:root {
  --bg: #0e0b0a;
  --bg-2: #130f0d;
  --surface: #1a1411;
  --surface-2: #231b17;
  --surface-3: #2d231e;
  --line: #3a2e27;
  --line-soft: #2a211c;
  --text: #f7efe8;
  --text-2: #d3c4b8;
  --muted: #9c8b7f;
  --flame: #ff7a1a;
  --flame-2: #ffb13b;
  --gold: #ffd166;
  --ember: #c9300f;
  --ice: #7fe3ff;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 20px 50px -20px rgba(0, 0, 0, .7);
  --font: "Avenir Next", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Avenir Next Condensed", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(201, 48, 15, .16), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(255, 122, 26, .07), transparent 60%),
    var(--bg);
  color: var(--text);
  font: 16px/1.55 var(--font);
  display: flex;
  flex-direction: column;
}
main { flex: 1; width: 100%; max-width: 1240px; margin: 0 auto; padding: 8px clamp(16px, 4vw, 40px) 48px; }
a { color: var(--flame-2); }
a:hover { color: var(--gold); }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.35rem, 2.4vw, 1.75rem); font-weight: 750; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--flame); color: #000; padding: 8px 12px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }
.muted { color: var(--muted); }
:focus-visible { outline: 2px solid var(--ice); outline-offset: 3px; }

/* ------------------------------------------------------------ chrome */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px clamp(16px, 4vw, 40px);
  max-width: 1240px; width: 100%; margin: 0 auto;
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 800; letter-spacing: .01em; }
.brand-mark { display: grid; grid-template-columns: repeat(2, 9px); gap: 2px; }
.brand-mark i { width: 9px; height: 9px; border-radius: 2px; background: #83150b; }
.brand-mark i:nth-child(2) { background: #f47316; }
.brand-mark i:nth-child(3) { background: #de4611; }
.brand-mark i:nth-child(4) { background: #fdcf48; box-shadow: 0 0 8px #fdcf48; }
.topnav { display: flex; gap: 4px; }
.topnav a { color: var(--text-2); text-decoration: none; padding: 8px 12px; border-radius: 999px; font-size: .95rem; }
.topnav a:hover, .topnav a[aria-current="page"] { color: var(--text); background: var(--surface-2); }
.foot {
  display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between;
  padding: 18px clamp(16px, 4vw, 40px); color: var(--muted); font-size: .8rem;
  border-top: 1px solid var(--line-soft); max-width: 1240px; width: 100%; margin: 0 auto;
}

.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .75rem; font-weight: 700; color: var(--flame-2); margin-bottom: .6em; }
.lede { font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--text-2); max-width: 62ch; }
.glow {
  background: linear-gradient(90deg, #f47316, #fdcf48 55%, #fff0a3);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: 0 0 40px rgba(255, 150, 40, .25);
}

/* ------------------------------------------------------------ buttons */
.btn {
  --h: 48px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--h); padding: 0 22px; border-radius: 999px;
  font: 700 1rem/1 var(--font); letter-spacing: .01em;
  border: 1px solid transparent; cursor: pointer; text-decoration: none;
  transition: transform .12s ease, background-color .15s ease, border-color .15s ease, box-shadow .2s ease;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn-sm { --h: 38px; padding: 0 14px; font-size: .88rem; }
.btn-fire { background: linear-gradient(180deg, #ff8a2a, #e5500f); color: #1a0803; box-shadow: 0 8px 24px -10px rgba(255, 110, 20, .8); }
.btn-fire:hover { color: #1a0803; background: linear-gradient(180deg, #ff9d45, #f05f16); box-shadow: 0 10px 30px -10px rgba(255, 130, 30, .95); }
.btn-ghost { background: var(--surface-2); color: var(--text); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface-3); color: var(--text); }
.btn-quiet { background: transparent; color: var(--text-2); }
.btn-quiet:hover { color: var(--text); background: var(--surface-2); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }

/* ------------------------------------------------------------ welcome */
.hero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .9fr); gap: clamp(20px, 5vw, 64px); align-items: center; padding: clamp(16px, 5vw, 56px) 0 24px; }
.hero-art { display: flex; justify-content: center; }
.hero-art canvas { width: min(360px, 100%); height: auto; aspect-ratio: 1; filter: drop-shadow(0 30px 60px rgba(201, 48, 15, .35)); }
.start-form { margin-top: 28px; max-width: 520px; }
.start-form label { display: block; font-weight: 650; margin-bottom: 8px; color: var(--text-2); }
.start-row { display: flex; gap: 10px; }
input[type="text"], input:not([type]), input[type="search"], textarea, select {
  font: 500 1rem var(--font); color: var(--text); background: var(--surface);
  border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; min-height: 48px; width: 100%;
}
input::placeholder, textarea::placeholder { color: #7d6d62; }
input:focus, textarea:focus, select:focus { border-color: var(--flame); outline: none; box-shadow: 0 0 0 3px rgba(255, 122, 26, .25); }
.resume { margin-top: 24px; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); max-width: 560px; }
.saved { margin-top: 18px; max-width: 560px; color: var(--text-2); }
.saved summary { cursor: pointer; font-weight: 650; padding: 6px 0; }
.saved-list { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 6px; }
.saved-list button { width: 100%; text-align: left; justify-content: space-between; }
.saved-list small { color: var(--muted); font-weight: 500; }
.facts { list-style: none; padding: 0; margin: 24px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.facts li { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 18px; display: grid; gap: 6px; }
.facts b { font-size: 1.05rem; }
.facts span { color: var(--text-2); font-size: .95rem; }

/* ------------------------------------------------------------ section chips */
.chips { list-style: none; display: flex; gap: 6px; padding: 0; margin: 0 0 14px; flex-wrap: wrap; }
.chips li {
  display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--muted);
  padding: 5px 10px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line-soft);
}
.chips li.done { color: var(--text-2); border-color: #5a2a14; background: #24130c; }
.chips li.current { color: #1a0803; background: var(--flame-2); border-color: var(--flame-2); font-weight: 700; }
.chips .chip-label { white-space: nowrap; }

/* ------------------------------------------------------------ intro */
.intro-card { max-width: 720px; margin: clamp(8px, 4vw, 40px) auto; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: clamp(22px, 5vw, 44px); box-shadow: var(--shadow); }
.intro-icon { font-size: 3rem; line-height: 1; margin: 12px 0 10px; }
.intro-text { font-size: 1.12rem; color: var(--text-2); }
.why { display: grid; gap: 4px; background: var(--bg-2); border-left: 3px solid var(--flame); border-radius: 0 12px 12px 0; padding: 14px 16px; margin: 18px 0 22px; color: var(--text-2); font-size: .95rem; }
.why b { color: var(--text); font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; }
.teaser { margin: 0 0 22px; padding: 16px; border-radius: 14px; background: linear-gradient(135deg, #2a140b, #1b120e); border: 1px solid #4a2412; }
.teaser h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--flame-2); margin-bottom: 10px; }
.teaser .pill-row { display: flex; flex-wrap: wrap; gap: 6px; }

/* ------------------------------------------------------------ quiz */
.quiz-head { max-width: 820px; margin: 8px auto 0; }
.progress { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, #83150b, #de4611, #fb9f22, #fdcf48); transition: width .35s ease; }
.quiz-meta { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: .88rem; margin-top: 8px; }
.q-card {
  max-width: 820px; margin: 18px auto 0; background: var(--surface); border: 1px solid var(--line);
  border-radius: 22px; padding: clamp(20px, 4.5vw, 44px); box-shadow: var(--shadow); min-height: 340px;
  display: flex; flex-direction: column;
}
.q-card.enter { animation: cardIn .22s ease both; }
@keyframes cardIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.q-section { color: var(--flame-2); font-weight: 700; font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 10px; }
.q-text { font-size: clamp(1.4rem, 3.4vw, 2.1rem); font-weight: 760; line-height: 1.2; margin-bottom: 8px; text-wrap: balance; }
.q-prompt { color: var(--muted); margin-bottom: 20px; }
.q-body { margin-top: auto; }
.scale { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.opt {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  min-height: 92px; padding: 12px 6px; border-radius: 14px; cursor: pointer;
  background: var(--surface-2); border: 1.5px solid var(--line); color: var(--text);
  font: 650 .92rem/1.2 var(--font); text-align: center;
  transition: transform .1s ease, border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.opt:hover { border-color: #6b4a38; background: var(--surface-3); }
.opt .glyph { font-size: 1.7rem; line-height: 1; }
.opt .num { font-size: .7rem; color: var(--muted); font-weight: 600; }
.opt[aria-pressed="true"] { border-color: var(--flame); background: #3a1b0d; box-shadow: 0 0 0 3px rgba(255, 122, 26, .25), 0 10px 26px -12px rgba(255, 110, 20, .8); }
.opt[aria-pressed="true"] .num { color: var(--flame-2); }
.opt:active { transform: scale(.97); }
.scale-heat .opt:nth-child(1)[aria-pressed="true"] { border-color: #83150b; background: #2b0f0b; }
.scale-heat .opt:nth-child(2)[aria-pressed="true"] { border-color: #b8230d; background: #3a130c; }
.scale-heat .opt:nth-child(5)[aria-pressed="true"] { border-color: var(--gold); background: #3e2a0c; }
.na-row { display: flex; justify-content: center; margin-top: 12px; }
.opt-na { min-height: 44px; flex-direction: row; padding: 0 18px; border-style: dashed; color: var(--text-2); }
.sub-block + .sub-block { margin-top: 18px; }
.sub-label { font-weight: 700; color: var(--text-2); margin-bottom: 8px; font-size: .95rem; }
.sub-block .opt { min-height: 72px; }
.choice-list { display: grid; gap: 10px; }
.choice-list .opt { flex-direction: row; justify-content: flex-start; min-height: 58px; padding: 12px 18px; text-align: left; font-size: 1rem; }
.top3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.top3 .opt { min-height: 64px; font-size: .95rem; }
.top3-foot, .text-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 18px; color: var(--muted); flex-wrap: wrap; }
.quiz-nav { max-width: 820px; margin: 14px auto 0; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.kbd-hint { color: var(--muted); font-size: .82rem; }
kbd { font: 600 .78rem var(--font); background: var(--surface-2); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; padding: 1px 6px; color: var(--text-2); }

/* ------------------------------------------------------------ results */
.results-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin: 12px 0 16px; }
.results-head h1 { margin-bottom: .2em; }
.res-sub { color: var(--text-2); margin: 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.res-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.notice { background: #2a1a0c; border: 1px solid #5c3a14; color: #ffd9a8; border-radius: 12px; padding: 12px 16px; margin-bottom: 16px; }
.code-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-size: .9rem; color: var(--text); }
.code-chip b { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 999px; background: var(--flame-2); color: #1a0803; font-size: .8rem; }

.tabs { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px; margin-bottom: 14px; }
.tab { font: 700 .95rem var(--font); color: var(--text-2); background: transparent; border: 0; border-radius: 999px; padding: 10px 18px; cursor: pointer; min-height: 42px; }
.tab[aria-selected="true"] { background: var(--surface-3); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.tab-n { color: var(--muted); font-weight: 600; font-size: .8rem; margin-left: 4px; }

.map-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 380px); gap: 18px; align-items: start; }
.map-card, .detail, .panel { background: var(--surface); border: 1px solid var(--line-soft); border-radius: 20px; box-shadow: var(--shadow); }
.map-card { padding: clamp(12px, 2vw, 20px); min-width: 0; }
.map-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; align-items: center; }
.map-tools .search { flex: 1 1 220px; }
.map-tools .select { flex: 0 1 250px; }
.map-tools input, .map-tools select { min-height: 42px; padding: 8px 12px; }
.toggle { display: inline-flex; align-items: center; gap: 8px; padding: 0 12px; min-height: 42px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); cursor: pointer; font-size: .9rem; color: var(--text-2); user-select: none; }
.toggle input { accent-color: var(--flame); width: 16px; height: 16px; }

.map-frame {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-rows: auto auto auto;
  grid-template-areas: ". top ." "left map right" ". bottom .";
  gap: 6px 8px; align-items: center;
}
.axis { color: var(--muted); font-size: .72rem; text-align: center; line-height: 1.25; }
.axis b { display: block; color: var(--text); font-size: .85rem; letter-spacing: .16em; }
.axis-top { grid-area: top; }
.axis-bottom { grid-area: bottom; }
.axis-left, .axis-right { writing-mode: vertical-rl; }
.axis-left { grid-area: left; transform: rotate(180deg); }
.axis-right { grid-area: right; }
.axis-left, .axis-right { align-self: center; }
.map-wrap { grid-area: map; position: relative; width: 100%; aspect-ratio: 1; align-self: start; }
.map-wrap canvas { display: block; width: 100%; border-radius: 6px; touch-action: manipulation; }
.map-wrap canvas:focus-visible { outline-offset: 4px; }
.corner { position: absolute; font-size: .66rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: rgba(255, 240, 225, .5); pointer-events: none; text-shadow: 0 1px 3px #000, 0 0 8px #000; }
.c-tl { left: 6px; top: 6px; } .c-tr { right: 6px; top: 6px; } .c-bl { left: 6px; bottom: 6px; } .c-br { right: 6px; bottom: 6px; }
.c-r { right: 6px; top: 50%; transform: translateY(-50%); } .c-l { left: 6px; top: 50%; transform: translateY(-50%); }
.map-tip {
  position: absolute; left: 0; top: 0; z-index: 3; pointer-events: none;
  display: flex; align-items: center; gap: 8px; max-width: 280px;
  background: rgba(16, 12, 10, .96); border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px 6px 6px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .6); font-size: .88rem; font-weight: 600; line-height: 1.25;
}
.tip-heat { flex: none; min-width: 30px; height: 26px; border-radius: 6px; display: grid; place-items: center; font-size: .8rem; font-weight: 800; font-variant-numeric: tabular-nums; }

.legend { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; margin: 16px 4px 4px; }
.legend-label { font-size: .75rem; color: var(--muted); font-weight: 600; }
.legend-bar { position: relative; height: 12px; border-radius: 4px; margin-bottom: 14px; }
.legend-bar span { position: absolute; top: 15px; transform: translateX(-50%); font-size: .68rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.map-help { color: var(--muted); font-size: .85rem; margin: 10px 4px 0; }
.you-chip { display: inline-block; padding: 0 6px; border: 2px solid var(--ice); border-radius: 999px; color: #bff2ff; font-size: .7rem; font-weight: 800; line-height: 1.4; }

.detail { padding: 20px; position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow: auto; }
.detail-empty h3 { margin-bottom: 4px; }
.detail-empty p { color: var(--text-2); font-size: .95rem; }
.hot-mini { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 4px; }
.d-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 10px; }
.d-heat { flex: none; width: 64px; height: 64px; border-radius: 14px; display: grid; place-items: center; font-weight: 850; font-size: 1.5rem; font-variant-numeric: tabular-nums; line-height: 1; }
.d-heat small { display: block; font-size: .55rem; letter-spacing: .12em; font-weight: 800; opacity: .75; margin-top: 2px; }
.d-title { font-size: 1.25rem; margin: 2px 0 4px; }
.d-kicker { color: var(--muted); font-size: .8rem; margin: 0; }
.d-alt { color: var(--text-2); font-size: .85rem; margin: 0 0 10px; }
.d-desc { color: var(--text-2); font-size: .95rem; }
.d-section { margin-top: 16px; }
.d-section h4 { margin: 0 0 8px; font-size: .75rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.pillars { display: grid; gap: 7px; }
.pillar { display: grid; grid-template-columns: 96px minmax(0, 1fr) 32px; gap: 8px; align-items: center; font-size: .85rem; color: var(--text-2); }
.pillar .val { text-align: right; font-variant-numeric: tabular-nums; color: var(--text); font-weight: 700; }
.mosaic-bar { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 2px; }
.mosaic-bar i { aspect-ratio: 1; border-radius: 2px; background: #1f1814; }
.why-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: .92rem; }
.why-list li { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 8px; color: var(--text-2); }
.why-list li::before { content: "▲"; color: var(--flame-2); font-size: .7rem; padding-top: 4px; }
.why-list.cold li::before { content: "▼"; color: #7fb6ff; }
.facts-list { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 12px; margin: 0; font-size: .9rem; }
.facts-list dt { color: var(--muted); }
.facts-list dd { margin: 0; color: var(--text); }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 999px; font-size: .75rem; font-weight: 700; background: #16301f; color: #9be7b0; border: 1px solid #245a36; white-space: nowrap; }
.links { display: flex; flex-wrap: wrap; gap: 6px; }
.link-chip { display: inline-flex; align-items: center; gap: 6px; font: 600 .85rem var(--font); color: var(--text); background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 5px 10px 5px 5px; cursor: pointer; text-align: left; }
.link-chip:hover { background: var(--surface-3); }
.link-chip .sw { width: 18px; height: 18px; border-radius: 5px; flex: none; }
.ext { font-size: .9rem; }

.panel { padding: clamp(16px, 3vw, 28px); margin-top: 18px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.rank { list-style: none; padding: 0; margin: 8px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 6px 18px; counter-reset: rank; }
.rank-item { display: grid; grid-template-columns: 26px 40px minmax(0, 1fr); gap: 10px; align-items: center; padding: 6px 8px; border-radius: 12px; cursor: pointer; background: transparent; border: 0; color: inherit; font: inherit; text-align: left; width: 100%; }
.rank-item:hover { background: var(--surface-2); }
.rank-num { color: var(--muted); font-size: .8rem; text-align: right; font-variant-numeric: tabular-nums; }
.rank-heat { height: 32px; border-radius: 8px; display: grid; place-items: center; font-weight: 800; font-size: .85rem; font-variant-numeric: tabular-nums; }
.rank-title { font-weight: 650; line-height: 1.25; }
.rank-meta { display: block; color: var(--muted); font-size: .78rem; font-weight: 500; margin-top: 2px; }
.rank-item.no-num { grid-template-columns: 40px minmax(0, 1fr); }

.profile-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.p-card { background: var(--bg-2); border: 1px solid var(--line-soft); border-radius: 14px; padding: 16px; }
.p-card h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-bottom: 12px; }
.bars { display: grid; gap: 8px; }
.bar-row { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 10px; align-items: center; font-size: .88rem; }
.bar-row .lbl b { display: block; color: var(--text); }
.bar-row .lbl small { color: var(--muted); }
.pill-row { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: .85rem; background: var(--surface-2); border: 1px solid var(--line); color: var(--text); }
.pill .sw { width: 10px; height: 10px; border-radius: 3px; }
.pill.warn { background: #2a1111; border-color: #5b2424; color: #ffb4a8; }

.weights { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px 22px; margin-top: 12px; }
.weight label { display: flex; justify-content: space-between; font-weight: 650; font-size: .92rem; margin-bottom: 6px; }
.weight output { color: var(--flame-2); font-variant-numeric: tabular-nums; }
input[type="range"] { width: 100%; accent-color: var(--flame); min-height: 28px; }

.next .steps { margin: 8px 0 0; padding-left: 1.3em; display: grid; gap: 10px; color: var(--text-2); }
.next .steps b { color: var(--text); }

/* ------------------------------------------------------------ money, own path, AI */
.small { font-size: .82rem; }
.tradeoff { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 12px; align-items: stretch; margin-bottom: 14px; }
.trade-card { display: grid; gap: 8px; align-content: start; text-align: left; padding: 16px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface-2); color: var(--text); font: 650 1.02rem/1.35 var(--font); cursor: pointer; }
.trade-card b { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--surface-3); color: var(--flame-2); font-size: .85rem; }
.trade-card:hover { border-color: #6b4a38; }
.trade-card.on { border-color: var(--flame); background: #3a1b0d; }
.trade-or { align-self: center; color: var(--muted); font-weight: 700; font-size: .85rem; text-transform: uppercase; letter-spacing: .1em; }
.scale-trade .opt { min-height: 60px; }
.teaser-big { font-size: 1.5rem; font-weight: 800; margin: 0; }
.teaser-big .muted { font-size: .95rem; font-weight: 500; }

.d-emerging { background: #1c1a2a; border: 1px solid #34305a; color: #d9d4ff; border-radius: 12px; padding: 10px 12px; font-size: .9rem; }
.d-emerging b { color: #fff; }
.paybar { margin: 4px 0 12px; }
.pb-track { position: relative; height: 16px; border-radius: 8px; background: #1f1814; }
.pb-track i { position: absolute; top: 0; bottom: 0; }
.pb-range { background: #5a2a14; border-radius: 8px; }
.pb-mid { background: #c2410c; border-radius: 6px; top: 2px !important; bottom: 2px !important; }
.pb-med { width: 3px; margin-left: -1.5px; background: #fff3d6; border-radius: 2px; top: -3px !important; bottom: -3px !important; }
.pb-goal { width: 0; border-left: 2px dashed var(--ice); top: -6px !important; bottom: -6px !important; }
.pb-scale { position: relative; height: 16px; margin-top: 4px; }
.pb-scale span { position: absolute; transform: translateX(-50%); font-size: .66rem; color: var(--muted); white-space: nowrap; }
.pb-scale span:first-child { transform: none; }
.pb-scale span:last-child { transform: translateX(-100%); }
.goal-note { margin: 10px 0 0; font-size: .88rem; padding: 8px 10px; border-radius: 10px; }
.goal-note.ok { background: #15291c; color: #a9ecbd; }
.goal-note.mid { background: #2b2410; color: #f6dc97; }
.goal-note.low { background: #2e1512; color: #ffb4a8; }

.money-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin-top: 12px; }
.big-num { font-size: clamp(2.2rem, 5vw, 3rem); font-weight: 850; line-height: 1; margin: 4px 0 8px; background: linear-gradient(90deg, #fb9f22, #fdcf48, #fff0a3); -webkit-background-clip: text; background-clip: text; color: transparent; font-variant-numeric: tabular-nums; }
.money-selects { display: grid; gap: 8px; margin-top: 12px; }
.money-select { display: grid; gap: 4px; font-size: .78rem; color: var(--muted); font-weight: 600; }
.money-select select { min-height: 40px; padding: 6px 10px; font-size: .9rem; }
.spend { display: grid; gap: 8px; }
.spend-row { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) 56px; gap: 10px; align-items: center; font-size: .85rem; color: var(--text-2); }
.spend-row b { text-align: right; color: var(--text); font-variant-numeric: tabular-nums; }
.spend-bar { height: 10px; border-radius: 5px; background: #1f1814; overflow: hidden; }
.spend-bar i { display: block; height: 100%; border-radius: 5px; }
.stat { font-size: 1.05rem; }
.stat b { font-size: 1.6rem; color: var(--gold); margin-right: 4px; }
.ent-level { font-weight: 800; font-size: 1.15rem; margin: 0 0 8px; }
.ent-gauge { margin-bottom: 14px; }
.ent-gauge .mosaic-bar i { border-radius: 3px; }
.research { margin-top: 16px; background: var(--bg-2); border: 1px solid var(--line-soft); border-radius: 14px; padding: 12px 16px; }
.research summary { cursor: pointer; font-weight: 700; color: var(--text); }
.research ul { margin: 12px 0 4px; padding-left: 1.2em; display: grid; gap: 8px; color: var(--text-2); font-size: .92rem; }
.research b { color: var(--text); }
.rank.compact { grid-template-columns: minmax(0, 1fr); gap: 2px; margin-top: 0; }

/* ------------------------------------------------------------ about */
.prose { max-width: 860px; margin: 0 auto; padding-top: 16px; }
.prose h2 { margin-top: 1.8em; }
.prose p, .prose li { color: var(--text-2); }
.prose li { margin-bottom: .45em; }
.method-wrap { overflow-x: auto; }
table.method { width: 100%; border-collapse: collapse; font-size: .92rem; margin: 12px 0 18px; display: block; overflow-x: auto; }
.method th, .method td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.method th { color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; }
.method td { color: var(--text-2); }
.refs li { font-size: .9rem; }
.attrib { font-size: .9rem; }

/* ------------------------------------------------------------ responsive */
@media (max-width: 1000px) {
  .map-layout { grid-template-columns: minmax(0, 1fr); }
  .detail { position: static; max-height: none; }
}
@media (max-width: 760px) {
  .hero { grid-template-columns: minmax(0, 1fr); padding-top: 8px; }
  .hero-art { order: -1; }
  .hero-art canvas { width: min(220px, 60vw); }
  .facts { grid-template-columns: minmax(0, 1fr); }
  .scale { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .opt { flex-direction: row; justify-content: flex-start; min-height: 54px; padding: 8px 16px; gap: 14px; font-size: 1rem; }
  .opt .glyph { font-size: 1.35rem; width: 28px; text-align: center; }
  .opt .num { margin-left: auto; order: 3; }
  .sub-block .opt { min-height: 48px; }
  .q-card { min-height: 0; }
  .kbd-hint { display: none; }
  .axis span { display: none !important; }
  .corner { font-size: .55rem; }
  .rank { grid-template-columns: minmax(0, 1fr); }
  .chips .chip-label { display: none; }
  .chips li.current .chip-label { display: inline; }
  .topbar { padding-block: 10px; gap: 8px; }
  .topnav a { padding: 6px 8px; font-size: .85rem; white-space: nowrap; }
  .brand { gap: 8px; }
  .brand span:last-child { font-size: .95rem; white-space: nowrap; }
  .sub-block .scale { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
  .sub-block .opt { flex-direction: column; justify-content: center; gap: 4px; min-height: 66px; padding: 8px 2px; font-size: .72rem; }
  .sub-block .opt .glyph { width: auto; font-size: 1.25rem; }
  .sub-block .opt .num { display: none; }
  .axis-left, .axis-right { font-size: .6rem; }
  .axis b { font-size: .72rem; letter-spacing: .12em; }
  .map-frame { gap: 4px; }
  .quiz-meta { gap: 8px; }
  .top3 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .tradeoff { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .trade-or { justify-self: center; }
  .scale-trade { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
  .scale-trade .opt { flex-direction: column; justify-content: center; font-size: .7rem; padding: 6px 2px; min-height: 56px; gap: 2px; }
  .scale-trade .opt .num { display: none; }
  .top3 .opt { justify-content: center; text-align: center; min-height: 58px; padding: 8px; font-size: .88rem; }
  .start-row { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

@media print {
  body { background: #fff; color: #111; }
  .topbar, .foot, .map-tools, .res-actions, .tabs, .detail, #weights, .weights, .panel-head button, .notice, .map-tip { display: none !important; }
  .map-card, .panel { box-shadow: none; border-color: #ccc; background: #fff; break-inside: avoid; }
  .map-layout { grid-template-columns: 1fr; }
  .axis b, .rank-title, h1, h2 { color: #111; }
  .p-card { background: #fff; }
  .corner { color: rgba(255,255,255,.8); }
  #view-results .panel:has(#weights) { display: none; }
}
.teaser .bar-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); }
