/* ═══════════════════════════════════════════════════════════════
   AI Run · Cosmos Light v0.3 — design tokens
   淺色板 + 游標閃 + 外星訊號 + 11-點 Asterism
   ═══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Newsreader:opsz,wght@6..72,400;6..72,500;6..72,600;6..72,700;6..72,800&family=Newsreader:ital,opsz,wght@1,6..72,400;1,6..72,500;1,6..72,600&family=Space+Grotesk:wght@300;400;500;600;700&family=JetBrains+Mono:wght@300;400;500;600;700&family=Major+Mono+Display&display=swap');

:root {
  /* ── PAPER & INK ──────────────────────────────────────────────
     Cool drafting paper, not cream. Deep cool ink, not warm black.
     Feels like a NASA mission control print-out, not a newspaper. */
  --paper:         #F2F4F8;     /* base — cool drafting white */
  --paper-elev:    #FFFFFF;     /* white cards / surfaces */
  --paper-sunk:    #E5E9F0;     /* subtle section bg */
  --paper-deep:    #D5DAE3;

  --ink:           #0A0E1A;     /* cool deep ink */
  --ink-90:        #161B28;
  --ink-70:        #2D3445;
  --ink-55:        #525968;     /* secondary type — ~5.9:1 on paper, WCAG AA ok */
  --ink-45:        #6B7385;     /* tertiary type (readable) — ~4.6:1 on paper, AA ok */
  --ink-35:        #8A92A0;     /* ~2.6:1 on paper — FAILS AA. Non-text only (rules/icons/dots) or on dark bg. Don't use for body text on light. */
  --ink-20:        #B5BCC8;     /* disabled / light rule */

  --rule:          rgba(10,14,26, 0.12);
  --rule-soft:     rgba(10,14,26, 0.06);
  --rule-strong:   rgba(10,14,26, 0.25);

  /* ── SIGNAL ───────────────────────────────────────────────────
     ONE accent. Visible on light. Reserved for: cursor blink,
     active asterism dot, "live" pulse. NEVER for type or wordmark.
     A touch more saturated than v2's #6BFFB8 because light bg
     swallows pastels. */
  --signal:        #00B872;
  --signal-bright: #00D684;
  --signal-glow:   rgba(0, 184, 114, 0.22);
  --signal-dim:    rgba(0, 184, 114, 0.40);

  /* For rare alarm states (blocked by human, halted) */
  --violet:        #6B47FF;
  --magenta:       #E14A8E;

  /* ── SUB-BRAND REFERENCE (kept) ──────────────────────────────── */
  --mingcha-ink:   #0B2447;
  --mingcha-acc:   #D6B968;
  --mingnow-acc:   #C75D3A;

  /* ── TYPE ─────────────────────────────────────────────────────
     Hybrid: Newsreader for the wordmark (italic AI + upright Run
     contrast — v1 DNA preserved). Space Grotesk for everything
     else (cosmic geometry). JetBrains Mono for telemetry. */
  --f-wordmark:    'Newsreader', Georgia, serif;
  --f-display:     'Space Grotesk', 'Inter Tight', sans-serif;
  --f-sans:        'Space Grotesk', system-ui, sans-serif;
  --f-mono:        'JetBrains Mono', 'IBM Plex Mono', monospace;
  --f-glyph:       'Major Mono Display', 'JetBrains Mono', monospace;
  --f-tc:          'Space Grotesk', 'PingFang TC', 'Noto Sans TC', sans-serif;

  /* ── LAYOUT ──────────────────────────────────────────────────── */
  --wrap:          1440px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 48px; }

/* ── WORDMARK helper ─────────────────────────────────────────────
   *AI*Run — italic 600 AI, upright 800 Run, adjacent. */
.wordmark {
  font-family: var(--f-wordmark);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 0.9;
  display: inline-block;
  color: inherit;
}
.wordmark .ai {
  font-style: italic;
  font-weight: 600;
  color: var(--ink-55);
  margin-right: 0.02em;
}
.surface-dark .wordmark .ai { color: rgba(232,236,242, 0.55); }

/* ── CURSOR (blinking caret) ────────────────────────────────── */
.caret {
  display: inline-block;
  width: 0.10em; height: 0.78em;
  background: var(--signal);
  margin-left: 0.08em;
  vertical-align: -0.04em;
  animation: caret-blink 1.05s steps(2, end) infinite;
  box-shadow:
    0 0 14px var(--signal-glow),
    0 0 28px var(--signal-glow);
}
@keyframes caret-blink {
  50% { opacity: 0; }
}

/* ── EYEBROW / TELEMETRY ─────────────────────────────────────── */
.eyebrow {
  font-family: var(--f-mono);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-55);
}
.eyebrow .live {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--signal);
}
.eyebrow .live::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 10px var(--signal-glow), 0 0 0 3px var(--signal-glow);
}

.coord {
  font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.10em;
  color: var(--ink-55); font-variant-numeric: tabular-nums;
}
.coord strong { color: var(--ink); font-weight: 500; }

.rule         { border: 0; border-top: 1px solid var(--rule); margin: 0; }
.rule--strong { border-top: 1px solid var(--rule-strong); }
.rule--ink    { border-top: 1px solid var(--ink); }
