/* ============================================================
   TALK LOUDER — DrupalCon Rotterdam 2026 keynote, retold
   Calm, editorial design system. Dusty blue + sage on paper/ink.
   ============================================================ */

:root {
  --radius: 14px;
  --maxw: 1180px;
  --gutter: clamp(18px, 4vw, 44px);
  --font-display: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-body: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

/* ---------- LIGHT (paper) ---------- */
:root, [data-theme="light"] {
  --bg: #F4F3EF;
  --bg-alt: #ECEAE4;
  --surface: #FBFAF7;
  --surface-2: #F0EEE7;
  --ink: #22262E;
  --ink-2: #4E5665;
  --ink-3: #828A98;
  --line: rgba(34, 38, 46, .16);
  --line-soft: rgba(34, 38, 46, .08);
  --accent: #3E6390;          /* dusty blue */
  --accent-strong: #2C4C74;
  --accent-soft: rgba(62, 99, 144, .12);
  --sage: #66815F;
  --sage-soft: rgba(102, 129, 95, .14);
  --clay: #A2705F;            /* restrained warm warning */
  --link: #33597F;
  --code-bg: #20242C;
  --code-ink: #D6DAE2;
  --diag-bg: #FBFAF7;
  --quote-bg: #23272F;
  --quote-ink: #EDEBE3;
  --shadow: 0 8px 24px rgba(34, 38, 46, .07);
  --shadow-lg: 0 18px 48px rgba(34, 38, 46, .12);
  --chip-bg: rgba(34, 38, 46, .05);
  --hero-arch-1: rgba(62, 99, 144, .10);
  --hero-arch-2: rgba(102, 129, 95, .12);
  --hero-arch-3: rgba(162, 112, 95, .10);
  --toc-active: rgba(62, 99, 144, .10);
  color-scheme: light;
}

/* ---------- DARK (ink) ---------- */
[data-theme="dark"] {
  --bg: #101317;
  --bg-alt: #0C0F12;
  --surface: #171B21;
  --surface-2: #1D222A;
  --ink: #E4E2DA;
  --ink-2: #AEB5C0;
  --ink-3: #79818F;
  --line: rgba(228, 226, 218, .16);
  --line-soft: rgba(228, 226, 218, .08);
  --accent: #9DB9DC;          /* pale dusty blue */
  --accent-strong: #C2D6EE;
  --accent-soft: rgba(157, 185, 220, .14);
  --sage: #A4BC9B;
  --sage-soft: rgba(164, 188, 155, .14);
  --clay: #C79A8C;
  --link: #A6C0DF;
  --code-bg: #0C0F13;
  --code-ink: #C9CFDA;
  --diag-bg: #14181E;
  --quote-bg: #161B22;
  --quote-ink: #EDEBE3;
  --shadow: 0 8px 24px rgba(0, 0, 0, .3);
  --shadow-lg: 0 18px 48px rgba(0, 0, 0, .45);
  --chip-bg: rgba(228, 226, 218, .07);
  --hero-arch-1: rgba(157, 185, 220, .08);
  --hero-arch-2: rgba(164, 188, 155, .08);
  --hero-arch-3: rgba(199, 154, 140, .07);
  --toc-active: rgba(157, 185, 220, .12);
  color-scheme: dark;
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  transition: background .35s ease, color .35s ease;
}
img, svg { max-width: 100%; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
strong { font-weight: 700; }
::selection { background: var(--accent-soft); color: var(--accent-strong); }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 820px; }

.skip-link { position: absolute; left: -9999px; top: 0; z-index: 999; background: var(--accent); color: var(--bg); padding: 10px 16px; font-weight: 700; border-radius: 0 0 10px 0; }
.skip-link:focus { left: 0; }

#progress { position: fixed; top: 0; left: 0; height: 2px; width: 0%; background: var(--accent); opacity: .75; z-index: 200; transition: width .1s linear; }

/* ---------- header ---------- */
.site-head {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-soft);
}
@supports not (background: color-mix(in srgb, red 50%, blue)) {
  .site-head { background: var(--bg); }
}
.head-row { display: flex; align-items: center; gap: 14px; height: 62px; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: .04em; color: var(--ink); font-size: 15px; text-transform: uppercase; }
.brand:hover { text-decoration: none; }
.brand .drop { width: 25px; height: 25px; flex: none; }
.brand small { display: block; font-size: 10px; font-weight: 600; letter-spacing: .14em; color: var(--ink-3); }
.head-nav { margin-left: auto; }
.head-nav > ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; align-items: center; }
.head-nav a, .head-nav .dropbtn { display: inline-block; padding: 8px 12px; border-radius: 9px; color: var(--ink-2); font-weight: 600; font-size: 14px; cursor: pointer; border: 0; background: none; font-family: inherit; }
.head-nav a:hover, .head-nav .dropbtn:hover, .head-nav a[aria-current="page"] { color: var(--ink); background: var(--chip-bg); text-decoration: none; }
.head-nav a[aria-current="page"] { color: var(--accent); }

.dropdown { position: relative; }
.dropdown .caret { font-size: 10px; margin-left: 4px; }
.dropmenu { position: absolute; top: calc(100% + 8px); left: 0; min-width: 280px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 8px; list-style: none; margin: 0; opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .18s ease, transform .18s ease, visibility .18s; }
.dropdown.open .dropmenu, .dropdown:focus-within .dropmenu { opacity: 1; visibility: visible; transform: none; }
.dropmenu a { display: block; padding: 9px 12px; border-radius: 9px; }
.dropmenu a small { display: block; color: var(--ink-3); font-weight: 500; font-size: 12px; }

.theme-btn { margin-left: 10px; width: 40px; height: 40px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); display: grid; place-items: center; cursor: pointer; flex: none; transition: transform .2s ease; }
.theme-btn:hover { transform: rotate(12deg) scale(1.04); }
.theme-btn svg { width: 18px; height: 18px; }
[data-theme="light"] .icon-sun { display: none; }
[data-theme="dark"] .icon-moon { display: none; }

.burger { display: none; margin-left: auto; width: 42px; height: 42px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; flex-direction: column; align-items: center; justify-content: center; gap: 5px; }
.burger span { width: 18px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .25s ease, opacity .2s; }
body.nav-open .burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.nav-open .burger span:nth-child(2) { opacity: 0; }
body.nav-open .burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-drawer { position: fixed; inset: 62px 0 0 0; z-index: 90; background: var(--bg); padding: 24px var(--gutter) 60px; overflow-y: auto; transform: translateX(100%); transition: transform .3s cubic-bezier(.4, 0, .2, 1); }
body.nav-open .mobile-drawer { transform: none; }
.mobile-drawer h4 { margin: 26px 0 8px; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); }
.mobile-drawer a { display: flex; align-items: baseline; gap: 12px; padding: 12px 10px; border-radius: 12px; color: var(--ink); font-weight: 650; font-size: 17px; }
.mobile-drawer a:hover { background: var(--chip-bg); text-decoration: none; }
.mobile-drawer a[aria-current="page"] { color: var(--accent); }
.mobile-drawer .idx { font-family: var(--font-mono); font-size: 12px; color: var(--ink-3); min-width: 30px; }

@media (max-width: 960px) { .head-nav { display: none; } .burger { display: flex; } }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; padding: clamp(56px, 9vw, 110px) 0 clamp(48px, 7vw, 90px); border-bottom: 1px solid var(--line-soft); }
.hero .arches { position: absolute; inset: auto 0 -2px 0; height: 72%; pointer-events: none; }
.hero-inner { position: relative; z-index: 2; }
.kicker { display: inline-flex; align-items: center; gap: 10px; font-size: 12.5px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-2); padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.kicker .dot-acid { width: 8px; height: 8px; border-radius: 50%; background: var(--sage); flex: none; }
.hero h1 { margin: 22px 0 18px; font-family: var(--font-display); font-size: clamp(42px, 7.2vw, 92px); line-height: .98; font-weight: 900; letter-spacing: -.02em; text-transform: uppercase; }
.hero h1 .acid { color: var(--accent); }
.hero h1 .outline { color: transparent; -webkit-text-stroke: 2px var(--ink); }
@supports not (-webkit-text-stroke: 1px black) { .hero h1 .outline { color: var(--ink); } }
.hero .lede { max-width: 640px; font-size: clamp(17px, 2.1vw, 21px); color: var(--ink-2); }
.hero .meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.badge { display: inline-flex; align-items: center; gap: 8px; background: var(--chip-bg); border: 1px solid var(--line-soft); padding: 8px 14px; border-radius: 999px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.badge b { color: var(--ink); }

.chapter-hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line-soft); padding: clamp(44px, 7vw, 84px) 0 clamp(34px, 5vw, 60px); }
.chapter-num { font-family: var(--font-mono); font-weight: 700; font-size: 13px; letter-spacing: .2em; color: var(--accent); text-transform: uppercase; display: flex; align-items: center; gap: 12px; }
.chapter-num::after { content: ""; height: 1px; width: 70px; background: var(--line); }
.chapter-hero h1 { margin: 16px 0 14px; font-family: var(--font-display); font-weight: 900; font-size: clamp(34px, 5.4vw, 66px); line-height: 1.02; letter-spacing: -.015em; text-transform: uppercase; }
.chapter-hero h1[data-reveal] { clip-path: inset(0 0 100% 0); transform: none; opacity: 1; transition: clip-path 1s cubic-bezier(.3, .7, .2, 1) .1s; }
.chapter-hero h1[data-reveal].revealed { clip-path: inset(0 0 -12% 0); }
.chapter-hero .lede { max-width: 720px; color: var(--ink-2); font-size: clamp(16px, 1.9vw, 19.5px); }

/* ---------- sections ---------- */
section.block { padding: clamp(46px, 6.5vw, 84px) 0; }
section.block + section.block { border-top: 1px solid var(--line-soft); }
.block-head { max-width: 760px; margin-bottom: clamp(28px, 4vw, 44px); }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 14px; font-size: 12.5px; font-weight: 750; letter-spacing: .18em; text-transform: uppercase; color: var(--accent); }
.eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--accent); }
h2.sec-title { margin: 0 0 14px; font-family: var(--font-display); font-weight: 850; font-size: clamp(27px, 3.6vw, 42px); line-height: 1.08; letter-spacing: -.01em; }
h2.sec-title[data-reveal] { clip-path: inset(0 0 100% 0); transform: none; opacity: 1; transition: clip-path .9s cubic-bezier(.3, .7, .2, 1); }
h2.sec-title[data-reveal].revealed { clip-path: inset(0 0 -12% 0); }
.sec-sub { color: var(--ink-2); font-size: 17.5px; max-width: 680px; }

.prose { max-width: 760px; }
.prose p { margin: 0 0 1.15em; }

.card-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.card { position: relative; background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 26px 24px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px; transition: transform .25s ease, border-color .25s ease; }
.card:hover { transform: translateY(-4px); border-color: var(--line); text-decoration: none; }
.card .num { font-family: var(--font-mono); font-size: 12px; font-weight: 700; color: var(--accent); letter-spacing: .14em; }
.card h3 { margin: 0; font-size: 20px; font-weight: 800; color: var(--ink); letter-spacing: -.01em; }
.card p { margin: 0; color: var(--ink-2); font-size: 15px; }
.card .arrow { margin-top: auto; font-weight: 700; color: var(--accent); font-size: 14px; }
a.card { color: inherit; }

.stat-band { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.stat { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 22px 22px 18px; }
.stat .v { font-family: var(--font-display); font-size: clamp(30px, 3.4vw, 44px); font-weight: 900; letter-spacing: -.02em; color: var(--accent); line-height: 1; }
.stat .l { margin-top: 8px; font-size: 13.5px; color: var(--ink-2); font-weight: 600; }

/* ---------- stage quotes ---------- */
.stage { position: relative; margin: clamp(36px, 5vw, 60px) 0; background: var(--quote-bg); color: var(--quote-ink); border-radius: var(--radius); padding: clamp(26px, 4vw, 44px); box-shadow: var(--shadow-lg); overflow: hidden; }
.stage::before { content: ""; position: absolute; inset: 0; background: radial-gradient(560px 260px at 88% -40%, rgba(157, 185, 220, .10), transparent 60%); pointer-events: none; }
.stage .mic { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 16px; font-size: 12px; font-weight: 750; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
[data-theme="light"] .stage .mic { color: #A9C1E0; }
.stage .mic svg { width: 15px; height: 15px; }
.stage blockquote { margin: 0; }
.stage blockquote p { margin: 0 0 .8em; font-size: clamp(17.5px, 2.2vw, 21.5px); line-height: 1.5; font-weight: 550; }
.stage blockquote p:last-child { margin-bottom: 0; }
.stage .who { margin-top: 18px; font-size: 13.5px; color: rgba(237, 235, 227, .62); font-weight: 600; }
.stage .who b { color: var(--accent); }
[data-theme="light"] .stage .who b { color: #A9C1E0; }
.stage--dries { border-left: 4px solid var(--accent); }
.stage--sean { border-left: 4px solid var(--sage); }
.stage--sean .mic { color: var(--sage); }
.stage--sean::before { background: radial-gradient(560px 260px at 88% -40%, rgba(164, 188, 155, .12), transparent 60%); }

/* ---------- journey ---------- */
.journey { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.jcard { display: flex; gap: 16px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 20px; color: inherit; transition: transform .22s ease, border-color .22s ease; }
.jcard:hover { transform: translateY(-3px); border-color: var(--accent); text-decoration: none; }
.jcard .jn { flex: none; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--chip-bg); font-family: var(--font-mono); font-weight: 700; font-size: 14px; color: var(--accent); }
.jcard h3 { margin: 0 0 4px; font-size: 16.5px; font-weight: 800; color: var(--ink); }
.jcard p { margin: 0; font-size: 13.8px; color: var(--ink-2); }

/* ---------- tutorial layout ---------- */
.tutorial-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: clamp(28px, 4vw, 56px); align-items: start; }
@media (max-width: 1020px) { .tutorial-layout { grid-template-columns: 1fr; } }
.toc { position: sticky; top: 84px; max-height: calc(100vh - 110px); overflow-y: auto; font-size: 13.5px; border-left: 1px solid var(--line); padding-left: 18px; }
.toc-title { font-size: 11.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); font-weight: 750; margin-bottom: 10px; }
.toc a { display: block; padding: 5px 8px; margin: 1px 0; border-radius: 7px; color: var(--ink-2); line-height: 1.4; }
.toc a:hover { background: var(--chip-bg); text-decoration: none; }
.toc a.active { background: var(--toc-active); color: var(--accent); font-weight: 700; }
.toc a.toc-h3 { padding-left: 20px; font-size: 12.5px; }
@media (max-width: 1020px) { .toc { display: none; } }

.tutorial-body { min-width: 0; }
.tutorial-body h2.doc-title { font-family: var(--font-display); font-size: clamp(24px, 3.2vw, 34px); font-weight: 850; line-height: 1.15; letter-spacing: -.01em; margin: 0 0 .8em; padding: .6em .8em; background: var(--surface-2); border-radius: 12px; border-left: 4px solid var(--accent); }
.tutorial-body h3 { margin: 2.2em 0 .7em; font-family: var(--font-display); font-size: clamp(21px, 2.6vw, 26px); font-weight: 820; letter-spacing: -.01em; scroll-margin-top: 90px; display: flex; align-items: baseline; gap: 12px; }
.tutorial-body h3::before { content: ""; flex: none; width: 10px; height: 10px; border-radius: 3px; background: var(--accent); transform: translateY(-1px) rotate(45deg); opacity: .8; }
.tutorial-body h4 { margin: 1.7em 0 .55em; font-size: 18px; font-weight: 780; scroll-margin-top: 90px; }
.tutorial-body h5 { margin: 1.4em 0 .5em; font-size: 15px; font-weight: 750; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); }
.tutorial-body p { margin: 0 0 1.1em; }
.tutorial-body ul.md-list, .tutorial-body ol.md-list { padding-left: 1.35em; margin: 0 0 1.2em; }
.tutorial-body .md-list li { margin-bottom: .5em; }
.tutorial-body .md-list .md-list { margin: .5em 0 .2em; }
.tutorial-body hr.md-hr { border: 0; border-top: 1px dashed var(--line); margin: clamp(30px, 4vw, 48px) 0; }
.tutorial-body blockquote.md-quote { margin: 1.4em 0; padding: 16px 22px; border-left: 4px solid var(--sage); background: var(--surface-2); border-radius: 0 12px 12px 0; color: var(--ink-2); font-weight: 550; }
.tutorial-body code { font-family: var(--font-mono); font-size: .86em; background: var(--chip-bg); border: 1px solid var(--line-soft); padding: .12em .4em; border-radius: 6px; }

/* lists build up */
.md-list li { opacity: 0; transform: translateY(8px); transition: opacity .5s ease, transform .5s ease; }
.md-list.on li { opacity: 1; transform: none; }
.md-list.on li:nth-child(1) { transition-delay: .05s; } .md-list.on li:nth-child(2) { transition-delay: .13s; }
.md-list.on li:nth-child(3) { transition-delay: .21s; } .md-list.on li:nth-child(4) { transition-delay: .29s; }
.md-list.on li:nth-child(5) { transition-delay: .37s; } .md-list.on li:nth-child(6) { transition-delay: .45s; }
.md-list.on li:nth-child(7) { transition-delay: .53s; } .md-list.on li:nth-child(n+8) { transition-delay: .6s; }

/* tables */
.tablewrap { margin: 1.4em 0; border: 1px solid var(--line); border-radius: 12px; overflow: auto; }
.tablewrap table { border-collapse: collapse; width: 100%; font-size: 14.5px; min-width: 560px; }
.tablewrap th { text-align: left; font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; background: var(--surface-2); color: var(--ink-2); padding: 11px 15px; border-bottom: 1px solid var(--line); }
.tablewrap td { padding: 11px 15px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.tablewrap tr:last-child td { border-bottom: 0; }
.tablewrap tbody tr:hover { background: var(--chip-bg); }

/* ---------- code & terminal figures ---------- */
.codewrap { position: relative; margin: 1.6em 0; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); background: var(--code-bg); }
.codewrap figcaption { display: flex; align-items: center; gap: 8px; padding: 9px 14px; background: color-mix(in srgb, var(--code-bg) 88%, white 12%); border-bottom: 1px solid rgba(255,255,255,.08); }
.codewrap .dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.18); }
.codewrap .cw-label { margin-left: 6px; font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.45); }
.codewrap pre { margin: 0; padding: 18px 20px; overflow-x: auto; font-family: var(--font-mono); font-size: 13px; line-height: 1.6; tab-size: 4; color: var(--code-ink); background: var(--code-bg); }
.codewrap code { background: none; border: 0; padding: 0; font-size: inherit; color: inherit; }
.codewrap.is-diagram pre { color: #C4CAD4; }
.copy-btn { position: absolute; top: 6px; right: 10px; z-index: 2; font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: .08em; background: rgba(255,255,255,.08); color: rgba(255,255,255,.6); border: 1px solid rgba(255,255,255,.14); border-radius: 7px; padding: 5px 11px; cursor: pointer; opacity: 0; transition: opacity .2s, transform .15s; }
.codewrap:hover .copy-btn, .copy-btn:focus-visible { opacity: 1; }
@media (hover: none) { .copy-btn { opacity: 1; } }
.copy-btn.copied { background: var(--accent); color: var(--bg); border-color: var(--accent); opacity: 1; }

/* terminals build up line by line */
.codewrap pre code .tl { display: block; opacity: 0; transform: translateY(4px); transition: opacity .4s ease, transform .4s ease; transition-delay: calc(var(--i) * 45ms); white-space: pre; }
.codewrap.on pre code .tl { opacity: 1; transform: none; }

.scroll-x { scrollbar-width: thin; }
.scroll-x::-webkit-scrollbar { height: 8px; }
.scroll-x::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }

/* ============================================================
   THE DIAGRAM ENGINE — restrained animated visualizations
   ============================================================ */
.vizwrap { margin: 1.8em 0; }
.viz { background: var(--diag-bg); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: clamp(18px, 3vw, 30px); box-shadow: var(--shadow); }
.viz .vz-cap { font-family: var(--font-mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.viz .vz-cap::before { content: ""; width: 18px; height: 1px; background: var(--ink-3); }

/* build-up primitives */
.vz-a { opacity: 0; transform: translateY(10px); transition: opacity .55s ease, transform .55s cubic-bezier(.25, .7, .3, 1); transition-delay: calc(var(--i, 0) * 90ms); }
.viz.on .vz-a { opacity: 1; transform: none; }

/* vertical connector with draw animation */
.vz-vlink { position: relative; height: 30px; width: 1px; margin: 2px auto; background: var(--line); overflow: visible; }
.vz-vlink::after { content: ""; position: absolute; left: -3.5px; bottom: 0; width: 8px; height: 8px; border-right: 1px solid var(--ink-3); border-bottom: 1px solid var(--ink-3); transform: rotate(45deg); }
.vz-vlink::before { content: ""; position: absolute; inset: 0; background: var(--ink-3); transform: scaleY(0); transform-origin: top; transition: transform .5s ease calc(var(--i, 0) * 90ms); }
.viz.on .vz-vlink::before { transform: scaleY(1); }
.vz-vlink .vlab { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-size: 12px; color: var(--ink-3); white-space: nowrap; font-family: var(--font-mono); }
@media (max-width: 640px) { .vz-vlink .vlab { white-space: normal; width: 70vw; } }

/* nodes */
.vz-node { border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 12px 16px; max-width: 640px; margin: 0 auto; }
.vz-node .t { font-weight: 750; font-size: 14.5px; }
.vz-node .s { font-size: 12.8px; color: var(--ink-2); margin-top: 4px; }
.vz-node .s li { margin: 2px 0; }
.vz-node.accent { border-color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
.vz-node.sage { border-color: var(--sage); box-shadow: inset 3px 0 0 var(--sage); }

/* horizontal flow */
.vz-flowh { display: flex; align-items: stretch; gap: 0; flex-wrap: wrap; justify-content: center; }
.vz-flowh .vz-node { margin: 0; max-width: 220px; flex: 1 1 150px; display: flex; flex-direction: column; justify-content: center; text-align: center; }
.vz-hlink { flex: 0 0 34px; align-self: center; height: 1px; background: var(--line); position: relative; }
.vz-hlink::after { content: ""; position: absolute; right: 0; top: -3.5px; width: 8px; height: 8px; border-right: 1px solid var(--ink-3); border-top: 1px solid var(--ink-3); transform: rotate(45deg); }

/* columns / hub */
.vz-cols { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.vz-panel { border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 14px 16px; }
.vz-panel h5 { margin: 0 0 8px; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); font-weight: 800; }
.vz-panel.sage h5 { color: var(--sage); }
.vz-panel ul { margin: 0; padding-left: 1.1em; }
.vz-panel li { font-size: 13px; color: var(--ink-2); margin: 3px 0; }
.vz-center-note { text-align: center; font-family: var(--font-mono); font-size: 12px; color: var(--ink-3); margin: 6px 0; }

/* compare */
.vz-cmp { display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: stretch; }
.vz-cmp .mid { display: grid; place-items: center; color: var(--ink-3); font-weight: 800; font-size: 18px; }
@media (max-width: 720px) { .vz-cmp { grid-template-columns: 1fr; } .vz-cmp .mid { padding: 2px 0; } }

/* window / wireframe */
.vz-win { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); overflow: hidden; max-width: 760px; margin: 0 auto; }
.vz-win-head { display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: var(--surface-2); border-bottom: 1px solid var(--line-soft); font-size: 13px; font-weight: 750; }
.vz-win-head .sp { margin-left: auto; font-size: 12px; color: var(--ink-3); font-weight: 600; }
.vz-win-body { padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.vz-row { font-size: 13.5px; color: var(--ink-2); }
.vz-row.t { color: var(--ink); font-weight: 600; }
.vz-row.note { font-size: 12.5px; color: var(--ink-3); }
.vz-input { display: flex; flex-direction: column; gap: 5px; }
.vz-input label { font-size: 12px; font-weight: 700; color: var(--ink-3); letter-spacing: .04em; }
.vz-input .box { border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px; font-size: 13.5px; background: var(--bg); color: var(--ink); font-family: var(--font-mono); }
.vz-btnrow { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.vz-btn { border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); border-radius: 8px; padding: 8px 16px; font-size: 13px; font-weight: 700; cursor: pointer; font-family: inherit; transition: border-color .2s, background .2s, transform .12s; }
.vz-btn:hover { border-color: var(--accent); transform: translateY(-1px); }
.vz-btn.primary { background: var(--accent); border-color: var(--accent); color: var(--bg); }
[data-theme="dark"] .vz-btn.primary { color: #101317; }
.vz-check, .vz-langchip { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 8px; padding: 7px 12px; font-size: 13px; cursor: pointer; background: var(--bg); color: var(--ink-2); user-select: none; transition: border-color .2s, background .2s; }
.vz-check .bx, .vz-langchip .bx { width: 14px; height: 14px; border: 1.5px solid var(--ink-3); border-radius: 4px; display: grid; place-items: center; font-size: 10px; color: transparent; transition: all .2s; flex: none; }
.vz-check.on, .vz-langchip.on { border-color: var(--accent); background: var(--accent-soft); color: var(--ink); }
.vz-check.on .bx, .vz-langchip.on .bx { background: var(--accent); border-color: var(--accent); color: var(--bg); }
[data-theme="dark"] .vz-check.on .bx, [data-theme="dark"] .vz-langchip.on .bx { color: #101317; }
.vz-checkgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (max-width: 640px) { .vz-checkgrid { grid-template-columns: 1fr; } }
.vz-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.vz-chip { font-size: 12.5px; font-weight: 650; padding: 6px 12px; border-radius: 999px; background: var(--chip-bg); border: 1px solid var(--line-soft); color: var(--ink-2); }
.vz-chip.accent { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.vz-chip.sage { background: var(--sage-soft); color: var(--sage); border-color: transparent; }
.vz-progress { height: 8px; background: var(--chip-bg); border-radius: 4px; overflow: hidden; }
.vz-progress i { display: block; height: 100%; width: 0; background: var(--accent); opacity: .8; border-radius: 4px; transition: width 1s cubic-bezier(.3,.7,.3,1) calc(var(--i,0)*90ms); }
.viz.on .vz-progress i { width: var(--w); }
.vz-table { width: 100%; border-collapse: collapse; font-size: 12.8px; }
.vz-table th { text-align: left; color: var(--ink-3); font-weight: 700; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.vz-table td { padding: 7px 8px; border-bottom: 1px solid var(--line-soft); color: var(--ink-2); }
.vz-select { border: 1px solid var(--line); background: var(--bg); color: var(--ink); border-radius: 8px; padding: 7px 10px; font-size: 13px; font-family: inherit; }

/* chat */
.vz-chat { display: flex; flex-direction: column; gap: 10px; max-width: 640px; margin: 0 auto; }
.vz-msg { border-radius: 12px; padding: 12px 16px; font-size: 13.8px; max-width: 92%; }
.vz-msg.user { align-self: flex-end; background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); color: var(--ink); }
.vz-msg.ai { align-self: flex-start; background: var(--surface-2); border: 1px solid var(--line-soft); color: var(--ink-2); }
.vz-msg .who { display: block; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 5px; }

/* banner */
.vz-banner { text-align: center; padding: clamp(20px, 4vw, 40px) 10px; }
.vz-banner .l1 { font-family: var(--font-display); font-weight: 900; letter-spacing: .06em; text-transform: uppercase; font-size: clamp(19px, 3vw, 30px); color: var(--ink); }
.vz-banner .l2 { margin-top: 6px; font-size: clamp(13px, 1.8vw, 16px); color: var(--ink-2); font-weight: 600; }
.vz-banner .l3 { margin-top: 2px; font-size: 13px; color: var(--ink-3); }

/* tree */
.vz-tree, .vz-tree ul { list-style: none; padding-left: 0; margin: 0; }
.vz-tree ul { padding-left: 22px; border-left: 1px dashed var(--line); margin-left: 8px; }
.vz-tree li { position: relative; padding: 3px 0 3px 14px; font-size: 13.2px; color: var(--ink-2); font-family: var(--font-mono); }
.vz-tree li::before { content: ""; position: absolute; left: 0; top: 13px; width: 10px; height: 1px; background: var(--line); }
.vz-tree li .nm { color: var(--ink); font-weight: 600; }
.vz-tree li .cm { color: var(--ink-3); }

/* grid of pages (the problem) */
.vz-pgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 12px; }
.vz-pcol { text-align: center; }
.vz-pcol .h { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 8px; }
.vz-pcol .sq { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.vz-pcol .sq i { aspect-ratio: 1.4; border: 1px solid var(--line); border-radius: 3px; background: var(--chip-bg); }
.viz.on .vz-pcol .sq i { animation: sqin .4s ease backwards; animation-delay: calc(var(--i) * 18ms); }
@keyframes sqin { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }

/* cycle rail */
.vz-cycle { position: relative; padding-right: 34px; }
.vz-cycle::after { content: ""; position: absolute; right: 10px; top: 12px; bottom: 12px; width: 1px; background: var(--line); }
.vz-cycle::before { content: ""; position: absolute; right: 6.5px; top: 6px; width: 8px; height: 8px; border-left: 1px solid var(--ink-3); border-top: 1px solid var(--ink-3); transform: rotate(45deg); }
.vz-cycle .ret { position: absolute; right: 0; top: 50%; transform: translate(0, -50%) rotate(90deg); font-family: var(--font-mono); font-size: 11px; color: var(--ink-3); letter-spacing: .1em; }

/* ascii source disclosure */
.ascii-src { margin-top: 10px; }
.ascii-src summary { cursor: pointer; font-size: 11.5px; font-family: var(--font-mono); letter-spacing: .08em; color: var(--ink-3); text-transform: uppercase; padding: 4px 2px; user-select: none; }
.ascii-src summary:hover { color: var(--ink-2); }
.ascii-src pre { margin: 8px 0 0; padding: 14px 16px; background: var(--code-bg); color: #B9BFC9; border-radius: 10px; overflow-x: auto; font-family: var(--font-mono); font-size: 12px; line-height: 1.5; }

/* interactive extras */
.vz-flag { background: color-mix(in srgb, var(--clay) 14%, transparent); border-bottom: 2px solid var(--clay); padding: 2px 4px; transition: all .4s; }
.vz-flag.fixed { background: var(--sage-soft); border-bottom-color: var(--sage); text-decoration: none; }
.vz-status { font-family: var(--font-mono); font-size: 12px; color: var(--ink-3); }
.vz-status.ok { color: var(--sage); }

/* ---------- tabs ---------- */
.tab-bar { display: flex; gap: 8px; flex-wrap: wrap; padding: 6px; background: var(--surface-2); border: 1px solid var(--line-soft); border-radius: 14px; margin-bottom: 26px; position: sticky; top: 70px; z-index: 40; }
.tab-bar button { flex: 1; min-width: 180px; padding: 11px 14px; border-radius: 10px; border: 0; cursor: pointer; background: transparent; color: var(--ink-2); font-family: inherit; font-size: 13.5px; font-weight: 700; transition: background .2s, color .2s; text-align: left; }
.tab-bar button small { display: block; font-weight: 550; font-size: 11.5px; opacity: .75; margin-top: 2px; }
.tab-bar button:hover { color: var(--ink); }
.tab-bar button[aria-selected="true"] { background: var(--surface); color: var(--accent); box-shadow: var(--shadow); }
.tab-panel { display: none; animation: fadeUp .35s ease; }
.tab-panel.active { display: block; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- demos (kept from v1, muted) ---------- */
.demo-frame { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); box-shadow: var(--shadow); margin: 1.6em 0; }
.demo-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 16px; background: var(--surface-2); border-bottom: 1px solid var(--line-soft); font-size: 12.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.demo-body { padding: clamp(20px, 3vw, 34px); }
.lang-btns { display: flex; gap: 8px; }
.lang-btns button { padding: 8px 18px; border-radius: 999px; border: 1px solid var(--line); cursor: pointer; background: var(--surface); color: var(--ink-2); font-weight: 750; font-family: inherit; font-size: 13.5px; }
.lang-btns button.active { background: var(--accent); color: var(--bg); border-color: var(--accent); }
[data-theme="dark"] .lang-btns button.active { color: #101317; }
.forma-hero { min-height: 190px; display: flex; flex-direction: column; justify-content: center; }
.forma-hero .fh-nav { display: flex; gap: 22px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: 12px; color: var(--ink-2); margin-bottom: 26px; }
.forma-hero h3 { font-family: var(--font-display); font-size: clamp(26px, 4vw, 44px) !important; font-weight: 900; letter-spacing: -.015em; line-height: 1.05; margin: 0 0 12px !important; text-transform: uppercase; }
.forma-hero h3::before { display: none; }
.forma-hero p { margin: 0; font-size: 16.5px; color: var(--ink-2); max-width: 420px; }
.lang-view { display: none; animation: fadeUp .4s ease; }
.lang-view.show { display: block; }

.score-row { display: grid; grid-template-columns: minmax(150px, 1.1fr) 2fr 52px; gap: 14px; align-items: center; padding: 9px 0; }
.score-row .nm { font-size: 14px; font-weight: 650; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.score-track { height: 10px; border-radius: 6px; background: var(--chip-bg); overflow: hidden; }
.score-fill { height: 100%; width: 0; border-radius: 6px; background: var(--accent); opacity: .75; transition: width 1.1s cubic-bezier(.3, .8, .3, 1); }
.score-row.low .score-fill { background: var(--clay); opacity: .8; }
.score-row .sc { font-family: var(--font-mono); font-size: 13px; font-weight: 700; text-align: right; color: var(--ink-2); }

/* ---------- timeline ---------- */
.timeline { position: relative; margin: 10px 0; padding-left: 30px; }
.timeline::before { content: ""; position: absolute; left: 9px; top: 6px; bottom: 6px; width: 1px; background: var(--line); }
.tl-item { position: relative; padding: 0 0 30px 18px; }
.tl-item::before { content: ""; position: absolute; left: -25px; top: 5px; width: 11px; height: 11px; border-radius: 50%; background: var(--bg); border: 2px solid var(--accent); }
.tl-item h3 { margin: 0 0 6px; font-size: 18px; font-weight: 800; }
.tl-item .tl-when { font-family: var(--font-mono); font-size: 12px; color: var(--accent); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.tl-item p { margin: 6px 0 0; color: var(--ink-2); font-size: 15px; }

/* ---------- people ---------- */
.filter-box { margin-bottom: 26px; }
.filter-box input { width: 100%; max-width: 460px; padding: 13px 18px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-family: inherit; font-size: 15px; outline: none; }
.filter-box input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.people-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.person { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 20px; transition: transform .2s ease, border-color .2s; }
.person:hover { transform: translateY(-3px); border-color: var(--accent); }
.person h3 { margin: 0 0 2px; font-size: 17.5px; font-weight: 800; }
.person .role { font-size: 13px; color: var(--accent); font-weight: 700; margin-bottom: 8px; }
.person p { margin: 0 0 10px; font-size: 13.8px; color: var(--ink-2); }
.person .seen { font-size: 11.5px; font-family: var(--font-mono); color: var(--ink-3); letter-spacing: .04em; }

/* ---------- finale ---------- */
.finale { position: relative; overflow: hidden; text-align: center; background: var(--quote-bg); color: var(--quote-ink); border-radius: calc(var(--radius) + 4px); padding: clamp(44px, 7vw, 90px) clamp(22px, 5vw, 60px); box-shadow: var(--shadow-lg); }
.finale::before { content: ""; position: absolute; inset: 0; background: radial-gradient(700px 340px at 15% -30%, rgba(157, 185, 220, .10), transparent 60%), radial-gradient(700px 340px at 90% 130%, rgba(164, 188, 155, .08), transparent 60%); }
.finale > * { position: relative; }
.finale h2 { margin: 14px auto 16px; font-family: var(--font-display); font-weight: 900; text-transform: uppercase; font-size: clamp(30px, 5vw, 58px); line-height: 1.03; max-width: 800px; }
.finale h2 .acid { color: var(--accent); }
[data-theme="light"] .finale h2 .acid { color: #A9C1E0; }
.finale p { max-width: 640px; margin: 0 auto 26px; color: rgba(237, 235, 227, .78); font-size: 17px; }
.btn { display: inline-flex; align-items: center; gap: 10px; background: var(--accent); color: var(--bg); font-weight: 800; font-size: 15.5px; padding: 14px 26px; border-radius: 999px; border: 0; cursor: pointer; font-family: inherit; transition: transform .18s ease, box-shadow .18s ease; }
[data-theme="dark"] .btn { color: #101317; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(62, 99, 144, .25); text-decoration: none; }
.btn.ghost { background: transparent; color: var(--quote-ink); border: 1.5px solid rgba(237, 235, 227, .35); }
.btn.ghost:hover { border-color: var(--accent); color: var(--accent); box-shadow: none; }
[data-theme="light"] .btn.ghost:hover { color: #A9C1E0; border-color: #A9C1E0; }

/* ---------- pager / footer ---------- */
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: clamp(40px, 6vw, 70px) 0 0; }
.pager a { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 18px 22px; color: inherit; transition: border-color .2s, transform .2s; }
.pager a:hover { border-color: var(--accent); transform: translateY(-2px); text-decoration: none; }
.pager a.next { text-align: right; }
.pager .lbl { font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); font-weight: 750; }
.pager .ttl { display: block; margin-top: 5px; font-weight: 800; font-size: 16.5px; color: var(--ink); }

.site-foot { margin-top: clamp(50px, 7vw, 90px); border-top: 1px solid var(--line-soft); background: var(--bg-alt); }
.foot-grid { display: flex; flex-wrap: wrap; gap: 30px; justify-content: space-between; padding: 40px 0; }
.foot-grid .fcol h4 { margin: 0 0 10px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.foot-grid a { display: block; color: var(--ink-2); font-size: 14px; padding: 3px 0; }
.foot-grid a:hover { color: var(--accent); }
.foot-note { padding: 0 0 34px; color: var(--ink-3); font-size: 13px; max-width: 720px; }

#toTop { position: fixed; right: 22px; bottom: 22px; z-index: 80; width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; font-size: 18px; opacity: 0; pointer-events: none; transform: translateY(10px); transition: opacity .25s, transform .25s; box-shadow: var(--shadow); }
#toTop.show { opacity: 1; pointer-events: auto; transform: none; }

/* ---------- reveal ---------- */
[data-reveal] { opacity: 0; transform: translateY(16px); transition: opacity .65s ease, transform .65s cubic-bezier(.2, .7, .3, 1); }
[data-reveal].revealed { opacity: 1; transform: none; }
.callout { display: flex; gap: 16px; align-items: flex-start; background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 26%, var(--line-soft)); border-radius: var(--radius); padding: 20px 22px; margin: 1.5em 0; }
.callout .ci { flex: none; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--accent); color: var(--bg); font-weight: 900; }
[data-theme="dark"] .callout .ci { color: #101317; }
.callout p { margin: 0; font-size: 15px; }
.split { display: grid; gap: clamp(26px, 4vw, 54px); grid-template-columns: 1fr 1fr; align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.vs { display: grid; gap: 14px; grid-template-columns: 1fr auto 1fr; align-items: stretch; }
.vs .vs-mid { display: grid; place-items: center; font-weight: 900; color: var(--ink-3); }
@media (max-width: 760px) { .vs { grid-template-columns: 1fr; } .vs .vs-mid { padding: 4px 0; } }
.panel { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 24px; }
.panel h3 { margin: 0 0 10px; font-size: 17px; font-weight: 800; }
.panel ul { margin: 0; padding-left: 1.2em; }
.panel li { font-size: 14.5px; color: var(--ink-2); margin-bottom: .4em; }
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; }
.tag { font-size: 12.5px; font-weight: 700; padding: 6px 12px; border-radius: 999px; background: var(--chip-bg); border: 1px solid var(--line-soft); color: var(--ink-2); }
.tag.acid { background: var(--accent-soft); color: var(--accent); border-color: transparent; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal], .vz-a, .md-list li, .codewrap pre code .tl { opacity: 1 !important; transform: none !important; transition: none !important; }
  .chapter-hero h1[data-reveal], h2.sec-title[data-reveal] { clip-path: none !important; }
  * { animation: none !important; }
}

/* mini text buttons (select all / none) */
.vz-mini { border: 0; background: none; padding: 0; font: inherit; color: var(--accent); cursor: pointer; font-weight: 700; }
.vz-mini:hover { text-decoration: underline; }
