/* ═══════════════════════════════════════════════════════════════
   PANDA LAB — DESIGN TOKENS v1.0
   Dark-blue premium surface. Single source of truth.
   All downstream files consume these variables.
   ═══════════════════════════════════════════════════════════════ */

:root {
  /* ── Typography ─────────────────────────────────────────────── */
  --font-sans: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* ── Background layers ──────────────────────────────────────── */
  --bg: #07111f;
  --bg-soft: #0b1830;
  --bg-deep: #050c18;
  --bg-code: #08111e;           /* code blocks, pre elements */

  /* ── Panel surfaces ─────────────────────────────────────────── */
  --panel: #0f1f3d;
  --panel-2: #13294e;
  --panel-3: #182f59;
  --panel-4: rgba(255, 255, 255, 0.03);

  /* ── Text ───────────────────────────────────────────────────── */
  --text: #e7efff;
  --text-soft: #d6e5ff;
  --text-code: #dbe7ff;         /* code/pre text */
  --muted: #97a8c9;

  /* ── Semantic text (used by components on colored backgrounds) */
  --text-accent-soft: #cfe0ff;  /* text on accent-tinted backgrounds */
  --text-cyan-soft: #d3f5ff;    /* text on cyan-tinted backgrounds */
  --text-good-soft: #dfffe8;    /* text on good/success backgrounds */

  /* ── Borders & glow ─────────────────────────────────────────── */
  --line: rgba(157, 186, 255, 0.18);
  --line-strong: rgba(120, 168, 255, 0.24);
  --glow: rgba(83, 140, 255, 0.18);
  --glow-cyan: rgba(124, 229, 255, 0.22);

  /* ── Accent & semantic colors ───────────────────────────────── */
  --accent: #78a8ff;
  --accent-2: #7ce5ff;
  --good: #86efac;
  --good-soft: #6ee7a0;
  --warn: #fcd34d;
  --warn-soft: #fbbf24;
  --danger: #fca5a5;
  --danger-soft: #f87171;

  /* ── Shadows ────────────────────────────────────────────────── */
  --shadow-soft: 0 12px 40px rgba(0, 0, 0, 0.28);
  --shadow-panel: 0 18px 44px rgba(0, 0, 0, 0.28);
  --shadow-inset: inset 0 1px 0 rgba(255, 255, 255, 0.02);

  --radius-sm: 14px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --radius-xl: 28px;
  --radius-hero: 32px;
  --radius-pill: 999px;

  --space-1: 8px;
  --space-2: 10px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 18px;
  --space-6: 22px;
  --space-7: 24px;
  --space-8: 34px;

  --shell-width: 1500px;
  --sidebar-width: 300px;
  --sticky-top: 18px;
  --section-gap: 22px;
  --card-gap: 16px;
  --mermaid-min-width: 720px;
  --mermaid-min-width-mobile: 620px;

  --h1-size: clamp(2rem, 3.2vw, 3.4rem);
  --h2-size: clamp(1.35rem, 1.6vw, 1.9rem);
  --h3-size: 1.1rem;
  --body-size: 1rem;
  --meta-size: 0.8rem;
  --pill-size: 0.88rem;
  --line-height: 1.55;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text);
  line-height: var(--line-height);
  background:
    radial-gradient(circle at top left, rgba(124, 229, 255, 0.08), transparent 30%),
    radial-gradient(circle at top right, rgba(120, 168, 255, 0.12), transparent 25%),
    linear-gradient(180deg, #081121 0%, var(--bg) 36%, var(--bg-deep) 100%);
}

a {
  color: inherit;
}

h1,
h2,
h3,
h4 {
  margin: 0 0 12px;
  line-height: 1.1;
}

h1 {
  font-size: var(--h1-size);
}

h2 {
  font-size: var(--h2-size);
}

h3,
h4 {
  font-size: var(--h3-size);
}

p,
ul,
ol,
pre {
  margin-top: 0;
}

code,
pre,
.mono {
  font-family: var(--font-mono);
}

.shell {
  width: min(var(--shell-width), calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 64px;
}
