:root {
  --ink: #101725;
  --muted: #667085;
  --paper: #f5f2ec;
  --card: #fffdf8;
  --line: #d9d6cf;
  --lime: #c6ff3d;
  --teal: #3ed6bd;
  --orange: #ff8a4c;
  --shadow: 0 24px 80px rgba(30, 34, 41, .10);
}

* { box-sizing: border-box; }
html { color-scheme: light; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, textarea { font: inherit; }
button { color: inherit; }
.shell { min-height: 100vh; }
.topbar { height: 78px; padding: 0 max(24px, 5vw); display: flex; align-items: center; border-bottom: 1px solid var(--line); gap: 42px; background: rgba(245,242,236,.92); backdrop-filter: blur(18px); position: sticky; top: 0; z-index: 20; }
.brand { display: flex; align-items: center; gap: 11px; border: 0; background: none; padding: 0; font-weight: 850; letter-spacing: -.04em; font-size: 19px; cursor: pointer; }
.brand > span:last-child span { color: #647084; font-weight: 650; }
.brand-mark { width: 28px; height: 28px; display: grid; grid-template-columns: repeat(3, 1fr); align-items: end; gap: 3px; }
.brand-mark i { background: var(--ink); border-radius: 6px; }
.brand-mark i:nth-child(1) { height: 40%; }
.brand-mark i:nth-child(2) { height: 90%; background: var(--teal); }
.brand-mark i:nth-child(3) { height: 65%; }
nav { display: flex; height: 100%; }
.nav-button { border: 0; border-bottom: 2px solid transparent; background: none; padding: 0 18px; color: var(--muted); cursor: pointer; }
.nav-button.active { border-color: var(--ink); color: var(--ink); font-weight: 700; }
.beta-badge { margin-left: auto; font-size: 11px; letter-spacing: .14em; font-weight: 800; border: 1px solid #bcc0c5; border-radius: 999px; padding: 7px 10px; }
main { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 72px 0 100px; }
.view { display: none; animation: rise .34s ease; }
.view.active { display: block; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.eyebrow, .kicker { color: #506070; font-size: 12px; font-weight: 850; letter-spacing: .16em; }
h1 { max-width: 900px; margin: 14px 0 16px; font-size: clamp(44px, 7vw, 88px); line-height: .98; letter-spacing: -.065em; }
.lede { max-width: 720px; color: var(--muted); font-size: clamp(18px, 2.2vw, 23px); line-height: 1.55; }
.coach-card { margin-top: 54px; min-height: 420px; border-radius: 28px; background: var(--ink); color: white; display: grid; grid-template-columns: 1.1fr .9fr; overflow: hidden; box-shadow: var(--shadow); }
.coach-copy { padding: clamp(36px, 6vw, 76px); }
.status-dot { display: inline-block; width: 9px; height: 9px; margin-right: 9px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 7px rgba(198,255,61,.12); }
.coach-copy .kicker { color: #aab5c4; }
.coach-copy h2 { font-size: clamp(36px, 5vw, 60px); line-height: 1.02; letter-spacing: -.05em; margin: 34px 0 18px; }
.coach-copy p { max-width: 520px; color: #aeb7c5; font-size: 18px; line-height: 1.6; }
.level-picker { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 4px; }
.level-picker > span { width: 100%; color: #8e9aac; font-size: 12px; text-transform: uppercase; letter-spacing: .12em; font-weight: 800; }
.level-picker button { border: 1px solid #3b4657; color: #cbd3de; background: #1b2432; border-radius: 999px; padding: 9px 12px; cursor: pointer; }
.level-picker button.active { background: white; color: var(--ink); border-color: white; font-weight: 800; }
.primary-button, .secondary-button { border-radius: 999px; padding: 15px 22px; font-weight: 800; cursor: pointer; border: 1px solid transparent; transition: transform .15s ease, background .15s ease; }
.primary-button { background: var(--lime); color: var(--ink); }
.primary-button:hover, .secondary-button:hover { transform: translateY(-2px); }
.primary-button span { margin-left: 24px; }
.coach-copy .primary-button { margin-top: 20px; }
.secondary-button { border-color: #c8c8c5; background: transparent; }
.mini-network { position: relative; background: radial-gradient(circle at 55% 45%, #223347 0, #111722 62%); }
.mini-network svg { width: 100%; height: 100%; }
.mini-network path { fill: none; stroke: #607085; stroke-width: 1.2; }
.node { fill: #718096; }
.active-node { fill: var(--lime); filter: drop-shadow(0 0 13px rgba(198,255,61,.65)); }
.faint { fill: transparent; stroke: var(--orange); stroke-width: 2; stroke-dasharray: 4 4; }
.pulse-label { position: absolute; right: 18%; top: 25%; font-size: 12px; color: #b9c4d0; }
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--line); margin-top: 45px; }
.metrics div { padding: 26px 0; border-right: 1px solid var(--line); }
.metrics div + div { padding-left: 36px; }
.metrics div:last-child { border-right: 0; }
.metrics strong { display: block; font-size: 32px; letter-spacing: -.04em; }
.metrics span { color: var(--muted); }
.text-button { border: 0; background: none; color: var(--muted); padding: 0; cursor: pointer; }
.conversation-layout { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(36px, 8vw, 110px); align-items: start; margin-top: 55px; }
.scene-column h1 { font-size: clamp(42px, 6vw, 76px); }
.scene-copy { color: var(--muted); font-size: 21px; line-height: 1.55; }
blockquote { margin: 42px 0 28px; padding: 26px 28px; border-left: 4px solid var(--teal); background: rgba(255,255,255,.58); font-size: 23px; line-height: 1.45; }
.translation { margin: -15px 0 25px; color: var(--muted); font-size: 15px; }
.skill-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.skill-chips span { padding: 8px 12px; background: #e4e1da; border-radius: 999px; font-size: 13px; font-weight: 700; }
.answer-card { background: var(--card); border: 1px solid #e2ded5; border-radius: 26px; box-shadow: var(--shadow); padding: clamp(28px, 5vw, 50px); }
.answer-card label { display: block; font-size: 25px; font-weight: 820; letter-spacing: -.03em; margin-bottom: 20px; }
textarea { width: 100%; min-height: 210px; resize: vertical; border: 1px solid #cfcac1; background: #fff; border-radius: 17px; padding: 20px; outline: none; font-size: 20px; line-height: 1.5; }
textarea:focus { border-color: var(--ink); box-shadow: 0 0 0 4px rgba(62,214,189,.18); }
.word-bank { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.word-bank button { border: 1px solid #c9c5bd; background: #f5f2ec; border-radius: 999px; padding: 9px 12px; cursor: pointer; }
.word-bank button:hover { border-color: var(--ink); }
.hint { margin-top: 14px; border-left: 3px solid var(--orange); padding: 11px 14px; background: #fff1e8; color: #744021; }
.answer-actions, .result-actions { display: flex; gap: 12px; margin-top: 22px; }
.answer-actions .primary-button { margin-left: auto; }
.microcopy { color: var(--muted); font-size: 13px; margin: 20px 0 0; }
.result-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(40px, 8vw, 110px); align-items: center; }
.result-grid h1 { font-size: clamp(44px, 6vw, 76px); }
.model-answer { margin: 36px 0; padding: 22px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.model-answer span { display: block; color: var(--muted); font-size: 13px; margin-bottom: 8px; }
.model-answer strong { font-size: 20px; }
.observation-card { border-radius: 28px; padding: 42px; background: var(--ink); color: white; box-shadow: var(--shadow); }
.score-ring { --score: 0deg; width: 144px; height: 144px; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--lime) var(--score), #354052 0); position: relative; }
.score-ring::after { content: ""; position: absolute; inset: 12px; border-radius: 50%; background: var(--ink); }
.score-ring span { position: relative; z-index: 1; font-size: 28px; font-weight: 850; }
.observation-card h2 { margin-top: 30px; }
.evidence-list { display: flex; flex-wrap: wrap; gap: 8px; min-height: 32px; }
.evidence-list span { background: #293548; border-radius: 999px; padding: 7px 10px; color: #d5dde7; font-size: 13px; }
.change-list { margin-top: 24px; display: grid; gap: 12px; }
.change-item { display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: center; }
.change-item small { color: #9ba8b9; display: block; }
.delta { color: var(--lime); font-weight: 800; }
.map-heading { display: flex; justify-content: space-between; align-items: end; gap: 30px; }
.map-heading h1 { margin-bottom: 0; }
.segmented { display: flex; background: #e4e1da; padding: 4px; border-radius: 999px; }
.segmented button { border: 0; background: transparent; padding: 10px 15px; border-radius: 999px; cursor: pointer; }
.segmented button.active { background: white; box-shadow: 0 3px 12px rgba(0,0,0,.08); font-weight: 750; }
.map-panel { height: min(610px, 68vh); min-height: 480px; border-radius: 28px; background: var(--ink); margin-top: 42px; position: relative; overflow: hidden; box-shadow: var(--shadow); }
.map-panel::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.10) 1px, transparent 1px); background-size: 34px 34px; mask-image: linear-gradient(to bottom, black, transparent); }
.edge-layer, .node-layer { position: absolute; inset: 0; width: 100%; height: 100%; }
.edge-layer line { stroke: #536174; stroke-width: 1.3; vector-effect: non-scaling-stroke; }
.map-node { position: absolute; transform: translate(-50%,-50%); border: 0; background: transparent; color: white; text-align: center; cursor: pointer; }
.map-node i { display: block; margin: 0 auto 9px; width: var(--size); height: var(--size); border-radius: 50%; background: var(--node-color); border: 2px solid rgba(255,255,255,.15); box-shadow: 0 0 0 calc(var(--uncertainty) * 11px) rgba(255,138,76,.15), 0 0 24px rgba(62,214,189,.18); transition: transform .18s ease; }
.map-node:hover i, .map-node:focus i { transform: scale(1.16); }
.map-node span { display: block; font-size: 12px; max-width: 120px; color: #d7deea; }
.map-legend { position: absolute; left: 24px; bottom: 20px; display: flex; gap: 18px; color: #aeb8c7; font-size: 12px; }
.map-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; }
.legend-stable { background: var(--teal); }.legend-active { background: var(--lime); }.legend-uncertain { border: 1px dashed var(--orange); }
.skill-detail { margin-top: 18px; padding: 20px 24px; border: 1px solid var(--line); border-radius: 16px; display: flex; gap: 18px; align-items: center; }
.skill-detail span { color: var(--muted); min-width: 165px; }
.skill-detail strong { font-size: 17px; }
#toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 120px); background: var(--ink); color: white; padding: 12px 18px; border-radius: 999px; box-shadow: var(--shadow); transition: transform .25s ease; z-index: 50; }
#toast.show { transform: translate(-50%, 0); }

@media (max-width: 800px) {
  .topbar { padding: 0 18px; gap: 12px; }.beta-badge { display: none; }.nav-button { padding: 0 10px; }
  main { width: min(100% - 28px, 1180px); padding-top: 45px; }
  .coach-card, .conversation-layout, .result-grid { grid-template-columns: 1fr; }
  .mini-network { min-height: 300px; }.metrics { grid-template-columns: 1fr; }.metrics div, .metrics div + div { padding: 18px 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .conversation-layout { margin-top: 36px; }.answer-card { order: 2; }.map-heading { align-items: start; flex-direction: column; }.map-panel { min-height: 520px; }
  .result-actions, .answer-actions { flex-wrap: wrap; }.answer-actions .primary-button { margin-left: 0; }
}

/* Core Universe visual language */
body {
  background:
    radial-gradient(circle at 76% 18%, rgba(71, 110, 170, .16), transparent 27%),
    radial-gradient(circle at 20% 72%, rgba(92, 67, 164, .12), transparent 24%),
    #070a17;
  color: #f5f7fb;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(255,255,255,.32) .7px, transparent .8px);
  background-size: 79px 79px;
  opacity: .22;
}
.topbar { background: rgba(7,10,23,.86); border-color: rgba(145,165,196,.18); }
.brand { color: #fff; }.brand > span:last-child span { color: #59c8f4; }
.brand small { display: block; color: #7f8da5; font-size: 8px; letter-spacing: .24em; margin-top: 2px; }
.brand-mark i { background: #5bc9f1; }.brand-mark i:nth-child(2) { background: #8b6ff7; }.brand-mark i:nth-child(3) { background: #59dfb0; }
.nav-button { color: #8f9bb0; }.nav-button.active { color: #fff; border-color: #59c8f4; }
.beta-badge { color: #9eabc0; border-color: rgba(145,165,196,.30); }
.eyebrow, .kicker { color: #59c8f4; }
.lede { color: #aab5c8; }
.principle-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; }
.principle-row span { border: 1px solid rgba(145,165,196,.24); border-radius: 999px; padding: 9px 13px; color: #bac4d4; font-size: 12px; }
.principle-row i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; }
.principle-cyan { background: #59c8f4; }.principle-violet { background: #8b6ff7; }.principle-green { background: #59dfb0; }
.coach-card { background: linear-gradient(135deg, #12182b, #0c1020); border: 1px solid rgba(145,165,196,.20); box-shadow: 0 30px 100px rgba(0,0,0,.38); }
.coach-copy p { color: #aeb9cb; }
.level-picker button { background: #11182a; border-color: #33405a; color: #bdc7d7; }
.level-picker button.active { background: #f5f7fb; color: #0a1020; }
.primary-button { background: #59c8f4; color: #07101d; }
.secondary-button { color: #dfe6f1; border-color: #3a465d; }
.mini-network { background: radial-gradient(circle at 55% 45%, #1c3150 0, #0b1020 66%); }
.mini-network path { stroke: #50627e; }.active-node { fill: #59c8f4; filter: drop-shadow(0 0 13px rgba(89,200,244,.65)); }
.metrics { border-color: rgba(145,165,196,.18); }.metrics div { border-color: rgba(145,165,196,.18); }.metrics span { color: #8896ab; }
.text-button { color: #9ca9bd; }
blockquote { background: rgba(17,24,42,.78); border-color: #59c8f4; }
.scene-copy, .translation { color: #9eabc0; }
.skill-chips span { background: #182135; color: #dbe4f1; border: 1px solid #2d3950; }
.selection-note { margin-top: 28px; padding: 18px 20px; border: 1px solid #2d3950; border-radius: 16px; background: rgba(17,24,42,.72); }
.selection-note > span { display: block; color: #8b6ff7; font-size: 11px; letter-spacing: .14em; font-weight: 850; }
.selection-note strong { display: block; margin-top: 8px; font-size: 18px; }.selection-note p { color: #9eabc0; margin: 6px 0 0; line-height: 1.5; }
.answer-card { background: #11182a; border-color: #2b3549; box-shadow: 0 24px 80px rgba(0,0,0,.32); }
textarea { background: #090f1d; border-color: #354159; color: #f5f7fb; }
textarea:focus { border-color: #59c8f4; box-shadow: 0 0 0 4px rgba(89,200,244,.14); }
.word-bank button { background: #182135; color: #dce5f2; border-color: #344159; }
.hint { background: rgba(255,191,92,.10); color: #ffd9a0; }
.microcopy, .model-answer span { color: #8f9bb0; }
.model-answer { border-color: rgba(145,165,196,.20); }
.observation-card { background: linear-gradient(145deg, #121a30, #0d1324); border: 1px solid rgba(145,165,196,.18); }
.score-ring { background: conic-gradient(#59c8f4 var(--score), #29334a 0); }.score-ring::after { background: #11182a; }
.score-ring span { font-size: 18px; }.signal-label { color: #59dfb0; font-size: 13px; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; margin-top: 18px; }
.evidence-list span { background: #202b42; }.change-item small { color: #91a0b6; }.delta { max-width: 145px; color: #59c8f4; font-size: 11px; text-align: right; }
.segmented { background: #131a2b; border: 1px solid #2a354a; }.segmented button { color: #aab6c9; }.segmented button.active { background: #26334c; color: #fff; box-shadow: none; }
.map-panel { background: #0b1020; border: 1px solid rgba(145,165,196,.18); }
.cluster-layer { position: absolute; inset: 0; pointer-events: none; }
.cluster-layer span { position: absolute; transform: translate(-50%,-50%); color: #61708a; text-transform: uppercase; letter-spacing: .16em; font-size: 10px; font-weight: 800; }
.edge-layer line { stroke: #3d4c67; }.edge-layer .path-edge { stroke: #7362ca; stroke-width: 2; }
.attempt-node { min-width: 130px; }.attempt-node small { display: block; color: #75849b; font-size: 9px; margin-top: 4px; }
.empty-path { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; gap: 8px; color: #dce5f2; }
.empty-path span { color: #8190a7; }
.skill-detail { border-color: #2a354a; background: rgba(13,19,36,.74); flex-wrap: wrap; }.skill-detail span { color: #8f9db2; }
#toast { background: #eaf6ff; color: #08111f; }

@media (max-width: 800px) {
  .principle-row { align-items: flex-start; flex-direction: column; }
  .skill-detail { align-items: flex-start; flex-direction: column; }
  .attempt-node { min-width: 88px; }
  .attempt-node small { display: none; }
}

