/* AgentDeck — shared tokens, reset and primitives (landing page + demo) */

:root {
  --font-ui: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Code", Consolas, monospace;

  --bg: #f6f7f9;
  --bg-elev: #ffffff;
  --bg-sunk: #eef0f3;
  --line: #e1e5ea;
  --line-strong: #cdd4dc;
  --text: #0e1318;
  --text-2: #3a4450;
  --muted: #66717d;
  --accent: #5646e0;
  --accent-hover: #4637cc;
  --accent-ink: #ffffff;
  --accent-soft: #ecebfd;
  --accent-line: #c9c3fa;
  --ok: #0c8f63;
  --ok-soft: #e1f5ec;
  --warn: #a8690f;
  --warn-soft: #fdf2df;
  --bad: #cc3b3b;
  --bad-soft: #fcebeb;
  --term-bg: #0d1117;
  --term-text: #d3dae3;
  --term-muted: #7d8894;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .06);
  --shadow-md: 0 6px 24px -8px rgba(16, 24, 40, .18);
  --shadow-lg: 0 24px 60px -20px rgba(16, 24, 40, .35);
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a0c10;
    --bg-elev: #12161c;
    --bg-sunk: #0d1015;
    --line: #1f252d;
    --line-strong: #2c343e;
    --text: #e7ecf2;
    --text-2: #b6c0cb;
    --muted: #7f8a96;
    --accent: #8f83ff;
    --accent-hover: #a399ff;
    --accent-ink: #0a0c10;
    --accent-soft: rgba(143, 131, 255, .14);
    --accent-line: rgba(143, 131, 255, .38);
    --ok: #34d399;
    --ok-soft: rgba(52, 211, 153, .12);
    --warn: #f5b84b;
    --warn-soft: rgba(245, 184, 75, .12);
    --bad: #f47171;
    --bad-soft: rgba(244, 113, 113, .12);
    --term-bg: #07090c;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-md: 0 8px 28px -10px rgba(0, 0, 0, .7);
    --shadow-lg: 0 30px 80px -24px rgba(0, 0, 0, .8);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0a0c10;
  --bg-elev: #12161c;
  --bg-sunk: #0d1015;
  --line: #1f252d;
  --line-strong: #2c343e;
  --text: #e7ecf2;
  --text-2: #b6c0cb;
  --muted: #7f8a96;
  --accent: #8f83ff;
  --accent-hover: #a399ff;
  --accent-ink: #0a0c10;
  --accent-soft: rgba(143, 131, 255, .14);
  --accent-line: rgba(143, 131, 255, .38);
  --ok: #34d399;
  --ok-soft: rgba(52, 211, 153, .12);
  --warn: #f5b84b;
  --warn-soft: rgba(245, 184, 75, .12);
  --bad: #f47171;
  --bad-soft: rgba(244, 113, 113, .12);
  --term-bg: #07090c;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-md: 0 8px 28px -10px rgba(0, 0, 0, .7);
  --shadow-lg: 0 30px 80px -24px rgba(0, 0, 0, .8);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.6 var(--font-ui);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code, pre, kbd { font-family: var(--font-mono); font-size: .88em; }
code, pre, kbd, samp, .mono, .term-out, .code, .tool-target { font-variant-ligatures: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--accent-soft); }
[hidden] { display: none !important; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-sm { width: 15px; height: 15px; }
.icon-lg { width: 22px; height: 22px; }

/* Brand */
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-family: var(--font-display); font-weight: 700; font-size: 18px; letter-spacing: -.01em; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 28px; height: 28px; }
/* Logo parts: unqualified so they also style the <symbol> cloned by <use> */
.lg-c1 { fill: var(--text); opacity: .18; }
.lg-c2 { fill: var(--text); opacity: .4; }
.lg-c3 { fill: var(--accent); }
.lg-ink { stroke: var(--accent-ink); fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 38px; padding: 0 16px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: var(--bg-elev); color: var(--text);
  font-weight: 500; font-size: 14px; line-height: 1; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s, transform .1s;
}
.btn:hover { text-decoration: none; border-color: var(--muted); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--bg-sunk); border-color: transparent; color: var(--text); }
.btn-danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn-lg { min-height: 46px; padding: 0 22px; font-size: 15px; border-radius: var(--radius); }
.btn-sm { min-height: 30px; padding: 0 10px; font-size: 13px; }

.icon-btn {
  display: inline-grid; place-items: center; width: 34px; height: 34px;
  border: 1px solid transparent; border-radius: var(--radius-sm);
  background: transparent; color: var(--text-2);
}
.icon-btn:hover { background: var(--bg-sunk); color: var(--text); }

.theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .i-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .i-moon { display: none; }
}

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 9px; border-radius: 999px;
  font-size: 12px; font-weight: 500; line-height: 1.4;
  background: var(--accent-soft); color: var(--accent);
}
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
