/* Design tokens shared by every page. Light by default; dark follows the OS unless the user picked one with the
   theme toggle (html[data-theme="light" | "dark"]). Monochrome: neutral surfaces, near-black (near-white in dark mode) for primary actions;
   red is used only for errors. */
:root {
  --bg: #f7f7f9;
  --surface: #ffffff;
  --surface-2: #f2f2f6;
  --surface-3: #e9e9ef;
  --text: #16161d;
  --text-2: #4b4b57;
  --text-3: #75758a;
  --border: #e4e4ea;
  --border-strong: #d2d2db;
  --accent: #16161d;
  --accent-2: #000000;
  --accent-soft: #ececf1;
  --accent-ring: rgba(22, 22, 29, .16);
  --accent-text: #ffffff;
  --success: #16161d;
  --success-soft: #f2f2f6;
  --warning: #16161d;
  --warning-soft: #f2f2f6;
  --danger: #c0352b;
  --danger-soft: #fdeeed;
  --sidebar-bg: #fbfbfd;
  --sidebar-text: #4b4b57;
  --sidebar-active-bg: #ffffff;
  --sidebar-active: #16161d;
  --code-bg: #15151c;
  --code-text: #dcdce6;
  --glow: rgba(22, 22, 29, .05);
  --radius: 14px;
  --radius-sm: 9px;
  --shadow-xs: 0 1px 2px rgba(22, 22, 29, .05);
  --shadow: 0 1px 2px rgba(22, 22, 29, .04), 0 4px 14px -6px rgba(22, 22, 29, .08);
  --shadow-hover: 0 2px 4px rgba(22, 22, 29, .05), 0 14px 32px -12px rgba(22, 22, 29, .16);
  --shadow-lg: 0 20px 50px -16px rgba(22, 22, 29, .24);
  --font: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", "Cascadia Mono", Consolas, ui-monospace, monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --fast: .15s;
  --slow: .35s;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #0b0b0f;
  --surface: #131318;
  --surface-2: #1a1a21;
  --surface-3: #23232c;
  --text: #f1f1f5;
  --text-2: #b3b3c2;
  --text-3: #8a8a9c;
  --border: #25252e;
  --border-strong: #454552;
  --accent: #f1f1f5;
  --accent-2: #ffffff;
  --accent-soft: #24242d;
  --accent-ring: rgba(241, 241, 245, .22);
  --accent-text: #0b0b0f;
  --success: #f1f1f5;
  --success-soft: #1a1a21;
  --warning: #f1f1f5;
  --warning-soft: #1a1a21;
  --danger: #ff7b72;
  --danger-soft: #2b1514;
  --sidebar-bg: #0f0f14;
  --sidebar-text: #b3b3c2;
  --sidebar-active-bg: #1d1d25;
  --sidebar-active: #f1f1f5;
  --code-bg: #08080b;
  --code-text: #dcdce6;
  --glow: rgba(255, 255, 255, .04);
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 4px 14px -6px rgba(0, 0, 0, .5);
  --shadow-hover: 0 2px 4px rgba(0, 0, 0, .4), 0 14px 32px -12px rgba(0, 0, 0, .7);
  --shadow-lg: 0 20px 50px -16px rgba(0, 0, 0, .75);
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0b0f;
    --surface: #131318;
    --surface-2: #1a1a21;
    --surface-3: #23232c;
    --text: #f1f1f5;
    --text-2: #b3b3c2;
    --text-3: #8a8a9c;
    --border: #25252e;
    --border-strong: #454552;
    --accent: #f1f1f5;
    --accent-2: #ffffff;
    --accent-soft: #24242d;
    --accent-ring: rgba(241, 241, 245, .22);
    --accent-text: #0b0b0f;
    --success: #f1f1f5;
    --success-soft: #1a1a21;
    --warning: #f1f1f5;
    --warning-soft: #1a1a21;
    --danger: #ff7b72;
    --danger-soft: #2b1514;
    --sidebar-bg: #0f0f14;
    --sidebar-text: #b3b3c2;
    --sidebar-active-bg: #1d1d25;
    --sidebar-active: #f1f1f5;
    --code-bg: #08080b;
    --code-text: #dcdce6;
    --glow: rgba(255, 255, 255, .04);
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 4px 14px -6px rgba(0, 0, 0, .5);
    --shadow-hover: 0 2px 4px rgba(0, 0, 0, .4), 0 14px 32px -12px rgba(0, 0, 0, .7);
    --shadow-lg: 0 20px 50px -16px rgba(0, 0, 0, .75);
    color-scheme: dark;
  }
}

/* Shared typography and motion */
body { text-rendering: optimizeLegibility; }
h1, h2, h3 { font-weight: 600; letter-spacing: -.011em; color: var(--text); }
::selection { background: var(--accent-ring); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
html { transition: background-color var(--slow) var(--ease); }

@keyframes fade-up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop-in { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: none; } }

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

/* Shared by every page: the contact rows and the plain social icons in footers. */
.contact-list { display: grid; gap: 10px; }
.contact-item { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 12px;
  background: var(--surface); color: var(--text); text-decoration: none; transition: border-color var(--fast) var(--ease), background var(--fast) var(--ease); }
.contact-item:hover { border-color: var(--border-strong); background: var(--surface-2); text-decoration: none; }
.contact-item:focus-visible { outline: 2px solid var(--accent-ring); outline-offset: 2px; }
.ci-icon { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); }
.ci-icon svg, .ci-go svg, .footer-social svg { width: 18px; height: 18px; }
.ci-text { display: grid; min-width: 0; flex: 1; }
.ci-text b { font-size: 14px; font-weight: 600; }
.ci-text span { font-size: 13.5px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ci-go { color: var(--text-3); display: grid; }
.contact-item:hover .ci-go { color: var(--text); }
.footer-social { display: inline-flex; gap: 6px; align-items: center; }
.footer-social a { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; color: var(--text-3);
  border: 1px solid transparent; transition: color var(--fast) var(--ease), border-color var(--fast) var(--ease); }
.footer-social a:hover { color: var(--text); border-color: var(--border); text-decoration: none; }
.footer-social a:focus-visible { outline: 2px solid var(--accent-ring); }

/* The setup guide video (home page and documentation) */
.video-card { margin: 0; border: 1px solid var(--border); border-radius: 16px; overflow: hidden; background: var(--surface);
  box-shadow: var(--shadow); }
.video-card video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; background: #0b0b0f; }
.video-card figcaption { padding: 12px 18px; font-size: 13px; color: var(--text-3); border-top: 1px solid var(--border); }
