/* 向野 · Career Atlas — a topographic atlas: map paper, survey-ink navy, trail orange.
   Light first; dark is a night map. One accent for actions (trail), one for data (survey). */
:root {
  color-scheme: light;
  --paper: #f6f4ee;
  --panel: #ffffff;
  --panel-2: #faf8f3;
  --ink: #1d2a3a;
  --text: #2c323b;
  --muted: #5d6470;
  --faint: #8b919b;
  --rule: #e0dcd2;
  --rule-strong: #cbc5b8;
  --control: #8e8a80;
  --trail: #c0521d;
  --trail-ink: #a3441a;
  --on-trail: #ffffff;
  --trail-soft: rgb(192 82 29 / 10%);
  --survey: #2a5d91;
  --survey-soft: rgb(42 93 145 / 9%);
  --chart-1: #2a5d91;
  --chart-2: #c0521d;
  --contour: #b49d78;
  --land: 11%;
  --g1: #4a78b5; --g2: #6a6fbf; --g3: #a8841f; --g4: #c0587e;
  --g5: #8e5aa8; --g6: #2f8c86; --g7: #6f7f91; --g8: #7a8a3a;
  --radius: 6px;
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #14171c; --panel: #1b1f26; --panel-2: #20252d;
    --ink: #e9ecf1; --text: #d3d7de; --muted: #9ea5b0; --faint: #747c88;
    --rule: #2d333d; --rule-strong: #3b424e; --control: #697281;
    --trail: #f0874f; --trail-ink: #f39a68; --on-trail: #1c120b; --trail-soft: rgb(240 135 79 / 13%);
    --survey: #8db6e3; --survey-soft: rgb(141 182 227 / 11%);
    --chart-1: #8db6e3; --chart-2: #f0874f; --contour: #6d614f; --land: 15%;
    --g1: #7ea6dc; --g2: #9a9ee6; --g3: #d4b25a; --g4: #e08aa9;
    --g5: #b98ad0; --g6: #5fbdb6; --g7: #9fb0c2; --g8: #a9b866;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #14171c; --panel: #1b1f26; --panel-2: #20252d;
  --ink: #e9ecf1; --text: #d3d7de; --muted: #9ea5b0; --faint: #747c88;
  --rule: #2d333d; --rule-strong: #3b424e; --control: #697281;
  --trail: #f0874f; --trail-ink: #f39a68; --on-trail: #1c120b; --trail-soft: rgb(240 135 79 / 13%);
  --survey: #8db6e3; --survey-soft: rgb(141 182 227 / 11%);
  --chart-1: #8db6e3; --chart-2: #f0874f; --contour: #6d614f; --land: 15%;
  --g1: #7ea6dc; --g2: #9a9ee6; --g3: #d4b25a; --g4: #e08aa9;
  --g5: #b98ad0; --g6: #5fbdb6; --g7: #9fb0c2; --g8: #a9b866;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 120px; }
body {
  margin: 0; background: var(--paper); color: var(--text);
  font: 15px/1.8 var(--font); font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { color: var(--ink); line-height: 1.35; margin: 0; font-weight: 650; letter-spacing: 0; }
p { margin: 0; }
a { color: var(--survey); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
ul, ol { margin: 0; padding-left: 1.2em; }
li + li { margin-top: 4px; }
svg { flex-shrink: 0; }
:focus-visible { outline: 2px solid var(--trail); outline-offset: 2px; border-radius: 3px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -48px; z-index: 50; padding: 8px 14px; background: var(--ink); color: var(--paper); border-radius: 4px; }
.skip-link:focus { top: 12px; }
.mono { font-family: var(--mono); font-size: 12px; letter-spacing: .02em; color: var(--muted); }
.eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; color: var(--trail-ink); }

/* Controls */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 36px; padding: 6px 14px; border: 1px solid var(--control); border-radius: 4px;
  background: var(--panel); color: var(--ink); font-size: 14px; font-weight: 550; line-height: 1.3; white-space: nowrap;
}
.button:hover { border-color: var(--ink); text-decoration: none; }
.button.primary { background: var(--trail); border-color: var(--trail); color: var(--on-trail); }
.button.primary:hover { filter: brightness(.94); }
.button.subtle { background: transparent; border-color: transparent; color: var(--survey); padding-inline: 8px; }
.button.subtle:hover { background: var(--survey-soft); }
.button[aria-pressed="true"] { border-color: var(--trail); color: var(--trail-ink); background: var(--trail-soft); }
.button:disabled { opacity: .55; cursor: not-allowed; }
.icon-button {
  display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0;
  border: 1px solid var(--control); border-radius: 4px; background: var(--panel); color: var(--ink); font-size: 20px; line-height: 1;
}
.icon-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.theme-toggle svg path { fill: currentColor; stroke: none; }
.text-link { background: none; border: 0; padding: 0; color: var(--survey); font-size: 14px; text-align: left; }
.text-link:hover { text-decoration: underline; text-underline-offset: 3px; }
select, input[type="text"], input:not([type]), textarea {
  min-height: 36px; padding: 6px 10px; border: 1px solid var(--control); border-radius: 4px;
  background: var(--panel); color: var(--text); font-size: 14px;
}
select { padding-right: 28px; max-width: 100%; }
label { font-size: 13px; color: var(--muted); }
.form-note { font-size: 12.5px; line-height: 1.7; color: var(--muted); }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chip {
  display: inline-flex; align-items: center; min-height: 26px; padding: 2px 9px; border: 1px solid var(--rule);
  border-radius: 3px; background: var(--panel-2); color: var(--text); font-size: 13px; line-height: 1.4;
}
button.chip:hover { border-color: var(--survey); color: var(--survey); }

/* Brand */
.brand { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 19px; letter-spacing: .04em; }
.brand:hover { text-decoration: none; }
.brand small { font: 500 11px var(--mono); letter-spacing: .1em; color: var(--muted); text-transform: uppercase; padding-left: 8px; border-left: 1px solid var(--rule-strong); }
.brand-mark { width: 26px; height: 26px; fill: none; stroke: var(--ink); stroke-width: 1.8; }
.brand-mark path:nth-child(2) { fill: var(--trail); stroke: none; }
.brand-mark .brand-trail { stroke: var(--trail); stroke-dasharray: 2 2.4; stroke-linecap: round; }

/* View switching: cover first, console after entering */
.console { display: none; }
:root[data-view="console"] .cover { display: none; }
:root[data-view="console"] .console { display: block; }

/* ---------- Cover ---------- */
.cover { min-height: 100vh; display: flex; flex-direction: column; }
.cover-bar { display: flex; align-items: center; gap: 24px; max-width: 1240px; width: 100%; margin: 0 auto; padding: 18px 24px; }
.cover-links { display: flex; gap: 22px; margin-left: auto; font-size: 14px; }
.cover-links a { color: var(--muted); }
.cover-links a:hover { color: var(--ink); }
.cover-tools { display: flex; gap: 10px; align-items: center; }
.cover-main { max-width: 1240px; width: 100%; margin: 0 auto; padding: 8px 24px 40px; flex: 1; }
.cover-hero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, .9fr); gap: 40px; align-items: start; padding: 28px 0 36px; }
.cover-copy h1 { font-size: clamp(30px, 3.6vw, 42px); line-height: 1.28; margin: 14px 0 16px; letter-spacing: .01em; }
.lede { font-size: 16px; line-height: 1.9; color: var(--text); max-width: 36em; }
.trailhead { margin-top: 26px; padding: 16px 18px; border: 1px solid var(--rule); border-left: 3px solid var(--trail); border-radius: var(--radius); background: var(--panel); max-width: 560px; }
.trailhead label { display: block; font-weight: 600; color: var(--ink); font-size: 14px; margin-bottom: 8px; }
.trailhead-row { display: flex; gap: 8px; }
.trailhead-row select { flex: 1; min-width: 0; }
.trailhead .form-note { margin-top: 10px; }
.cover-ledger { border: 1px solid var(--rule); border-radius: var(--radius); background: var(--panel); padding: 16px 18px; }
.ledger-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.ledger-head h2 { font-size: 15px; }
.ledger-row { display: grid; grid-template-columns: minmax(0, 1fr) auto 72px; gap: 4px 12px; align-items: center; padding: 10px 0; border-top: 1px dashed var(--rule); }
.ledger-row:first-child { border-top: 0; }
.ledger-row .k { font-size: 13.5px; color: var(--text); line-height: 1.4; }
.ledger-row .k small { display: block; font-size: 12px; color: var(--muted); }
.ledger-row .v { font: 600 20px/1 var(--mono); color: var(--ink); text-align: right; }
.ledger-row .v small { font-size: 12px; font-weight: 500; color: var(--muted); margin-left: 2px; }
.ledger-row .spark { width: 72px; height: 24px; }
.cover-ledger > .text-link { display: inline-block; margin-top: 10px; font-size: 13px; }

.map-sheet { border: 1px solid var(--rule); border-radius: var(--radius); background: var(--panel); padding: 16px 18px 14px; }
.map-sheet-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.map-sheet-head h2 { font-size: 16px; }
.map-frame { position: relative; }
.map-scroll { overflow-x: auto; overscroll-behavior-x: contain; }
.map-placeholder { aspect-ratio: 1000 / 620; display: grid; place-items: center; color: var(--muted); font-size: 14px; }
.map-legend { list-style: none; padding: 10px 0 0; margin: 10px 0 0; border-top: 1px solid var(--rule); display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 12.5px; color: var(--muted); }
.map-legend li { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.map-legend svg { width: 22px; height: 16px; fill: none; }
.lg-ring { stroke: var(--ink); stroke-width: 1.6; fill: var(--panel); }
.lg-dot { fill: var(--ink); }
.lg-trail { stroke: var(--trail); stroke-width: 2; stroke-dasharray: 3.5 3; }
.lg-badge { fill: var(--trail); }
.lg-contour { stroke: var(--contour); stroke-width: 1.2; }

.how { padding: 44px 0 8px; }
.how > h2 { font-size: 18px; margin-bottom: 18px; }
.how-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.how-grid article { padding: 18px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--panel); }
.how-grid h3 { font-size: 15.5px; margin: 10px 0 6px; }
.how-grid p { font-size: 14px; color: var(--muted); line-height: 1.85; }
.how-sym svg { width: 26px; height: 26px; fill: none; stroke: var(--trail); stroke-width: 1.7; stroke-linejoin: round; }
.boundaries { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-wrap: wrap; gap: 8px 26px; font-size: 13px; color: var(--muted); }
.boundaries li { margin: 0; padding-left: 14px; position: relative; }
.boundaries li::before { content: ""; position: absolute; left: 0; top: .78em; width: 6px; height: 6px; border: 1.5px solid var(--trail); border-radius: 50%; }

.site-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; max-width: 1240px; width: 100%; margin: 0 auto; padding: 22px 24px 30px; border-top: 1px solid var(--rule); font-size: 13px; color: var(--muted); }
.site-footer a { color: var(--muted); }

/* ---------- Atlas map (SVG) ---------- */
.atlas { display: block; width: 100%; height: auto; font-family: var(--font); user-select: none; }
.atlas .graticule line { stroke: var(--rule); stroke-width: 1; stroke-dasharray: 2 5; }
.atlas .grid-ticks text { font: 11px var(--mono); fill: var(--muted); }
.atlas .land { fill: color-mix(in srgb, var(--g) var(--land), transparent); stroke: color-mix(in srgb, var(--g) 55%, transparent); stroke-width: 1.3; }
.atlas .contour { fill: none; stroke: color-mix(in srgb, var(--g) 30%, var(--contour)); stroke-opacity: .55; stroke-width: 1; }
.atlas .region-name { font-size: 12.5px; font-weight: 650; letter-spacing: .18em; fill: color-mix(in srgb, var(--g) 60%, var(--ink)); }
.atlas .trail { fill: none; stroke: var(--trail); stroke-width: 2.2; stroke-linecap: round; stroke-dasharray: 6 5; animation: trail-walk 1.6s linear infinite; }
@keyframes trail-walk { to { stroke-dashoffset: -22; } }
.atlas .home circle { fill: var(--panel); stroke: var(--ink); stroke-width: 1.6; stroke-dasharray: 3 3; }
.atlas .home.set circle { stroke: var(--trail); stroke-dasharray: none; stroke-width: 2; }
.atlas .home path { fill: var(--ink); }
.atlas .home.set path { fill: var(--trail); }
.atlas .home text { font-size: 13px; font-weight: 600; fill: var(--ink); paint-order: stroke; stroke: var(--panel); stroke-width: 5px; stroke-linejoin: round; }
.atlas .wp { cursor: pointer; }
.atlas .wp-hit { fill: transparent; }
.atlas .wp-ring { fill: var(--panel); stroke: var(--ink); stroke-width: 1.6; transition: r .15s; }
.atlas .wp-dot { fill: var(--ink); }
.atlas .wp-label { font-size: 13px; fill: var(--text); paint-order: stroke; stroke: var(--panel); stroke-width: 4px; stroke-linejoin: round; }
.atlas .wp.on .wp-ring { stroke: var(--trail); stroke-width: 2.2; }
.atlas .wp.on .wp-dot { fill: var(--trail); }
.atlas .wp.on .wp-label { font-weight: 650; fill: var(--ink); }
.atlas .wp-badge rect { fill: var(--trail); }
.atlas .wp-badge text { font: 600 11.5px var(--mono); fill: var(--on-trail); }
.atlas .wp.dim { opacity: .45; }
.atlas .wp:hover .wp-ring, .atlas .wp:focus-visible .wp-ring, .atlas .wp.hot .wp-ring { r: 9.5px; stroke: var(--trail); }
.atlas .wp:hover .wp-label, .atlas .wp:focus-visible .wp-label, .atlas .wp.hot .wp-label { fill: var(--trail-ink); text-decoration: underline; }
.atlas .wp:focus-visible { outline: none; }
.atlas .wp:focus-visible .wp-hit { stroke: var(--trail); stroke-width: 2; }
.map-callout {
  position: absolute; z-index: 5; width: 280px; padding: 12px 14px; border: 1px solid var(--rule-strong); border-top: 3px solid var(--trail);
  border-radius: var(--radius); background: var(--panel); box-shadow: 0 6px 20px rgb(20 24 30 / 12%); font-size: 13px; line-height: 1.7; pointer-events: none;
}
.map-callout h3 { font-size: 15px; }
.map-callout .mono { display: block; margin: 2px 0 6px; }
.map-callout p { color: var(--muted); }
.map-hint { display: none; font-size: 12px; color: var(--muted); margin-top: 6px; }

/* ---------- Console ---------- */
.app-bar { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--rule); }
.app-bar-row { display: flex; align-items: center; gap: 18px; max-width: 1240px; margin: 0 auto; padding: 12px 24px 6px; }
.global-search { position: relative; display: flex; align-items: center; flex: 1; max-width: 420px; margin-left: auto; }
.global-search svg { position: absolute; left: 10px; width: 16px; height: 16px; fill: none; stroke: var(--muted); stroke-width: 1.7; }
.global-search input { width: 100%; padding-left: 34px; padding-right: 34px; background: var(--panel); }
.global-search kbd { position: absolute; right: 8px; font: 11px var(--mono); color: var(--faint); border: 1px solid var(--rule-strong); border-radius: 3px; padding: 0 5px; }
.bar-tools { display: flex; gap: 8px; }
.tabs { display: flex; gap: 4px; max-width: 1240px; margin: 0 auto; padding: 0 18px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
  position: relative; display: inline-flex; align-items: center; gap: 7px; padding: 9px 12px 11px; color: var(--muted);
  font-size: 14.5px; font-weight: 550; white-space: nowrap; text-decoration: none;
}
.tabs a svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current="page"] { color: var(--ink); }
.tabs a[aria-current="page"] svg { stroke: var(--trail); }
.tabs a[aria-current="page"]::after {
  content: ""; position: absolute; left: 10px; right: 10px; bottom: 0; height: 0; border-bottom: 2.5px dashed var(--trail);
}
#main { max-width: 1240px; margin: 0 auto; padding: 22px 24px 48px; min-height: 70vh; outline: none; }
.loading-state, .empty-state { padding: 48px 20px; text-align: center; color: var(--muted); }
.empty-state h1 { font-size: 20px; margin-bottom: 8px; }

.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px 24px; padding-bottom: 18px; margin-bottom: 22px; border-bottom: 1px solid var(--rule); }
.crumbs { font-family: var(--mono); font-size: 12px; color: var(--muted); letter-spacing: .03em; margin-bottom: 6px; }
.crumbs a { color: var(--muted); }
.crumbs span + span::before, .crumbs a + span::before, .crumbs a + a::before { content: " / "; color: var(--faint); }
.page-head h1 { font-size: 26px; }
.page-head .desc { margin-top: 6px; color: var(--muted); font-size: 14.5px; max-width: 46em; }
.layer { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; font-size: 12.5px; color: var(--muted); }
.layer-switch { display: inline-flex; border: 1px solid var(--control); border-radius: 4px; overflow: hidden; background: var(--panel); }
.layer-switch button { white-space: nowrap; border: 0; background: transparent; padding: 5px 12px; font-size: 13px; color: var(--muted); }
.layer-switch button + button { border-left: 1px solid var(--rule-strong); }
.layer-switch button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.collected { display: inline-flex; align-items: center; gap: 6px; }
.collected i { width: 7px; height: 7px; border-radius: 50%; background: var(--survey); }

.section { margin-top: 30px; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; margin-bottom: 12px; }
.section-head h2 { font-size: 18px; }
.section-head p { font-size: 13.5px; color: var(--muted); }
.panel { border: 1px solid var(--rule); border-radius: var(--radius); background: var(--panel); padding: 18px 20px; }
.panel + .panel, .spaced { margin-top: 16px; }
:is(.cols-2, .cols-3, .detail-grid, .method-grid, .public-grid, .atlas-side, .rail, .role-grid) > :is(.panel, .spaced) { margin-top: 0; }
.panel h2 { font-size: 17px; margin-bottom: 8px; }
.panel h3 { font-size: 15.5px; margin: 14px 0 6px; }
.panel h3:first-child, .panel h2 + h3 { margin-top: 0; }
.panel h4 { font-size: 14px; margin: 12px 0 4px; color: var(--muted); font-weight: 600; }
.panel p + p { margin-top: 8px; }
.panel li { font-size: 14.5px; }
.note, .section-note, .source-line, .evidence-note {
  font-size: 12.5px; line-height: 1.75; color: var(--muted);
}
.note, .section-note { margin-top: 10px; }
.evidence-note { margin-top: 14px; padding: 10px 12px; border-left: 3px solid var(--rule-strong); background: var(--panel-2); border-radius: 0 4px 4px 0; }
.tag { display: inline-flex; align-items: center; gap: 4px; font: 500 11.5px var(--mono); letter-spacing: .04em; padding: 1px 7px; border-radius: 3px; border: 1px solid var(--rule-strong); color: var(--muted); white-space: nowrap; }
.tag.ok { border-color: color-mix(in srgb, var(--survey) 45%, transparent); color: var(--survey); }
.tag.warn { border-color: color-mix(in srgb, var(--trail) 50%, transparent); color: var(--trail-ink); }
.swatch { display: inline-block; width: 10px; height: 10px; border-radius: 2px; background: var(--g); flex-shrink: 0; }
.cols-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.cols-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 24px; margin-top: 12px; }

/* Indicator strip */
.strip { display: grid; grid-template-columns: repeat(var(--n, 5), minmax(0, 1fr)); border: 1px solid var(--rule); border-radius: var(--radius); background: var(--panel); }
.strip-item { display: block; padding: 14px 16px; color: var(--text); text-decoration: none; }
.strip-item + .strip-item { border-left: 1px dashed var(--rule); }
.strip-item:hover { background: var(--panel-2); text-decoration: none; }
.strip-item .k { font-size: 13px; color: var(--muted); }
.strip-item .v { display: block; font: 600 26px/1.2 var(--mono); color: var(--ink); margin: 4px 0 2px; }
.strip-item .v small { font-size: 13px; font-weight: 500; color: var(--muted); margin-left: 2px; }
.strip-item .p { display: block; font-size: 12px; color: var(--muted); line-height: 1.6; }
.strip-item .spark { width: 100%; height: 26px; margin-top: 6px; }

/* Charts */
.chart { display: block; width: 100%; height: auto; }
.chart text { font: 11px var(--mono); fill: var(--muted); }
.chart .gridline { stroke: var(--rule); stroke-dasharray: 2 4; }
.chart circle:focus-visible { outline: none; stroke-width: 3; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.legend-dot { display: inline-block; width: 14px; height: 3px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.spark polyline { vector-effect: non-scaling-stroke; }

/* Atlas overview */
.atlas-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
.atlas-side { display: grid; gap: 16px; }
.atlas-side .panel { padding: 16px; }
.atlas-side h2 { font-size: 15px; margin-bottom: 8px; }
.route-list { list-style: none; padding: 0; margin: 8px 0 0; }
.route-list li { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; border-top: 1px dashed var(--rule); font-size: 13.5px; margin: 0; }
.route-list li:first-child { border-top: 0; }
.route-list .mono { color: var(--trail-ink); }
.news-list { list-style: none; padding: 0; margin: 0; }
.news-list li { padding: 8px 0; border-top: 1px dashed var(--rule); margin: 0; font-size: 13.5px; line-height: 1.6; }
.news-list li:first-child { border-top: 0; padding-top: 0; }
.news-list time { display: block; font: 11.5px var(--mono); color: var(--muted); }
.shortcuts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.shortcut { display: block; padding: 14px 16px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--panel); color: var(--text); text-decoration: none; }
.shortcut:hover { border-color: var(--trail); text-decoration: none; }
.shortcut strong { display: block; color: var(--ink); font-size: 14.5px; }
.shortcut span { font-size: 13px; color: var(--muted); }

/* Industry directory */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 16px; }
.toolbar .count { font: 12.5px var(--mono); color: var(--muted); margin-right: auto; }
.region-sheet { margin-top: 22px; }
.region-sheet-head { display: flex; align-items: center; gap: 10px; padding-bottom: 8px; border-bottom: 2px solid color-mix(in srgb, var(--g) 60%, transparent); margin-bottom: 4px; }
.region-sheet-head h2 { font-size: 16px; }
.region-sheet-head .mono { margin-left: auto; }
.ind-row { display: grid; grid-template-columns: 54px minmax(0, 1.1fr) minmax(0, 2fr) 150px; gap: 16px; align-items: start; padding: 14px 6px; border-bottom: 1px solid var(--rule); color: var(--text); text-decoration: none; }
.ind-row:hover { background: var(--panel); text-decoration: none; }
.ind-row .ref { font: 600 13px var(--mono); color: var(--muted); padding-top: 2px; }
.ind-row h3 { font-size: 15.5px; }
.ind-row .cat { font-size: 12.5px; color: var(--muted); }
.ind-row p { font-size: 14px; line-height: 1.8; }
.ind-row .stat { text-align: right; font-size: 12.5px; color: var(--muted); line-height: 1.7; }
.ind-row .stat strong { display: block; font: 600 18px var(--mono); color: var(--ink); }

/* Industry page */
.sheet-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.sheet-title .tag { font-size: 12px; }
.chain { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); gap: 0; margin-top: 8px; position: relative; }
.chain::before { content: ""; position: absolute; left: 8%; right: 8%; top: 13px; border-top: 2px dashed var(--trail); }
.chain-step { position: relative; padding: 32px 12px 0; text-align: center; }
.chain-step::before { content: ""; position: absolute; top: 6px; left: 50%; width: 16px; height: 16px; margin-left: -8px; border-radius: 50%; background: var(--panel); border: 2px solid var(--ink); }
.chain-step:first-child::before, .chain-step:last-child::before { border-color: var(--trail); }
.chain-step .mono { display: block; color: var(--trail-ink); }
.chain-step h3 { font-size: 15px; margin: 2px 0 6px; }
.chain-step p { font-size: 13.5px; color: var(--muted); line-height: 1.75; }
.chain-step .chip-row { justify-content: center; }
.companies { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.company { display: inline-flex; padding: 5px 10px; border: 1px solid var(--rule); border-radius: 4px; font-size: 13.5px; background: var(--panel-2); color: var(--text); }
.company:hover { border-color: var(--survey); color: var(--survey); text-decoration: none; }
.stat-big { font: 600 34px/1.1 var(--mono); color: var(--ink); }
.stat-big small { font-size: 14px; color: var(--muted); font-weight: 500; }

/* Role cards */
.role-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.role-card { display: flex; flex-direction: column; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--panel); padding: 16px 18px; }
.role-card:hover { border-color: var(--rule-strong); }
.role-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.role-card h3 { font-size: 16.5px; }
.role-card h3 a { color: var(--ink); }
.role-card .where { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.role-card .deliver { margin-top: 10px; font-size: 14px; line-height: 1.8; }
.role-card .deliver b { font-weight: 600; color: var(--muted); font-size: 12.5px; margin-right: 6px; }
.role-card .entry { margin-top: 6px; font-size: 13.5px; color: var(--muted); line-height: 1.75; }
.role-card .chip-row { margin-top: 10px; }
.role-card-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; margin-top: auto; padding-top: 12px; border-top: 1px dashed var(--rule); font-size: 12.5px; color: var(--muted); }
.role-card-foot > div { display: flex; gap: 6px; }
.role-card > .role-card-foot { margin-top: 14px; }
.fit-line { font-size: 12px; color: var(--trail-ink); margin-bottom: 6px; font-family: var(--mono); }
.score-chip { display: inline-flex; flex-direction: column; align-items: flex-end; font: 600 17px/1.1 var(--mono); color: var(--ink); white-space: nowrap; }
.score-chip small { font: 500 11px var(--font); color: var(--muted); }
.score-chip.none { color: var(--muted); font-size: 13px; }
.more { display: flex; justify-content: center; margin-top: 18px; }

/* Role page */
.role-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.rail { position: sticky; top: 118px; display: grid; gap: 14px; }
.rail .panel { padding: 16px; }
.rail h2 { font-size: 15px; margin-bottom: 6px; }
.lead { font-size: 15.5px; line-height: 1.95; color: var(--text); }
.dimensions { display: grid; gap: 8px; margin-top: 12px; }
.dimension { display: grid; grid-template-columns: 96px minmax(0, 1fr) 54px; gap: 8px; align-items: center; font-size: 12.5px; color: var(--muted); }
.dimension .bar { height: 6px; border-radius: 3px; background: var(--panel-2); border: 1px solid var(--rule); overflow: hidden; }
.dimension .bar span { display: block; height: 100%; background: var(--chart-1); }
.dimension .bar span.editorial { background: var(--chart-2); }
.dimension > span:last-child { text-align: right; font-family: var(--mono); }
.next-trail { display: flex; flex-wrap: wrap; align-items: center; gap: 0; margin-top: 8px; }
.next-trail .here { font-weight: 650; color: var(--ink); padding: 4px 10px; border: 2px solid var(--trail); border-radius: 4px; font-size: 14px; }
.next-trail .seg { width: 26px; border-top: 2px dashed var(--trail); }
.next-trail .button { margin: 4px 0; }
.table-wrap { overflow-x: auto; margin-top: 10px; border: 1px solid var(--rule); border-radius: 4px; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; line-height: 1.7; background: var(--panel); }
th, td { padding: 9px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--rule); }
thead th { background: var(--panel-2); font-size: 12.5px; color: var(--muted); font-weight: 600; white-space: nowrap; }
tbody tr:last-child > * { border-bottom: 0; }
tbody th { font-weight: 600; color: var(--ink); }
td.num, th.num { text-align: right; font-family: var(--mono); white-space: nowrap; }
details { margin-top: 12px; }
summary { cursor: pointer; color: var(--survey); font-size: 13.5px; }
details[open] > summary { margin-bottom: 8px; }

/* Majors */
.major-index { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.major-cat { margin-top: 22px; }
.major-cat h2 { font-size: 15px; margin-bottom: 10px; display: flex; gap: 10px; align-items: baseline; }
.major-cat h2 .mono { font-weight: 400; }
.major-tile { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 11px 14px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--panel); color: var(--text); text-decoration: none; }
.major-tile:hover { border-color: var(--trail); text-decoration: none; }
.major-tile strong { color: var(--ink); font-size: 14.5px; font-weight: 600; }
.major-tile span { font-size: 12px; color: var(--muted); white-space: nowrap; }
.major-tile .tag { margin-left: 6px; }
.outcome { margin-top: 16px; }
.outcome-head h3 { font-size: 15px; margin: 0; }
.bars { display: grid; gap: 7px; margin-top: 10px; }
.bar-row { display: grid; grid-template-columns: minmax(0, 15em) minmax(0, 1fr) 56px; gap: 10px; align-items: center; font-size: 13px; }
.bar-row .label { color: var(--text); line-height: 1.4; }
.bar-row .track { height: 12px; background: var(--panel-2); border: 1px solid var(--rule); border-radius: 2px; overflow: hidden; }
.bar-row .fill { display: block; height: 100%; background: var(--chart-1); }
.bar-row .val { text-align: right; font: 12.5px var(--mono); color: var(--ink); }
.bar-row.missing .val { color: var(--muted); }

/* research-views */
.major-guide h2 { font-size: 17px; }
.research-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-top: 12px; }
.research-block { padding: 14px 16px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--panel-2); }
.research-block h3 { font-size: 15px; margin: 0 0 6px; }
.research-block p { font-size: 13.5px; line-height: 1.8; }
.research-block p + p { margin-top: 6px; }
.policy-item { padding: 14px 0; border-top: 1px dashed var(--rule); }
.policy-item:first-of-type { border-top: 0; }
.policy-item h3 { font-size: 15px; margin: 2px 0 6px; }
.policy-item p { font-size: 14px; }

/* Plan */
.plan-layout { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 20px; align-items: start; }
.plan-form { display: grid; gap: 14px; }
.plan-form .field { display: grid; gap: 6px; }
.plan-form .actions { display: grid; gap: 8px; }
.public-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.public-card ol { margin-top: 8px; }
.public-card p { font-size: 14px; }

/* Data */
.method-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.method-formula { margin: 12px 0; padding: 10px 12px; font: 14px var(--mono); background: var(--panel-2); border: 1px dashed var(--rule-strong); border-radius: 4px; color: var(--ink); text-align: center; }
.downloads { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.trend-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; align-items: center; margin-bottom: 8px; }
.release-list { list-style: none; padding: 0; margin: 0; }
.release-list li { display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: 12px; padding: 8px 0; border-top: 1px dashed var(--rule); margin: 0; font-size: 14px; }
.release-list li:first-child { border-top: 0; }
.release-list time { font: 12.5px var(--mono); color: var(--muted); padding-top: 2px; }
.resource-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin-top: 10px; }
.resource-card { padding: 10px 12px; border: 1px solid var(--rule); border-radius: 4px; }
.resource-card h3 { font-size: 14px; margin: 0; }
.resource-card p { font-size: 12.5px; color: var(--muted); }

/* Compare bar + dialogs */
.compare-bar { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 30; display: flex; align-items: center; gap: 12px; padding: 8px 10px 8px 16px; border: 1px solid var(--rule-strong); border-left: 3px solid var(--trail); border-radius: var(--radius); background: var(--panel); box-shadow: 0 8px 26px rgb(20 24 30 / 16%); font-size: 13.5px; }
:root:not([data-view="console"]) .compare-bar { display: none; }
dialog { border: 1px solid var(--rule-strong); border-radius: 8px; background: var(--panel); color: var(--text); padding: 0; }
dialog::backdrop { background: rgb(14 18 24 / 45%); }
.detail-dialog { width: min(1080px, calc(100vw - 32px)); max-height: calc(100vh - 48px); }
.dialog-header { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 20px; background: var(--panel); border-bottom: 1px solid var(--rule); }
.dialog-header h2 { font-size: 18px; }
.dialog-body { padding: 18px 20px 24px; }
.comparison-table th[scope="row"] { width: 120px; background: var(--panel-2); }
.comparison-table td ul { padding-left: 1.1em; }
.assistant-dialog { margin: 0 0 0 auto; width: min(520px, 100vw); height: 100vh; max-height: 100vh; border-radius: 0; border-width: 0 0 0 1px; display: none; flex-direction: column; }
.assistant-dialog[open] { display: flex; }
.assistant-dialog > header { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px; border-bottom: 1px solid var(--rule); }
.assistant-dialog h2 { font-size: 18px; }
.model-settings { margin: 0; padding: 10px 18px; border-bottom: 1px solid var(--rule); background: var(--panel-2); }
.model-settings[open] > summary { margin-bottom: 8px; }
.model-intro p { font-size: 13px; line-height: 1.75; }
.model-actions { display: flex; gap: 8px; margin: 10px 0 6px; }
#model-status { display: block; font-size: 12.5px; color: var(--muted); }
#model-progress { width: 100%; margin-top: 6px; accent-color: var(--trail); }
.model-download-note { margin-top: 6px; color: var(--muted); }
.chat-log { flex: 1; overflow-y: auto; padding: 16px 18px; display: grid; gap: 12px; align-content: start; }
.chat-bubble { max-width: 100%; padding: 10px 14px; border-radius: 6px; font-size: 14px; line-height: 1.8; }
.chat-bubble.assistant { background: var(--panel-2); border: 1px solid var(--rule); }
.chat-bubble.user { justify-self: end; max-width: 85%; background: var(--ink); color: var(--paper); white-space: pre-wrap; }
.chat-bubble p + p { margin-top: 6px; }
.answer-label { font: 11.5px var(--mono); color: var(--trail-ink); letter-spacing: .04em; margin-bottom: 6px; }
.structured-answer section + section { margin-top: 10px; }
.structured-answer h3 { font-size: 14px; margin: 0 0 4px; }
.structured-answer h3 small { font: 11px var(--mono); color: var(--survey); }
.structured-answer li { font-size: 13.5px; }
.chat-evidence { margin-top: 10px; padding-top: 8px; border-top: 1px dashed var(--rule); display: grid; gap: 3px; font-size: 12.5px; color: var(--muted); }
.prompt-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 18px; }
.prompt-chips button { border: 1px solid var(--rule-strong); background: var(--panel); border-radius: 3px; padding: 3px 10px; font-size: 13px; color: var(--text); }
.prompt-chips button:hover { border-color: var(--trail); color: var(--trail-ink); }
#chat-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 10px 18px 18px; border-top: 1px solid var(--rule); }
#chat-form textarea { resize: none; font-size: 16px; line-height: 1.6; }
#stop-chat { grid-column: 2; }
.toast { position: fixed; left: 50%; top: 18px; transform: translateX(-50%); z-index: 60; padding: 8px 16px; border-radius: 4px; background: var(--ink); color: var(--paper); font-size: 13.5px; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .atlas-layout, .role-layout { grid-template-columns: minmax(0, 1fr); }
  .rail { position: static; }
  .shortcuts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .strip-item:nth-child(3n + 1) { border-left: 0; }
  .strip-item:nth-child(n + 4) { border-top: 1px dashed var(--rule); }
}
@media (max-width: 860px) {
  .cover-hero { grid-template-columns: minmax(0, 1fr); gap: 24px; padding-top: 12px; }
  .cover-links { display: none; }
  .cover-tools { margin-left: auto; }
  .how-grid, .cols-3 { grid-template-columns: minmax(0, 1fr); }
  .cols-2, .detail-grid, .method-grid, .public-grid, .role-grid, .plan-layout { grid-template-columns: minmax(0, 1fr); }
  .ind-row { grid-template-columns: 44px minmax(0, 1fr); }
  .ind-row p, .ind-row .stat { grid-column: 2; text-align: left; }
  .ind-row .stat strong { display: inline; margin-right: 6px; }
  .app-bar-row { flex-wrap: wrap; gap: 10px 12px; padding: 10px 16px 4px; }
  .global-search { order: 3; flex-basis: 100%; max-width: none; margin: 0; }
  .bar-tools { margin-left: auto; }
  .tabs { padding: 0 8px; }
  .chain { grid-template-columns: minmax(0, 1fr); }
  .chain::before { left: 15px; right: auto; top: 12px; bottom: 12px; border-top: 0; border-left: 2px dashed var(--trail); }
  .chain-step { padding: 0 0 18px 40px; text-align: left; }
  .chain-step::before { left: 15px; top: 4px; }
  .chain-step .chip-row { justify-content: flex-start; }
}
@media (max-width: 640px) {
  body { font-size: 14.5px; }
  .cover-bar, .cover-main, #main, .site-footer { padding-left: 16px; padding-right: 16px; }
  .brand small { display: none; }
  .cover-copy h1 { font-size: 27px; }
  .cover-copy h1 br { display: none; }
  .trailhead-row { flex-direction: column; }
  .map-sheet { padding: 12px; }
  .map-scroll .atlas { min-width: 700px; }
  .map-hint { display: block; }
  .map-callout { display: none !important; }
  .strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .strip-item { border-left: 0 !important; border-top: 1px dashed var(--rule); }
  .strip-item:nth-child(-n + 2) { border-top: 0; }
  .strip-item:nth-child(2n) { border-left: 1px dashed var(--rule) !important; }
  .strip-item:last-child:nth-child(odd) { grid-column: 1 / -1; border-left: 0 !important; }
  .shortcuts { grid-template-columns: minmax(0, 1fr); }
  .page-head h1 { font-size: 22px; }
  .page-head > div:first-child { width: 100%; }
  .layer { width: 100%; justify-content: space-between; }
  .layer > span[aria-hidden] { display: none; }
  .toolbar input, .toolbar select { flex: 1 1 140px; min-width: 0; }
  .toolbar .count { flex-basis: 100%; }
  .bar-row { grid-template-columns: minmax(0, 1fr) 52px; }
  .bar-row .track { grid-column: 1 / -1; grid-row: 2; }
  .dimension { grid-template-columns: 84px minmax(0, 1fr) 48px; }
  .release-list li { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .compare-bar { left: 12px; right: 12px; transform: none; justify-content: space-between; }
  .detail-dialog { width: 100vw; max-width: 100vw; max-height: 100vh; height: 100vh; border-radius: 0; margin: 0; }
  #open-assistant { padding-inline: 10px; }
  .tabs { gap: 0; }
  .tabs a { padding: 9px 9px 11px; gap: 0; }
  .tabs a svg { display: none; }
  select, input, textarea { font-size: 16px; }
}
@media (hover: none) {
  .global-search kbd { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .atlas .trail { animation: none; }
  * { transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  .app-bar, .compare-bar, .cover, .site-footer, .layer, .downloads, .more, .toast { display: none !important; }
  :root[data-view="console"] .console, .console { display: block !important; }
  body { background: #fff; color: #000; }
  .panel, .role-card { break-inside: avoid; border-color: #bbb; }
  #main { padding: 0; }
}
