:root {
  --bg: #06080d;
  --surface: #0e131c;
  --surface-2: #161c2a;
  --line: #232a3d;
  --line-soft: #181d2c;
  --text: #e8edf5;
  --muted: #8e95a8;
  --dim: #525870;

  --signal: #5fdcff;
  --signal-glow: rgba(95, 220, 255, 0.32);
  --geo: #ffb04d;
  --econ: #5fbf99;
  --tech: #a87aff;
  --soc: #ff7bbf;
  --climate: #5fe3a1;
  --info: #ffd06a;
  --threat: #ff5e6a;

  --primary: var(--signal);
  --primary-glow: var(--signal-glow);

  --display: 'Geist', 'Noto Sans SC', system-ui, sans-serif;
  --body: 'Sora', system-ui, sans-serif;
  --mono: 'Geist Mono', 'JetBrains Mono', monospace;
  --cjk-display: 'Noto Sans SC', sans-serif;
  --cjk-body: 'Noto Sans SC', sans-serif;
}

[data-theme="light"] {
  --bg: #f4f6f9;
  --surface: #ffffff;
  --surface-2: #ebeef3;
  --line: #d4d8e0;
  --line-soft: #e3e6ec;
  --text: #0d1320;
  --muted: #545a72;
  --dim: #8a90a3;

  --signal: #1f8aa8;
  --signal-glow: rgba(31, 138, 168, 0.16);
  --geo: #b86f1c;
  --econ: #2c8a6a;
  --tech: #6b48d4;
  --soc: #c14872;
  --climate: #2c8a4f;
  --info: #b8862a;
  --threat: #c0263e;

  --primary: var(--signal);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { background: var(--bg); color: var(--text); font-family: var(--body); -webkit-font-smoothing: antialiased; line-height: 1.55; overflow-x: hidden; }
html[data-lang="en"] [lang="zh"] { display: none; }
html[data-lang="zh"] [lang="en"] { display: none; }
html[data-lang="zh"] body { font-family: var(--cjk-body); }
html[data-lang="zh"] h1, html[data-lang="zh"] h2, html[data-lang="zh"] h3, html[data-lang="zh"] .display { font-family: var(--cjk-display); }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
a { color: inherit; text-decoration: none; } a:hover { color: var(--signal); }

.nav { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line-soft); }
.nav-inner { display: flex; align-items: center; gap: 28px; padding: 14px 24px; max-width: 1200px; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 600; }
.brand-mark { width: 30px; height: 30px; border-radius: 6px; position: relative; background: var(--surface-2); border: 1px solid var(--signal); display: grid; place-items: center; box-shadow: 0 0 16px var(--signal-glow); }
.brand-mark::after { content: ''; width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid var(--signal); }
.brand-mark::before { content: ''; position: absolute; width: 6px; height: 6px; border-radius: 50%; background: var(--signal); }
.brand-name { font-size: 17px; letter-spacing: -0.012em; font-weight: 600; }
.nav-links { display: flex; gap: 18px; margin-left: auto; font-size: 13px; color: var(--muted); }
.nav-links a:hover { color: var(--text); }
.nav-ctrl { display: flex; gap: 6px; }
.btn { font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; padding: 7px 12px; background: transparent; color: var(--muted); border: 1px solid var(--line); border-radius: 6px; cursor: pointer; transition: all 0.15s; }
.btn:hover { color: var(--text); border-color: var(--signal); }

.hero { position: relative; padding: 100px 0 80px; overflow: hidden; }
.hero::before { content: ''; position: absolute; inset: 0; background: radial-gradient(50% 35% at 25% 35%, var(--signal-glow), transparent 70%), radial-gradient(45% 30% at 80% 60%, rgba(168, 122, 255, 0.18), transparent 70%); opacity: 0.55; filter: blur(50px); pointer-events: none; }
[data-theme="light"] .hero::before { opacity: 0.22; }
.hero-grid { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
@media (max-width: 880px) { .hero-grid { grid-template-columns: 1fr; gap: 40px; } }
.eyebrow { font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em; color: var(--muted); text-transform: uppercase; margin-bottom: 22px; }
h1.display { font-family: var(--display); font-weight: 600; font-size: clamp(38px, 5.5vw, 68px); line-height: 1.04; letter-spacing: -0.025em; margin: 0 0 22px; }
h1.display em { font-style: normal; color: var(--signal); }
.lede { font-size: 17px; color: var(--muted); max-width: 56ch; margin: 0 0 28px; }
.tags { display: flex; gap: 8px; flex-wrap: wrap; }
.tag { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; color: var(--muted); border: 1px solid var(--line); padding: 5px 10px; border-radius: 100px; }

.hero-viz { position: relative; aspect-ratio: 1 / 1; max-width: 540px; margin: 0 auto; }
.hero-viz svg { width: 100%; height: 100%; }

section { padding: 80px 0; border-top: 1px solid var(--line-soft); }
.sec-head { margin-bottom: 44px; }
.sec-tag { font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; color: var(--signal); text-transform: uppercase; margin-bottom: 14px; }
h2 { font-family: var(--display); font-weight: 600; font-size: clamp(28px, 3.6vw, 44px); line-height: 1.1; letter-spacing: -0.022em; margin: 0 0 14px; max-width: 24ch; }
h2 em { font-style: normal; color: var(--signal); }
.sec-lede { color: var(--muted); max-width: 66ch; font-size: 16px; }

.grid { display: grid; gap: 16px; }
.grid.c2 { grid-template-columns: repeat(2, 1fr); }
.grid.c3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 880px) { .grid.c2, .grid.c3 { grid-template-columns: 1fr; } }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 24px; transition: all 0.2s; }
.card:hover { transform: translateY(-2px); border-color: var(--signal); }
.card[data-l="geo"]     { border-left: 3px solid var(--geo); }
.card[data-l="econ"]    { border-left: 3px solid var(--econ); }
.card[data-l="tech"]    { border-left: 3px solid var(--tech); }
.card[data-l="soc"]     { border-left: 3px solid var(--soc); }
.card[data-l="climate"] { border-left: 3px solid var(--climate); }
.card[data-l="info"]    { border-left: 3px solid var(--info); }
.card-tag { font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.card h3 { font-family: var(--display); font-weight: 600; font-size: 19px; margin: 0 0 10px; line-height: 1.25; letter-spacing: -0.012em; }
.card p { color: var(--muted); font-size: 13.5px; margin: 0 0 6px; }
.card .row { display: flex; gap: 8px; font-size: 13px; margin-top: 8px; }
.card .row .lab { font-family: var(--mono); font-size: 10.5px; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; min-width: 70px; }
.card .row .val { color: var(--text); flex: 1; }

.scenario-gen { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 28px; }
.scenario-gen .controls { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 20px; }
@media (max-width: 880px) { .scenario-gen .controls { grid-template-columns: 1fr; } }
.scenario-gen label { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; color: var(--muted); text-transform: uppercase; display: block; margin-bottom: 6px; }
.scenario-gen select { width: 100%; background: var(--surface-2); color: var(--text); border: 1px solid var(--line); border-radius: 6px; padding: 10px; font-family: var(--body); font-size: 14px; }
.scenario-gen button.go { background: var(--signal); color: #04060c; border: 0; padding: 12px 26px; border-radius: 8px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; cursor: pointer; font-weight: 700; }
.gen-out { margin-top: 24px; padding: 24px 28px; background: var(--surface-2); border-left: 3px solid var(--signal); border-radius: 8px; line-height: 1.7; min-height: 100px; }
.gen-out:empty::before { content: 'Pick a driver, a region, a horizon. Run the scenario.'; color: var(--dim); font-style: italic; }
html[data-lang="zh"] .gen-out:empty::before { content: '挑一个驱动力、一个地区、一个时间视野。运行情境。'; }
.gen-out h4 { font-family: var(--display); font-size: 22px; margin: 0 0 10px; color: var(--signal); font-weight: 600; letter-spacing: -0.015em; }
.gen-out .lab { font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-top: 14px; margin-bottom: 4px; }
.gen-out p { margin: 4px 0 12px; font-size: 15px; }
.gen-out .lik { display: inline-block; padding: 2px 10px; border-radius: 100px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; }
.gen-out .lik.high { background: var(--threat); color: #1c0608; }
.gen-out .lik.med { background: var(--geo); color: #1c1206; }
.gen-out .lik.low { background: var(--econ); color: #061c10; }

.stack-viz { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 28px; }
.stack-viz svg { width: 100%; max-width: 880px; display: block; margin: 0 auto; height: auto; }

.mirror-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 28px; }
.prompt-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin-bottom: 18px; }
.prompt-btn { background: var(--surface-2); border: 1px solid var(--line); color: var(--text); text-align: left; padding: 14px 16px; border-radius: 10px; cursor: pointer; font-family: var(--body); font-size: 13px; transition: all 0.18s; }
.prompt-btn:hover { border-color: var(--signal); transform: translateY(-1px); }
.prompt-btn .pt-tag { font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; color: var(--signal); text-transform: uppercase; display: block; margin-bottom: 6px; }
.prompt-btn strong { font-family: var(--display); font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.mirror-input { display: flex; gap: 10px; margin-bottom: 16px; }
.mirror-input textarea { flex: 1; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 12px; font-family: var(--body); font-size: 14px; color: var(--text); resize: vertical; min-height: 70px; }
.mirror-input textarea:focus { outline: none; border-color: var(--signal); }
.mirror-input button { background: var(--signal); color: #04060c; border: 0; border-radius: 8px; padding: 0 26px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; cursor: pointer; font-weight: 700; }
.mirror-out { background: var(--surface-2); border-left: 3px solid var(--signal); border-radius: 6px; padding: 22px 24px; font-size: 15px; line-height: 1.7; white-space: pre-wrap; min-height: 80px; color: var(--text); }
.mirror-out:empty::before { content: 'Pick a probe above or describe a question.'; color: var(--dim); font-style: italic; }
html[data-lang="zh"] .mirror-out:empty::before { content: '从上方选择一个探针，或描述一个问题。'; }

.rails { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--threat); border-radius: 14px; padding: 26px 28px; }
.rails h3 { font-family: var(--display); margin: 0 0 14px; font-size: 22px; color: var(--threat); font-weight: 600; }
.rails ul { margin: 0; padding-left: 20px; color: var(--muted); font-size: 14.5px; }
.rails li { margin-bottom: 10px; }

footer { border-top: 1px solid var(--line-soft); padding: 40px 24px; color: var(--muted); font-size: 13px; text-align: center; }
footer a { color: var(--muted); border-bottom: 1px dotted var(--line); }
footer a:hover { color: var(--signal); }
