/* Meridian — visual system v2 */
:root {
  --bg: #f6f4ef;
  --bg-2: #ece9e1;
  --bg-3: #e3dfd4;
  --surface: #ffffff;
  --surface-2: #fbfaf7;
  --ink: #15171c;
  --ink-2: #393c44;
  --muted: #676a72;
  --faint: #9a9ca2;
  --line: #e4e0d7;
  --line-2: #d3cec2;
  --brand: #23336e;
  --brand-ink: #ffffff;
  --brand-soft: #e6eaf6;
  --accent: #d4502c;
  --accent-soft: #fbe6de;
  --ok: #2c7a52;
  --q1: rgba(196, 72, 72, .085); --q2: rgba(47, 93, 160, .085); --q3: rgba(44, 128, 82, .085); --q4: rgba(196, 150, 40, .1);
  --a0: #8a6a45; --a1: #b8334f; --a2: #6a52b3; --a3: #c46a28; --a4: #5b7f2e; --a5: #2b7aa0;
  --a6: #a07a14; --a7: #17806f; --a8: #3b62b0; --a9: #8b46a0; --a10: #c2486e; --a11: #2f8f55;
  --shadow: 0 1px 2px rgba(21,23,28,.04), 0 6px 20px -10px rgba(21,23,28,.12);
  --shadow-lg: 0 2px 6px rgba(21,23,28,.05), 0 28px 60px -28px rgba(21,23,28,.32);
  --r: 16px; --r-sm: 10px;
  --serif: "Newsreader", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1013; --bg-2: #17181c; --bg-3: #202127; --surface: #18191d; --surface-2: #1c1d22; --ink: #eeede8; --ink-2: #c8c7c1;
    --muted: #9a9aa0; --faint: #6c6d73; --line: #2a2b31; --line-2: #383941;
    --brand: #9fb2f5; --brand-ink: #0f1013; --brand-soft: #1e2440; --accent: #f08562; --accent-soft: #3a231b; --ok: #6cc597;
    --q1: rgba(230, 110, 110, .08); --q2: rgba(110, 150, 230, .08); --q3: rgba(100, 200, 140, .07); --q4: rgba(230, 190, 90, .08);
    --a0: #c9a47a; --a1: #f0708a; --a2: #a592f0; --a3: #f0a060; --a4: #9fc66a; --a5: #6fbfe3;
    --a6: #e0bb52; --a7: #4fcbb5; --a8: #86a6ef; --a9: #c98ae0; --a10: #f088aa; --a11: #6dd394;
    --shadow: 0 1px 2px rgba(0,0,0,.35), 0 8px 24px -12px rgba(0,0,0,.6);
    --shadow-lg: 0 28px 60px -24px rgba(0,0,0,.8);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1013; --bg-2: #17181c; --bg-3: #202127; --surface: #18191d; --surface-2: #1c1d22; --ink: #eeede8; --ink-2: #c8c7c1;
  --muted: #9a9aa0; --faint: #6c6d73; --line: #2a2b31; --line-2: #383941;
  --brand: #9fb2f5; --brand-ink: #0f1013; --brand-soft: #1e2440; --accent: #f08562; --accent-soft: #3a231b; --ok: #6cc597;
  --q1: rgba(230, 110, 110, .08); --q2: rgba(110, 150, 230, .08); --q3: rgba(100, 200, 140, .07); --q4: rgba(230, 190, 90, .08);
  --a0: #c9a47a; --a1: #f0708a; --a2: #a592f0; --a3: #f0a060; --a4: #9fc66a; --a5: #6fbfe3;
  --a6: #e0bb52; --a7: #4fcbb5; --a8: #86a6ef; --a9: #c98ae0; --a10: #f088aa; --a11: #6dd394;
  --shadow: 0 1px 2px rgba(0,0,0,.35), 0 8px 24px -12px rgba(0,0,0,.6);
  --shadow-lg: 0 28px 60px -24px rgba(0,0,0,.8);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 130px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 15.5px/1.6 var(--sans); letter-spacing: -0.005em; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; padding: 0; }
input, select { font: inherit; color: inherit; }
::selection { background: var(--brand); color: var(--brand-ink); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
img { max-width: 100%; }

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 28px; }
.wrap.narrow { max-width: 840px; }
@media (max-width: 640px) { .wrap { padding: 0 16px; } }

/* ——— Type ——— */
.serif { font-family: var(--serif); }
h1, h2, h3, h4 { margin: 0; font-weight: 500; letter-spacing: -0.02em; }
.display { font-family: var(--serif); font-weight: 400; font-size: clamp(46px, 6.6vw, 88px); line-height: .98; letter-spacing: -0.035em; }
.display em { font-style: italic; color: var(--accent); }
.h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(32px, 4vw, 50px); line-height: 1.04; letter-spacing: -0.03em; }
.h3 { font-family: var(--serif); font-weight: 500; font-size: 25px; line-height: 1.2; }
.eyebrow { font: 600 11.5px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); display: inline-flex; align-items: center; gap: 10px; }
.eyebrow::before { content: ""; width: 18px; height: 2px; border-radius: 2px; background: var(--accent); }
.lede { font-size: 18px; line-height: 1.6; color: var(--ink-2); max-width: 56ch; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.num { font-variant-numeric: tabular-nums; }
.tag { font: 600 10.5px/1.2 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }

/* ——— Nav ——— */
.nav { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--bg) 84%, transparent); backdrop-filter: saturate(1.5) blur(14px); -webkit-backdrop-filter: saturate(1.5) blur(14px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.nav.scrolled { border-bottom-color: var(--line); }
.nav .wrap { display: flex; align-items: center; height: 64px; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-size: 22px; font-weight: 500; letter-spacing: -0.02em; color: var(--ink); }
.brand-mark { width: 26px; height: 26px; color: var(--brand); }
.nav-links { display: flex; gap: 2px; margin-left: 8px; }
.nav-links a { white-space: nowrap; padding: 7px 11px; border-radius: 9px; font-size: 14px; color: var(--muted); transition: color .15s, background .15s; }
.nav-links a:hover { color: var(--ink); background: var(--bg-2); }
.nav-links a.on { color: var(--brand); background: var(--brand-soft); font-weight: 500; }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.search-trigger { display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 10px 0 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); color: var(--muted); font-size: 13.5px; min-width: 230px; }
.search-trigger:hover { border-color: var(--line-2); color: var(--ink-2); }
.search-trigger svg { width: 16px; height: 16px; flex: none; }
.search-trigger kbd { margin-left: auto; }
kbd { font: 500 11px/1 var(--mono); padding: 3px 6px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; color: var(--muted); background: var(--bg); }
.icon-btn { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; color: var(--muted); border: 1px solid transparent; }
.icon-btn:hover { color: var(--ink); background: var(--bg-2); }
.icon-btn svg { width: 18px; height: 18px; }
.menu-btn { display: none; }
.mobile-menu { display: none; }
@media (max-width: 1120px) {
  .nav-links { display: none; } .search-trigger { min-width: 0; } .search-trigger span, .search-trigger kbd { display: none; }
  .menu-btn { display: grid; }
  .mobile-menu.open { display: grid; gap: 2px; padding: 8px 16px 16px; border-bottom: 1px solid var(--line); background: var(--bg); }
  .mobile-menu a { padding: 12px 10px; border-radius: 10px; font-size: 15px; }
  .mobile-menu a.on, .mobile-menu a:hover { background: var(--bg-2); }
}

/* ——— Buttons ——— */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 48px; padding: 0 22px; border-radius: 12px; font-weight: 500; font-size: 15px; letter-spacing: -0.01em; transition: transform .12s, background .15s, border-color .15s, box-shadow .15s; white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn svg { width: 17px; height: 17px; }
.btn-primary { background: var(--brand); color: var(--brand-ink); box-shadow: 0 1px 0 rgba(255,255,255,.12) inset, 0 6px 16px -8px color-mix(in srgb, var(--brand) 70%, transparent); }
.btn-primary:hover { box-shadow: 0 10px 24px -10px color-mix(in srgb, var(--brand) 80%, transparent); filter: brightness(1.08); }
.btn-ghost { border: 1px solid var(--line-2); background: var(--surface); }
.btn-ghost:hover { border-color: var(--ink-2); }
.btn-light { background: rgba(255,255,255,.14); color: #fff; border: 1px solid rgba(255,255,255,.28); }
.btn-light:hover { background: rgba(255,255,255,.22); }
.btn-white { background: #fff; color: #15171c; }
.btn-sm { height: 36px; padding: 0 14px; font-size: 13.5px; border-radius: 10px; }
.btn[disabled] { opacity: .4; pointer-events: none; }
.link { color: var(--brand); border-bottom: 1px solid color-mix(in srgb, var(--brand) 35%, transparent); }
.link:hover { border-bottom-color: var(--brand); }
.arrow-link { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 500; color: var(--brand); }
.arrow-link svg { width: 15px; height: 15px; transition: transform .15s; }
.arrow-link:hover svg { transform: translateX(3px); }

/* ——— Surfaces ——— */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.pad { padding: 28px; }
@media (max-width: 640px) { .pad { padding: 20px; } }
.section { padding: 88px 0; }
.section + .section { border-top: 1px solid var(--line); }
.section.tint { background: var(--surface-2); }
@media (max-width: 640px) { .section { padding: 60px 0; } }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 36px; flex-wrap: wrap; }
.section-head .h2 { margin-top: 14px; max-width: 20ch; }
.section-head p { max-width: 48ch; margin: 0; color: var(--ink-2); }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.g5 { grid-template-columns: repeat(5, minmax(0,1fr)); }
@media (max-width: 1000px) { .g5 { grid-template-columns: repeat(3, minmax(0,1fr)); } .g4 { grid-template-columns: repeat(2, minmax(0,1fr)); } .g3 { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 640px) { .g2, .g3, .g4 { grid-template-columns: minmax(0,1fr); } .g5 { grid-template-columns: repeat(2, minmax(0,1fr)); } }
.chip { display: inline-flex; align-items: center; gap: 7px; height: 26px; padding: 0 10px; border-radius: 99px; font-size: 12px; font-weight: 500; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); white-space: nowrap; }
.chip .dot { width: 7px; height: 7px; border-radius: 50%; }
.axchip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px 0 8px; border-radius: 99px; font-size: 12px; font-weight: 600; color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); white-space: nowrap; }

/* ——— Pictures: portraits, flags, logos ——— */
.pic { position: relative; flex: none; display: inline-grid; place-items: center; overflow: hidden; background: var(--c, var(--bg-3)); color: #fff; }
.pic .fb { font-style: normal; font-family: var(--serif); letter-spacing: -0.02em; }
.pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .3s; }
.pic.ok img { opacity: 1; }
.pic.ok .fb { visibility: hidden; }
.avatar { width: 52px; height: 52px; border-radius: 50%; font-size: 18px; box-shadow: 0 0 0 1px var(--line); }
.avatar img { object-position: 50% 18%; filter: saturate(.92); }
.avatar.sm { width: 34px; height: 34px; font-size: 12.5px; }
.avatar.xs { width: 28px; height: 28px; font-size: 11px; }
.avatar.lg { width: 96px; height: 96px; font-size: 32px; }
.avatar.xl { width: 128px; height: 128px; font-size: 40px; }
.flag { width: 54px; height: 38px; border-radius: 7px; background: var(--bg-3); color: var(--ink-2); box-shadow: 0 0 0 1px var(--line-2); }
.flag .fb { font: 700 11px var(--mono); }
.flag img { object-fit: cover; }
.flag.sm { width: 34px; height: 24px; border-radius: 5px; } .flag.sm .fb { font-size: 8.5px; }
.flag.xs { width: 28px; height: 20px; border-radius: 4px; } .flag.xs .fb { font-size: 7.5px; }
.flag.lg { width: 132px; height: 90px; border-radius: 12px; } .flag.lg .fb { font-size: 18px; }
.flag.xl { width: 100%; height: auto; aspect-ratio: 3 / 2; border-radius: 12px; } .flag.xl .fb { font-size: 22px; }
.logo { width: 48px; height: 48px; border-radius: 12px; background: var(--c); }
.logo .fb { font: 700 10.5px var(--sans); letter-spacing: .02em; }
.logo img { object-fit: contain; background: #fff; padding: 5px; }
.logo.sm { width: 34px; height: 34px; border-radius: 9px; } .logo.sm .fb { font-size: 8px; }
.logo.xs { width: 28px; height: 28px; border-radius: 7px; } .logo.xs .fb { font-size: 7px; }
.logo.lg { width: 96px; height: 96px; border-radius: 20px; } .logo.lg .fb { font-size: 18px; }
.ideo { width: 48px; height: 48px; border-radius: 12px; background: var(--c); }
.ideo .fb { font-size: 17px; }
.ideo.sm { width: 34px; height: 34px; border-radius: 9px; } .ideo.sm .fb { font-size: 12px; }
.ideo.xs { width: 28px; height: 28px; border-radius: 7px; } .ideo.xs .fb { font-size: 10px; }
.ideo.lg { width: 96px; height: 96px; border-radius: 20px; } .ideo.lg .fb { font-size: 32px; }

/* ——— Home ——— */
.hero { position: relative; padding: 72px 0 84px; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: -20% -10% auto auto; width: 720px; height: 720px; border-radius: 50%; background: radial-gradient(circle at center, color-mix(in srgb, var(--brand) 16%, transparent), transparent 62%); pointer-events: none; }
.hero::after { content: ""; position: absolute; left: -200px; bottom: -300px; width: 620px; height: 620px; border-radius: 50%; background: radial-gradient(circle at center, color-mix(in srgb, var(--accent) 12%, transparent), transparent 62%); pointer-events: none; }
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr .95fr; gap: 64px; align-items: center; }
.hero h1 { margin: 22px 0 24px; }
.hero .actions { display: flex; gap: 12px; margin-top: 36px; flex-wrap: wrap; }
.hero-meta { display: flex; gap: 22px; margin-top: 28px; color: var(--muted); font-size: 13.5px; flex-wrap: wrap; }
.hero-meta span { display: inline-flex; align-items: center; gap: 7px; }
.hero-meta svg { width: 15px; height: 15px; color: var(--ok); }
.faces { display: flex; align-items: center; margin-top: 34px; gap: 14px; }
.faces .row { display: flex; }
.faces .row .avatar { width: 38px; height: 38px; margin-left: -10px; box-shadow: 0 0 0 3px var(--bg); font-size: 13px; }
.faces .row .avatar:first-child { margin-left: 0; }
.hero-grid > * { min-width: 0; }
@media (max-width: 960px) { .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 48px; } .hero { padding: 48px 0 64px; } }
@media (max-width: 560px) { .faces { flex-wrap: wrap; gap: 10px; } .faces .row { max-width: 100%; overflow: hidden; } }

.sample { position: relative; }
.sample .card { padding: 0; overflow: hidden; }
.sample-band { padding: 22px 24px; color: #fff; background: var(--c); position: relative; overflow: hidden; }
.sample-band::after { content: ""; position: absolute; right: -60px; top: -80px; width: 240px; height: 240px; border-radius: 50%; background: rgba(255,255,255,.1); }
.sample-band h3 { font-family: var(--serif); font-size: 30px; font-weight: 400; letter-spacing: -0.025em; line-height: 1.05; margin-top: 8px; position: relative; z-index: 1; }
.sample-band .tag { color: rgba(255,255,255,.75); }
.sample-body { padding: 4px 24px 22px; }
.sample-stack { position: absolute; inset: 14px -14px -14px 14px; border-radius: var(--r); background: var(--bg-2); border: 1px solid var(--line); z-index: -1; }

.stats { display: grid; grid-template-columns: repeat(6, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stats div { padding: 26px 20px; border-right: 1px solid var(--line); }
.stats div:last-child { border-right: 0; }
.stats b { display: block; font-family: var(--serif); font-weight: 400; font-size: 36px; letter-spacing: -0.03em; line-height: 1; color: var(--brand); }
.stats span { font-size: 13px; color: var(--muted); }
@media (max-width: 860px) { .stats { grid-template-columns: repeat(3, 1fr); } .stats div:nth-child(3) { border-right: 0; } .stats div:nth-child(-n+3) { border-bottom: 1px solid var(--line); } }

.version { position: relative; display: flex; flex-direction: column; padding: 28px; gap: 18px; transition: border-color .15s, transform .15s, box-shadow .15s; }
.version:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.version.rec { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand), var(--shadow); }
.version .badge { position: absolute; top: -11px; left: 24px; background: var(--brand); color: var(--brand-ink); font: 600 10.5px/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; padding: 6px 9px; border-radius: 6px; }
.version .n { font-family: var(--serif); font-size: 66px; line-height: .9; letter-spacing: -0.04em; }
.version .n small { font: 400 15px var(--sans); letter-spacing: 0; color: var(--muted); margin-left: 6px; }
.version .meta { display: flex; flex-direction: column; gap: 8px; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 14px; }
.version .meta div { display: flex; justify-content: space-between; }
.version .meta span:first-child { color: var(--muted); }
.version .depth { display: flex; gap: 3px; }
.version .depth i { flex: 1; height: 5px; border-radius: 3px; background: var(--bg-2); }
.version .depth i.on { background: var(--brand); }
.version .btn { margin-top: auto; }

.resume { display: flex; align-items: center; gap: 18px; padding: 18px 22px; margin-bottom: 24px; flex-wrap: wrap; border-color: color-mix(in srgb, var(--brand) 30%, var(--line)); }
.resume .bar { flex: 1; min-width: 120px; height: 5px; background: var(--bg-2); border-radius: 4px; overflow: hidden; }
.resume .bar i { display: block; height: 100%; background: var(--brand); }

.steps { counter-reset: s; }
.step { padding: 28px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 80px 1fr 1.4fr; gap: 24px; align-items: baseline; }
.step::before { counter-increment: s; content: "0" counter(s); font: 600 14px var(--mono); color: var(--accent); }
.step h3 { font-family: var(--serif); font-size: 26px; font-weight: 400; }
.step p { margin: 0; color: var(--ink-2); }
@media (max-width: 760px) { .step { grid-template-columns: 1fr; gap: 6px; } }

.axis-card { padding: 22px; display: flex; flex-direction: column; gap: 12px; border-top: 3px solid var(--c); transition: transform .15s, box-shadow .15s; }
.axis-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.axis-card .top { display: flex; justify-content: space-between; align-items: center; }
.axis-card .ico { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; color: var(--c); background: color-mix(in srgb, var(--c) 13%, transparent); }
.axis-card .poles { font-family: var(--serif); font-size: 21px; letter-spacing: -0.015em; line-height: 1.2; }
.axis-card .poles i { font-style: normal; color: var(--c); margin: 0 6px; font-family: var(--sans); font-size: 15px; }
.axis-card p { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.55; }

.spectrum-row { display: grid; grid-template-columns: repeat(8, 1fr); gap: 3px; height: 10px; border-radius: 6px; overflow: hidden; margin-bottom: 28px; }
.spec-item { padding: 20px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 220px 1fr; gap: 24px; }
.spec-item h4 { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-size: 21px; font-weight: 400; }
.spec-item h4 i { width: 12px; height: 12px; border-radius: 4px; }
.spec-item p { margin: 0; color: var(--ink-2); font-size: 14.5px; }
@media (max-width: 640px) { .spec-item { grid-template-columns: 1fr; gap: 6px; } }

.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 22px 0; display: flex; justify-content: space-between; align-items: center; gap: 16px; font-family: var(--serif); font-size: 21px; letter-spacing: -0.015em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 300 24px var(--sans); color: var(--accent); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 22px; color: var(--ink-2); max-width: 70ch; }

.footer { border-top: 1px solid var(--line); padding: 40px 0 56px; color: var(--muted); font-size: 13.5px; }
.footer .wrap { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; align-items: center; }

/* ——— Axis bars ——— */
.axes-list { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 0 44px; }
@media (max-width: 760px) { .axes-list { grid-template-columns: minmax(0,1fr); } }
.axbar { padding: 16px 0 14px; border-top: 1px solid var(--line); }
.axbar .row1 { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.axbar .name { display: inline-flex; align-items: center; gap: 9px; font-weight: 600; font-size: 14px; }
.axbar .ic { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; color: var(--c); background: color-mix(in srgb, var(--c) 13%, transparent); }
.axbar .verdict { font-size: 12.5px; color: var(--muted); text-align: right; }
.axbar .verdict b { color: var(--c); font-weight: 600; }
.track { position: relative; height: 8px; border-radius: 8px; background: var(--bg-2); }
.track .mid { position: absolute; left: 50%; top: -4px; bottom: -4px; width: 2px; margin-left: -1px; border-radius: 2px; background: var(--line-2); }
.track .fill { position: absolute; top: 0; bottom: 0; border-radius: 8px; background: var(--c); }
.track .you { position: absolute; top: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; background: var(--surface); border: 3.5px solid var(--c); box-shadow: 0 1px 5px rgba(0,0,0,.18); }
.track .them { position: absolute; top: 50%; width: 13px; height: 13px; margin: -6.5px 0 0 -6.5px; border-radius: 3px; transform: rotate(45deg); background: var(--ink); border: 2px solid var(--surface); }
.axbar .poles { display: flex; justify-content: space-between; margin-top: 10px; font-size: 12.5px; color: var(--muted); }
.axbar .poles .lead { color: var(--c); font-weight: 600; padding: 1px 8px; margin: -1px -8px; border-radius: 99px; background: color-mix(in srgb, var(--c) 11%, transparent); }
.legend { display: flex; gap: 18px; font-size: 12.5px; color: var(--muted); align-items: center; flex-wrap: wrap; }
.legend i { display: inline-block; vertical-align: -2px; margin-right: 6px; }
.legend .l-you { width: 12px; height: 12px; border-radius: 50%; border: 3px solid var(--accent); }
.legend .l-them { width: 9px; height: 9px; transform: rotate(45deg); background: var(--ink); border-radius: 2px; }

/* ——— Quiz ——— */
.quiz { min-height: calc(100vh - 64px); display: flex; flex-direction: column; padding: 28px 0 48px; }
.quiz-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; font-size: 13.5px; color: var(--muted); margin-bottom: 12px; flex-wrap: wrap; }
.quiz-top b { color: var(--ink); font-weight: 600; }
.quiz-top .timers { display: flex; gap: 10px; }
.quiz-top .timers > span { display: inline-flex; gap: 6px; align-items: center; height: 28px; padding: 0 10px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); }
.quiz-top svg { width: 14px; height: 14px; }
.progress { display: grid; grid-template-columns: repeat(12, 1fr); gap: 3px; margin-bottom: 30px; }
.progress span { height: 5px; border-radius: 3px; background: var(--bg-2); overflow: hidden; }
.progress span i { display: block; height: 100%; background: var(--c); transition: width .35s cubic-bezier(.2,.7,.2,1); }
.qcard { padding: 40px 48px 34px; position: relative; overflow: hidden; border-top: 4px solid var(--c); }
@media (max-width: 640px) { .qcard { padding: 26px 20px; } }
.qcard .qnum { position: absolute; right: 34px; top: 16px; font-family: var(--serif); font-size: 104px; line-height: 1; color: color-mix(in srgb, var(--c) 22%, transparent); letter-spacing: -0.05em; pointer-events: none; user-select: none; }
.qcard::before { content: ""; position: absolute; right: -120px; top: -120px; width: 300px; height: 300px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--c) 10%, transparent), transparent 70%); pointer-events: none; }
@media (max-width: 640px) { .qcard .qnum { font-size: 64px; right: 16px; top: 10px; } }
.qcard .q { position: relative; font-family: var(--serif); font-weight: 400; font-size: clamp(25px, 3.1vw, 34px); line-height: 1.25; letter-spacing: -0.02em; margin: 18px 0 30px; max-width: 30ch; text-wrap: pretty; }
.options { display: grid; gap: 8px; }
.opt { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; padding: 15px 18px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font-size: 15px; font-weight: 500; transition: border-color .12s, background .12s, transform .12s; position: relative; }
.opt:hover { border-color: var(--oc); background: color-mix(in srgb, var(--oc) 6%, var(--surface)); }
.opt .k { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; font: 600 11.5px var(--mono); color: var(--oc); background: color-mix(in srgb, var(--oc) 12%, transparent); flex: none; }
.opt .scale { margin-left: auto; display: flex; gap: 3px; }
.opt .scale i { width: 7px; height: 7px; border-radius: 50%; background: var(--line); }
.opt .scale i.on { background: var(--oc); }
.opt.sel { border-color: var(--oc); background: var(--oc); color: #fff; box-shadow: 0 8px 22px -12px var(--oc); }
.opt.sel .k { color: var(--oc); background: #fff; }
.opt.sel .scale i { background: rgba(255,255,255,.35); } .opt.sel .scale i.on { background: #fff; }
.opt[data-v="1"] { --oc: #2c7a52; } .opt[data-v="0.5"] { --oc: #4f9a6e; } .opt[data-v="0"] { --oc: #6d7280; }
.opt[data-v="-0.5"] { --oc: #c9643f; } .opt[data-v="-1"] { --oc: #b8402c; }
:root[data-theme="dark"] .opt[data-v="1"] { --oc: #3f9a6c; }
.terms { margin-top: 24px; padding: 16px 18px; border-radius: 12px; background: var(--bg); display: grid; gap: 10px; }
.terms .tl { font: 600 10.5px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.terms .t { font-size: 13.5px; color: var(--ink-2); line-height: 1.5; }
.terms .t b { font-weight: 600; color: var(--ink); }
.quiz-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 22px; gap: 12px; }
.toggle { display: inline-flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--muted); cursor: pointer; user-select: none; }
.toggle input { display: none; }
.toggle .sw { width: 34px; height: 20px; border-radius: 20px; background: var(--line-2); position: relative; transition: background .15s; }
.toggle .sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.toggle input:checked + .sw { background: var(--brand); }
.toggle input:checked + .sw::after { transform: translateX(14px); }
.kbd-hint { text-align: center; color: var(--faint); font-size: 12.5px; margin-top: 28px; }
@media (max-width: 640px) { .kbd-hint { display: none; } .toggle span:last-child { display: none; } }

.term { font: inherit; color: inherit; border-bottom: 2px dotted var(--accent); cursor: help; padding: 0; background: none; }
.term:hover { color: var(--accent); }
.pop { position: fixed; z-index: 100; max-width: 330px; padding: 14px 16px; border-radius: 12px; background: var(--ink); color: var(--bg); font-size: 13.5px; line-height: 1.5; box-shadow: var(--shadow-lg); pointer-events: none; opacity: 0; transform: translateY(4px); transition: opacity .12s, transform .12s; }
.pop.on { opacity: 1; transform: none; }
.pop b { display: block; font-family: var(--serif); font-size: 17px; font-weight: 500; margin-bottom: 4px; }

/* ——— Results ——— */
.res-band { position: relative; color: #fff; background: var(--c); overflow: hidden; }
.res-band::before { content: ""; position: absolute; inset: 0; background: radial-gradient(900px 500px at 85% -10%, rgba(255,255,255,.18), transparent 60%), radial-gradient(600px 400px at 0% 120%, rgba(0,0,0,.25), transparent 60%); pointer-events: none; }
.res-band .wrap { position: relative; padding-top: 52px; padding-bottom: 56px; }
.res-band .eyebrow { color: rgba(255,255,255,.78); }
.res-band .eyebrow::before { background: #fff; }
.res-hero-grid { display: grid; grid-template-columns: 1fr auto; gap: 40px; align-items: center; }
@media (max-width: 860px) { .res-hero-grid { grid-template-columns: 1fr; } }
.res-title { font-family: var(--serif); font-weight: 400; font-size: clamp(42px, 6vw, 80px); line-height: .98; letter-spacing: -0.035em; margin: 18px 0 16px; }
.res-band .lede { color: rgba(255,255,255,.88); }
.res-band .chip { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.3); color: #fff; }
.res-band .meta-line { font-size: 13px; color: rgba(255,255,255,.72); margin-top: 18px; }
.res-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 26px; }
.ring { position: relative; flex: none; }
.ring svg { width: 100%; height: 100%; }
.ring-t { fill: none; stroke: rgba(255,255,255,.2); stroke-width: 9; }
.ring-v { fill: none; stroke: #fff; stroke-width: 9; stroke-linecap: round; transition: stroke-dashoffset 1s ease; }
.ring-l { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring-l b { font-family: var(--serif); font-weight: 400; font-size: 46px; letter-spacing: -0.03em; line-height: 1; }
.ring-l span { font: 600 10px/1.6 var(--sans); letter-spacing: .14em; text-transform: uppercase; opacity: .75; }
.card .ring-t { stroke: var(--bg-2); } .card .ring-v { stroke: var(--c, var(--brand)); }
.card .ring-l b { font-size: 30px; }
.sample-band .ring-t { stroke: rgba(255,255,255,.22); } .sample-band .ring-v { stroke: #fff; }
.sample-band .ring-l b { font-size: 26px; color: #fff; } .sample-band .ring-l span { color: #fff; font-size: 8.5px; }

.quote { position: relative; margin-top: -30px; z-index: 2; padding: 26px 30px 26px 76px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg); }
.quote::before { content: "“"; position: absolute; left: 24px; top: 6px; font: 400 76px/1 var(--serif); color: var(--c); }
.quote .tag { margin-bottom: 6px; display: block; }
.quote p { margin: 0; font-family: var(--serif); font-size: clamp(19px, 2.2vw, 24px); line-height: 1.4; letter-spacing: -0.01em; }
@media (max-width: 640px) { .quote { padding: 22px 20px 22px 54px; } .quote::before { left: 14px; font-size: 56px; } }

.subnav { position: sticky; top: 64px; z-index: 30; background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.subnav .wrap { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding-top: 8px; padding-bottom: 8px; }
.subnav a { padding: 7px 12px; border-radius: 99px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.subnav a:hover, .subnav a.on { color: var(--ink); background: var(--bg-2); }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.kpi { padding: 20px 22px; display: flex; flex-direction: column; gap: 6px; min-width: 0; position: relative; overflow: hidden; }
.kpi .v { font-family: var(--serif); font-size: 34px; letter-spacing: -0.03em; line-height: 1.05; }
.kpi .s { font-size: 12.5px; color: var(--muted); }
.kpi .bar { height: 5px; border-radius: 4px; background: var(--bg-2); overflow: hidden; margin-top: 6px; }
.kpi .bar i { display: block; height: 100%; background: var(--kc, var(--brand)); border-radius: 4px; }
@media (max-width: 860px) { .kpis { grid-template-columns: repeat(2, 1fr); } }
.feature { display: grid; grid-template-columns: auto 1fr; grid-template-areas: "pic p" "t t"; gap: 14px 12px; align-items: center; padding: 18px 20px; min-width: 0; transition: transform .15s, box-shadow .15s; }
.feature:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.feature > .pic { grid-area: pic; }
.feature .t { grid-area: t; min-width: 0; }
.feature .v { font-family: var(--serif); font-size: 21px; letter-spacing: -0.015em; line-height: 1.2; margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.feature .s { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feature .p { grid-area: p; justify-self: end; font-family: var(--serif); font-size: 28px; letter-spacing: -0.03em; color: var(--brand); }
.sample .feature { grid-template-columns: auto 1fr; grid-template-areas: "pic t"; }

.rank { display: grid; gap: 0; }
.rank-row { display: grid; grid-template-columns: 26px auto 1fr 140px 48px; gap: 14px; align-items: center; padding: 11px 6px; border-top: 1px solid var(--line); transition: background .12s; border-radius: 8px; }
.rank-row:hover { background: var(--surface); }
.rank-row .i { font: 500 12px var(--mono); color: var(--faint); }
.rank-row .n { font-weight: 500; min-width: 0; }
.rank-row .n small { display: block; font-weight: 400; color: var(--muted); font-size: 12.5px; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-row .m { height: 5px; background: var(--bg-2); border-radius: 4px; overflow: hidden; }
.rank-row .m i { display: block; height: 100%; background: var(--rc, var(--brand)); border-radius: 4px; }
.rank-row .p { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; font-size: 14px; }
@media (max-width: 640px) { .rank-row { grid-template-columns: 22px auto 1fr 44px; } .rank-row .m { display: none; } }

.fig-card { padding: 0; display: flex; flex-direction: column; overflow: hidden; }
.fig-top { display: flex; gap: 18px; align-items: center; padding: 22px 22px 0; }
.fig-top h4 { font-family: var(--serif); font-size: 23px; font-weight: 500; line-height: 1.1; }
.fig-top .s { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.fig-body { padding: 16px 22px 22px; display: flex; flex-direction: column; gap: 14px; flex: 1; }
.fig-body p { margin: 0; font-size: 13.8px; color: var(--ink-2); line-height: 1.55; }
.rank-badge { position: absolute; top: 14px; right: 14px; font: 600 11px var(--mono); color: var(--muted); }
.agree { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; font-size: 12.5px; }
.agree > div { padding: 10px 12px; border-radius: 10px; background: var(--bg); line-height: 1.45; }
.agree > div.y { background: color-mix(in srgb, var(--ok) 10%, var(--surface)); }
.agree > div.n { background: color-mix(in srgb, var(--accent) 9%, var(--surface)); }
.agree b { display: block; font: 600 10px/1.6 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.book-btn { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); font-size: 13px; transition: border-color .15s, background .15s; margin-top: auto; background: var(--surface-2); }
.book-btn:hover { border-color: #e3a83b; background: color-mix(in srgb, #f3c26b 12%, var(--surface)); }
.book-btn .bk { width: 32px; height: 40px; flex: none; border-radius: 3px 6px 6px 3px; background: linear-gradient(90deg, rgba(0,0,0,.18) 0 4px, transparent 4px), var(--c, var(--brand)); display: grid; place-items: center; color: #fff; }
.book-btn .bk svg { width: 14px; height: 14px; }
.book-btn > svg { width: 16px; height: 16px; flex: none; color: var(--muted); }
.book-btn .t { flex: 1; min-width: 0; }
.book-btn .t b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.book-btn .t span { color: var(--muted); font-size: 12px; }

.country-hero { display: grid; grid-template-columns: 240px 1fr auto; gap: 26px; align-items: center; padding: 22px; }
@media (max-width: 760px) { .country-hero { grid-template-columns: 1fr; } }
.country-hero h3 { font-family: var(--serif); font-weight: 400; font-size: 34px; letter-spacing: -0.025em; line-height: 1.05; }
.dim-card { padding: 16px; display: flex; flex-direction: column; gap: 10px; min-width: 0; transition: transform .15s, box-shadow .15s; }
.dim-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.dim-card .nm { font-weight: 600; font-size: 14px; line-height: 1.25; }
.dim-card .p { font-family: var(--serif); font-size: 24px; letter-spacing: -0.03em; color: var(--brand); line-height: 1; }
.dim-card .flag { width: 100%; height: auto; aspect-ratio: 3/2; }
.dim-card .avatar { width: 64px; height: 64px; font-size: 22px; }

.apart { padding: 22px; display: flex; flex-direction: column; gap: 12px; border-top: 3px solid var(--c); }
.apart .big { font-family: var(--serif); font-size: 44px; letter-spacing: -0.035em; line-height: 1; color: var(--c); }
.apart h4 { font-family: var(--serif); font-size: 22px; font-weight: 500; }
.apart p { margin: 0; font-size: 13.5px; color: var(--ink-2); }
.two-track { position: relative; height: 34px; }
.two-track::before { content: ""; position: absolute; left: 0; right: 0; top: 16px; height: 3px; border-radius: 3px; background: var(--bg-2); }
.two-track i { position: absolute; top: 9px; width: 16px; height: 16px; margin-left: -8px; border-radius: 50%; }
.two-track i.y { background: var(--c); box-shadow: 0 0 0 3px var(--surface); }
.two-track i.a { background: var(--surface); border: 2.5px dashed var(--faint); }
.two-track span { position: absolute; top: -2px; font-size: 10.5px; font-weight: 600; color: var(--muted); transform: translateX(-50%); white-space: nowrap; }

.fam-row { display: grid; grid-template-columns: 150px 1fr 48px; gap: 14px; align-items: center; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14px; }
.fam-row .bar { height: 10px; border-radius: 6px; background: var(--bg-2); overflow: hidden; }
.fam-row .bar i { display: block; height: 100%; border-radius: 6px; }
.fam-row .p { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.fam-row small { display: block; color: var(--muted); font-size: 12px; }

.timeline { position: relative; display: grid; gap: 0; }
.timeline::before { content: ""; position: absolute; left: 19px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(var(--line-2), var(--line)); }
.tl-item { position: relative; display: grid; grid-template-columns: 40px 1fr; gap: 18px; padding: 16px 0; }
.tl-dot { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 2px solid var(--line-2); font: 600 10px var(--mono); color: var(--muted); z-index: 1; }
.tl-item.best .tl-dot { border-color: var(--accent); color: var(--accent); }
.tl-body h4 { font-family: var(--serif); font-size: 21px; font-weight: 500; }
.tl-body .yrs { font-size: 12px; color: var(--muted); }
.tl-picks { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.tl-pick { display: flex; align-items: center; gap: 10px; padding: 8px 12px 8px 8px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font-size: 13px; transition: border-color .15s; }
.tl-pick:hover { border-color: var(--ink-2); }
.tl-pick b { font-weight: 600; display: block; }
.tl-pick small { color: var(--muted); }

.stmt { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); }
.stmt p { margin: 0; font-family: var(--serif); font-size: 17.5px; line-height: 1.35; }
.ans-pill { font-size: 12px; font-weight: 600; padding: 5px 10px; border-radius: 99px; white-space: nowrap; color: #fff; }

.vs { display: grid; grid-template-columns: 1fr auto 1fr; gap: 20px; align-items: center; padding: 26px; }
.vs .side { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.vs .mid { font-family: var(--serif); font-size: 30px; color: var(--accent); }
@media (max-width: 640px) { .vs { grid-template-columns: 1fr; } }

.compass-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 32px; align-items: start; }
@media (max-width: 860px) { .compass-wrap { grid-template-columns: 1fr; } }
.compass svg { width: 100%; height: auto; display: block; }
.seg { display: inline-flex; padding: 3px; background: var(--bg-2); border-radius: 11px; gap: 2px; }
.seg button { padding: 7px 12px; border-radius: 8px; font-size: 13px; color: var(--muted); }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }

.toast { position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 20px); background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 10px; font-size: 14px; box-shadow: var(--shadow-lg); opacity: 0; transition: opacity .2s, transform .2s; z-index: 200; pointer-events: none; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.sheet-bg { position: fixed; inset: 0; background: rgba(10,10,12,.5); backdrop-filter: blur(4px); z-index: 150; display: grid; place-items: center; padding: 16px; animation: fade .15s; overflow-y: auto; }
.sheet { width: 100%; max-width: 540px; padding: 28px; }
.sheet h3 { font-family: var(--serif); font-weight: 400; font-size: 28px; letter-spacing: -0.02em; }
.share-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 20px; }
.share-grid button, .share-grid a { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; font-size: 14px; font-weight: 500; text-align: left; }
.share-grid button:hover, .share-grid a:hover { border-color: var(--brand); color: var(--brand); }
.share-grid svg { width: 18px; height: 18px; color: var(--muted); }
.share-preview { margin-top: 18px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: var(--bg-2); max-height: 46vh; }
.share-preview img { display: block; width: 100%; }
@keyframes fade { from { opacity: 0; } }

/* ——— Hub ——— */
.hub-head { padding: 56px 0 28px; }
.hub-search { display: flex; align-items: center; gap: 12px; height: 58px; padding: 0 18px; border: 1px solid var(--line-2); border-radius: 15px; background: var(--surface); box-shadow: var(--shadow); margin-top: 28px; }
.hub-search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.hub-search svg { width: 20px; height: 20px; color: var(--muted); flex: none; }
.hub-search input { flex: 1; border: 0; outline: 0; background: none; font-size: 17px; min-width: 0; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 28px 0 20px; overflow-x: auto; scrollbar-width: none; }
.tabs button { padding: 12px 14px; font-size: 14px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button.on { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }
.tabs button span { font-size: 12px; color: var(--faint); margin-left: 5px; font-variant-numeric: tabular-nums; }
.filters { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 24px; }
.filters button { height: 30px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--line); font-size: 12.5px; display: inline-flex; align-items: center; gap: 7px; color: var(--ink-2); background: var(--surface); }
.filters button.on { border-color: var(--brand); background: var(--brand); color: var(--brand-ink); }
.filters button i { width: 8px; height: 8px; border-radius: 50%; }
.entry { padding: 18px; display: flex; flex-direction: column; gap: 10px; transition: border-color .15s, transform .15s, box-shadow .15s; min-width: 0; }
.entry:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.entry .top { display: flex; gap: 14px; align-items: center; min-width: 0; }
.entry h4 { font-family: var(--serif); font-size: 19px; font-weight: 500; letter-spacing: -0.015em; line-height: 1.2; }
.entry .s { font-size: 12.5px; color: var(--muted); }
.entry p { margin: 0; font-size: 13.5px; color: var(--ink-2); line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.entry .foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; padding-top: 6px; gap: 12px; }
.entry .pct { font-size: 12.5px; font-weight: 700; color: var(--brand); white-space: nowrap; }
.entry.flagcard { padding: 0; overflow: hidden; }
.entry.flagcard .flag { width: 100%; height: auto; aspect-ratio: 16/9; border-radius: 0; box-shadow: none; border-bottom: 1px solid var(--line); }
.entry.flagcard .in { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.empty { padding: 64px 0; text-align: center; color: var(--muted); }
.gl-row { padding: 18px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 240px 1fr; gap: 24px; }
.gl-row h4 { font-family: var(--serif); font-size: 19px; font-weight: 500; }
.gl-row p { margin: 0; color: var(--ink-2); font-size: 14.5px; }
@media (max-width: 640px) { .gl-row { grid-template-columns: 1fr; gap: 4px; } }
.mini-bars { display: grid; grid-template-columns: repeat(12, 1fr); gap: 3px; height: 24px; align-items: center; }
.mini-bars i { position: relative; height: 100%; background: var(--bg-2); border-radius: 2px; }
.mini-bars i b { position: absolute; left: 0; right: 0; border-radius: 2px; }
.era-head { display: grid; grid-template-columns: 1fr 2fr; gap: 28px; padding: 30px 0 18px; border-top: 1px solid var(--line); }
.era-head h3 { font-family: var(--serif); font-weight: 400; font-size: 32px; letter-spacing: -0.025em; }
.era-head .yrs { font: 600 12px var(--mono); color: var(--accent); }
.era-head p { margin: 0; color: var(--ink-2); }
@media (max-width: 760px) { .era-head { grid-template-columns: 1fr; gap: 8px; } }
.era-strip { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 14px; scrollbar-width: thin; }
.era-strip > a { flex: none; width: 168px; }
.era-card { padding: 14px; display: flex; flex-direction: column; gap: 8px; height: 100%; }
.era-card .avatar { width: 56px; height: 56px; font-size: 19px; }
.era-card b { font-size: 14px; line-height: 1.25; }
.era-card small { color: var(--muted); font-size: 12px; }
.era-card .flag { width: 100%; height: auto; aspect-ratio: 3/2; }

/* ——— Detail ——— */
.crumbs { font-size: 13px; color: var(--muted); padding-top: 32px; display: flex; gap: 8px; }
.crumbs a:hover { color: var(--brand); }
.detail-head { padding: 28px 0 36px; display: flex; gap: 28px; align-items: center; flex-wrap: wrap; }
.detail-head h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(38px, 5vw, 62px); letter-spacing: -0.035em; line-height: 1; }
.detail-head .meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 32px; align-items: start; padding-bottom: 80px; }
@media (max-width: 960px) { .detail-grid { grid-template-columns: minmax(0,1fr); } }
.prose { font-size: 17px; line-height: 1.7; color: var(--ink-2); }
.prose p { margin: 0 0 16px; }
.prose .first { font-family: var(--serif); font-size: 23px; line-height: 1.45; color: var(--ink); letter-spacing: -0.01em; }
.side-list a { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; }
.side-list a:hover .nm { color: var(--brand); }
.side-list .nm { flex: 1; min-width: 0; font-weight: 500; }
.side-list .nm small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; }
.side-list .pc { font-variant-numeric: tabular-nums; font-size: 13px; font-weight: 600; color: var(--ink-2); }

/* ——— Palette ——— */
.palette-bg { position: fixed; inset: 0; z-index: 160; background: rgba(10,10,12,.45); backdrop-filter: blur(3px); display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; animation: fade .12s; }
.palette { width: 100%; max-width: 640px; overflow: hidden; }
.palette .hub-search { margin: 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; box-shadow: none; }
.palette-list { max-height: 56vh; overflow-y: auto; padding: 8px; }
.palette-list .grp { font: 600 10.5px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--faint); padding: 14px 10px 8px; }
.palette-list a { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 10px; font-size: 14px; }
.palette-list a.on, .palette-list a:hover { background: var(--brand-soft); }
.palette-list a .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.palette-list a small { color: var(--muted); font-size: 12px; }
.palette-foot { display: flex; gap: 16px; padding: 10px 16px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }

.fade-in { animation: rise .35s cubic-bezier(.2,.7,.2,1); }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media print { .nav, .subnav, .res-actions, .footer { display: none !important; } }

/* ═══════════ v3 additions ═══════════ */

/* Soft colour glows that rise from the bottom of a section and fade out */
.aura { position: relative; isolation: isolate; overflow: hidden; }
.aura::before, .aura::after { content: ""; position: absolute; z-index: -1; pointer-events: none; border-radius: 50%; filter: blur(10px); }
.aura::before { width: 760px; height: 520px; left: -160px; bottom: -320px; background: radial-gradient(closest-side, var(--g1), transparent); }
.aura::after { width: 680px; height: 480px; right: -140px; bottom: -300px; background: radial-gradient(closest-side, var(--g2), transparent); }
.aura-a { --g1: color-mix(in srgb, var(--brand) 13%, transparent); --g2: color-mix(in srgb, var(--a7) 12%, transparent); }
.aura-b { --g1: color-mix(in srgb, var(--accent) 10%, transparent); --g2: color-mix(in srgb, var(--a6) 13%, transparent); }
.aura-c { --g1: color-mix(in srgb, var(--a7) 12%, transparent); --g2: color-mix(in srgb, var(--a2) 10%, transparent); }
.aura-d { --g1: color-mix(in srgb, var(--a10) 10%, transparent); --g2: color-mix(in srgb, var(--a8) 12%, transparent); }
.footer { position: relative; overflow: hidden; }
.footer::before { content: ""; position: absolute; left: 50%; bottom: -260px; width: 900px; height: 380px; margin-left: -450px; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--brand) 9%, transparent), transparent); pointer-events: none; }

/* Home: explore tiles */
.tiles { display: grid; grid-template-columns: 1fr 1fr 1.35fr; gap: 16px; }
@media (max-width: 960px) { .tiles { grid-template-columns: 1fr 1fr; } .tile.wide { grid-column: span 2; } }
@media (max-width: 640px) { .tiles { grid-template-columns: 1fr; } .tile.wide { grid-column: auto; } }
.tile { display: flex; flex-direction: column; overflow: hidden; transition: transform .18s, box-shadow .18s; position: relative; }
.tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.tile-art { height: 190px; position: relative; overflow: hidden; background: linear-gradient(180deg, color-mix(in srgb, var(--c) 10%, var(--surface)), var(--surface)); border-bottom: 1px solid var(--line); }
.tile-txt { padding: 20px 22px 22px; }
.tile-txt h3 { font-family: var(--serif); font-weight: 400; font-size: 28px; letter-spacing: -0.02em; margin: 6px 0 6px; }
.tile-txt p { margin: 0; color: var(--ink-2); font-size: 14px; }
.glyphs { display: grid; grid-template-columns: repeat(3, 56px); gap: 12px; place-content: center; }
.glyphs .pic { width: 56px; height: 56px; }
.faces-art { display: grid; grid-template-columns: repeat(4, 54px); gap: 12px; place-content: center; }
.faces-art .avatar { width: 54px; height: 54px; }
.map-art .hmap-svg { width: 100%; height: 100%; }

/* Ideology fingerprint */
.glyph-svg { width: 100%; height: 100%; display: block; overflow: visible; }
.gl-ring { fill: color-mix(in srgb, var(--c, var(--brand)) 6%, var(--surface)); stroke: var(--line); stroke-width: 1; }
.gl-mid { fill: none; stroke: var(--line); stroke-width: .8; stroke-dasharray: 2 2.5; }
.gl-spokes line { stroke: var(--line); stroke-width: .6; }
.gl-lbl { font: 600 4.1px var(--sans); fill: var(--muted); letter-spacing: .02em; }
.pic.glyph { background: transparent; border-radius: 50%; box-shadow: none; }
.pic.glyph .glyph-svg { position: absolute; inset: 0; }
.ideo-card { position: relative; overflow: hidden; }
.ideo-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--c); opacity: .85; }
.ideo-card .top { align-items: center; }
.ideo-fp { flex: none; width: 74px; height: 74px; --c: inherit; }
.ideo-card:hover .ideo-fp { transform: rotate(-8deg) scale(1.04); }
.ideo-fp { transition: transform .35s cubic-bezier(.2,.7,.2,1); }
.fam { display: inline-flex; align-items: center; gap: 6px; font: 600 10.5px/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--c); margin-bottom: 6px; }
.fam i { width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.pos { display: flex; gap: 6px; flex-wrap: wrap; }
.pos .axchip { height: 24px; font-size: 11.5px; }
.group { margin-bottom: 44px; }
.group-head { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 16px; }
.group-head p { margin: 4px 0 0; color: var(--muted); font-size: 14px; max-width: 70ch; }
.fam-bar { width: 5px; align-self: stretch; border-radius: 4px; background: var(--c); flex: none; }
.fsep { width: 1px; height: 22px; background: var(--line-2); margin: 4px 6px; }

/* Ideology page */
.ideo-hero { position: relative; overflow: hidden; background: linear-gradient(180deg, color-mix(in srgb, var(--c) 13%, var(--bg)) 0%, var(--bg) 100%); border-bottom: 1px solid var(--line); }
.ideo-hero::after { content: ""; position: absolute; right: -120px; top: -160px; width: 560px; height: 560px; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--c) 18%, transparent), transparent); pointer-events: none; }
.ideo-hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 340px; gap: 40px; align-items: center; padding: 26px 0 44px; }
@media (max-width: 860px) { .ideo-hero-grid { grid-template-columns: 1fr; } .ideo-fp-big { max-width: 300px; margin: 0 auto; } }
.ideo-title { font-family: var(--serif); font-weight: 400; font-size: clamp(40px, 5.4vw, 70px); line-height: 1; letter-spacing: -0.035em; margin: 16px 0 16px; }
.fam-pill { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px; border-radius: 99px; font-size: 12.5px; font-weight: 600; color: var(--c); background: color-mix(in srgb, var(--c) 13%, var(--surface)); border: 1px solid color-mix(in srgb, var(--c) 25%, transparent); }
.fam-pill i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.ideo-fp-big { width: 100%; aspect-ratio: 128 / 112; }
.core-list { display: grid; gap: 8px; margin-top: 12px; }
.core-item { display: flex; gap: 14px; align-items: center; padding: 14px 16px; border-radius: 14px; background: color-mix(in srgb, var(--c) 7%, var(--surface)); border: 1px solid color-mix(in srgb, var(--c) 18%, var(--line)); }
.core-item .ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); flex: none; }
.core-item b { display: block; font-family: var(--serif); font-weight: 500; font-size: 18px; letter-spacing: -0.01em; line-height: 1.25; }
.core-item small { color: var(--muted); font-size: 12.5px; }

/* Subjects (glossary) */
.subj-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; }
@media (max-width: 960px) { .subj-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 640px) { .subj-grid { grid-template-columns: 1fr; } }
.subj { text-align: left; padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; transition: transform .15s, box-shadow .15s, border-color .15s; }
.subj:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.subj b { font-family: var(--serif); font-size: 19px; font-weight: 500; }
.subj span { font-size: 13.5px; color: var(--ink-2); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.subj em { font-style: normal; font-size: 12px; font-weight: 600; color: var(--accent); }
.drawer-bg { position: fixed; inset: 0; z-index: 170; background: rgba(10,10,12,0); transition: background .2s; }
.drawer-bg.on { background: rgba(10,10,12,.38); }
.drawer { position: absolute; top: 0; right: 0; bottom: 0; width: min(480px, 100%); background: var(--surface); border-left: 1px solid var(--line); box-shadow: var(--shadow-lg); padding: 26px 28px 40px; overflow-y: auto; transform: translateX(30px); opacity: 0; transition: transform .25s cubic-bezier(.2,.7,.2,1), opacity .2s; display: flex; flex-direction: column; gap: 14px; }
.drawer-bg.on .drawer { transform: none; opacity: 1; }
.drawer::before { content: ""; position: absolute; left: -100px; top: -140px; width: 420px; height: 320px; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 12%, transparent), transparent); pointer-events: none; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; }
.drawer-title { font-family: var(--serif); font-weight: 400; font-size: 40px; letter-spacing: -0.03em; line-height: 1.05; }
.drawer-lead { margin: 0; font-family: var(--serif); font-size: 20px; line-height: 1.45; color: var(--ink); }
.drawer-body p { margin: 0; font-size: 15.5px; line-height: 1.7; color: var(--ink-2); }
.drawer-sec { border-top: 1px solid var(--line); padding-top: 14px; display: grid; gap: 4px; }
.drawer-sec .tag { margin-bottom: 6px; }
.drawer-row { display: flex; align-items: center; gap: 12px; padding: 7px 8px; margin: 0 -8px; border-radius: 10px; font-size: 14px; }
.drawer-row:hover { background: var(--bg); }
.drawer-row > i { width: 10px; height: 10px; border-radius: 50%; flex: none; margin: 0 9px; }
.drawer-row b { display: block; font-weight: 500; }
.drawer-row small { color: var(--muted); font-size: 12px; }
.drawer-faces { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.drawer-faces a { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.drawer-faces small { font-size: 11.5px; line-height: 1.25; color: var(--ink-2); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chips .chip:hover { border-color: var(--accent); color: var(--accent); }

/* History map — a night-atlas stage that looks the same in light and dark themes */
.hm-land path { fill: color-mix(in srgb, var(--ink) 9%, var(--surface)); stroke: var(--surface); stroke-width: .6; }
.hmap { --sea: #0a0f1d; --land: #2d3858; --land-2: #36446b; --border: #46557f; --hud: rgba(10, 14, 28, .72); }
.hmap-stage { position: relative; border-radius: 22px; overflow: hidden; background: var(--sea); aspect-ratio: 2.15 / 1; box-shadow: 0 30px 60px -36px rgba(8, 12, 30, .55), 0 0 0 1px rgba(255,255,255,.05) inset; isolation: isolate; }
.hmap-stage::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(120% 90% at 50% 40%, transparent 55%, rgba(5, 8, 18, .55)); z-index: 1; }
.hmap .hmap-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: pan-y; }
.hmap .hm-land path { fill: var(--land); stroke: var(--border); stroke-width: .7px; vector-effect: non-scaling-stroke; }
.hm-wrap { pointer-events: none; }
.hmap .hm-land path:hover { fill: var(--land-2); }
.hm-grat line { stroke: rgba(150, 175, 255, .07); stroke-width: 1px; vector-effect: non-scaling-stroke; }
.hm-hl path { fill: var(--c); fill-opacity: .14; stroke: var(--c); stroke-opacity: .4; stroke-width: 1px; vector-effect: non-scaling-stroke; pointer-events: none; }
.hm-hl path.on { fill-opacity: .3; stroke-opacity: .9; stroke-width: 1.4px; }
.ev-blob { pointer-events: none; }
.hm-loading { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(220, 228, 255, .6); font-size: 13px; z-index: 2; }
.ev { cursor: pointer; transition: opacity .35s; }
.ev-guide { fill: none; stroke: var(--c); stroke-opacity: .28; stroke-width: calc(var(--u, 1) * 1.4px); stroke-dasharray: calc(var(--u, 1) * 2px) calc(var(--u, 1) * 5px); }
.ev-line { fill: none; stroke: var(--c); stroke-width: calc(var(--u, 1) * 2.4px); stroke-linecap: round; }
.ev-glow { fill: none; stroke: var(--c); stroke-opacity: .2; stroke-width: calc(var(--u, 1) * 8px); stroke-linecap: round; pointer-events: none; }
.ev.focus .ev-line { stroke-width: calc(var(--u, 1) * 3px); }
.ev .mk.end .core { stroke-width: 1.2; }
.ev-hit { fill: none; stroke: transparent; stroke-width: calc(var(--u, 1) * 16px); }
.ev .core { fill: var(--c); stroke: #0c1120; stroke-width: 1.6; }
.ev .halo { fill: var(--c); opacity: .18; transform-box: fill-box; transform-origin: center; }
.ev.focus .halo { opacity: .3; animation: hm-pulse 1.8s ease-out infinite; }
.ev .hit { fill: transparent; }
@keyframes hm-pulse { 0% { transform: scale(.55); opacity: .5; } 100% { transform: scale(1.9); opacity: 0; } }
.hm-tags { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.hm-tag { position: absolute; transform: translate(12px, -50%); pointer-events: auto; white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis; font: 600 11.5px var(--sans); color: rgba(235, 240, 255, .82); padding: 3px 8px; border-radius: 7px; background: rgba(10, 14, 28, .55); border: 1px solid rgba(255,255,255,.08); backdrop-filter: blur(6px); transition: opacity .3s; }
.hm-tag.left { transform: translate(calc(-100% - 12px), -50%); }
.hm-tag.on { color: #fff; font-size: 12.5px; padding: 4px 10px; background: color-mix(in srgb, var(--c) 30%, rgba(10, 14, 28, .82)); border-color: color-mix(in srgb, var(--c) 60%, transparent); }
.hm-hud { position: absolute; right: 20px; top: 16px; z-index: 3; text-align: right; pointer-events: none; color: #fff; display: flex; flex-direction: column; align-items: flex-end; }
.hm-hud b { font-family: var(--serif); font-weight: 400; font-size: clamp(30px, 4.4vw, 54px); letter-spacing: -0.03em; line-height: 1; text-shadow: 0 2px 20px rgba(0,0,0,.5); }
.hm-hud span { font: 600 10.5px var(--sans); letter-spacing: .16em; text-transform: uppercase; color: rgba(220, 228, 255, .62); margin-top: 6px; }
.hm-world { position: absolute; right: 16px; bottom: 16px; z-index: 3; width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; color: rgba(230, 236, 255, .8); background: var(--hud); border: 1px solid rgba(255,255,255,.1); backdrop-filter: blur(8px); }
.hm-world:hover { color: #fff; border-color: rgba(255,255,255,.25); }
.hmap-view { position: relative; }
.hm-cap { position: absolute; left: 16px; top: 16px; bottom: 16px; width: min(380px, 42%); z-index: 3; display: flex; flex-direction: column; justify-content: flex-end; pointer-events: none; }
.hm-cap.empty { display: none; }
.hm-cap-in { pointer-events: auto; max-height: 100%; overflow-y: auto; scrollbar-width: thin; padding: 18px 20px 16px; border-radius: 16px; color: #e9ecf5; background: var(--hud); border: 1px solid rgba(255,255,255,.09); backdrop-filter: blur(14px) saturate(1.3); box-shadow: 0 20px 40px -20px rgba(0,0,0,.6); position: relative; animation: hm-in .45s cubic-bezier(.2,.7,.2,1); }
@keyframes hm-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.hm-cap-top { display: flex; align-items: center; gap: 10px; }
.hm-kind { display: inline-flex; align-items: center; gap: 7px; font: 700 10.5px var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--c, #9fb2f5); }
.hm-kind i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); box-shadow: 0 0 10px var(--c); }
.hm-when { font-size: 12.5px; color: rgba(220, 228, 255, .7); }
.hm-x { margin-left: auto; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; color: rgba(230, 236, 255, .7); }
.hm-x:hover { background: rgba(255,255,255,.08); color: #fff; }
.hm-cap h4 { font-family: var(--serif); font-weight: 400; font-size: clamp(22px, 2.3vw, 28px); line-height: 1.12; letter-spacing: -0.02em; margin: 8px 0 8px; color: #fff; }
.hm-cap p { margin: 0; font-size: 14px; line-height: 1.55; color: rgba(225, 230, 245, .86); }
.hm-cap a.term, .hm-cap .gl { color: #fff; }
.hm-why { margin-top: 12px; padding-top: 11px; border-top: 1px solid rgba(255,255,255,.09); }
.hm-why span { font: 700 10px var(--sans); letter-spacing: .14em; text-transform: uppercase; color: rgba(220, 228, 255, .5); }
.hm-why p { font-size: 13.2px; color: rgba(215, 222, 240, .78); margin-top: 4px; }
.hm-rel { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.hm-rel a { display: inline-flex; align-items: center; gap: 7px; padding: 3px 10px 3px 3px; border-radius: 99px; background: rgba(255,255,255,.07); font-size: 12.5px; font-weight: 600; color: #eef1fa; }
.hm-rel a:hover { background: rgba(255,255,255,.14); }
.hm-meta { margin-top: 10px; font-size: 11.5px; color: rgba(220, 228, 255, .45); }
.hm-dwell { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: rgba(255,255,255,.05); border-radius: 0 0 16px 16px; overflow: hidden; }
.hm-dwell i { display: block; height: 100%; width: 0; background: var(--c, #9fb2f5); }
.hmap:not(.is-playing) .hm-dwell { display: none; }
.hm-start { margin-top: 16px; height: 42px; padding: 0 18px; border-radius: 11px; display: inline-flex; align-items: center; gap: 9px; background: #fff; color: #0c1120; font-weight: 600; font-size: 14px; box-shadow: 0 10px 24px -12px rgba(255,255,255,.5); }
.hm-start:hover { transform: translateY(-1px); }
.hm-start svg { width: 14px; height: 14px; }

.hm-bar { display: flex; align-items: center; gap: 18px; margin-top: 14px; padding: 10px 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.hm-btns { display: flex; align-items: center; gap: 6px; flex: none; }
.hm-btn { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: var(--ink-2); }
.hm-btn:hover { background: var(--bg-2); color: var(--ink); }
.hm-play { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--bg); transition: transform .15s; }
.hm-play:hover { transform: scale(1.06); }
.hm-play svg { margin-left: 1px; }
.is-playing .hm-play svg { margin-left: 0; }
.hm-tl { flex: 1; min-width: 0; position: relative; padding: 14px 0 20px; cursor: pointer; touch-action: none; outline: none; }
.hm-tl:focus-visible .hm-tl-thumb { box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 35%, transparent); }
.hm-tl-track { position: relative; height: 6px; border-radius: 6px; background: var(--track); }
.hm-tl-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 6px; background: linear-gradient(90deg, color-mix(in srgb, var(--brand) 40%, transparent), var(--brand)); }
.hm-tick { position: absolute; top: -5px; width: 2px; height: 16px; margin-left: -1px; border-radius: 2px; background: var(--c); opacity: .5; transition: opacity .2s, transform .2s; }
.hm-tick.on { opacity: 1; transform: scaleY(1.45); box-shadow: 0 0 8px var(--c); }
.hm-tl-thumb { position: absolute; top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; background: var(--surface); border: 3px solid var(--brand); box-shadow: 0 2px 6px rgba(0,0,0,.25); }
.hm-tl-eras { position: absolute; left: 0; right: 0; bottom: 0; height: 14px; }
.hm-tl-eras button { position: absolute; bottom: 0; transform: translateX(-1px); font-size: 10.5px; font-weight: 600; color: var(--faint); white-space: nowrap; padding: 0 0 0 5px; border-left: 1px solid var(--line-2); line-height: 12px; overflow: hidden; text-overflow: ellipsis; }
.hm-tl-eras button.tight:not(.on) { font-size: 0; width: 6px; }
.hm-tl-eras button.end.on { transform: translateX(-100%); border-left: 0; border-right: 1px solid var(--ink-2); padding: 0 5px 0 6px; }
.hm-tl-eras button.on { max-width: none !important; background: var(--surface); padding-right: 6px; z-index: 1; }
.hm-tl-eras button:hover, .hm-tl-eras button.on { color: var(--ink); border-left-color: var(--ink-2); }
.hm-speed { flex: none; height: 30px; min-width: 42px; padding: 0 10px; border-radius: 9px; font: 600 12.5px var(--mono); color: var(--ink-2); border: 1px solid var(--line-2); }
.hm-speed:hover { border-color: var(--ink-2); color: var(--ink); }
@media (max-width: 1100px) { .hm-tl-eras button:not(.on) { font-size: 0; width: 6px; } }
@media (max-width: 900px) {
  .hmap-stage { aspect-ratio: 4 / 3.2; border-radius: 18px; }
  .hmap { display: flex; flex-direction: column; } .hmap-view { display: contents; } .hmap-stage { order: 1; } .hm-bar { order: 2; } .hm-tick { opacity: .35; }
  .hm-cap { order: 3; position: static; width: auto; display: block; margin-top: 12px; }
  .hmap .hm-cap-in { background: #121828; backdrop-filter: none; max-height: none; }
  .hm-hud { right: 14px; top: 12px; }
  .hm-bar { gap: 10px; padding: 8px 10px; }
  .hm-btn { width: 30px; }
}
.era-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 22px; }
.era-chips .chip:hover { border-color: var(--brand); color: var(--brand); }

/* Eras */
.era-block { padding: 10px 0 40px; }
.era-block .era-head { border-top: 1px solid var(--line); }
.era-stats { margin-top: 8px; }
.ev-list { display: grid; gap: 6px; }
.ev-item { display: grid; grid-template-columns: 92px 1fr auto; gap: 14px; align-items: center; text-align: left; padding: 12px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--c); transition: transform .15s, box-shadow .15s; }
.ev-item:hover { transform: translateX(3px); box-shadow: var(--shadow); }
.ev-y { font: 600 12.5px var(--mono); color: color-mix(in srgb, var(--c) 68%, var(--ink)); }
.ev-item b { display: block; font-weight: 600; font-size: 14.5px; }
.ev-item small { color: var(--muted); font-size: 13px; line-height: 1.45; }
.ev-k { font-size: 11.5px; font-weight: 600; color: color-mix(in srgb, var(--c) 68%, var(--ink)); white-space: nowrap; }
@media (max-width: 640px) { .ev-item { grid-template-columns: 1fr; gap: 4px; } .ev-k { display: none; } }

/* Country pages */
.land-map { width: 300px; flex: none; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.land-map .hmap-svg.mini .hm-land path { stroke-width: .4; }
@media (max-width: 760px) { .land-map { width: 100%; } }
.lineage { position: relative; display: grid; gap: 0; margin-top: 12px; }
.lineage::before { content: ""; position: absolute; left: 16px; top: 14px; bottom: 14px; width: 2px; background: var(--line); }
.lin-item { position: relative; display: flex; gap: 14px; align-items: center; padding: 9px 10px 9px 0; border-radius: 10px; }
.lin-item .pic { z-index: 1; box-shadow: 0 0 0 3px var(--bg); }
.lin-item:hover b { color: var(--brand); }
.lin-item.on b { color: var(--accent); }
.lin-item b { display: block; font-weight: 600; font-size: 14.5px; }
.lin-item small { color: var(--muted); font-size: 12.5px; }

/* ═══════════ v4 additions ═══════════ */

/* Track tone for every bar, tuned so bars stay visible in both themes */
:root { --track: #e2ded3; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --track: #3a3c46; --line: #30323a; --line-2: #42444e; } }
:root[data-theme="dark"] { --track: #3a3c46; --line: #30323a; --line-2: #42444e; }
.track, .mini-bars i, .kpi .bar, .rank-row .m, .fam-row .bar, .progress span, .resume .bar, .version .depth i { background-color: var(--track); }
.two-track::before { background: var(--track); }
.track .mid { background: var(--muted); opacity: .45; }
.version .depth i.on { background: var(--brand); }

/* Free badges */
.free-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.free-pill { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 14px; border-radius: 99px; font-size: 13.5px; font-weight: 600; color: #fff; background: var(--ok); box-shadow: 0 6px 16px -8px var(--ok); }
.free-pill svg { width: 15px; height: 15px; }
.free-pill.soft { color: var(--ink-2); background: var(--surface); border: 1px solid var(--line); box-shadow: none; font-weight: 500; }
.free-pill.soft svg { color: var(--ok); }
.free-tag { color: var(--ok); font-weight: 700; }

/* Land history: clean list, details on demand */
.land-story { margin: 12px 0 6px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.land-story summary { list-style: none; cursor: pointer; padding: 14px 16px; font-family: var(--serif); font-size: 18px; display: flex; align-items: center; gap: 8px; }
.land-story summary::-webkit-details-marker { display: none; }
.land-story summary::before { content: "+"; font: 400 18px var(--sans); color: var(--accent); width: 16px; }
.land-story[open] summary::before { content: "−"; }
.land-story p { margin: 0; padding: 0 18px 18px; color: var(--ink-2); line-height: 1.7; }
details.lin-item { display: block; padding: 0; border-radius: 12px; transition: background .15s; }
details.lin-item summary { list-style: none; cursor: pointer; display: flex; gap: 14px; align-items: center; padding: 9px 10px 9px 0; }
details.lin-item summary::-webkit-details-marker { display: none; }
details.lin-item summary > span { flex: 1; min-width: 0; }
details.lin-item:hover summary b { color: var(--brand); }
details.lin-item.on summary b { color: var(--accent); }
.lin-chev { font-style: normal; font-size: 20px; color: var(--faint); transition: transform .2s; padding: 0 6px; }
details.lin-item[open] .lin-chev { transform: rotate(90deg); color: var(--brand); }
details.lin-item[open] { background: var(--surface); box-shadow: var(--shadow); margin: 6px 0; }
.lin-body { padding: 2px 16px 16px 50px; display: grid; gap: 12px; animation: rise .25s cubic-bezier(.2,.7,.2,1); }
.lin-body > p { margin: 0; color: var(--ink-2); font-size: 14.5px; line-height: 1.6; }
.lin-facts { display: flex; gap: 6px; flex-wrap: wrap; }
.lin-sub { display: grid; gap: 2px; }
.lin-sub .tag { margin-bottom: 4px; }
.lin-people { display: flex; gap: 12px; flex-wrap: wrap; }
.lin-people a { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 64px; text-align: center; }
.lin-people small { font-size: 11px; line-height: 1.2; color: var(--ink-2); }
@media (max-width: 640px) { .lin-body { padding-left: 12px; } }

/* Language switch */
.lang-btn { height: 38px; padding: 0 10px; border-radius: 11px; border: 1px solid var(--line); background: var(--surface); font: 600 12px var(--sans); letter-spacing: .04em; color: var(--ink-2); display: inline-flex; align-items: center; gap: 6px; }
.lang-btn:hover { border-color: var(--line-2); color: var(--ink); }
.lang-menu { position: absolute; right: 0; top: 46px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; min-width: 170px; z-index: 60; }
.lang-menu button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; font-size: 14px; text-align: left; }
.lang-menu button:hover, .lang-menu button.on { background: var(--bg); }
.lang-menu button.on { font-weight: 600; color: var(--brand); }
.lang-wrap { position: relative; }

/* Phones: comfortable touch targets, no overflow */
@media (max-width: 640px) {
  .nav .wrap { gap: 10px; }
  .nav-right { gap: 4px; }
  .icon-btn, .lang-btn, .search-trigger { height: 40px; }
  .opt { padding: 14px; }
  .hub-search input { font-size: 16px; }
  .display { font-size: 44px; }
}

/* ═══════════ v6: reading list & reading links ═══════════ */
.read-block { margin-top: 10px; max-width: 620px; }
.read-list { display: grid; gap: 6px; margin-top: 10px; }
.read-list a { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); transition: border-color .15s, transform .15s; }
.read-list a:hover { border-color: var(--ink-2); transform: translateX(2px); }
.read-list .ri { width: 30px; height: 30px; border-radius: 9px; flex: none; display: grid; place-items: center; background: var(--bg-2); color: var(--ink-2); }
.read-list .ri svg { width: 15px; height: 15px; }
.read-list a > span:nth-child(2) { flex: 1; min-width: 0; }
.read-list b { display: block; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.read-list small { color: var(--muted); font-size: 12px; }
.read-list a > svg { width: 15px; height: 15px; color: var(--muted); flex: none; }

.book-grid { gap: 14px; }
.book-card { display: flex; gap: 18px; padding: 18px; align-items: stretch; transition: border-color .15s, transform .15s, box-shadow .15s; }
.book-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.bcover { position: relative; width: 96px; flex: none; aspect-ratio: 2 / 3; border-radius: 4px 9px 9px 4px; overflow: hidden; align-self: flex-start;
  background: linear-gradient(90deg, rgba(0,0,0,.22) 0 6px, transparent 6px), linear-gradient(160deg, hsl(var(--h) 45% 42%), hsl(calc(var(--h) + 40) 50% 24%));
  box-shadow: 0 12px 24px -14px rgba(0,0,0,.55), 0 0 0 1px rgba(0,0,0,.06); }
.bcover i { position: absolute; inset: 0; padding: 12px 10px 10px 14px; display: flex; flex-direction: column; justify-content: space-between; font-style: normal; color: #fff; }
.bcover i b { font-family: var(--serif); font-weight: 500; font-size: 13.5px; line-height: 1.15; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.bcover i small { font-size: 9.5px; opacity: .8; line-height: 1.2; }
.bcover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .3s; }
.bcover.ok img { opacity: 1; }
.bk-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.bk-top { display: flex; align-items: baseline; gap: 8px; }
.bk-m { font-family: var(--serif); font-size: 26px; letter-spacing: -.03em; line-height: 1; color: var(--c); }
.bk-t { font-family: var(--serif); font-weight: 500; font-size: 20px; line-height: 1.2; letter-spacing: -.01em; margin-top: 6px; }
.bk-a { font-size: 13px; color: var(--muted); }
.bk-d { font-size: 14px; color: var(--ink-2); margin-top: 6px; line-height: 1.5; }
.bk-why { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.bk-why > span { font-weight: 600; color: var(--ink-2); }
.bk-go { margin-top: auto; padding-top: 10px; display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--accent); }
.bk-go svg { width: 13px; height: 13px; }
.other-side { margin-top: 26px; max-width: calc(50% - 7px); }
.other-side .tag { display: block; margin-bottom: 10px; }
.book-card.other { border-style: dashed; }
@media (max-width: 860px) { .other-side { max-width: none; } }
@media (max-width: 520px) { .book-card { gap: 14px; padding: 14px; } .bcover { width: 76px; } .bk-t { font-size: 17px; } .bk-d { font-size: 13.5px; } }

/* ═══════════ v7: phone performance & motion ═══════════ */
/* Blur behind sticky bars and soft glows are costly while scrolling on phones: use solid surfaces there */
@media (max-width: 760px), (hover: none) {
  .nav { backdrop-filter: none; -webkit-backdrop-filter: none; background: color-mix(in srgb, var(--bg) 97%, transparent); }
  .subnav { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--bg); }
  .sheet-bg, .palette-bg { backdrop-filter: none; }
  .hm-tag, .hm-world { backdrop-filter: none; background: rgba(10, 14, 28, .82); }
  .aura::before, .aura::after { filter: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* Language hint: points non-English speakers to the language switch */
.lang-hint { position: absolute; right: -6px; top: calc(100% + 12px); z-index: 55; display: flex; align-items: center; gap: 2px; padding: 4px 4px 4px 12px; border-radius: 12px; background: var(--brand); color: var(--brand-ink); box-shadow: 0 12px 28px -12px color-mix(in srgb, var(--brand) 70%, transparent); white-space: nowrap; animation: lh-bob 2.4s ease-in-out infinite; }
.lang-hint::before { content: ""; position: absolute; right: 22px; top: -6px; width: 12px; height: 12px; background: var(--brand); transform: rotate(45deg); border-radius: 2px; }
.lang-hint .lh-open { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.25; padding: 4px 6px 4px 0; color: inherit; text-align: left; }
.lang-hint .lh-open span { font-size: 11.5px; opacity: .85; }
.lang-hint .lh-open b { font-size: 13px; font-weight: 600; }
.lang-hint .lh-x { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; color: inherit; opacity: .8; }
.lang-hint .lh-x:hover { opacity: 1; background: rgba(255,255,255,.14); }
.lang-hint .lh-x svg { width: 14px; height: 14px; }
@keyframes lh-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(3px); } }
