/* Vendored fonts — same-origin, so the CSP allows the import. */
@import "/fonts/fonts.css";

/* styles.css — the shared base for the two standalone documentation pages.
 *
 * The app itself ships its CSS through the bundler, so this file exists for
 * api.html and tokens.html: they carry their own page-local rules but consume the
 * design tokens from here, and they need the same light/dark behaviour the app
 * has. theme.js has already stamped data-theme on <html> before first paint.
 */

:root {
  --font-sans: "DM Sans";
  --font-serif: "Cormorant Garamond";
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --ink: #2f2a27;
  --muted: #8d847c;
  --canvas: #f7f0e7;
  --paper: rgba(255, 251, 244, 0.82);
  --line: rgba(117, 91, 70, 0.18);
  --coral: #eb7c6b;
  --lavender: #8d6bcc;
  --sage: #769d74;
  --shadow: 0 18px 48px rgba(87, 62, 43, 0.06);
  --code-bg: #f3ebe0;
  --radius: 16px;
}

:root[data-theme="dark"] {
  --ink: #ece4da;
  --muted: #9d938a;
  --canvas: #191512;
  --paper: rgba(38, 32, 28, 0.86);
  --line: rgba(214, 186, 156, 0.16);
  --coral: #ef8b78;
  --lavender: #b299e8;
  --sage: #8fb98c;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.4);
  --code-bg: #221d19;
}

* { box-sizing: border-box; }

html { background: var(--canvas); }

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 48% 22%, rgba(255, 255, 255, 0.55), transparent 36%),
    var(--canvas);
  color: var(--ink);
  font-family: var(--font-sans), system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

:root[data-theme="dark"] body {
  background:
    radial-gradient(circle at 48% 18%, rgba(255, 255, 255, 0.05), transparent 38%),
    linear-gradient(135deg, #1b1714, #221d19 48%, #17130f);
}

h1, h2, h3, h4 { font-family: var(--font-serif), Georgia, serif; font-weight: 500; letter-spacing: -0.01em; }
h1 { font-size: clamp(30px, 3.4vw, 44px); line-height: 1.05; margin: 0 0 10px; }
h2 { font-size: 24px; margin: 34px 0 10px; }
h3 { font-size: 17px; margin: 22px 0 8px; }

a { color: var(--coral); text-decoration: none; border-bottom: 1px solid color-mix(in srgb, var(--coral), transparent 70%); }
a:hover { border-bottom-color: var(--coral); }

button, input, textarea, select { font: inherit; color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible {
  outline: 2px solid var(--lavender);
  outline-offset: 3px;
}

/* Wide code blocks scroll inside their own box; the page body never does. */
pre {
  margin: 0;
  padding: 14px 16px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--code-bg);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.55;
  white-space: pre;
  tab-size: 2;
}
code { font-family: var(--mono); font-size: 0.92em; }
p > code, li > code, td > code {
  padding: 1px 5px;
  border-radius: 5px;
  background: var(--code-bg);
}

table { width: 100%; border-collapse: collapse; font-size: 12px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-size: 10px; }

/* The tab bar api-docs.js builds, plus the pane container it looks for. */
.code-group { position: relative; margin: 12px 0 18px; }

.hidden { display: none !important; }

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