/* ==========================================================
   Serenitarium — design system
   Calm "moonlit lake" theme: deep night-blue base, mist teal / lavender / moonlight accents.
   ========================================================== */

:root {
  --bg: #0a1220;
  --bg-2: #0e1829;
  --surface: #122036;
  --surface-2: #192a44;
  --line: rgba(220, 235, 255, .09);
  --line-strong: rgba(220, 235, 255, .18);
  --text: #eef4fb;
  --text-2: #c2cfdf;
  --muted: #8d9db3;
  --sun: #f1e3c2;      /* moonlight */
  --ember: #7fd3c6;    /* mist teal */
  --rose: #a99cf2;     /* lavender */
  --violet: #82aef5;   /* sky */
  --mint: #8fe3b8;
  --grad: linear-gradient(100deg, #a99cf2 0%, #82aef5 45%, #7fd3c6 100%);
  --grad-soft: linear-gradient(135deg, rgba(169, 156, 242, .14), rgba(127, 211, 198, .10));
  --radius: 22px;
  --radius-sm: 14px;
  --shadow: 0 20px 60px -20px rgba(0, 0, 0, .55);
  --gutter: clamp(16px, 4vw, 40px);
  --max: 1200px;
  --header-h: 68px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Manrope", "Inter", system-ui, sans-serif;
  --ease: cubic-bezier(.25, .8, .25, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.65 var(--font);
  overflow-x: clip;
  min-height: 100vh;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
body::before { /* faint grain + top glow on every page */
  content: "";
  position: fixed; inset: 0;
  pointer-events: none; z-index: -1;
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(127, 211, 198, .10), transparent 60%),
    radial-gradient(800px 600px at -10% 10%, rgba(130, 174, 245, .10), transparent 60%),
    var(--bg);
}
img, svg, video, canvas { max-width: 100%; display: block; }
a { color: inherit; text-decoration-color: rgba(241, 227, 194, .5); text-underline-offset: 3px; }
a:hover { color: var(--sun); }
:focus-visible { outline: 2px solid var(--sun); outline-offset: 3px; border-radius: 6px; }
::selection { background: rgba(127, 211, 198, .45); color: #fff; }
button, input, textarea, select { font: inherit; color: inherit; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.2em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 3rem 0; }

h1, h2, h3, h4 { font-family: var(--display); font-weight: 700; line-height: 1.12; letter-spacing: -.01em; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: clamp(2.2rem, 6vw, 4.6rem); font-weight: 800; letter-spacing: -.02em; }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.8rem); }
h3 { font-size: clamp(1.15rem, 1.8vw, 1.4rem); font-weight: 700; }
h4 { font-size: 1rem; }
.prose h2 { margin-top: 2.2em; }
.prose h3 { margin-top: 1.8em; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--sun); color: #111; padding: 8px 14px; border-radius: 8px; z-index: 200; }
.skip:focus { left: 8px; }

/* ---------- layout ---------- */
.wrap { width: 100%; max-width: calc(var(--max) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.wrap-narrow { max-width: calc(820px + var(--gutter) * 2); }
.section { padding-block: clamp(56px, 9vw, 120px); position: relative; }
.section-tight { padding-block: clamp(40px, 6vw, 72px); }
.section-alt { background: linear-gradient(180deg, transparent, rgba(255, 255, 255, .025) 20%, rgba(255, 255, 255, .025) 80%, transparent); }
.section-head { max-width: 760px; margin-bottom: clamp(28px, 4vw, 48px); }
.section-head.center { margin-inline: auto; text-align: center; }
.grid { display: grid; gap: clamp(14px, 2vw, 24px); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.split { display: grid; gap: clamp(28px, 5vw, 72px); align-items: center; grid-template-columns: 1fr; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; } .split.wide-left { grid-template-columns: 1.3fr 1fr; } }
.stack > * + * { margin-top: 1rem; }
.center { text-align: center; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 1rem; } .mt-2 { margin-top: 2rem; } .mt-3 { margin-top: 3rem; }
.mb-0 { margin-bottom: 0; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.row.center { justify-content: center; }

/* ---------- type helpers ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font: 600 .78rem/1 var(--font); letter-spacing: .14em; text-transform: uppercase;
  color: var(--sun); margin-bottom: 1rem;
}
.eyebrow::before { content: ""; width: 22px; height: 2px; border-radius: 2px; background: var(--grad); }
.lead { font-size: clamp(1.08rem, 1.6vw, 1.3rem); color: var(--text-2); line-height: 1.6; max-width: 62ch; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.prose { max-width: 72ch; }
.prose p, .prose li { color: var(--text-2); }
.prose strong { color: var(--text); }
.prose li + li { margin-top: .4em; }
.kbd { font: 600 .85em/1 ui-monospace, monospace; background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: 6px; padding: 3px 6px; }
.formula {
  font: 600 clamp(1rem, 2.4vw, 1.35rem)/1.4 var(--display);
  padding: 18px 22px; border-radius: var(--radius-sm);
  background: var(--surface); border: 1px solid var(--line);
  overflow-x: auto; text-align: center;
}

/* ---------- buttons ---------- */
.btn {
  --b: var(--surface-2);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 22px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--b);
  font: 600 .98rem/1 var(--font); color: var(--text); text-decoration: none;
  cursor: pointer; white-space: nowrap;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s, border-color .25s;
}
.btn:hover { color: var(--text); border-color: rgba(255, 255, 255, .35); transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn-glow { background: var(--grad) border-box; border-color: transparent; color: #0a1626; box-shadow: 0 10px 30px -10px rgba(127, 211, 198, .7); }
.btn-glow:hover { color: #0a1626; box-shadow: 0 16px 40px -10px rgba(127, 211, 198, .9); }
.btn-ghost { background: transparent; }
.btn-sm { min-height: 40px; padding: 9px 16px; font-size: .9rem; }
.btn svg { width: 18px; height: 18px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }
.link-arrow { font-weight: 600; text-decoration: none; display: inline-flex; gap: 6px; align-items: center; color: var(--sun); }
.link-arrow::after { content: "→"; transition: transform .25s var(--ease); }
.link-arrow:hover::after { transform: translateX(4px); }

/* ---------- header ---------- */
.energy { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 120; pointer-events: none; }
.energy span { display: block; height: 100%; width: 100%; background: var(--grad); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); box-shadow: 0 0 12px rgba(127, 211, 198, .8); }
.site-header {
  position: sticky; top: 0; z-index: 100; height: var(--header-h);
  background: rgba(10, 18, 32, .72);
  -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid transparent; transition: border-color .3s, background .3s;
}
.site-header.scrolled { border-bottom-color: var(--line); background: rgba(10, 18, 32, .86); }
.header-in { height: 100%; display: flex; align-items: center; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }
.brand:hover { color: var(--text); }
.brand .logo { width: 36px; height: 36px; transition: transform .5s var(--ease); }
.brand:hover .logo { transform: translateY(-2px) rotate(-4deg); }
.brand-name { font: 700 1.18rem/1 var(--display); letter-spacing: -.01em; }
.brand-name b { font-weight: 700; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.main-nav { margin-left: auto; display: none; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; }
.main-nav a { display: block; padding: 8px 11px; border-radius: 999px; text-decoration: none; font-size: .93rem; font-weight: 500; color: var(--text-2); transition: color .2s, background .2s; }
.main-nav a:hover { color: var(--text); background: rgba(255, 255, 255, .06); }
.main-nav a[aria-current="page"] { color: var(--text); background: rgba(127, 211, 198, .16); box-shadow: inset 0 0 0 1px rgba(127, 211, 198, .35); }
.header-cta { display: none; }
.burger { margin-left: auto; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--surface); display: grid; place-content: center; gap: 6px; cursor: pointer; }
.burger span { width: 20px; height: 2px; border-radius: 2px; background: var(--text); transition: transform .3s var(--ease); }
.burger[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }
@media (min-width: 1160px) {
  .main-nav { display: block; }
  .header-cta { display: inline-flex; }
  .burger { display: none; }
}
.menu {
  position: fixed; inset: var(--header-h) 0 0 0; z-index: 99;
  background: rgba(10, 18, 32, .97); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  padding: 24px var(--gutter) 40px; overflow-y: auto;
  display: flex; flex-direction: column; justify-content: space-between;
}
.menu[hidden] { display: none; }
.menu ul { list-style: none; margin: 0; padding: 0; }
.menu li { opacity: 0; transform: translateY(12px); animation: menuIn .5s var(--ease) forwards; }
.menu li:nth-child(n) { animation-delay: calc(var(--i, 0) * 40ms); }
.menu a { display: block; padding: 10px 0; font: 700 clamp(1.5rem, 6vw, 2.2rem)/1.15 var(--display); text-decoration: none; border-bottom: 1px solid var(--line); }
.menu a[aria-current="page"] { color: var(--sun); }
.menu-quote { color: var(--muted); font-style: italic; margin-top: 28px; }
@keyframes menuIn { to { opacity: 1; transform: none; } }
body.menu-open { overflow: hidden; }

/* ---------- heroes ---------- */
.hero { position: relative; min-height: calc(100svh - var(--header-h)); display: flex; align-items: center; overflow: hidden; isolation: isolate; padding-block: 60px 90px; }
.hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.hero::after { /* horizon glow */
  content: ""; position: absolute; left: 50%; bottom: -38vmax; width: 120vmax; height: 60vmax; translate: -50% 0; z-index: -2;
  background: radial-gradient(closest-side, rgba(127, 211, 198, .45), rgba(169, 156, 242, .18) 45%, transparent 70%);
  animation: breathe 12s ease-in-out infinite;
}
@keyframes breathe { 50% { transform: scale(1.06); opacity: .85; } }
.hero h1 { font-size: clamp(2.5rem, 8.4vw, 6.6rem); line-height: 1.02; margin-bottom: .35em; }
.hero .lead { margin-bottom: 2rem; }
.rotator { display: inline-grid; vertical-align: bottom; }
.rotator > span { grid-area: 1 / 1; opacity: 0; transform: translateY(.4em); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.rotator > span.on { opacity: 1; transform: none; }
.rotator > span.out { opacity: 0; transform: translateY(-.4em); }
.scroll-cue { position: absolute; left: 50%; bottom: 22px; translate: -50% 0; width: 26px; height: 42px; border: 2px solid var(--line-strong); border-radius: 14px; }
.scroll-cue::after { content: ""; position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; border-radius: 2px; background: var(--sun); translate: -50% 0; animation: cue 1.8s var(--ease) infinite; }
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

.page-hero { position: relative; padding-block: clamp(56px, 9vw, 110px) clamp(40px, 6vw, 70px); overflow: hidden; isolation: isolate; }
.page-hero::before {
  content: ""; position: absolute; inset: -40% -10% auto auto; width: min(780px, 120vw); aspect-ratio: 1; z-index: -1;
  background: conic-gradient(from 200deg, rgba(169, 156, 242, .0), rgba(169, 156, 242, .32), rgba(127, 211, 198, .32), rgba(241, 227, 194, .25), rgba(130, 174, 245, .2), rgba(169, 156, 242, 0));
  filter: blur(70px); border-radius: 50%; animation: spin 60s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.page-hero h1 { max-width: 16ch; }
.page-hero .lead { margin-top: .4rem; }
.crumbs { font-size: .85rem; color: var(--muted); margin-bottom: 1.2rem; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--sun); }

/* ---------- cards ---------- */
.card {
  --mx: 50%; --my: 0%;
  position: relative; border-radius: var(--radius); padding: clamp(20px, 2.4vw, 28px);
  background: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .015));
  border: 1px solid var(--line);
  transition: transform .35s var(--ease), border-color .35s, background .35s;
  overflow: hidden; isolation: isolate;
}
.card::before { /* cursor spotlight, positions set by JS */
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .35s;
  background: radial-gradient(420px circle at var(--mx) var(--my), rgba(127, 211, 198, .16), transparent 45%);
}
.card:hover::before { opacity: 1; }
.card:hover { border-color: rgba(127, 211, 198, .35); }
a.card { display: block; text-decoration: none; color: inherit; }
a.card:hover { transform: translateY(-4px); color: inherit; }
.card h3 { margin-bottom: .4em; }
.card p { color: var(--text-2); margin-bottom: 0; }
.card p + p { margin-top: .7em; }
.card .meta { color: var(--muted); font-size: .85rem; margin-bottom: .6em; display: block; }
.card .more { display: inline-block; margin-top: 1rem; color: var(--sun); font-weight: 600; font-size: .92rem; }
.card-icon {
  width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 18px;
  background: var(--grad-soft); border: 1px solid rgba(127, 211, 198, .3); font-size: 1.4rem; color: var(--sun);
}
.card-icon svg { width: 24px; height: 24px; }
.card-num { font: 800 2.6rem/1 var(--display); background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; margin-bottom: 12px; }
.card-feature { background: var(--grad-soft); border-color: rgba(127, 211, 198, .3); }

/* ---------- districts (home "map") ---------- */
.districts { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.district { min-height: 220px; display: flex; flex-direction: column; justify-content: flex-end; }
.district .d-art { position: absolute; inset: 0; z-index: -2; opacity: .55; transition: opacity .4s, transform .8s var(--ease); }
.district:hover .d-art { opacity: .85; transform: scale(1.04); }
.district .d-art svg { width: 100%; height: 100%; }
.district::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, transparent 20%, rgba(10, 18, 32, .92) 85%); }
.district .tag { align-self: flex-start; margin-bottom: auto; }
.district-big { grid-column: span 1; }
@media (min-width: 900px) { .district-big { grid-column: span 2; } }

/* ---------- tags / chips ---------- */
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; font-size: .76rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; background: rgba(255, 255, 255, .06); border: 1px solid var(--line-strong); color: var(--text-2); }
.tag-hot { background: rgba(127, 211, 198, .14); border-color: rgba(127, 211, 198, .4); color: #a8e6dc; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.chip { padding: 9px 16px; min-height: 40px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text-2); font-weight: 600; font-size: .9rem; cursor: pointer; transition: all .2s; }
.chip:hover { color: var(--text); border-color: rgba(255, 255, 255, .35); }
.chip[aria-pressed="true"] { background: var(--grad) border-box; color: #0a1626; border-color: transparent; }
.search { width: 100%; max-width: 420px; min-height: 48px; padding: 12px 18px 12px 44px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239a8fab' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 16px 50% / 18px; margin-bottom: 18px; }
.search:focus { outline: none; border-color: var(--ember); }
[data-filter-item][hidden] { display: none !important; }

/* ---------- quote blocks ---------- */
.big-quote { position: relative; margin: 0; padding: clamp(28px, 5vw, 56px); border-radius: calc(var(--radius) + 8px); background: var(--grad-soft); border: 1px solid rgba(127, 211, 198, .28); overflow: hidden; }
.big-quote::before { content: "“"; position: absolute; top: -.18em; left: .12em; font: 800 clamp(8rem, 18vw, 14rem)/1 var(--display); color: rgba(241, 227, 194, .12); pointer-events: none; }
.big-quote blockquote { margin: 0; font: 700 clamp(1.35rem, 3.2vw, 2.3rem)/1.3 var(--display); letter-spacing: -.01em; position: relative; text-wrap: balance; }
.big-quote figcaption { margin-top: 1.2rem; color: var(--sun); font-weight: 600; }
.big-quote .row { margin-top: 1.6rem; }
.pull { border-left: 3px solid var(--ember); padding: 4px 0 4px 20px; margin: 1.8em 0; font: 600 1.2rem/1.5 var(--font); color: var(--text); }
.pull cite { display: block; margin-top: .4em; font-style: normal; color: var(--muted); font-size: .9rem; font-weight: 500; }

/* ---------- callouts ---------- */
.callout { padding: 18px 20px; border-radius: var(--radius-sm); background: rgba(130, 174, 245, .09); border: 1px solid rgba(130, 174, 245, .3); margin: 1.6em 0; }
.callout p:last-child { margin-bottom: 0; }
.callout strong:first-child { color: #bcd3fb; }
.callout-warm { background: rgba(127, 211, 198, .09); border-color: rgba(127, 211, 198, .3); }
.callout-warm strong:first-child { color: #a8e6dc; }
.callout-care { background: rgba(62, 230, 176, .08); border-color: rgba(62, 230, 176, .3); }
.callout-care strong:first-child { color: var(--mint); }

/* ---------- article layout with sticky TOC ---------- */
.article { display: grid; gap: 40px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1024px) { .article { grid-template-columns: 240px minmax(0, 1fr); gap: 64px; } }
.toc { display: none; }
@media (min-width: 1024px) {
  .toc { display: block; position: sticky; top: calc(var(--header-h) + 24px); align-self: start; max-height: calc(100vh - var(--header-h) - 48px); overflow: auto; }
}
.toc p { font: 600 .75rem/1 var(--font); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.toc ol { list-style: none; padding: 0; margin: 0; border-left: 1px solid var(--line); }
.toc a { display: block; padding: 7px 0 7px 16px; margin-left: -1px; border-left: 2px solid transparent; text-decoration: none; color: var(--muted); font-size: .9rem; line-height: 1.35; transition: color .2s, border-color .2s; }
.toc a:hover { color: var(--text); }
.toc a.active { color: var(--text); border-left-color: var(--ember); }
.article-body > section + section { margin-top: clamp(48px, 7vw, 88px); }

/* ---------- timeline ---------- */
.timeline { position: relative; list-style: none; padding: 0; margin: 0; }
.timeline::before { content: ""; position: absolute; left: 11px; top: 6px; bottom: 6px; width: 2px; background: linear-gradient(var(--rose), var(--ember), var(--sun), var(--violet)); border-radius: 2px; opacity: .6; }
.timeline > li { position: relative; padding: 0 0 clamp(26px, 4vw, 40px) 48px; }
.timeline > li::before { content: ""; position: absolute; left: 4px; top: 6px; width: 16px; height: 16px; border-radius: 50%; background: var(--bg); border: 3px solid var(--ember); box-shadow: 0 0 0 5px rgba(127, 211, 198, .14); transition: background .3s, box-shadow .3s; }
.timeline > li.in::before { background: var(--sun); box-shadow: 0 0 0 6px rgba(241, 227, 194, .18), 0 0 20px rgba(241, 227, 194, .6); }
.timeline .when { font: 700 .9rem/1 var(--display); color: var(--sun); letter-spacing: .02em; display: block; margin-bottom: .55em; }
.timeline h3 { margin-bottom: .35em; }
.timeline p { color: var(--text-2); margin: 0; max-width: 68ch; }
.era { font: 800 clamp(1.1rem, 2vw, 1.3rem)/1 var(--display); color: var(--text); margin: 0 0 22px 48px; padding-top: 10px; }
.era span { color: var(--muted); font-weight: 500; font-family: var(--font); font-size: .9rem; margin-left: 10px; }
@media (min-width: 900px) {
  .timeline::before { left: 50%; translate: -1px 0; }
  .timeline > li { width: 50%; padding-left: 0; padding-right: 48px; text-align: right; }
  .timeline > li::before { left: auto; right: -8px; }
  .timeline > li:nth-child(even) { margin-left: 50%; padding-right: 0; padding-left: 48px; text-align: left; }
  .timeline > li:nth-child(even)::before { right: auto; left: -8px; }
  .timeline > li p { margin-left: auto; }
  .timeline > li:nth-child(even) p { margin-left: 0; }
  .era { text-align: center; margin-left: 0; }
}

/* ---------- accordions / FAQ ---------- */
.acc { border: 1px solid var(--line); border-radius: var(--radius-sm); background: rgba(255, 255, 255, .02); transition: border-color .3s, background .3s; }
.acc + .acc { margin-top: 10px; }
.acc[open] { border-color: rgba(127, 211, 198, .35); background: rgba(255, 255, 255, .035); }
.acc summary { list-style: none; cursor: pointer; padding: 18px 56px 18px 20px; position: relative; font-weight: 600; font-size: 1.04rem; }
.acc summary::-webkit-details-marker { display: none; }
.acc summary::after { content: "+"; position: absolute; right: 18px; top: 50%; translate: 0 -50%; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--sun); font-size: 1.2rem; transition: transform .3s var(--ease); }
.acc[open] summary::after { transform: rotate(45deg); }
.acc .acc-body { padding: 0 20px 20px; color: var(--text-2); }
.acc .acc-body p:last-child { margin-bottom: 0; }
.acc summary small { display: block; color: var(--muted); font-weight: 500; font-size: .86rem; margin-top: 2px; }

/* ---------- stats ---------- */
.stats { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.stat { padding: 22px; border-radius: var(--radius); border: 1px solid var(--line); background: rgba(255, 255, 255, .025); }
.stat b { display: block; font: 800 clamp(2rem, 4.4vw, 3rem)/1 var(--display); background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; margin-bottom: 8px; }
.stat span { color: var(--text-2); font-size: .94rem; }
.stat small { display: block; color: var(--muted); font-size: .78rem; margin-top: 8px; }

/* ---------- marquee ---------- */
.marquee { overflow: hidden; border-block: 1px solid var(--line); padding-block: 18px; -webkit-mask: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-track { display: flex; gap: 40px; width: max-content; animation: marquee 70s linear infinite; }
.marquee-track span { font: 700 clamp(1.1rem, 2.4vw, 1.6rem)/1 var(--display); color: var(--muted); white-space: nowrap; display: inline-flex; align-items: center; gap: 40px; }
.marquee-track span::after { content: "✦"; color: var(--ember); font-size: .7em; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius-sm); border: 1px solid var(--line); margin: 1.6em 0; }
table { width: 100%; border-collapse: collapse; font-size: .95rem; min-width: 540px; }
th, td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 600; color: var(--text); background: rgba(255, 255, 255, .03); }
td { color: var(--text-2); }
tr:last-child td { border-bottom: 0; }

/* ---------- forms ---------- */
.form { display: grid; gap: 18px; }
.field { display: grid; gap: 8px; }
.field label { font-weight: 600; font-size: .92rem; }
.field input, .field textarea, .field select {
  width: 100%; min-height: 50px; padding: 13px 16px; border-radius: var(--radius-sm);
  background: var(--surface); border: 1px solid var(--line-strong); color: var(--text);
  transition: border-color .2s, box-shadow .2s; font-size: 16px; /* 16px stops iOS zoom */
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--ember); box-shadow: 0 0 0 4px rgba(127, 211, 198, .18); }
.field .hint { color: var(--muted); font-size: .84rem; }
.field-row { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; color: var(--text-2); }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--ember); flex-shrink: 0; }
.form-status { min-height: 1.5em; font-weight: 600; }
.form-status.ok { color: var(--mint); }
.form-status.err { color: #ff8a8a; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
input[type="range"] { width: 100%; accent-color: var(--ember); min-height: 32px; }

/* ---------- tool panels (used by tools / quiz pages) ---------- */
.panel { border-radius: calc(var(--radius) + 4px); border: 1px solid var(--line-strong); background: linear-gradient(180deg, var(--surface), var(--bg-2)); padding: clamp(20px, 3.4vw, 40px); box-shadow: var(--shadow); }
.panel h3 { margin-bottom: .3em; }
.dial { font: 800 clamp(3.4rem, 12vw, 7rem)/1 var(--display); letter-spacing: -.03em; text-align: center; font-variant-numeric: tabular-nums; }
.ring { width: min(260px, 70vw); aspect-ratio: 1; margin: 10px auto 24px; position: relative; display: grid; place-items: center; }
.ring svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 8; }
.ring .track { stroke: rgba(255, 255, 255, .08); }
.ring .bar { stroke: url(#ringGrad); stroke-linecap: round; transition: stroke-dashoffset .3s linear; }
.progress { height: 10px; border-radius: 999px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.progress > span { display: block; height: 100%; width: 0; background: var(--grad); border-radius: inherit; transition: width .5s var(--ease); }
.options { display: grid; gap: 10px; }
.option { text-align: left; padding: 15px 18px; min-height: 52px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: var(--surface); cursor: pointer; font-weight: 500; transition: all .2s; }
.option:hover { border-color: var(--ember); background: var(--surface-2); }
.option[aria-pressed="true"] { border-color: var(--sun); background: rgba(241, 227, 194, .12); }

/* ---------- people (speakers) ---------- */
.person { display: flex; flex-direction: column; }
.avatar { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font: 800 1.25rem/1 var(--display); color: #0a1626; margin-bottom: 16px; background: var(--grad); flex-shrink: 0; box-shadow: 0 8px 24px -8px rgba(127, 211, 198, .6); }
.person .known { color: var(--sun); font-size: .9rem; font-weight: 600; margin-bottom: .6em; }
.person .links { margin-top: auto; padding-top: 16px; display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- toast ---------- */
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); translate: -50% 20px; opacity: 0; z-index: 300; background: var(--surface-2); border: 1px solid var(--line-strong); padding: 12px 20px; border-radius: 999px; font-weight: 600; box-shadow: var(--shadow); transition: all .35s var(--ease); pointer-events: none; max-width: calc(100vw - 32px); }
.toast.show { translate: -50% 0; opacity: 1; }

/* ---------- CTA band ---------- */
.cta-band { position: relative; border-radius: calc(var(--radius) + 12px); padding: clamp(32px, 6vw, 72px); overflow: hidden; isolation: isolate; text-align: center; border: 1px solid rgba(127, 211, 198, .3); }
.cta-band::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(600px 300px at 50% 120%, rgba(127, 211, 198, .5), transparent 70%), radial-gradient(500px 260px at 0% 0%, rgba(169, 156, 242, .25), transparent 70%), var(--bg-2); }
.cta-band h2 { max-width: 20ch; margin-inline: auto; }
.cta-band .lead { margin-inline: auto; margin-bottom: 1.8rem; }

/* ---------- footer ---------- */
.site-footer { margin-top: clamp(40px, 6vw, 80px); border-top: 1px solid var(--line); padding-block: 56px 32px; background: linear-gradient(180deg, transparent, rgba(127, 211, 198, .04)); }
.footer-top { display: grid; gap: 40px; grid-template-columns: 1fr; }
@media (min-width: 820px) { .footer-top { grid-template-columns: 1.1fr 1.6fr; } }
.footer-brand p { color: var(--muted); max-width: 38ch; margin-top: 16px; }
.footer-cols { display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.footer-cols h3 { font: 600 .78rem/1 var(--font); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.footer-cols ul { list-style: none; padding: 0; margin: 0; }
.footer-cols li + li { margin-top: 8px; }
.footer-cols a { text-decoration: none; color: var(--text-2); }
.footer-cols a:hover { color: var(--sun); }
.footer-bottom { margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; color: var(--muted); font-size: .86rem; }
.footer-bottom p { margin: 0; }
.footer-bottom a { color: var(--muted); }

/* ---------- reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity 1.2s var(--ease), transform 1.2s var(--ease); transition-delay: var(--d, 0ms); }
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
}
@media print {
  .site-header, .energy, .menu, .site-footer, canvas { display: none !important; }
  body { background: #fff; color: #000; }
}

/* ---------- breathing orb (hero + tools) ---------- */
.breath { position: relative; width: min(340px, 78vw); aspect-ratio: 1; display: grid; place-items: center; margin-inline: auto; }
.breath-orb { position: absolute; inset: 14%; border-radius: 50%;
  background: radial-gradient(circle at 40% 34%, rgba(251, 243, 223, .95), rgba(251, 243, 223, 0) 48%), radial-gradient(circle, rgba(169, 156, 242, .75), rgba(130, 174, 245, .5) 50%, rgba(127, 211, 198, .35) 70.7%);
  box-shadow: 0 0 80px rgba(127, 211, 198, .35), 0 0 160px rgba(169, 156, 242, .25);
  transform: scale(.72); transition: transform var(--ms, 4000ms) cubic-bezier(.45, 0, .55, 1); }
.breath::before, .breath::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 1px solid rgba(220, 235, 255, .14); }
.breath::after { inset: 8%; border-color: rgba(220, 235, 255, .08); }
.breath[data-phase="in"] .breath-orb, .breath[data-phase="hold"] .breath-orb { transform: scale(1); }
.breath[data-phase="out"] .breath-orb { transform: scale(.72); }
.breath b { position: relative; font: 600 1.05rem/1 var(--display); letter-spacing: .08em; text-transform: uppercase; color: #0a1626; }
@media (prefers-reduced-motion: reduce) { .breath-orb { transform: scale(.86); } }

/* ---------- calm waves at the bottom of the hero ---------- */
.waves { position: absolute; left: 0; right: 0; bottom: 0; height: 160px; z-index: -1; pointer-events: none; overflow: hidden; }
.waves svg { position: absolute; bottom: 0; left: 0; width: 200%; max-width: none; height: 100%; }
.waves .w1 { animation: drift 38s linear infinite; opacity: .28; }
.waves .w2 { animation: drift 56s linear infinite reverse; opacity: .2; }
.waves .w3 { animation: drift 80s linear infinite; opacity: .14; }
@keyframes drift { to { transform: translateX(-50%); } }
.hero-grid { display: grid; gap: 40px; align-items: center; grid-template-columns: 1fr; }
@media (min-width: 960px) { .hero-grid { grid-template-columns: 1.25fr 1fr; } }

.hero-grid h1 { font-size: clamp(2.4rem, 5.6vw, 4.8rem); }
