/* edgeTR Academy design system
   1 tokens  2 base  3 layout  4 header/footer  5 buttons/chips  6 hero  7 cards
   8 article  9 callouts  10 figures (viz)  11 diagrams  12 landing/search/glossary  13 motion  14 print */

/* ---------- 1. tokens ---------- */
@font-face { font-family: "Inter"; src: url("../fonts/inter-latin.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-latin-ext.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Sora"; src: url("../fonts/sora-latin.woff2") format("woff2"); font-weight: 100 800; font-style: normal; font-display: swap; }

:root {
  --bg: #05080d;
  --bg-2: #070c15;
  --navy: #0a1426;
  --navy-2: #0e1c35;
  --surface: #0b121d;
  --surface-2: #101927;
  --surface-3: #152133;
  --line: rgba(190, 215, 255, 0.09);
  --line-2: rgba(190, 215, 255, 0.17);
  --text: #f4f7f8;
  --text-2: #d5dde3;
  --muted: #a7b0b4;
  --dim: #818d97;

  --bull: #00e676;
  --bull-2: #4dffa6;
  --bull-soft: rgba(0, 230, 118, 0.11);
  --bull-line: rgba(0, 230, 118, 0.38);
  --bear: #ff3b3b;
  --bear-2: #ff6b6b;
  --bear-soft: rgba(255, 59, 59, 0.11);
  --bear-line: rgba(255, 59, 59, 0.4);
  --info: #5ab8ff;
  --info-soft: rgba(90, 184, 255, 0.11);
  --info-line: rgba(90, 184, 255, 0.38);
  --warn: #ffb547;
  --warn-soft: rgba(255, 181, 71, 0.11);
  --warn-line: rgba(255, 181, 71, 0.4);
  --violet: #b693ff;

  --viz-neutral: #9fb0c3;
  --viz-neutral-soft: rgba(159, 176, 195, 0.09);
  --viz-label-bg: #09101a;
  --viz-panel: rgba(255, 255, 255, 0.02);
  --viz-border: rgba(190, 215, 255, 0.14);

  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-head: "Sora", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", Menlo, Consolas, monospace;

  --r-sm: 8px;
  --r: 14px;
  --r-lg: 20px;
  --shadow: 0 18px 50px -24px rgba(0, 0, 0, 0.9);
  --glow-bull: 0 0 0 1px var(--bull-line), 0 14px 44px -18px rgba(0, 230, 118, 0.35);
  --wrap: 1200px;
  --header-h: 68px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  color-scheme: dark;
}

/* ---------- 2. base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 18px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text-2);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(900px 520px at 12% -8%, rgba(0, 230, 118, 0.07), transparent 62%),
    radial-gradient(900px 600px at 96% 4%, rgba(40, 96, 200, 0.12), transparent 60%),
    linear-gradient(180deg, var(--navy) 0%, var(--bg-2) 34%, var(--bg) 100%);
}
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--text); line-height: 1.16; letter-spacing: -0.02em; margin: 0 0 0.5em; font-weight: 700; text-wrap: balance; }
h1 { font-size: clamp(2rem, 1.2rem + 3.4vw, 3.5rem); font-weight: 800; }
h2 { font-size: clamp(1.45rem, 1.1rem + 1.5vw, 2.1rem); }
h3, .h3 { font-size: clamp(1.12rem, 1rem + 0.5vw, 1.32rem); letter-spacing: -0.01em; }
h4 { font-size: 1.02rem; letter-spacing: 0; }
p { margin: 0 0 1em; }
a { color: var(--bull-2); text-decoration-color: rgba(77, 255, 166, 0.4); text-underline-offset: 0.18em; }
a:hover { color: #fff; text-decoration-color: currentColor; }
img, svg { max-width: 100%; height: auto; }
strong { color: var(--text); font-weight: 650; }
code, kbd { font-family: var(--mono); font-size: 0.9em; }
:focus-visible { outline: 2px solid var(--bull); outline-offset: 3px; border-radius: 6px; }
::selection { background: rgba(0, 230, 118, 0.28); color: #fff; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -80px; z-index: 100; background: var(--bull); color: #03130a; padding: 10px 16px; border-radius: 10px; font-weight: 700; text-decoration: none; }
.skip:focus { top: 12px; }
.ico { width: 1.15em; height: 1.15em; flex: none; vertical-align: -0.2em; }
main:focus { outline: 2px solid transparent; }

/* ---------- 3. layout ---------- */
.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.wrap--narrow { width: min(100% - 2.5rem, 820px); }
.band { padding: clamp(3rem, 2rem + 4vw, 5.5rem) 0; position: relative; }
.band--flush { padding-top: clamp(1.5rem, 1rem + 2vw, 2.5rem); }
.band--tint { background: linear-gradient(180deg, rgba(14, 28, 53, 0.42), rgba(8, 13, 22, 0.2)); border-block: 1px solid var(--line); }
.section-head { max-width: 720px; margin-bottom: 2rem; }
.section-head p:last-child { color: var(--muted); margin: 0; font-size: 1.05rem; }
.section-head h2 .ico { margin-right: 0.45em; color: var(--bull); }
.section-head--row { max-width: none; display: flex; gap: 1.25rem; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; }
.section-head--row > div { max-width: 720px; }
.section-more { margin: 2rem 0 0; }
.eyebrow { font-family: var(--font-head); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--bull); margin: 0 0 0.9rem; }
.eyebrow--pill { display: inline-flex; align-items: center; gap: 0.5em; padding: 0.45em 0.95em; border: 1px solid var(--bull-line); border-radius: 999px; background: var(--bull-soft); letter-spacing: 0.08em; }
.lede { font-size: clamp(1.08rem, 1rem + 0.45vw, 1.28rem); color: var(--text-2); max-width: 62ch; line-height: 1.55; }
.lede--wide { max-width: 78ch; margin-bottom: 2rem; }
.hl-bull { color: var(--bull); }
.hl-bear { color: var(--bear); }
.t-bull { --tone: var(--bull); --tone-soft: var(--bull-soft); --tone-line: var(--bull-line); }
.t-bear { --tone: var(--bear); --tone-soft: var(--bear-soft); --tone-line: var(--bear-line); }
.t-info { --tone: var(--info); --tone-soft: var(--info-soft); --tone-line: var(--info-line); }
.t-warn { --tone: var(--warn); --tone-soft: var(--warn-soft); --tone-line: var(--warn-line); }
.t-neutral { --tone: var(--viz-neutral); --tone-soft: var(--viz-neutral-soft); --tone-line: var(--line-2); }

/* ---------- 4. header / footer ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(5, 9, 15, 0.78); backdrop-filter: saturate(150%) blur(14px); -webkit-backdrop-filter: saturate(150%) blur(14px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 1.25rem; min-height: var(--header-h); }
.brand { display: inline-flex; align-items: flex-end; gap: 0.5rem; text-decoration: none; color: var(--muted); flex: none; padding: 6px 0; }
.brand img { display: block; height: 44px; width: auto; }
.brand-sub { font-family: var(--font-head); font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; font-weight: 600; padding-bottom: 7px; color: var(--muted); }
.main-nav { margin-left: auto; }
.main-nav ul { display: flex; gap: 0.15rem; list-style: none; margin: 0; padding: 0; }
.main-nav a { display: block; padding: 0.7rem 0.85rem; border-radius: 10px; color: var(--text-2); text-decoration: none; font-weight: 550; font-size: 0.95rem; }
.main-nav a:hover { color: #fff; background: rgba(255, 255, 255, 0.06); }
.main-nav a[aria-current] { color: var(--bull); background: var(--bull-soft); }
.nav-search-link { display: none; }
.header-search { position: relative; display: flex; align-items: center; gap: 0.5rem; width: clamp(200px, 22vw, 300px); height: 44px; padding: 0 0.75rem; border: 1px solid var(--line-2); border-radius: 12px; background: rgba(255, 255, 255, 0.04); color: var(--muted); }
.header-search:focus-within { border-color: var(--bull-line); box-shadow: 0 0 0 3px var(--bull-soft); }
.header-search input { flex: 1; min-width: 0; height: 100%; background: none; border: 0; color: var(--text); font: inherit; font-size: 0.93rem; outline: 2px solid transparent; }
.header-search input::placeholder, .hero-search input::placeholder, .search-form input::placeholder, .filter-search input::placeholder { color: var(--dim); }
.header-search kbd { border: 1px solid var(--line-2); border-radius: 6px; padding: 0 0.4em; font-size: 0.75rem; color: var(--dim); }
.header-search-btn, .nav-toggle { display: none; width: 44px; height: 44px; align-items: center; justify-content: center; border-radius: 12px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.04); color: var(--text); cursor: pointer; flex: none; }
.header-search-btn .ico { width: 20px; height: 20px; }
.bars { display: grid; gap: 5px; width: 20px; }
.bars i { height: 2px; background: currentColor; border-radius: 2px; transition: transform 0.25s var(--ease), opacity 0.2s; }
.nav-toggle[aria-expanded="true"] .bars i:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bars i:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .bars i:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.suggest { position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 60; background: #0a111c; border: 1px solid var(--line-2); border-radius: var(--r); box-shadow: var(--shadow); padding: 6px; max-height: min(70vh, 460px); overflow: auto; text-align: left; }
.suggest a { display: grid; gap: 1px; padding: 0.6rem 0.75rem; border-radius: 10px; text-decoration: none; color: var(--text); min-height: 44px; }
.suggest a:hover, .suggest a.is-active { background: var(--bull-soft); }
.suggest small { color: var(--dim); font-size: 0.76rem; letter-spacing: 0.04em; text-transform: uppercase; }
.suggest span { font-weight: 600; font-size: 0.95rem; }
.suggest .suggest-all { color: var(--bull-2); font-weight: 600; font-size: 0.9rem; border-top: 1px solid var(--line); border-radius: 0 0 10px 10px; margin-top: 4px; }
.suggest .suggest-none { padding: 0.7rem 0.75rem; color: var(--muted); font-size: 0.9rem; margin: 0; }

.site-footer { margin-top: 3rem; border-top: 1px solid var(--line); background: linear-gradient(180deg, rgba(10, 20, 38, 0.6), #04060a); padding: 3.5rem 0 2rem; font-size: 0.93rem; }
.footer-grid { display: grid; grid-template-columns: 1.5fr repeat(4, 1fr); gap: 2rem; }
.footer-brand img { height: 40px; width: auto; }
.footer-brand p { color: var(--muted); max-width: 30ch; margin: 0.9rem 0 1rem; }
.site-footer h2 { font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.9rem; font-weight: 600; }
.site-footer nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.1rem; }
.site-footer nav a { display: inline-block; padding: 0.32rem 0; color: var(--text-2); text-decoration: none; }
.site-footer nav a:hover { color: var(--bull-2); }
.trust { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem; padding: 0; margin: 0; }
.trust li { font-size: 0.78rem; padding: 0.3em 0.7em; border: 1px solid var(--line-2); border-radius: 999px; color: var(--muted); }
.footer-disclaimer { margin: 2.5rem 0 0.75rem; padding-top: 1.5rem; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.86rem; max-width: 100ch; }
.footer-legal { color: var(--dim); font-size: 0.82rem; margin: 0; }

/* ---------- 5. buttons / chips ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.55em; min-height: 46px; padding: 0.7rem 1.25rem; border-radius: 12px; border: 1px solid transparent; font: inherit; font-weight: 650; font-size: 0.97rem; text-decoration: none; cursor: pointer; transition: transform 0.2s var(--ease), box-shadow 0.25s var(--ease), background 0.2s, border-color 0.2s; }
.btn--lg { min-height: 54px; padding: 0.85rem 1.6rem; font-size: 1.04rem; border-radius: 14px; }
.btn--primary { background: linear-gradient(180deg, #19f08a, #00c765); color: #02160b; box-shadow: 0 10px 30px -12px rgba(0, 230, 118, 0.65); }
.btn--primary:hover { color: #02160b; transform: translateY(-2px); box-shadow: 0 16px 36px -12px rgba(0, 230, 118, 0.8); }
.btn--ghost { border-color: var(--line-2); color: var(--text); background: rgba(255, 255, 255, 0.035); }
.btn--ghost:hover { border-color: var(--bull-line); color: #fff; background: var(--bull-soft); transform: translateY(-2px); }
.chip { display: inline-flex; align-items: center; gap: 0.4em; padding: 0.22em 0.7em; border: 1px solid var(--line-2); border-radius: 999px; font-size: 0.78rem; font-weight: 550; color: var(--muted); background: rgba(255, 255, 255, 0.03); white-space: nowrap; }
.chip .ico { width: 1em; height: 1em; }
.chip--diff i { width: 7px; height: 7px; border-radius: 50%; background: var(--bull); }
.chip--intermediate i { background: var(--info); }
.chip--advanced i { background: var(--warn); }
.chip--pro i { background: var(--violet); }
.chip--bull { color: var(--bull-2); border-color: var(--bull-line); background: var(--bull-soft); }
.chip--bear { color: var(--bear-2); border-color: var(--bear-line); background: var(--bear-soft); }
.chip-btn { min-height: 40px; padding: 0.45rem 0.95rem; border: 1px solid var(--line-2); border-radius: 999px; background: rgba(255, 255, 255, 0.03); color: var(--text-2); font: inherit; font-size: 0.88rem; font-weight: 550; cursor: pointer; }
.chip-btn:hover { border-color: var(--bull-line); }
.chip-btn.is-on { background: var(--bull-soft); border-color: var(--bull-line); color: var(--bull-2); }

/* ---------- 6. hero ---------- */
.hero { position: relative; overflow: hidden; padding: clamp(3.5rem, 2rem + 7vw, 7.5rem) 0 clamp(3rem, 2rem + 5vw, 6rem); border-bottom: 1px solid var(--line); isolation: isolate; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -2; background: radial-gradient(700px 420px at 18% 12%, rgba(0, 230, 118, 0.16), transparent 65%), radial-gradient(760px 480px at 92% 88%, rgba(255, 59, 59, 0.12), transparent 62%), radial-gradient(1000px 600px at 70% 0%, rgba(30, 84, 190, 0.22), transparent 60%), linear-gradient(180deg, #0a1528, #05080d 82%); }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(rgba(190, 215, 255, 0.045) 1px, transparent 1px), linear-gradient(90deg, rgba(190, 215, 255, 0.045) 1px, transparent 1px); background-size: 56px 56px; mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 20%, transparent 78%); -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 20%, transparent 78%); }
.hero-bg { position: absolute; inset: auto 0 0 0; height: 62%; z-index: -1; opacity: 0.5; mask-image: linear-gradient(180deg, transparent, #000 45%, #000 70%, transparent); -webkit-mask-image: linear-gradient(180deg, transparent, #000 45%, #000 70%, transparent); pointer-events: none; }
.hero-bg svg { width: 100%; height: 100%; display: block; }
.hero-inner { text-align: center; max-width: 900px; }
.hero h1 { font-size: clamp(2.4rem, 1.2rem + 5.4vw, 4.6rem); margin-bottom: 0.35em; text-shadow: 0 2px 40px rgba(5, 8, 13, 0.9); }
.hero-lede { font-size: clamp(1.06rem, 0.98rem + 0.6vw, 1.32rem); color: var(--text-2); max-width: 58ch; margin: 0 auto 2rem; text-shadow: 0 1px 24px rgba(5, 8, 13, 0.95); }
.hero-search, .search-form { position: relative; display: flex; align-items: center; gap: 0.6rem; max-width: 680px; margin: 0 auto; padding: 0.4rem 0.4rem 0.4rem 1.1rem; border: 1px solid var(--line-2); border-radius: 16px; background: rgba(8, 14, 24, 0.86); box-shadow: 0 24px 60px -30px #000, inset 0 1px 0 rgba(255, 255, 255, 0.04); color: var(--muted); }
.hero-search:focus-within, .search-form:focus-within { border-color: var(--bull-line); box-shadow: 0 0 0 4px var(--bull-soft), 0 24px 60px -30px #000; }
.hero-search > .ico, .search-form > .ico { width: 22px; height: 22px; }
.hero-search input, .search-form input { flex: 1; min-width: 0; height: 48px; background: none; border: 0; outline: 2px solid transparent; color: var(--text); font: inherit; font-size: 1.02rem; }
.hero-cta { display: flex; gap: 0.9rem; justify-content: center; flex-wrap: wrap; margin: 1.6rem 0 1.5rem; }
.trust--hero { justify-content: center; gap: 0.5rem 1.4rem; }
.trust--hero li { border: 0; padding: 0; font-size: 0.9rem; color: var(--text-2); display: inline-flex; gap: 0.4em; align-items: center; }
.trust--hero .ico { color: var(--bull); }

.page-hero, .article-hero { padding: clamp(1.75rem, 1.2rem + 2.4vw, 3.25rem) 0 clamp(1.5rem, 1rem + 2vw, 2.5rem); border-bottom: 1px solid var(--line); background: radial-gradient(640px 300px at 8% 0%, rgba(0, 230, 118, 0.09), transparent 70%), radial-gradient(700px 340px at 100% 0%, rgba(30, 84, 190, 0.16), transparent 68%); }
.accent-bear .article-hero { background: radial-gradient(640px 300px at 8% 0%, rgba(255, 59, 59, 0.12), transparent 70%), radial-gradient(700px 340px at 100% 0%, rgba(30, 84, 190, 0.14), transparent 68%); }
.accent-bear .article-hero .eyebrow { color: var(--bear-2); }
.page-hero h1, .article-hero h1 { max-width: 22ch; }
.page-hero .lede, .article-hero .lede { margin-bottom: 1.25rem; }
.page-hero-split { display: grid; grid-template-columns: 1fr minmax(220px, 340px); gap: 2rem; align-items: center; }
.page-hero-thumb { border: 1px solid var(--line-2); border-radius: var(--r-lg); background: linear-gradient(160deg, var(--surface-2), var(--surface)); padding: 1rem; aspect-ratio: 5 / 3; display: grid; place-items: center; }
.page-hero-thumb svg { width: 100%; height: 100%; }
.page-hero-thumb .thumb-ico .ico { width: 84px; height: 84px; color: var(--bull); }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0 0.55rem; padding: 0; margin: -0.5rem 0 0.9rem; font-size: 0.86rem; color: var(--dim); }
.crumbs li { display: inline-flex; align-items: center; }
.crumbs li + li::before { content: "/"; margin-right: 0.55rem; color: var(--dim); }
.crumbs a { color: var(--muted); text-decoration: none; padding: 0.7rem 0.15rem; display: inline-block; }
.crumbs a:hover { color: var(--bull-2); }
.crumbs [aria-current] { color: var(--text-2); }
.meta-chips { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0; margin: 0; }

/* ---------- 7. cards ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); gap: 1.1rem; }
.card-grid--compact { grid-template-columns: repeat(auto-fill, minmax(min(100%, 235px), 1fr)); }
.card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r); background: linear-gradient(170deg, var(--surface-2), var(--surface)); color: var(--text-2); text-decoration: none; overflow: hidden; transition: transform 0.28s var(--ease), border-color 0.25s, box-shadow 0.3s var(--ease); height: 100%; }
.card:hover { transform: translateY(-4px); border-color: var(--bull-line); box-shadow: 0 22px 46px -26px rgba(0, 230, 118, 0.42); color: var(--text-2); }
.card.accent-bear:hover { border-color: var(--bear-line); box-shadow: 0 22px 46px -26px rgba(255, 59, 59, 0.42); }
.card-thumb { display: grid; place-items: center; aspect-ratio: 5 / 3; background: radial-gradient(120% 90% at 50% 0%, rgba(30, 84, 190, 0.16), transparent 70%), #080e18; border-bottom: 1px solid var(--line); padding: 0.6rem; }
.card-thumb svg.vz { width: 100%; height: 100%; }
.thumb-ico .ico { width: 54px; height: 54px; color: var(--bull); opacity: 0.9; stroke-width: 1.3; }
.accent-bear .thumb-ico .ico { color: var(--bear); }
.card:hover .thumb-ico .ico, .card:hover .card-thumb svg.vz { transform: scale(1.04); }
.card-thumb svg, .thumb-ico .ico { transition: transform 0.4s var(--ease); }
.card-body { display: flex; flex-direction: column; gap: 0.4rem; padding: 1rem 1.1rem 1.1rem; flex: 1; }
.card-eyebrow { font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--bull); font-weight: 600; }
.card-title { font-family: var(--font-head); font-weight: 650; font-size: 1.08rem; color: var(--text); line-height: 1.25; display: flex; align-items: center; gap: 0.5em; }
.card-title .ico { color: var(--bull); }
.card-text { font-size: 0.92rem; color: var(--muted); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; margin-top: auto; padding-top: 0.6rem; }
.card-go { margin-left: auto; font-size: 0.85rem; font-weight: 600; color: var(--bull-2); display: inline-flex; gap: 0.35em; align-items: center; }

.path-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
.path-card { position: relative; display: flex; flex-direction: column; gap: 0.6rem; padding: clamp(1.4rem, 1rem + 1.6vw, 2.2rem); border-radius: var(--r-lg); border: 1px solid var(--line-2); text-decoration: none; color: var(--text-2); overflow: hidden; transition: transform 0.3s var(--ease), border-color 0.25s, box-shadow 0.3s; background: linear-gradient(160deg, rgba(0, 230, 118, 0.1), rgba(11, 18, 29, 0.9) 46%); }
.path-card--library { background: linear-gradient(160deg, rgba(60, 124, 240, 0.16), rgba(11, 18, 29, 0.9) 46%); }
.path-card:hover { transform: translateY(-5px); border-color: var(--bull-line); box-shadow: 0 30px 60px -34px rgba(0, 230, 118, 0.5); color: var(--text-2); }
.path-card--library:hover { border-color: var(--info-line); box-shadow: 0 30px 60px -34px rgba(90, 184, 255, 0.5); }
.path-ico { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 14px; background: var(--bull-soft); border: 1px solid var(--bull-line); color: var(--bull); }
.path-card--library .path-ico { background: var(--info-soft); border-color: var(--info-line); color: var(--info); }
.path-ico .ico { width: 26px; height: 26px; }
.path-card h3 { font-size: clamp(1.3rem, 1.1rem + 0.8vw, 1.7rem); margin: 0.4rem 0 0; }
.path-card p { margin: 0; color: var(--muted); }
.path-steps, .path-tags { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem; padding: 0; margin: 0.6rem 0; }
.path-steps li { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--bull-line); background: rgba(0, 230, 118, 0.06); color: var(--bull-2); font-weight: 700; font-size: 0.9rem; font-family: var(--font-head); }
.path-tags li, .path-tags--links a { padding: 0.35em 0.85em; border-radius: 999px; border: 1px solid var(--info-line); background: rgba(90, 184, 255, 0.07); color: #bfe2ff; font-size: 0.86rem; font-weight: 550; }
.path-tags--links li { padding: 0; border: 0; background: none; }
.path-tags--links a { display: inline-flex; align-items: center; min-height: 40px; text-decoration: none; }
.path-tags--links a:hover { background: var(--info-soft); color: #fff; }
.path-go { margin-top: auto; padding-top: 0.6rem; font-weight: 650; color: var(--bull-2); display: inline-flex; align-items: center; gap: 0.45em; }
.path-card--library .path-go { color: var(--info); }

.split-feature { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(1.5rem, 1rem + 3vw, 4rem); align-items: center; }
.split-feature-fig .viz { margin: 0; }
.ticks { list-style: none; padding: 0; margin: 1.2rem 0 1.6rem; display: grid; gap: 0.6rem; }
.ticks li { display: flex; gap: 0.6em; align-items: flex-start; }
.ticks .ico { color: var(--bull); margin-top: 0.2em; }
.promise { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(1.5rem, 1rem + 3vw, 4rem); align-items: center; }
.promise-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.9rem; }
.promise-list li { display: flex; gap: 0.9rem; padding: 1.1rem 1.2rem; border-radius: var(--r); border: 1px solid var(--tone-line); background: var(--tone-soft); }
.promise-list .ico { color: var(--tone); width: 26px; height: 26px; margin-top: 2px; }
.promise-list strong { display: block; }
.vs-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 0.8rem; }
.vs-list a { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.6rem; min-height: 60px; padding: 0.85rem 1.1rem; border: 1px solid var(--line); border-radius: var(--r); background: linear-gradient(170deg, var(--surface-2), var(--surface)); text-decoration: none; font-family: var(--font-head); font-weight: 650; transition: transform 0.25s var(--ease), border-color 0.2s; }
.vs-list a:hover { transform: translateY(-3px); border-color: var(--line-2); }
.vs-list a > span { color: var(--tone); }
.vs-list i { font-style: normal; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--dim); border: 1px solid var(--line-2); border-radius: 999px; padding: 0.15em 0.6em; }
.vs-list small { flex-basis: 100%; font-family: var(--font); font-weight: 400; color: var(--muted); font-size: 0.9rem; line-height: 1.45; }
.vs-list--big { grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); }
.vs-list--big a { padding: 1.2rem 1.3rem; font-size: 1.12rem; }
.shelf-links { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.6rem; }
.shelf-links a { display: inline-flex; align-items: center; gap: 0.55em; min-height: 44px; padding: 0.5rem 1rem; border: 1px solid var(--line-2); border-radius: 12px; text-decoration: none; color: var(--text-2); background: rgba(255, 255, 255, 0.03); font-weight: 550; }
.shelf-links a:hover { border-color: var(--bull-line); color: #fff; }
.shelf-links .ico { color: var(--bull); }

/* ---------- 8. article ---------- */
.article-grid { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: clamp(1.5rem, 1rem + 2.5vw, 3.5rem); padding-top: clamp(1.5rem, 1rem + 2vw, 2.75rem); align-items: start; }
.article-grid > .prose:only-child { grid-column: 1 / -1; max-width: 820px; margin-inline: auto; width: 100%; }
.toc { position: sticky; top: calc(var(--header-h) + 20px); max-height: calc(100vh - var(--header-h) - 40px); overflow: auto; font-size: 0.9rem; }
.toc summary { font-family: var(--font-head); font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); font-weight: 600; cursor: pointer; padding: 0.4rem 0; list-style: none; }
.toc summary::-webkit-details-marker { display: none; }
.toc ol { list-style: none; margin: 0.6rem 0 0; padding: 0; border-left: 1px solid var(--line-2); }
.toc a { display: block; padding: 0.42rem 0 0.42rem 0.9rem; margin-left: -1px; border-left: 2px solid transparent; color: var(--muted); text-decoration: none; line-height: 1.35; }
.toc a:hover { color: var(--text); }
.toc a.is-active { color: var(--bull-2); border-left-color: var(--bull); }
.prose { min-width: 0; font-size: 1.0625rem; line-height: 1.72; }
.prose > * { max-width: 74ch; }
.prose > .viz, .prose > .vs, .prose > .dg-compare, .prose > .table-wrap, .prose > .deeper, .prose > .card-grid, .prose > section.related { max-width: none; }
.prose h2 { margin-top: 2.4em; padding-top: 0.2em; }
.prose h3 { margin-top: 1.9em; }
.prose > :first-child, .prose > :first-child h2 { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.1em; }
.prose li { margin: 0.3em 0; }
.prose li::marker { color: var(--bull); }
.prose a.gl { color: inherit; text-decoration: underline dotted var(--bull-line); text-underline-offset: 0.22em; }
.prose a.gl:hover { color: var(--bull-2); text-decoration-style: solid; }
.prose a.ext::after { content: "\2197"; font-size: 0.8em; margin-left: 0.15em; color: var(--dim); }
.prose blockquote { margin: 1.5em 0; padding: 0.2em 0 0.2em 1.2em; border-left: 3px solid var(--bull-line); color: var(--text); font-size: 1.1em; }
.prose code { background: rgba(255, 255, 255, 0.07); padding: 0.15em 0.4em; border-radius: 6px; color: var(--text); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.5em 0; }
.table-wrap { overflow-x: auto; margin: 1.5em 0; border: 1px solid var(--line-2); border-radius: var(--r); }
.table-wrap table, .dg-compare table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
.table-wrap th, .table-wrap td { padding: 0.75rem 1rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.table-wrap thead th { font-family: var(--font-head); font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); background: rgba(255, 255, 255, 0.03); white-space: nowrap; }
.table-wrap tr:last-child td { border-bottom: 0; }
.formula { margin: 1.4em 0; padding: 1rem 1.2rem; border: 1px solid var(--info-line); border-left-width: 3px; border-radius: var(--r-sm); background: var(--info-soft); overflow-x: auto; }
.formula code { background: none; padding: 0; color: #dff1ff; font-size: 1rem; white-space: pre-wrap; overflow-wrap: anywhere; display: block; }
.formula span { display: block; margin-top: 0.5rem; color: var(--muted); font-size: 0.9rem; }
.chapter-steps { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem; padding: 0; margin: 1.4rem 0 0; }
.chapter-steps a { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line-2); color: var(--muted); text-decoration: none; font-weight: 700; font-family: var(--font-head); font-size: 0.92rem; }
.chapter-steps a:hover { border-color: var(--bull-line); color: #fff; }
.chapter-steps .is-current a { background: var(--bull); border-color: var(--bull); color: #02160b; }
.sources { margin-top: 3rem; padding-top: 0.5rem; border-top: 1px solid var(--line); }
.sources h2 { font-size: 1.15rem; margin-top: 1.4em; }
.sources ul { font-size: 0.95rem; color: var(--muted); }
.sources cite { color: var(--text-2); }
.edu-note { display: flex; gap: 0.8rem; margin-top: 2.5rem; padding: 1rem 1.2rem; border: 1px solid var(--line-2); border-radius: var(--r); background: rgba(255, 255, 255, 0.025); font-size: 0.9rem; color: var(--muted); }
.edu-note p { margin: 0; }
.edu-note .ico { color: var(--info); margin-top: 0.2em; width: 20px; height: 20px; }
.related { margin-top: clamp(2.5rem, 2rem + 2vw, 4rem); background: linear-gradient(180deg, rgba(14, 28, 53, 0.42), rgba(8, 13, 22, 0.2)); border-block: 1px solid var(--line); }
.related h2 { margin-bottom: 1.4rem; }
.deeper { margin-top: 3rem; }
.pager { display: grid; grid-template-columns: 1fr auto 1fr; gap: 1rem; align-items: stretch; padding: 2.5rem 0 1rem; }
.pager > * { min-width: 0; }
.pager-link strong { overflow-wrap: anywhere; }
.pager-link { display: grid; gap: 0.25rem; padding: 1rem 1.2rem; border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; background: linear-gradient(170deg, var(--surface-2), var(--surface)); transition: border-color 0.2s, transform 0.25s var(--ease); min-height: 72px; }
.pager-link:hover { border-color: var(--bull-line); transform: translateY(-2px); }
.pager-link span { font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); display: inline-flex; gap: 0.4em; align-items: center; }
.pager-link strong { font-family: var(--font-head); font-weight: 650; }
.pager-prev .ico { transform: rotate(180deg); }
.pager-next { text-align: right; }
.pager-next span { justify-content: flex-end; }
.pager-up { align-self: center; padding: 0.75rem 1rem; color: var(--muted); text-decoration: none; font-size: 0.9rem; font-weight: 550; text-align: center; }
.pager-up:hover { color: var(--bull-2); }

/* compare */
.vs { display: grid; grid-template-columns: 1fr auto 1fr; gap: 0.9rem; align-items: stretch; margin-bottom: 1.5rem; }
.vs-side { padding: 1.3rem 1.4rem; border-radius: var(--r-lg); border: 1px solid var(--tone-line); background: linear-gradient(165deg, var(--tone-soft), rgba(11, 18, 29, 0.6)); }
.vs-side .vs-title { margin: 0 0 0.4rem; padding: 0; font-size: clamp(1.25rem, 1.05rem + 1vw, 1.75rem); color: var(--tone); }
.vs-side p { margin: 0 0 0.8rem; color: var(--text-2); font-size: 1rem; line-height: 1.55; }
.vs-link { font-size: 0.9rem; font-weight: 600; display: inline-flex; gap: 0.4em; align-items: center; color: var(--tone); text-decoration: none; min-height: 44px; }
.vs-shared { margin: -0.6rem 0 1.2rem; }
.vs-shared .vs-link { color: var(--bull-2); }
.vs-mid { align-self: center; font-family: var(--font-head); font-weight: 700; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted); width: 44px; height: 44px; border: 1px solid var(--line-2); border-radius: 50%; display: grid; place-items: center; background: var(--bg); }
.dg-compare { overflow-x: auto; border: 1px solid var(--line-2); border-radius: var(--r); margin: 0 0 1.5rem; }
.dg-compare th, .dg-compare td { padding: 0.8rem 1rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.dg-compare thead th { font-family: var(--font-head); font-size: 0.95rem; color: var(--tone, var(--muted)); background: var(--tone-soft, rgba(255, 255, 255, 0.03)); }
.dg-compare tbody th { font-weight: 600; color: var(--muted); font-size: 0.86rem; width: 24%; min-width: 110px; }
.dg-compare tr:last-child > * { border-bottom: 0; }

/* ---------- 9. callouts ---------- */
.callout, .takeaway, .example, .notmean { margin: 1.8em 0; padding: 1.1rem 1.3rem; border-radius: var(--r); border: 1px solid var(--tone-line, var(--line-2)); background: var(--tone-soft, rgba(255, 255, 255, 0.03)); }
.callout > :last-child, .takeaway > :last-child, .example > :last-child, .notmean > :last-child { margin-bottom: 0; }
.callout-title, .takeaway-title, .example-title { display: flex; align-items: center; gap: 0.55em; font-family: var(--font-head); font-weight: 650; color: var(--tone, var(--text)); margin: 0 0 0.5rem; font-size: 0.98rem; }
.callout--note, .callout--deep { --tone: var(--info); --tone-soft: var(--info-soft); --tone-line: var(--info-line); }
.callout--tip, .callout--beginner { --tone: var(--bull); --tone-soft: var(--bull-soft); --tone-line: var(--bull-line); }
.callout--warn, .callout--security { --tone: var(--warn); --tone-soft: var(--warn-soft); --tone-line: var(--warn-line); }
.callout--risk { --tone: var(--bear-2); --tone-soft: var(--bear-soft); --tone-line: var(--bear-line); }
.takeaway { --tone: var(--bull); --tone-soft: linear-gradient(160deg, rgba(0, 230, 118, 0.14), rgba(0, 230, 118, 0.04)); --tone-line: var(--bull-line); font-size: 1.08rem; color: var(--text); }
.example { --tone: var(--violet); --tone-soft: rgba(182, 147, 255, 0.08); --tone-line: rgba(182, 147, 255, 0.36); }
.example-title em { margin-left: auto; font-style: normal; font-family: var(--font); font-size: 0.72rem; font-weight: 550; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line-2); border-radius: 999px; padding: 0.15em 0.7em; }
.notmean { --tone: var(--bear-2); --tone-soft: linear-gradient(160deg, rgba(255, 59, 59, 0.13), rgba(255, 59, 59, 0.03)); --tone-line: var(--bear-line); padding: 1.3rem 1.5rem; }
.prose .notmean h2 { display: flex; align-items: center; gap: 0.5em; margin: 0 0 0.7rem; padding: 0; font-size: 1.3rem; color: var(--bear-2); }
.notmean h2 .ico { width: 26px; height: 26px; }
.notmean li::marker { color: var(--bear-2); }
.mistakes ol, .mistakes ul { list-style: none; padding: 0; counter-reset: m; display: grid; gap: 0.7rem; }
.mistakes li { counter-increment: m; position: relative; padding: 0.9rem 1rem 0.9rem 3.2rem; border: 1px solid var(--line); border-radius: var(--r-sm); background: rgba(255, 255, 255, 0.025); margin: 0; }
.mistakes li::before { content: counter(m); position: absolute; left: 0.9rem; top: 0.85rem; width: 1.6rem; height: 1.6rem; display: grid; place-items: center; border-radius: 50%; background: var(--warn-soft); border: 1px solid var(--warn-line); color: var(--warn); font-weight: 700; font-size: 0.82rem; }

/* ---------- 10. figures ---------- */
.viz { margin: 2em 0; border: 1px solid var(--line-2); border-radius: var(--r-lg); background: radial-gradient(120% 80% at 0% 0%, rgba(0, 230, 118, 0.05), transparent 55%), radial-gradient(120% 80% at 100% 100%, rgba(255, 59, 59, 0.045), transparent 55%), linear-gradient(170deg, #0b1422, #070b13); padding: clamp(0.85rem, 0.6rem + 1vw, 1.4rem); box-shadow: var(--shadow); }
.viz { container-type: inline-size; container-name: viz; }
.viz-title { font-family: var(--font-head); font-weight: 650; color: var(--text); font-size: 1.02rem; margin: 0.1rem 0.2rem 0.8rem; display: flex; align-items: center; gap: 0.6em; }
.viz-title::before { content: ""; width: 22px; height: 3px; border-radius: 2px; background: linear-gradient(90deg, var(--bull), var(--bear)); flex: none; }
.viz-canvas svg.vz { display: block; width: 100%; height: auto; }
.viz--candle .viz-canvas svg.vz, .viz--anatomy .viz-canvas svg.vz { max-width: 520px; margin-inline: auto; }
.viz-scroll { overflow-x: auto; overscroll-behavior-x: contain; border-radius: var(--r-sm); scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.viz--wide .viz-canvas { min-width: 640px; }
.viz figcaption { margin: 0.9rem 0.2rem 0.1rem; font-size: 0.92rem; color: var(--muted); line-height: 1.55; }
.viz-note { display: inline-block; color: var(--dim); font-size: 0.82rem; }
.viz-legend { margin: 0.9rem 0.2rem 0; padding: 0; list-style: none; counter-reset: lg; display: grid; gap: 0.35rem; font-size: 0.92rem; color: var(--text-2); }
.viz-legend li { counter-increment: lg; display: flex; gap: 0.6em; align-items: baseline; margin: 0; }
.viz-legend li::before { content: counter(lg); flex: none; width: 1.45rem; height: 1.45rem; display: inline-grid; place-items: center; border-radius: 50%; border: 1.5px solid var(--bull-line); color: var(--bull-2); font-size: 0.75rem; font-weight: 700; }

.vz text { font-family: var(--font); fill: var(--muted); }
.vz-t-strong { font-size: 13px; font-weight: 650; }
.vz-t-sub { font-size: 12px; fill: var(--muted); }
.vz-t-tag { font-size: 11.5px; font-weight: 700; letter-spacing: 0.07em; }
.vz-t-axis { font-size: 11px; fill: var(--dim) !important; }
.vz-t-num { font-size: 12px; font-weight: 700; }
.vz-grid { stroke: rgba(190, 215, 255, 0.055); stroke-width: 1; }
.vz-c line { stroke-width: 1.6; stroke-linecap: round; }
.vz-up rect { fill: var(--bull); }
.vz-up line { stroke: var(--bull); }
.vz-down rect { fill: var(--bear); }
.vz-down line { stroke: var(--bear); }
.vz-dim { opacity: 0.5; }
.vz-ghost { opacity: 0.38; }
.vz-ghost rect { fill-opacity: 0.25; stroke-width: 1.5; stroke-dasharray: 4 3; }
.vz-ghost.vz-up rect { stroke: var(--bull); }
.vz-ghost.vz-down rect { stroke: var(--bear); }
.vz-vol { opacity: 0.45; }
.vz-vol.vz-up { fill: var(--bull); }
.vz-vol.vz-down { fill: var(--bear); }
.vz-glow { filter: drop-shadow(0 0 14px color-mix(in srgb, currentColor 40%, transparent)); }
.vz-glow.vz-up { color: var(--bull); }
.vz-glow.vz-down { color: var(--bear); }
.vz-mini .vz-c line { stroke-width: 1.3; }
.vz-candlefig .vz-c line { stroke-width: 2.4; }

/* ---------- 11. diagrams ---------- */
.dg-flow { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 1.6rem; }
.dg-flow--column { grid-template-columns: 1fr; gap: 1.4rem; }
.dg-step { position: relative; display: flex; flex-direction: column; gap: 0.6rem; padding: 1rem; border-radius: var(--r); border: 1px solid var(--tone-line); background: var(--tone-soft); margin: 0; }
.dg-step:not(:last-child)::after { content: ""; position: absolute; right: -1.25rem; top: 50%; width: 0.9rem; height: 0.9rem; border-top: 2px solid var(--muted); border-right: 2px solid var(--muted); transform: translateY(-50%) rotate(45deg); opacity: 0.8; }
.dg-flow--column .dg-step { flex-direction: row; align-items: center; }
.dg-flow--column .dg-step:not(:last-child)::after { right: auto; left: 50%; top: auto; bottom: -1.05rem; transform: translateX(-50%) rotate(135deg); }
.dg-step-n { width: 38px; height: 38px; flex: none; display: grid; place-items: center; border-radius: 11px; border: 1px solid var(--tone-line); color: var(--tone); font-weight: 700; font-family: var(--font-head); background: rgba(5, 8, 13, 0.5); }
.dg-step-n .ico { width: 20px; height: 20px; }
.dg-step-body { display: grid; gap: 0.2rem; }
.dg-step-body strong { font-family: var(--font-head); font-size: 0.98rem; line-height: 1.25; }
.dg-step-body span { font-size: 0.88rem; color: var(--muted); line-height: 1.45; }
.dg-loop-note { margin: 0.9rem 0 0; font-size: 0.88rem; color: var(--muted); display: flex; gap: 0.5em; align-items: center; }
.dg-bars { display: grid; gap: 1rem; }
.dg-bar-head { display: flex; justify-content: space-between; gap: 1rem; font-size: 0.95rem; margin-bottom: 0.35rem; }
.dg-bar-label { color: var(--text); font-weight: 600; }
.dg-bar-value { color: var(--tone); font-weight: 700; font-family: var(--font-head); white-space: nowrap; }
.dg-bar-track { height: 14px; border-radius: 999px; background: rgba(255, 255, 255, 0.06); overflow: hidden; }
.dg-bar-fill { display: block; height: 100%; width: var(--w); border-radius: 999px; background: linear-gradient(90deg, color-mix(in srgb, var(--tone) 55%, transparent), var(--tone)); transform-origin: left; }
.dg-bar-note { margin: 0.35rem 0 0; font-size: 0.85rem; color: var(--muted); }
.dg-split, .dg-anatomy { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.dg-side { padding: 1.1rem; border-radius: var(--r); border: 1px solid var(--tone-line); background: linear-gradient(165deg, var(--tone-soft), rgba(8, 13, 22, 0.5)); min-width: 0; }
.dg-side-head { display: flex; gap: 0.8rem; align-items: flex-start; margin-bottom: 0.7rem; }
.dg-side-ico { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 12px; border: 1px solid var(--tone-line); background: var(--tone-soft); color: var(--tone); }
.dg-side .dg-side-title { font-family: var(--font-head); font-weight: 700; line-height: 1.16; color: var(--tone); margin: 0 0 0.2rem; font-size: 1.1rem; letter-spacing: 0.03em; }
.dg-side p { margin: 0; font-size: 0.92rem; color: var(--text-2); line-height: 1.45; }
.dg-side ul { margin: 0.6rem 0 0; padding-left: 1.15em; font-size: 0.92rem; color: var(--text-2); }
.dg-side li { margin: 0.25em 0; }
.dg-side li::marker { color: var(--tone); }
.dg-side-fig { margin: 0.7rem 0; border-radius: var(--r-sm); border: 1px solid var(--line); background: rgba(5, 8, 13, 0.45); overflow: hidden; }
.dg-side-fig svg.vz { display: block; width: 100%; }
.dg-mini-steps { list-style: none; padding: 0; margin: 0.7rem 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
.dg-mini-steps li { margin: 0; padding: 0.55rem 0.6rem; border-radius: var(--r-sm); background: rgba(5, 8, 13, 0.45); border: 1px solid var(--line); display: grid; gap: 0.15rem; }
.dg-mini-steps strong { color: var(--tone); font-size: 0.84rem; }
.dg-mini-steps span { color: var(--muted); font-size: 0.8rem; line-height: 1.35; }
.dg-anatomy .dg-side { text-align: left; }
.dg-anatomy svg.vz { margin-top: 0.5rem; }
.dg-ladder { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.55rem; }
.dg-level { display: grid; grid-template-columns: 84px 1fr; gap: 0.9rem; align-items: center; margin: 0; }
.dg-level-line { height: 0; border-top: 2px dashed var(--tone); position: relative; }
.dg-level-line::after { content: ""; position: absolute; right: -4px; top: -6px; width: 10px; height: 10px; border-radius: 50%; background: var(--tone); }
.dg-level-body { padding: 0.65rem 0.9rem; border-radius: var(--r-sm); border: 1px solid var(--tone-line); background: var(--tone-soft); display: flex; flex-wrap: wrap; gap: 0.2rem 0.8rem; align-items: baseline; }
.dg-level-body strong { color: var(--tone); font-family: var(--font-head); font-size: 0.95rem; }
.dg-level-body em { font-style: normal; font-family: var(--mono); font-size: 0.86rem; color: var(--text); }
.dg-level-body span { flex-basis: 100%; font-size: 0.86rem; color: var(--muted); }
.dg-stack { display: grid; gap: 0.5rem; }
.dg-layer { display: flex; gap: 0.9rem; align-items: center; padding: 0.85rem 1rem; border-radius: var(--r-sm); border: 1px solid var(--tone-line); background: var(--tone-soft); }
.dg-layer-ico { color: var(--tone); display: grid; }
.dg-layer-ico .ico { width: 24px; height: 24px; }
.dg-layer strong { display: block; font-family: var(--font-head); font-size: 0.98rem; }
.dg-layer span { font-size: 0.89rem; color: var(--muted); }
.dg-timeline { list-style: none; margin: 0; padding: 0 0 0 1.1rem; border-left: 2px solid var(--line-2); display: grid; gap: 1.1rem; }
.dg-timeline li { position: relative; margin: 0; display: grid; gap: 0.15rem; }
.dg-timeline li::before { content: ""; position: absolute; left: calc(-1.1rem - 7px); top: 0.3rem; width: 12px; height: 12px; border-radius: 50%; background: var(--bg); border: 2px solid var(--tone, var(--bull)); }
.dg-when { font-family: var(--mono); font-size: 0.8rem; color: var(--bull-2); letter-spacing: 0.02em; }
.dg-timeline strong { display: block; font-family: var(--font-head); }
.dg-timeline div span { font-size: 0.9rem; color: var(--muted); }
.dg-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 0.7rem; }
.dg-stat { padding: 1rem; border-radius: var(--r); border: 1px solid var(--tone-line); background: var(--tone-soft); text-align: center; }
.dg-stat strong { display: block; font-family: var(--font-head); font-size: clamp(1.3rem, 1.1rem + 1vw, 1.8rem); color: var(--tone); line-height: 1.1; }
.dg-stat span { font-size: 0.85rem; color: var(--muted); }
.dg-gallery { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)); gap: 0.6rem; }
.dg-gallery li { margin: 0; padding: 0.5rem 0.4rem 0.6rem; border: 1px solid var(--line); border-radius: var(--r-sm); background: rgba(5, 8, 13, 0.45); text-align: center; display: grid; gap: 0.3rem; }
.dg-gallery svg { width: 100%; height: 78px; }
.dg-gallery span { font-size: 0.8rem; color: var(--text-2); font-weight: 550; line-height: 1.25; }
.dg-orderbook table { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: 0.9rem; }
.dg-orderbook thead th { text-align: left; font-family: var(--font-head); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); padding: 0.3rem 0.7rem; }
.dg-orderbook td { padding: 0.42rem 0.7rem; }
.ob-ask .ob-price { color: var(--bear-2); }
.ob-bid .ob-price { color: var(--bull-2); }
.ob-depth { width: 46%; }
.ob-depth span { display: block; height: 14px; width: var(--w); border-radius: 3px; }
.ob-ask .ob-depth span { background: linear-gradient(90deg, rgba(255, 59, 59, 0.55), rgba(255, 59, 59, 0.15)); }
.ob-bid .ob-depth span { background: linear-gradient(90deg, rgba(0, 230, 118, 0.55), rgba(0, 230, 118, 0.15)); }
.ob-head th { font-family: var(--font); font-size: 0.78rem; font-weight: 550; text-align: left; padding: 0.4rem 0.7rem; color: var(--muted); }
.ob-spread td { text-align: center; font-family: var(--font); font-size: 0.84rem; color: var(--warn); border-block: 1px dashed var(--warn-line); background: var(--warn-soft); padding: 0.5rem; }

/* figures adapt to their own width, not the viewport */
@container viz (max-width: 660px) {
  .dg-flow { grid-template-columns: 1fr; gap: 1.4rem; }
  .dg-flow .dg-step { flex-direction: row; align-items: center; }
  .dg-flow .dg-step:not(:last-child)::after { right: auto; left: 50%; top: auto; bottom: -1.05rem; transform: translateX(-50%) rotate(135deg); }
}
@container viz (max-width: 860px) {
  .dg-flow--long { grid-template-columns: 1fr; gap: 1.4rem; }
  .dg-flow--long .dg-step { flex-direction: row; align-items: center; }
  .dg-flow--long .dg-step:not(:last-child)::after { right: auto; left: 50%; top: auto; bottom: -1.05rem; transform: translateX(-50%) rotate(135deg); }
}
@container viz (max-width: 560px) {
  .dg-split, .dg-anatomy { grid-template-columns: minmax(0, 1fr); }
  .dg-mini-steps { grid-template-columns: 1fr; }
}

/* ---------- 12. landing / filter / search / glossary ---------- */
.chapter-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.9rem; counter-reset: ch; }
.chapter-row { display: grid; grid-template-columns: 64px 1fr 190px; gap: 1.2rem; align-items: center; padding: 1.1rem 1.2rem; border: 1px solid var(--line); border-radius: var(--r-lg); background: linear-gradient(170deg, var(--surface-2), var(--surface)); text-decoration: none; color: var(--text-2); transition: transform 0.28s var(--ease), border-color 0.2s, box-shadow 0.3s; }
.chapter-row:hover { transform: translateX(4px); border-color: var(--bull-line); box-shadow: 0 22px 46px -30px rgba(0, 230, 118, 0.5); color: var(--text-2); }
.chapter-num { width: 56px; height: 56px; display: grid; place-items: center; border-radius: 16px; font-family: var(--font-head); font-weight: 800; font-size: 1.4rem; color: var(--bull); border: 1px solid var(--bull-line); background: var(--bull-soft); }
.chapter-main { display: grid; gap: 0.25rem; min-width: 0; }
.chapter-covers { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.4rem; }
.chapter-thumb { aspect-ratio: 5 / 3; border-radius: var(--r-sm); background: #080e18; border: 1px solid var(--line); display: grid; place-items: center; padding: 0.4rem; }
.chapter-thumb svg.vz { width: 100%; height: 100%; }
.filterbar { display: flex; flex-wrap: wrap; gap: 0.8rem 1rem; align-items: center; margin-bottom: 1.5rem; }
.filter-search { display: flex; align-items: center; gap: 0.5rem; flex: 1 1 260px; max-width: 420px; height: 46px; padding: 0 0.9rem; border: 1px solid var(--line-2); border-radius: 12px; background: rgba(255, 255, 255, 0.04); color: var(--muted); }
.filter-search:focus-within { border-color: var(--bull-line); box-shadow: 0 0 0 3px var(--bull-soft); }
.filter-search input { flex: 1; min-width: 0; height: 100%; background: none; border: 0; outline: 2px solid transparent; color: var(--text); font: inherit; }
.filter-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.filter-count { margin: 0 0 0 auto; color: var(--dim); font-size: 0.88rem; }
.filter-item[hidden] { display: none; }
.filter-empty { padding: 2rem; text-align: center; color: var(--muted); border: 1px dashed var(--line-2); border-radius: var(--r); }
.az { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-bottom: 2rem; position: sticky; top: var(--header-h); z-index: 5; padding: 0.6rem 0; background: linear-gradient(180deg, var(--bg-2) 70%, transparent); }
.az a { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line-2); text-decoration: none; color: var(--text-2); font-family: var(--font-head); font-weight: 650; background: var(--bg-2); }
.az a:hover { border-color: var(--bull-line); color: var(--bull-2); }
.az-group { margin-bottom: 2.2rem; }
.az-group[hidden] { display: none; }
.az-group h2 { font-size: 1.6rem; color: var(--bull); border-bottom: 1px solid var(--line); padding-bottom: 0.3rem; margin-bottom: 0.4rem; }
.az-group dl { margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 0 2rem; }
.term { padding: 0.35rem 0 0.85rem; border-bottom: 1px solid var(--line); }
.term dt { font-family: var(--font-head); font-weight: 650; }
.term dt a { text-decoration: none; color: var(--text); display: inline-flex; align-items: center; min-height: 44px; }
.term dt a:hover { color: var(--bull-2); }
.term dd { margin: 0.2rem 0 0; color: var(--muted); font-size: 0.94rem; }
.term-aka { display: block; font-family: var(--font); font-weight: 400; font-size: 0.82rem; color: var(--dim); }
.term-page .term-aka { font-size: 0.95rem; margin: -0.3rem 0 1rem; }
.term-links { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0 !important; }
.term-links a { display: inline-flex; align-items: center; min-height: 40px; padding: 0.3rem 0.9rem; border: 1px solid var(--line-2); border-radius: 999px; text-decoration: none; color: var(--text-2); font-size: 0.92rem; }
.term-links a:hover { border-color: var(--bull-line); color: #fff; }
.search-form { margin: 0 0 1.2rem; max-width: none; }
.search-filters { display: grid; gap: 0.6rem; margin-bottom: 1.2rem; }
.search-status { color: var(--muted); font-size: 0.92rem; min-height: 1.5em; }
.search-results { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.7rem; }
.search-results a { display: grid; gap: 0.25rem; padding: 1rem 1.2rem; border: 1px solid var(--line); border-radius: var(--r); background: linear-gradient(170deg, var(--surface-2), var(--surface)); text-decoration: none; color: var(--text-2); transition: border-color 0.2s, transform 0.25s var(--ease); }
.search-results a:hover { border-color: var(--bull-line); transform: translateX(3px); }
.search-results small { font-size: 0.74rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--bull); font-weight: 600; }
.search-results strong { font-family: var(--font-head); font-size: 1.1rem; }
.search-results span { color: var(--muted); font-size: 0.94rem; }
.search-results mark, .suggest mark { background: none; color: var(--bull-2); font-weight: inherit; }
.search-empty { padding: 1.5rem; border: 1px dashed var(--line-2); border-radius: var(--r); color: var(--muted); }
.search-empty ul { margin: 0.6rem 0 0; padding-left: 1.2em; }
.search-start { margin-top: 2rem; }
.search-start h2 { margin-top: 1.6rem; }

/* ---------- 13. motion ---------- */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.22s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes candle-in { from { opacity: 0; transform: scaleY(0.2); } to { opacity: 1; transform: none; } }
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes grow { from { transform: scaleX(0); } to { transform: none; } }
@keyframes hero-drift { from { transform: translateX(0); } to { transform: translateX(-1.5%); } }

@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] { opacity: 0; }
  .js [data-reveal].is-in { animation: rise 0.6s var(--ease) both; animation-delay: calc(var(--d, 0) * 70ms); }
  .hero-inner > * { animation: rise 0.7s var(--ease) both; }
  .hero-inner > :nth-child(2) { animation-delay: 0.06s; }
  .hero-inner > :nth-child(3) { animation-delay: 0.12s; }
  .hero-inner > :nth-child(4) { animation-delay: 0.18s; }
  .hero-inner > :nth-child(5) { animation-delay: 0.24s; }
  .hero-inner > :nth-child(6) { animation-delay: 0.3s; }
  .hero-bg .vz-c { transform-box: fill-box; transform-origin: center bottom; animation: candle-in 0.7s var(--ease) both; animation-delay: calc(0.25s + var(--i) * 16ms); }

  .js .viz[data-animate]:not(.is-in) .vz-c:not(.vz-dim), .js .viz[data-animate]:not(.is-in) .vz-fade, .js .viz[data-animate]:not(.is-in) .dg-step, .js .viz[data-animate]:not(.is-in) .dg-layer, .js .viz[data-animate]:not(.is-in) .dg-level, .js .viz[data-animate]:not(.is-in) .dg-timeline li, .js .viz[data-animate]:not(.is-in) .dg-stat { opacity: 0; }
  .js .viz[data-animate]:not(.is-in) .vz-draw { stroke-dasharray: 1; stroke-dashoffset: 1; }
  .js .viz[data-animate]:not(.is-in) .dg-bar-fill { transform: scaleX(0); }
  .viz.is-in .vz-c:not(.vz-dim) { transform-box: fill-box; transform-origin: center; animation: candle-in 0.45s var(--ease) both; animation-delay: calc(var(--i, 0) * 14ms); }
  .viz.is-in .vz-ghost { animation-name: fade; animation-duration: 0.8s; animation-delay: 1.1s; opacity: 0.38; }
  .viz.is-in .vz-fade { animation: fade 0.6s ease both; animation-delay: calc(0.55s + var(--i, 0) * 90ms); }
  .viz.is-in .vz-late { animation-delay: 1.25s; }
  .viz.is-in .vz-draw { stroke-dasharray: 1; animation: draw 1.1s var(--ease) both; animation-delay: 0.5s; }
  .viz.is-in .dg-step, .viz.is-in .dg-layer, .viz.is-in .dg-level, .viz.is-in .dg-timeline li, .viz.is-in .dg-stat { animation: rise 0.5s var(--ease) both; animation-delay: calc(var(--i, 0) * 130ms); }
  .viz.is-in .dg-bar-fill { animation: grow 0.9s var(--ease) both; animation-delay: calc(0.15s + var(--i, 0) * 140ms); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  @view-transition { navigation: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .footer-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-brand { grid-column: 1 / -1; }
  .header-search { display: none; }
  .header-search-btn { display: inline-flex; margin-left: 0; }
  .main-nav { margin-left: auto; }
}
@media (max-width: 900px) {
  .article-grid { grid-template-columns: minmax(0, 1fr); }
  .toc { position: static; max-height: none; border: 1px solid var(--line-2); border-radius: var(--r); padding: 0.5rem 1rem; background: rgba(255, 255, 255, 0.025); }
  .toc summary { min-height: 40px; display: flex; align-items: center; justify-content: space-between; }
  .toc summary::after { content: "+"; font-size: 1.2rem; color: var(--bull); }
  .toc details[open] summary::after { content: "\2212"; }
  .toc ol { margin-bottom: 0.5rem; }
  .split-feature, .promise, .page-hero-split { grid-template-columns: minmax(0, 1fr); }
  .page-hero-thumb { display: none; }
  .nav-toggle { display: inline-flex; }
  .header-search-btn { margin-left: auto; }
  .main-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; margin: 0; background: #070c15; border-bottom: 1px solid var(--line-2); padding: 0.6rem 1.25rem 1.2rem; box-shadow: var(--shadow); max-height: calc(100vh - var(--header-h)); overflow: auto; }
  .main-nav.is-open { display: block; }
  .main-nav ul { flex-direction: column; gap: 0.2rem; }
  .main-nav a { padding: 0.9rem 0.9rem; font-size: 1.05rem; min-height: 48px; }
  .nav-search-link { display: block; }
  .chapter-row { grid-template-columns: 56px 1fr; }
  .chapter-thumb { display: none; }
}
@media (max-width: 700px) {
  .path-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .vs { grid-template-columns: 1fr; }
  .vs-mid { justify-self: center; margin: -0.3rem 0; }
  .pager { grid-template-columns: 1fr 1fr; }
  .pager-up { grid-column: 1 / -1; grid-row: 2; }
  .hero-search { flex-wrap: wrap; padding: 0.5rem 0.5rem 0.5rem 0.9rem; }
  .hero-search .btn, .search-form .btn { min-height: 44px; padding-inline: 1rem; }
  .brand-sub { display: none; }
  .dg-level { grid-template-columns: 34px 1fr; }
  .dg-mini-steps { grid-template-columns: 1fr; }
  .filter-count { margin-left: 0; flex-basis: 100%; }
  .section-head--row .btn { width: 100%; }
}
@media (max-width: 420px) {
  .wrap, .wrap--narrow { width: min(100% - 1.75rem, var(--wrap)); }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-search input { font-size: 0.95rem; }
  .hero-search .btn { flex: 1 1 100%; }
  .brand img { height: 34px; }
  .hero-cta .btn { width: 100%; }
  .chapter-row { grid-template-columns: 1fr; }
  .pager { grid-template-columns: minmax(0, 1fr); }
  .pager-up { grid-column: auto; grid-row: auto; }
  .pager-next { text-align: left; }
  .pager-next span { justify-content: flex-start; }
  .chapter-num { width: 44px; height: 44px; font-size: 1.1rem; border-radius: 12px; }
}

/* ---------- 14. print ---------- */
@media print {
  .site-header, .site-footer, .toc, .pager, .related, .hero-bg, .filterbar { display: none !important; }
  body { background: #fff; color: #000; }
  body::before { display: none; }
  .viz { break-inside: avoid; box-shadow: none; }
}

/* ---------- 15. "Watch in 60 Seconds" player ---------- */
.viz--bare { margin: 0; border: 0; background: none; padding: 0; box-shadow: none; border-radius: 0; }
.watch { margin: 0 0 2.4rem; max-width: none !important; border: 1px solid var(--line-2); border-radius: var(--r-lg); background: radial-gradient(120% 90% at 0% 0%, rgba(0, 230, 118, 0.07), transparent 55%), radial-gradient(120% 90% at 100% 100%, rgba(40, 96, 200, 0.14), transparent 60%), linear-gradient(170deg, #0b1422, #060a12); box-shadow: var(--shadow); overflow: hidden; }
.watch-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.9rem; padding: 0.9rem clamp(0.9rem, 0.6rem + 1vw, 1.4rem) 0.8rem; border-bottom: 1px solid var(--line); }
.watch-badge { display: inline-flex; align-items: center; gap: 0.45em; padding: 0.3em 0.8em; border-radius: 999px; background: var(--bull-soft); border: 1px solid var(--bull-line); color: var(--bull-2); font-family: var(--font-head); font-size: 0.74rem; font-weight: 650; letter-spacing: 0.1em; text-transform: uppercase; white-space: nowrap; }
.watch-badge .ico { width: 0.95em; height: 0.95em; fill: currentColor; stroke: none; }
.prose .watch .watch-title { margin: 0; padding: 0; font-size: 1.12rem; letter-spacing: -0.01em; }
.watch-len { margin-left: auto; font-size: 0.82rem; color: var(--dim); white-space: nowrap; }
.watch-stage { position: relative; display: grid; min-height: clamp(250px, 42vw, 430px); background: radial-gradient(90% 70% at 50% 0%, rgba(30, 84, 190, 0.14), transparent 70%), #050910; }
.watch-scene { grid-area: 1 / 1; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 0.6rem; padding: 0.9rem clamp(0.8rem, 0.5rem + 1.2vw, 1.5rem) 1rem; opacity: 0; visibility: hidden; transition: opacity 0.4s var(--ease), visibility 0s linear 0.4s; min-width: 0; }
.watch-scene.is-active { opacity: 1; visibility: visible; transition: opacity 0.4s var(--ease); }
.watch-kicker { margin: 0; font-family: var(--font-head); font-weight: 650; font-size: clamp(0.95rem, 0.85rem + 0.5vw, 1.2rem); color: var(--text); display: flex; align-items: center; gap: 0.6em; }
.watch-kicker span { font-size: 0.72rem; letter-spacing: 0.08em; color: var(--bull-2); border: 1px solid var(--bull-line); background: var(--bull-soft); border-radius: 999px; padding: 0.15em 0.6em; font-weight: 700; }
.watch-figure { display: grid; align-content: center; justify-items: center; min-width: 0; width: 100%; }
.watch-figure > svg.vz { display: block; width: 100%; max-width: 760px; height: auto; max-height: min(56vh, 400px); }
.watch-figure > svg.vz-anatomy, .watch-figure > svg.vz-candlefig { max-width: 400px; }
.watch-figure > .dg-flow, .watch-figure > .dg-split, .watch-figure > .dg-ladder, .watch-figure > .dg-stack, .watch-figure > .dg-bars, .watch-figure > .dg-gallery { width: 100%; max-width: 680px; text-align: left; }
.watch-figure .dg-gallery { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.watch-figure .dg-gallery svg { height: clamp(120px, 16vw, 170px); }
.watch-figure .dg-gallery li { padding: 0.6rem 0.4rem 0.7rem; }
.watch-figure .dg-gallery span { font-size: clamp(0.72rem, 0.66rem + 0.3vw, 0.9rem); }
.watch-points { list-style: none; margin: 0; padding: 0 !important; display: flex; flex-wrap: wrap; justify-content: center; gap: 0.4rem; min-height: 2.1rem; }
.watch-points li { margin: 0; padding: 0.3em 0.85em; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(9, 16, 26, 0.9); color: var(--text); font-size: clamp(0.78rem, 0.72rem + 0.3vw, 0.92rem); font-weight: 600; opacity: 0; transform: translateY(6px); transition: opacity 0.35s var(--ease), transform 0.35s var(--ease); }
.watch-points li.is-on { opacity: 1; transform: none; }
.watch:not(.is-started) .watch-points li { opacity: 1; transform: none; }
.watch-bigplay { position: absolute; inset: 0; margin: auto; width: max-content; height: max-content; display: none; align-items: center; gap: 0.7rem; padding: 0.95rem 1.5rem 0.95rem 1.2rem; border: 0; border-radius: 999px; background: linear-gradient(180deg, #19f08a, #00c765); color: #02160b; font: inherit; font-weight: 700; font-size: 1.05rem; cursor: pointer; box-shadow: 0 0 0 10px rgba(0, 230, 118, 0.12), 0 22px 50px -18px rgba(0, 230, 118, 0.8); z-index: 3; }
.watch-bigplay .ico { width: 1.5rem; height: 1.5rem; fill: currentColor; stroke: none; }
.watch-bigplay:hover { transform: scale(1.04); }
.watch.is-ready:not(.is-started) .watch-bigplay { display: inline-flex; }
.watch.is-ready:not(.is-started) .watch-scene.is-active { opacity: 0.4; }
.watch-caption { margin: 0; padding: 0.8rem clamp(0.9rem, 0.6rem + 1vw, 1.5rem); min-height: 4.4em; display: grid; align-content: center; text-align: center; font-size: clamp(1rem, 0.94rem + 0.35vw, 1.14rem); line-height: 1.45; color: var(--text); background: rgba(3, 6, 11, 0.72); border-top: 1px solid var(--line); max-width: none !important; }
.watch.is-cc-off.is-started .watch-caption { visibility: hidden; }
.watch-controls { display: none; align-items: center; gap: 0.4rem; padding: 0.55rem clamp(0.6rem, 0.4rem + 0.8vw, 1.1rem); border-top: 1px solid var(--line); flex-wrap: wrap; }
.watch.is-ready .watch-controls { display: flex; }
.watch-btn { width: 44px; height: 44px; flex: none; display: inline-grid; place-items: center; border-radius: 12px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.04); color: var(--text); cursor: pointer; font: inherit; font-weight: 650; font-size: 0.86rem; }
.watch-btn:hover { border-color: var(--bull-line); background: var(--bull-soft); }
.watch-btn .ico { width: 20px; height: 20px; }
.watch-toggle { background: var(--bull); border-color: var(--bull); color: #02160b; }
.watch-toggle:hover { background: #33f092; }
.watch-toggle .ico { fill: currentColor; stroke: currentColor; }
.watch-btn[aria-pressed="true"].watch-cc { border-color: var(--bull-line); color: var(--bull-2); background: var(--bull-soft); }
.watch-btn[aria-pressed="true"].watch-mute { border-color: var(--warn-line); color: var(--warn); background: var(--warn-soft); }
.watch-speed { width: auto; min-width: 54px; padding: 0 0.6rem; }
.watch-time { font-family: var(--mono); font-size: 0.82rem; color: var(--muted); white-space: nowrap; padding: 0 0.3rem; }
.watch-seek { flex: 1 1 140px; min-width: 110px; height: 44px; margin: 0; background: none; cursor: pointer; -webkit-appearance: none; appearance: none; --p: 0%; }
.watch-seek::-webkit-slider-runnable-track { height: 6px; border-radius: 999px; background: linear-gradient(90deg, var(--bull) var(--p), rgba(255, 255, 255, 0.14) var(--p)); }
.watch-seek::-moz-range-track { height: 6px; border-radius: 999px; background: rgba(255, 255, 255, 0.14); }
.watch-seek::-moz-range-progress { height: 6px; border-radius: 999px; background: var(--bull); }
.watch-seek::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 18px; height: 18px; margin-top: -6px; border-radius: 50%; background: #fff; border: 3px solid var(--bull); }
.watch-seek::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid var(--bull); }
.watch-status { margin: 0; padding: 0 1.1rem; font-size: 0.85rem; color: var(--warn); min-height: 0; max-width: none !important; }
.watch-status:not(:empty) { padding-bottom: 0.6rem; }
.watch-transcript { border-top: 1px solid var(--line); max-width: none !important; }
.watch-transcript summary { display: flex; align-items: center; gap: 0.5em; min-height: 46px; padding: 0 clamp(0.9rem, 0.6rem + 1vw, 1.4rem); cursor: pointer; font-weight: 600; font-size: 0.92rem; color: var(--text-2); list-style: none; }
.watch-transcript summary::-webkit-details-marker { display: none; }
.watch-transcript summary::after { content: "+"; margin-left: auto; color: var(--bull); font-size: 1.2rem; }
.watch-transcript[open] summary::after { content: "\2212"; }
.prose .watch-transcript ol { list-style: none; margin: 0; padding: 0 clamp(0.9rem, 0.6rem + 1vw, 1.4rem) 1rem; display: grid; gap: 0.15rem; }
.watch-transcript li { display: grid; grid-template-columns: 56px 1fr; gap: 0.6rem; align-items: baseline; margin: 0; font-size: 0.95rem; color: var(--text-2); }
.watch-transcript .watch-tr-head { display: block; margin-top: 0.7rem; font-family: var(--font-head); font-size: 0.74rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--bull-2); }
.watch-ts { min-height: 36px; border: 1px solid var(--line-2); border-radius: 8px; background: rgba(255, 255, 255, 0.04); color: var(--muted); font-family: var(--mono); font-size: 0.8rem; cursor: pointer; }
.watch-ts:hover { border-color: var(--bull-line); color: var(--bull-2); }
.watch-note { margin: 0; padding: 0.6rem clamp(0.9rem, 0.6rem + 1vw, 1.4rem) 0.8rem; font-size: 0.8rem; color: var(--dim); border-top: 1px solid var(--line); max-width: none !important; }
.watch-nojs { margin: 0; padding: 0.8rem 1.1rem; font-size: 0.9rem; }
.watch-nojs audio { display: block; width: 100%; margin-top: 0.4rem; }
.watch-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 1.1rem; }
.watch-card { flex-direction: row; align-items: stretch; }
.watch-card-play { flex: none; width: 92px; display: grid; place-items: center; background: radial-gradient(circle at 50% 50%, rgba(0, 230, 118, 0.22), transparent 70%), #080e18; border-right: 1px solid var(--line); color: var(--bull); }
.watch-card-play .ico { width: 34px; height: 34px; fill: currentColor; stroke: none; }
@media (max-width: 560px) {
  .watch-len { margin-left: 0; flex-basis: 100%; }
  .watch-controls { gap: 0.3rem; padding-inline: 0.5rem; }
  .watch-seek { order: -1; flex-basis: 100%; height: 36px; }
  .watch-time { margin-right: auto; font-size: 0.76rem; padding: 0 0.15rem; }
  .watch-speed { min-width: 48px; padding: 0 0.4rem; }
  .watch-transcript li { grid-template-columns: 50px 1fr; }
  .watch-figure .dg-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 320px; }
  .watch-figure .dg-gallery svg { height: 118px; }
  .watch-stage { min-height: 300px; }
}
/* Lessons written after the first five samples use denser diagrams on phones, so the figure and its caption
   stay on one screen. The five approved samples keep their original spacing. */
@media (max-width: 560px) {
  .watch--compact .watch-scene { gap: 0.5rem; padding-top: 0.75rem; padding-bottom: 0.8rem; }
  .watch--compact .watch-points { gap: 0.3rem; min-height: 1.9rem; }
  .watch--compact .watch-points li { font-size: 0.76rem; padding: 0.26em 0.7em; }
  .watch--compact .watch-figure .dg-flow { gap: 0.95rem; }
  .watch--compact .watch-figure .dg-step { padding: 0.45rem 0.7rem; gap: 0.65rem; }
  .watch--compact .watch-figure .dg-flow .dg-step:not(:last-child)::after { bottom: -0.74rem; width: 0.6rem; height: 0.6rem; }
  .watch--compact .watch-figure .dg-step-n { width: 30px; height: 30px; border-radius: 9px; }
  .watch--compact .watch-figure .dg-step-n .ico { width: 17px; height: 17px; }
  .watch--compact .watch-figure .dg-step-body { gap: 0.05rem; }
  .watch--compact .watch-figure .dg-step-body strong { font-size: 0.93rem; }
  .watch--compact .watch-figure .dg-step-body span { font-size: 0.83rem; line-height: 1.3; }
  .watch--compact .watch-figure .dg-stack { gap: 0.4rem; }
  .watch--compact .watch-figure .dg-layer { padding: 0.45rem 0.75rem; gap: 0.7rem; }
  .watch--compact .watch-figure .dg-layer-ico .ico { width: 20px; height: 20px; }
  .watch--compact .watch-figure .dg-layer strong { font-size: 0.93rem; line-height: 1.25; }
  .watch--compact .watch-figure .dg-layer span { font-size: 0.83rem; line-height: 1.3; }
  .watch--compact .watch-figure .dg-ladder { gap: 0.4rem; }
  .watch--compact .watch-figure .dg-level { grid-template-columns: 30px 1fr; gap: 0.6rem; }
  .watch--compact .watch-figure .dg-level-body { padding: 0.4rem 0.7rem; gap: 0.05rem 0.7rem; }
  .watch--compact .watch-figure .dg-level-body span { font-size: 0.83rem; line-height: 1.3; }
  .watch--compact .watch-figure .dg-split { gap: 0.5rem; }
  .watch--compact .watch-figure .dg-side { padding: 0.6rem 0.75rem; }
  .watch--compact .watch-figure .dg-side-head { gap: 0.6rem; margin-bottom: 0.3rem; align-items: center; }
  .watch--compact .watch-figure .dg-side-ico { width: 32px; height: 32px; border-radius: 9px; }
  .watch--compact .watch-figure .dg-side-ico .ico { width: 18px; height: 18px; }
  .watch--compact .watch-figure .dg-side .dg-side-title { font-size: 0.98rem; margin: 0; }
  .watch--compact .watch-figure .dg-side p { font-size: 0.85rem; line-height: 1.3; }
  .watch--compact .watch-figure .dg-side ul { margin-top: 0.25rem; font-size: 0.85rem; line-height: 1.3; }
  .watch--compact .watch-figure .dg-side li { margin: 0.12em 0; }
  .watch--compact .watch-figure .dg-orderbook table { font-size: 0.85rem; }
  .watch--compact .watch-figure .dg-orderbook td { padding: 0.2rem 0.6rem; }
  .watch--compact .watch-figure .ob-head th { padding: 0.25rem 0.6rem; font-size: 0.76rem; }
  .watch--compact .watch-figure .ob-spread td { padding: 0.3rem 0.5rem; font-size: 0.8rem; line-height: 1.3; }
  .watch--compact .watch-figure .ob-depth span { height: 11px; }
  .watch--compact .watch-figure .dg-bars { gap: 0.6rem; }
  .watch--compact .watch-figure .dg-bar-head { font-size: 0.88rem; margin-bottom: 0.25rem; }
  .watch--compact .watch-figure .dg-bar-note { margin-top: 0.2rem; font-size: 0.8rem; line-height: 1.3; }
  .watch--compact .watch-figure .dg-stats { gap: 0.5rem; }
  .watch--compact .watch-figure .dg-stat { padding: 0.6rem 0.5rem; }
  .watch--compact .watch-figure .dg-stat span { font-size: 0.8rem; line-height: 1.3; display: block; }
}
@media (prefers-reduced-motion: reduce) {
  .watch-scene, .watch-points li { transition: none; }
}
@media print {
  .watch-stage, .watch-controls, .watch-caption, .watch-bigplay { display: none !important; }
  .watch-transcript > ol { display: grid !important; }
}

.watch-group { margin: 2.2rem 0 0.9rem; }
.watch-group:first-child { margin-top: 0; }
.watch-group-note { color: var(--muted); margin: -0.3rem 0 1.1rem; max-width: 80ch; }
.watch-card--draft .watch-card-play { color: var(--info); background: radial-gradient(circle at 50% 50%, rgba(90, 184, 255, 0.18), transparent 70%), #080e18; }
.watch-card--draft .watch-card-play .ico { fill: none; stroke: currentColor; }
.watch-card--draft .card-eyebrow { color: var(--info); }

/* private script review page */
.review-stats { margin-bottom: 1.5rem; }
.review-index ol { columns: 3 220px; padding-left: 1.2rem; margin: 0 0 2rem; font-size: 0.95rem; }
.review-index li { margin: 0.2rem 0; break-inside: avoid; }
.review-lesson { border: 1px solid var(--line-2); border-radius: var(--r); background: linear-gradient(170deg, var(--surface-2), var(--surface)); padding: 0.75rem clamp(0.9rem, 0.7rem + 1vw, 1.5rem); margin-bottom: 0.6rem; }
.review-lesson > summary { cursor: pointer; display: grid; gap: 0.15rem; list-style: none; min-height: 44px; align-content: center; }
.review-lesson > summary::-webkit-details-marker { display: none; }
.review-lesson > summary .review-title { font-family: var(--font-head); font-weight: 650; font-size: 1.12rem; color: var(--text); }
.review-lesson > summary .review-title::before { content: "+"; display: inline-block; width: 1.1em; color: var(--bull); font-weight: 700; }
.review-lesson[open] > summary .review-title::before { content: "\2212"; }
.review-lesson > summary .review-sub { font-size: 0.84rem; color: var(--muted); padding-left: 1.25em; }
.review-state { justify-self: start; margin: 0.25rem 0 0 1.25em; font-size: 0.74rem; font-weight: 650; letter-spacing: 0.04em; border-radius: 999px; padding: 0.15em 0.7em; border: 1px solid var(--line-2); color: var(--muted); }
.review-state--ready { color: var(--bull-2); border-color: var(--bull-line); background: var(--bull-soft); }
.review-state--approved { color: var(--bull-2); border-color: var(--bull-line); background: var(--bull-soft); }
.review-state--recorded { color: var(--info); border-color: var(--info-line, var(--line-2)); background: var(--info-soft, transparent); }
.review-state--held { color: var(--warn); border-color: var(--warn-line); background: var(--warn-soft); }
.review-held { border: 1px solid var(--warn-line); background: var(--warn-soft); border-radius: var(--r); padding: 0.8rem 1rem; color: var(--text-2); }
.review-lesson[open] > summary { margin-bottom: 0.9rem; padding-bottom: 0.7rem; border-bottom: 1px solid var(--line); }
.review-how { color: var(--text-2); display: flex; flex-wrap: wrap; gap: 0.8rem; align-items: center; }
.review-index h2 { font-size: 1rem; margin: 1rem 0 0.4rem; }
.review-index h2 span { color: var(--muted); font-weight: 400; }
.review-group { font-size: 1.5rem; margin: 2.2rem 0 1rem; padding-bottom: 0.4rem; border-bottom: 1px solid var(--line-2); }
.review-meta { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0 0 0.8rem; }
.review-scene { border-top: 1px solid var(--line); padding-top: 1rem; margin-top: 1rem; }
.review-scene h4 { font-size: 1.05rem; display: flex; gap: 0.6em; align-items: center; margin: 0 0 0.4rem; }
.review-scene h4 span { font-size: 0.72rem; color: var(--bull-2); border: 1px solid var(--bull-line); background: var(--bull-soft); border-radius: 999px; padding: 0.15em 0.6em; }
.review-fig { display: flex; gap: 0.5em; align-items: baseline; color: var(--info); font-size: 0.9rem; margin: 0 0 0.6rem; }
.review-scene ol { margin: 0; padding-left: 1.3rem; display: grid; gap: 0.6rem; }
.review-text { margin: 0; color: var(--text); font-size: 1.04rem; }
.review-say, .review-point { margin: 0.15rem 0 0; font-size: 0.88rem; color: var(--muted); }
.review-say strong { color: var(--warn); font-weight: 600; }
.review-point strong { color: var(--bull-2); font-weight: 600; }
.review-lesson footer { border-top: 1px solid var(--line); margin-top: 1rem; padding-top: 0.8rem; font-size: 0.92rem; color: var(--muted); }
.review-lesson footer h4 { font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin: 0.8rem 0 0.3rem; }
.review-lesson footer ul { margin: 0; padding-left: 1.2rem; }
.review-lesson footer li { overflow-wrap: anywhere; margin: 0.3em 0; }

/* ---------- pattern gallery (homepage section + /patterns/) ---------- */
.band--patterns { background: radial-gradient(60% 70% at 12% 20%, rgba(0, 230, 118, 0.07), transparent 70%), radial-gradient(60% 70% at 88% 25%, rgba(255, 59, 59, 0.07), transparent 70%), linear-gradient(180deg, rgba(14, 28, 53, 0.34), rgba(8, 13, 22, 0.1)); border-block: 1px solid var(--line); }
.pat-split { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; align-items: start; }
.pat-panel { --tone: var(--bull); --tone-soft: var(--bull-soft); --tone-line: var(--bull-line); border: 1px solid var(--tone-line); border-radius: var(--r-lg); padding: clamp(1rem, 0.6rem + 1.4vw, 1.6rem); background: linear-gradient(165deg, var(--tone-soft), rgba(8, 13, 22, 0.55) 55%); box-shadow: var(--shadow); }
.pat-panel--bear { --tone: var(--bear); --tone-soft: var(--bear-soft); --tone-line: var(--bear-line); }
.pat-head { display: flex; align-items: center; gap: 0.9rem; margin-bottom: 1.1rem; }
.pat-head h3 { margin: 0; font-size: clamp(1.25rem, 1.05rem + 0.8vw, 1.6rem); color: var(--text); }
.pat-head p { margin: 0.15rem 0 0; color: var(--muted); font-size: 0.95rem; }
.pat-arrow { flex: none; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 16px; border: 1px solid var(--tone-line); background: var(--tone-soft); color: var(--tone); }
.pat-arrow .ico { width: 28px; height: 28px; stroke-width: 2.2; }
.pat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: 0.8rem; }
.pcard { border-color: var(--line-2); }
.pcard .card-thumb { aspect-ratio: 5 / 3.2; padding: 0.4rem; }
.pcard .card-body { padding: 0.75rem 0.85rem 0.9rem; gap: 0.25rem; }
.pcard .card-eyebrow { font-size: 0.66rem; color: var(--tone, var(--bull)); }
.pcard .card-title { font-size: 0.98rem; }
.pcard .card-text { font-size: 0.84rem; line-height: 1.4; color: var(--muted); }
.pcard--bull { --tone: var(--bull); }
.pcard--bear { --tone: var(--bear); }
.pcard--bear:hover { border-color: var(--bear-line); box-shadow: 0 22px 46px -26px rgba(255, 59, 59, 0.45); }
.pcard:focus-visible { outline-offset: 3px; }
.pat-more { display: inline-flex; align-items: center; gap: 0.5em; margin-top: 1.1rem; min-height: 44px; font-weight: 600; font-size: 0.95rem; color: var(--tone); text-decoration: none; }
.pat-more:hover { text-decoration: underline; text-underline-offset: 0.25em; }
.pat-more .ico { width: 1.05em; height: 1.05em; transition: transform 0.25s var(--ease); }
.pat-more:hover .ico { transform: translateX(4px); }
.pat-note { display: flex; gap: 0.7rem; align-items: flex-start; max-width: 860px; margin: 1.8rem 0 0; padding: 0.85rem 1.1rem; border: 1px solid var(--info-line); border-radius: var(--r); background: var(--info-soft); color: var(--text-2); font-size: 0.95rem; }
.pat-note .ico { flex: none; width: 1.25rem; height: 1.25rem; margin-top: 0.15rem; color: var(--info); }
.pat-jump { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: 0.4rem; }
.pat-jump .chip-btn { display: inline-flex; align-items: center; gap: 0.45em; text-decoration: none; }
.chip-btn--bull:hover { border-color: var(--bull-line); background: var(--bull-soft); color: var(--bull-2); }
.chip-btn--bear:hover { border-color: var(--bear-line); background: var(--bear-soft); color: var(--bear-2); }
.pat-section { scroll-margin-top: calc(var(--header-h) + 12px); }
.pat-section--bull .eyebrow { color: var(--bull); }
.pat-section--bear .eyebrow { color: var(--bear-2); }
@media (prefers-reduced-motion: no-preference) {
  .pat-panel--bull .pat-arrow .ico { animation: pat-up 2.6s var(--ease) infinite; }
  .pat-panel--bear .pat-arrow .ico { animation: pat-down 2.6s var(--ease) infinite; }
  @keyframes pat-up { 0%, 100% { transform: translateY(2px); } 50% { transform: translateY(-3px); } }
  @keyframes pat-down { 0%, 100% { transform: translateY(-2px); } 50% { transform: translateY(3px); } }
}
@media (max-width: 899px) { .pat-split { grid-template-columns: 1fr; } }
@media (max-width: 420px) { .pat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.65rem; } .pcard .card-body { padding: 0.6rem 0.65rem 0.75rem; } .pcard .card-title { font-size: 0.92rem; } }
.footer-family { margin: 0.2rem 0 0.9rem; font-size: 0.85rem; color: var(--dim); letter-spacing: 0.02em; }
.footer-family strong { color: var(--text-2); font-weight: 600; }
.footer-legal a { color: inherit; text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 0.2em; }
.footer-legal a:hover { color: var(--text); text-decoration-color: var(--bull-line); }

/* ---------- Ethos Empire family showcase (homepage, before the footer) ---------- */
.family { --gold: #f1c453; --gold-soft: rgba(241, 196, 83, 0.16); --gold-line: rgba(241, 196, 83, 0.42); position: relative; isolation: isolate; overflow: hidden; padding: clamp(4rem, 2.5rem + 6vw, 8.5rem) 0; background: linear-gradient(180deg, #05080d 0%, #08101d 38%, #060b14 100%); border-top: 1px solid var(--line); text-align: center; }
.family-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.family-glow { position: absolute; width: min(70vw, 720px); aspect-ratio: 1; border-radius: 50%; opacity: 0.9; }
.family-glow--gold { left: -12%; top: 6%; background: radial-gradient(circle, rgba(241, 196, 83, 0.17), transparent 68%); }
.family-glow--green { right: -10%; top: -8%; background: radial-gradient(circle, rgba(0, 230, 118, 0.13), transparent 68%); }
.family-glow--red { right: 6%; bottom: -22%; background: radial-gradient(circle, rgba(255, 59, 59, 0.09), transparent 68%); }
.family-grid { position: absolute; inset: 0; opacity: 0.5; background-image: linear-gradient(rgba(190, 215, 255, 0.045) 1px, transparent 1px), linear-gradient(90deg, rgba(190, 215, 255, 0.045) 1px, transparent 1px); background-size: 56px 56px; -webkit-mask-image: radial-gradient(70% 60% at 50% 45%, #000 20%, transparent 75%); mask-image: radial-gradient(70% 60% at 50% 45%, #000 20%, transparent 75%); }
.family-dust { position: absolute; inset: 0; }
.family-dust i { position: absolute; left: var(--x); top: var(--y); width: var(--s); height: var(--s); border-radius: 50%; background: var(--c, #fff); opacity: 0; box-shadow: 0 0 10px 1px var(--c, #fff); }
.family-dust i:nth-child(1) { --x: 8%; --y: 72%; --s: 3px; --c: #f1c453; --d: 13s; --w: 0s; }
.family-dust i:nth-child(2) { --x: 17%; --y: 28%; --s: 2px; --c: #fff; --d: 15s; --w: 2s; }
.family-dust i:nth-child(3) { --x: 26%; --y: 82%; --s: 2px; --c: #f1c453; --d: 11s; --w: 4s; }
.family-dust i:nth-child(4) { --x: 34%; --y: 16%; --s: 3px; --c: #00e676; --d: 14s; --w: 1s; }
.family-dust i:nth-child(5) { --x: 43%; --y: 64%; --s: 2px; --c: #fff; --d: 16s; --w: 5s; }
.family-dust i:nth-child(6) { --x: 52%; --y: 88%; --s: 3px; --c: #f1c453; --d: 12s; --w: 3s; }
.family-dust i:nth-child(7) { --x: 61%; --y: 22%; --s: 2px; --c: #fff; --d: 17s; --w: 6s; }
.family-dust i:nth-child(8) { --x: 70%; --y: 70%; --s: 3px; --c: #00e676; --d: 13s; --w: 2.5s; }
.family-dust i:nth-child(9) { --x: 79%; --y: 34%; --s: 2px; --c: #ff6b6b; --d: 15s; --w: 4.5s; }
.family-dust i:nth-child(10) { --x: 87%; --y: 80%; --s: 2px; --c: #fff; --d: 12s; --w: 1.5s; }
.family-dust i:nth-child(11) { --x: 93%; --y: 20%; --s: 3px; --c: #00e676; --d: 16s; --w: 7s; }
.family-dust i:nth-child(12) { --x: 50%; --y: 8%; --s: 2px; --c: #f1c453; --d: 14s; --w: 3.5s; }

.family-inner { position: relative; display: flex; flex-direction: column; align-items: center; }
.family-eyebrow { color: var(--gold); }
.family-title { margin: 0 0 0.9rem; font-size: clamp(2.05rem, 1.15rem + 4.4vw, 4.2rem); line-height: 1.08; letter-spacing: -0.02em; color: #fff; max-width: 16ch; }
.family-title span { display: inline-block; }
.family-lockup { margin: 0 0 clamp(2rem, 1rem + 3vw, 3.6rem); font-family: var(--font-head); font-weight: 600; font-size: clamp(0.72rem, 0.55rem + 0.75vw, 1.02rem); letter-spacing: 0.3em; text-transform: uppercase; color: var(--muted); }
.family-lockup i { font-style: normal; color: var(--gold); margin: 0 0.35em; }
.family-lockup .g { color: var(--bull); text-transform: none; }
.family-lockup .r { color: var(--bear); text-transform: none; }

.family-stage { width: 100%; max-width: 1040px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(90px, 0.55fr) minmax(0, 1fr); align-items: center; gap: clamp(0.6rem, 2vw, 1.6rem); margin: 0 auto clamp(2.4rem, 1.4rem + 3vw, 4rem); }
.family-logo { --tone: var(--bull); --tone-line: var(--bull-line); position: relative; display: grid; place-items: center; aspect-ratio: 1; width: min(100%, 300px); padding: clamp(0.8rem, 0.4rem + 1.6vw, 1.4rem); border-radius: 28px; border: 1px solid var(--line-2); background: radial-gradient(90% 70% at 50% 25%, rgba(255, 255, 255, 0.07), transparent 70%), rgba(10, 17, 30, 0.72); box-shadow: 0 30px 70px -36px #000; transition: transform 0.4s var(--ease), border-color 0.3s, box-shadow 0.4s var(--ease); }
.family-logo--ethos { --tone: var(--gold); --tone-line: var(--gold-line); justify-self: end; }
.family-logo--edgetr { justify-self: start; }
.family-logo img { display: block; width: 100%; height: auto; }
/* The official file has a wide black margin. It is shown unmodified and scaled inside the card; only that black margin is clipped, never the crest. Screen blending lets the black margin disappear into the card. */
.family-logo--ethos { overflow: hidden; }
.family-logo--ethos img { mix-blend-mode: screen; transform: scale(1.38); }
.family-logo:hover, .family-logo:focus-within { transform: translateY(-6px); border-color: var(--tone-line); box-shadow: 0 34px 80px -34px #000, 0 0 0 1px var(--tone-line), 0 0 60px -14px var(--tone); }
.family-logo--ethos:hover { box-shadow: 0 34px 80px -34px #000, 0 0 0 1px var(--gold-line), 0 0 60px -14px rgba(241, 196, 83, 0.55); }
.family-logo--edgetr:hover { box-shadow: 0 34px 80px -34px #000, 0 0 0 1px var(--bull-line), 0 0 60px -14px rgba(0, 230, 118, 0.5); }

.family-link { position: relative; width: 100%; height: 38px; overflow: hidden; }
.family-link-svg { position: absolute; left: 0; top: 7px; width: 100%; height: 24px; overflow: visible; }
.family-link-svg path { fill: none; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.fl-base { stroke: rgba(190, 215, 255, 0.16); stroke-width: 1.5; }
.fl-draw { stroke: url(#fl-grad); stroke-width: 2.4; stroke-dasharray: 1; stroke-dashoffset: 0; }
.family-spark { position: absolute; inset: 0; opacity: 0; }
.family-spark::after { content: ""; position: absolute; right: 0; top: 50%; width: 9px; height: 9px; margin: -4.5px -4.5px 0 0; border-radius: 50%; background: #fff; box-shadow: 0 0 14px 4px rgba(255, 255, 255, 0.55), 0 0 30px 10px rgba(241, 196, 83, 0.3); }
.family-x { position: absolute; left: 50%; top: 50%; width: 34px; height: 34px; margin: -17px 0 0 -17px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--gold-line); background: #09111f; color: var(--gold); font-size: 1.15rem; line-height: 1; box-shadow: 0 0 22px -4px rgba(241, 196, 83, 0.45); }

.family-copy { max-width: 760px; }
.family-quote { margin: 0 0 1.1rem; font-family: var(--font-head); font-weight: 600; font-size: clamp(1.3rem, 0.95rem + 1.7vw, 2.1rem); line-height: 1.25; color: #fff; text-wrap: balance; }
.family-text { margin: 0 0 1.8rem; color: var(--text-2); font-size: clamp(1rem, 0.95rem + 0.3vw, 1.12rem); line-height: 1.7; }
.family-cta-row { margin: 0 0 1.2rem; }
.family-cta { position: relative; overflow: hidden; isolation: isolate; gap: 0.7em; }
.family-cta .ico { transition: transform 0.3s var(--ease); }
.family-cta-shine { position: absolute; inset: 0; z-index: -1; background: linear-gradient(110deg, transparent 32%, rgba(255, 255, 255, 0.5) 50%, transparent 68%); transform: translateX(-130%); }
.family-cta:hover, .family-cta:focus-visible { transform: translateY(-3px); box-shadow: 0 16px 44px -12px rgba(0, 230, 118, 0.8), 0 0 0 4px rgba(0, 230, 118, 0.18); }
.family-cta:hover .family-cta-shine, .family-cta:focus-visible .family-cta-shine { transform: translateX(130%); transition: transform 0.85s var(--ease); }
.family-cta:hover .ico, .family-cta:focus-visible .ico { transform: translateX(5px); }
.family-cta:active { transform: translateY(-1px) scale(0.985); }
.family-note { margin: 0; font-size: 0.86rem; color: var(--dim); }

/* motion: only transform and opacity; plays when the section scrolls into view (class set by site.js) */
@keyframes family-rise { from { opacity: 0; transform: translateY(30px); } }
@keyframes family-word { from { opacity: 0; transform: translateY(0.55em); } }
@keyframes family-fade { from { opacity: 0; } }
@keyframes family-draw { from { stroke-dashoffset: 1; } }
@keyframes family-pop { from { opacity: 0; transform: scale(0.4); } }
@keyframes family-travel { 0% { opacity: 0; transform: translateX(-100%); } 8% { opacity: 1; } 48% { opacity: 1; transform: translateX(0); } 56%, 100% { opacity: 0; transform: translateX(0); } }
@keyframes family-travel-y { 0% { opacity: 0; transform: translateY(-100%); } 8% { opacity: 1; } 48% { opacity: 1; transform: translateY(0); } 56%, 100% { opacity: 0; transform: translateY(0); } }
@keyframes family-drift { to { transform: translate3d(3%, 4%, 0); } }
@keyframes family-float { 0% { opacity: 0; transform: translateY(14px); } 25% { opacity: 0.75; } 70% { opacity: 0.5; } 100% { opacity: 0; transform: translateY(-34px); } }
@keyframes family-glint { 0%, 100% { box-shadow: 0 0 22px -4px rgba(241, 196, 83, 0.45); } 50% { box-shadow: 0 0 34px 0 rgba(241, 196, 83, 0.75); } }
.js .family:not(.is-in) .family-logo, .js .family:not(.is-in) .family-title span, .js .family:not(.is-in) .family-lockup, .js .family:not(.is-in) .family-quote, .js .family:not(.is-in) .family-text, .js .family:not(.is-in) .family-cta-row, .js .family:not(.is-in) .family-note, .js .family:not(.is-in) .family-eyebrow, .js .family:not(.is-in) .family-x { opacity: 0; }
.js .family:not(.is-in) .fl-draw { stroke-dashoffset: 1; }
.family.is-in .family-eyebrow { animation: family-fade 0.8s var(--ease) backwards; }
.family.is-in .family-logo--ethos { animation: family-rise 1s var(--ease) 0.15s backwards; }
.family.is-in .family-logo--edgetr { animation: family-rise 1s var(--ease) 0.4s backwards; }
.family.is-in .fl-draw { animation: family-draw 1.5s cubic-bezier(0.5, 0, 0.2, 1) 0.8s backwards; }
.family.is-in .family-x { animation: family-pop 0.7s var(--ease) 1.5s backwards, family-glint 6s ease-in-out 3s infinite; }
.family.is-in .family-title span { animation: family-word 0.85s var(--ease) backwards; }
.family.is-in .family-title span:nth-child(1) { animation-delay: 1.2s; }
.family.is-in .family-title span:nth-child(2) { animation-delay: 1.27s; }
.family.is-in .family-title span:nth-child(3) { animation-delay: 1.34s; }
.family.is-in .family-title span:nth-child(4) { animation-delay: 1.41s; }
.family.is-in .family-title span:nth-child(5) { animation-delay: 1.48s; }
.family.is-in .family-title span:nth-child(6) { animation-delay: 1.55s; }
.family.is-in .family-lockup { animation: family-fade 1s var(--ease) 1.9s backwards; }
.family.is-in .family-quote { animation: family-rise 0.9s var(--ease) 2.1s backwards; }
.family.is-in .family-text { animation: family-rise 0.9s var(--ease) 2.3s backwards; }
.family.is-in .family-cta-row { animation: family-rise 0.9s var(--ease) 2.5s backwards; }
.family.is-in .family-note { animation: family-fade 1s var(--ease) 2.8s backwards; }
.family.is-live .family-spark { animation: family-travel 7s ease-in-out 2.6s infinite; }
.family.is-live .family-glow--gold { animation: family-drift 26s ease-in-out infinite alternate; }
.family.is-live .family-glow--green { animation: family-drift 30s ease-in-out -8s infinite alternate-reverse; }
.family.is-live .family-glow--red { animation: family-drift 34s ease-in-out -14s infinite alternate; }
.family.is-live .family-dust i { animation: family-float var(--d) ease-in-out var(--w) infinite; }

@media (max-width: 760px) {
  .family-stage { grid-template-columns: 1fr; justify-items: center; gap: 0.5rem; }
  .family-logo { width: min(74vw, 270px); }
  .family-logo--ethos, .family-logo--edgetr { justify-self: center; }
  .family-link { width: 38px; height: 76px; }
  .family-link-svg { left: 50%; top: 50%; width: 76px; height: 24px; margin: -12px 0 0 -38px; transform: rotate(90deg); }
  .family.is-live .family-spark { animation-name: family-travel-y; }
  .family-lockup { letter-spacing: 0.2em; }
}
@media (max-width: 400px) { .family-lockup { letter-spacing: 0.12em; } .family-logo { width: min(70vw, 240px); } }
@media (prefers-reduced-motion: reduce) {
  .family *, .family *::before, .family *::after { animation: none !important; transition: none !important; }
  .family .family-spark { display: none; }
  .js .family:not(.is-in) .family-logo, .js .family:not(.is-in) .family-title span, .js .family:not(.is-in) .family-lockup, .js .family:not(.is-in) .family-quote, .js .family:not(.is-in) .family-text, .js .family:not(.is-in) .family-cta-row, .js .family:not(.is-in) .family-note, .js .family:not(.is-in) .family-eyebrow, .js .family:not(.is-in) .family-x { opacity: 1; }
  .js .family:not(.is-in) .fl-draw { stroke-dashoffset: 0; }
  .family-logo:hover, .family-logo:focus-within, .family-cta:hover, .family-cta:focus-visible { transform: none; }
}
