/* Design tokens for the landing page — copied from src/shared/tokens.css (modeled on Claude Code / claude.ai).
   Two axes:
     data-theme = dark | light          (color scheme)
     data-style = cli  | app            (cli: monospace everywhere, like the Claude Code CLI;
                                         app: claude.ai sans with mono numbers)
   Anthropic's own fonts (Anthropic Sans/Serif) are proprietary: they are listed first so they
   render if installed locally, then fall back to the closest system faces. */

:root {
  --font-sans: "Anthropic Sans", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-serif: "Anthropic Serif", "Tiempos Text", ui-serif, Georgia, serif;
  --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;

  --fs-xxs: 10px;
  --fs-xs: 11px;
  --fs-sm: 12px;
  --fs-md: 13px;
  --fs-lg: 15px;

  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 12px;

  /* Claude Code CLI palette (dark theme values from the CLI) */
  --claude: #d97757;          /* Claude orange — rgb(215,119,87) in the CLI */
  --claude-strong: #c96442;   /* claude.ai primary button */
  --success: #4eba65;
  --warning: #e5a83b;
  --error: #ff6b80;
  --suggestion: #b1b9f9;
  --plan: #48968c;
}

:root,
:root[data-theme="dark"] {
  --bg: #262624;
  --surface: #1f1e1d;
  --surface-2: #30302e;
  --surface-3: #3a3936;
  --border: rgba(222, 220, 209, 0.12);
  --border-strong: rgba(222, 220, 209, 0.22);
  --text: #faf9f5;
  --text-2: #c2c0b6;
  --muted: #9c9a92;
  --faint: #6b6a65;
  --track: rgba(222, 220, 209, 0.10);
  --claude-tint: rgba(217, 119, 87, 0.14);
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.45), 0 0 0 0.5px rgba(222, 220, 209, 0.15);
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #faf9f5;
  --surface: #f5f4ed;
  --surface-2: #f0eee6;
  --surface-3: #e8e6dc;
  --border: rgba(31, 30, 29, 0.12);
  --border-strong: rgba(31, 30, 29, 0.22);
  --text: #141413;
  --text-2: #3d3d3a;
  --muted: #73726c;
  --faint: #a3a19a;
  --track: rgba(31, 30, 29, 0.08);
  --claude: #c96442;
  --success: #2f8f46;
  --warning: #b7791f;
  --error: #c4314b;
  --suggestion: #5865c9;
  --claude-tint: rgba(201, 100, 66, 0.10);
  --shadow: 0 12px 32px rgba(20, 20, 19, 0.16), 0 0 0 0.5px rgba(31, 30, 29, 0.18);
  color-scheme: light;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #faf9f5;
    --surface: #f5f4ed;
    --surface-2: #f0eee6;
    --surface-3: #e8e6dc;
    --border: rgba(31, 30, 29, 0.12);
    --border-strong: rgba(31, 30, 29, 0.22);
    --text: #141413;
    --text-2: #3d3d3a;
    --muted: #73726c;
    --faint: #a3a19a;
    --track: rgba(31, 30, 29, 0.08);
    --claude: #c96442;
    --success: #2f8f46;
    --warning: #b7791f;
    --error: #c4314b;
    --suggestion: #5865c9;
    --claude-tint: rgba(201, 100, 66, 0.10);
    --shadow: 0 12px 32px rgba(20, 20, 19, 0.16), 0 0 0 0.5px rgba(31, 30, 29, 0.18);
    color-scheme: light;
  }
}

/* Style axis: what font the UI chrome uses */
:root { --font-ui: var(--font-mono); --fs-base: var(--fs-xs); }
:root[data-style="app"] { --font-ui: var(--font-sans); --fs-base: var(--fs-sm); }

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: var(--fs-base);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
.num, .mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.claude { color: var(--claude); }
.ok { color: var(--success); }
.warn { color: var(--warning); }
.err { color: var(--error); }

/* Glyphs used by the CLI: ✻ (logo/spinner)  ⎿ (result indent)  ❯ (selection)  ● (status) */
.glyph { font-family: var(--font-mono); }

/* Usage bar — thin track; level classes switch the fill color */
.bar { position: relative; height: 6px; border-radius: 3px; background: var(--track); overflow: hidden; }
.bar > i { position: absolute; inset: 0 auto 0 0; border-radius: 3px; background: var(--claude); }
.bar.lv-ok > i { background: var(--success); }
.bar.lv-warn > i { background: var(--warning); }
.bar.lv-crit > i { background: var(--error); }
.bar .pace { position: absolute; top: -2px; bottom: -2px; width: 1.5px; background: var(--text-2); opacity: .7; }

/* Buttons — claude.ai shapes */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 26px; padding: 0 10px; border-radius: var(--r-md);
  border: 0.5px solid var(--border-strong); background: var(--surface-2); color: var(--text);
  font: inherit; cursor: pointer; white-space: nowrap;
}
.btn:hover { background: var(--surface-3); }
.btn.primary { background: var(--claude-strong); border-color: transparent; color: #fff; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--surface-2); color: var(--text); }
.btn.block { width: 100%; height: 32px; }

.kbd {
  display: inline-block; min-width: 16px; padding: 0 4px; border-radius: 3px;
  border: 0.5px solid var(--border-strong); background: var(--surface-2);
  font-family: var(--font-mono); font-size: var(--fs-xxs); line-height: 15px; text-align: center; color: var(--muted);
}

.badge {
  display: inline-block; padding: 0 5px; border-radius: 3px; line-height: 15px;
  font-family: var(--font-mono); font-size: var(--fs-xxs); color: var(--text-2);
  background: var(--surface-2); border: 0.5px solid var(--border);
}
.badge.claude { color: var(--claude); background: var(--claude-tint); border-color: transparent; }

.input {
  width: 100%; height: 30px; padding: 0 10px; border-radius: var(--r-md);
  border: 0.5px solid var(--border-strong); background: var(--surface); color: var(--text); font: inherit;
}
.input:focus { outline: none; border-color: var(--claude); box-shadow: 0 0 0 2px var(--claude-tint); }

.avatar {
  display: inline-grid; place-items: center; flex: none; width: 22px; height: 22px; border-radius: 50%;
  font-family: var(--font-sans); font-size: 10px; font-weight: 600; color: #fff;
}

.divider { height: 0.5px; background: var(--border); margin: 0; border: 0; }

/* Segmented control (settings) */
.seg { display: inline-flex; padding: 2px; border-radius: var(--r-md); background: var(--surface-2); border: 0.5px solid var(--border); }
.seg button { border: 0; background: transparent; color: var(--muted); font: inherit; font-size: var(--fs-xxs); padding: 2px 8px; border-radius: 6px; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--bg); color: var(--text); box-shadow: 0 0 0 0.5px var(--border-strong); }

/* Toggle switch */
.switch { position: relative; width: 26px; height: 15px; border-radius: 8px; background: var(--surface-3); border: 0; cursor: pointer; flex: none; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 11px; height: 11px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch[aria-checked="true"] { background: var(--claude-strong); }
.switch[aria-checked="true"]::after { transform: translateX(11px); }

@keyframes spin-glyph { 0% { content: "✻"; } 25% { content: "✽"; } 50% { content: "✶"; } 75% { content: "✳"; } }
.spinner::before { content: "✻"; color: var(--claude); animation: spin-glyph 1s steps(1) infinite; font-family: var(--font-mono); }
