/* ==========================================================================
   Claudebook design tokens
   Ivory canvas, ink typography, a single warm clay accent.
   ========================================================================== */

:root {
  color-scheme: light;

  --font-serif: "Source Serif 4", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --bg: #faf9f5;
  --bg-sunken: #f2f0e9;
  --surface: #ffffff;
  --surface-2: #f8f7f2;
  --surface-hover: #f4f2eb;
  --border: #e8e6dc;
  --border-strong: #d7d4c8;
  --text: #141413;
  --text-2: #3d3d3a;
  --text-3: #6b6a64;
  --text-4: #74726a;

  --accent: #d97757;
  --accent-strong: #c15f3c;
  --accent-text: #ad4f2c;
  --accent-soft: #f9ede7;
  --accent-soft-2: #f2dccf;

  --ink: #141413;
  --ink-hover: #33322e;
  --on-ink: #faf9f5;

  --blue-soft: #e9f0f7;
  --blue-text: #365f88;
  --green-soft: #e9f0e3;
  --green-text: #476b39;
  --gold-soft: #f6efdb;
  --gold-text: #7d6020;
  --live: #3e9a5a;

  --shadow-xs: 0 1px 1px rgba(20, 20, 19, 0.04);
  --shadow-sm: 0 1px 2px rgba(20, 20, 19, 0.05), 0 1px 1px rgba(20, 20, 19, 0.03);
  --shadow-md: 0 1px 2px rgba(20, 20, 19, 0.04), 0 8px 24px -8px rgba(20, 20, 19, 0.12);
  --shadow-lg: 0 2px 6px rgba(20, 20, 19, 0.06), 0 32px 72px -16px rgba(20, 20, 19, 0.28);

  --radius-xs: 5px;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 22px;

  --container: 1264px;
  --header-h: 64px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #1b1a18;
  --bg-sunken: #161513;
  --surface: #242321;
  --surface-2: #292825;
  --surface-hover: #2e2d2a;
  --border: #363532;
  --border-strong: #46443f;
  --text: #f4f3ee;
  --text-2: #d8d6cd;
  --text-3: #a4a198;
  --text-4: #94918a;
  --accent: #d97757;
  --accent-strong: #e38b6c;
  --accent-text: #eb9676;
  --accent-soft: rgba(217, 119, 87, 0.13);
  --accent-soft-2: rgba(217, 119, 87, 0.24);
  --ink: #f4f3ee;
  --ink-hover: #dedcd3;
  --on-ink: #1b1a18;
  --blue-soft: rgba(106, 155, 204, 0.15);
  --blue-text: #93b9df;
  --green-soft: rgba(120, 140, 93, 0.2);
  --green-text: #a7c690;
  --gold-soft: rgba(196, 160, 70, 0.16);
  --gold-text: #dcbd6d;
  --live: #58b775;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 28px -10px rgba(0, 0, 0, 0.55);
  --shadow-lg: 0 2px 6px rgba(0, 0, 0, 0.35), 0 36px 80px -16px rgba(0, 0, 0, 0.7);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #1b1a18;
    --bg-sunken: #161513;
    --surface: #242321;
    --surface-2: #292825;
    --surface-hover: #2e2d2a;
    --border: #363532;
    --border-strong: #46443f;
    --text: #f4f3ee;
    --text-2: #d8d6cd;
    --text-3: #a4a198;
    --text-4: #94918a;
    --accent: #d97757;
    --accent-strong: #e38b6c;
    --accent-text: #eb9676;
    --accent-soft: rgba(217, 119, 87, 0.13);
    --accent-soft-2: rgba(217, 119, 87, 0.24);
    --ink: #f4f3ee;
    --ink-hover: #dedcd3;
    --on-ink: #1b1a18;
    --blue-soft: rgba(106, 155, 204, 0.15);
    --blue-text: #93b9df;
    --green-soft: rgba(120, 140, 93, 0.2);
    --green-text: #a7c690;
    --gold-soft: rgba(196, 160, 70, 0.16);
    --gold-text: #dcbd6d;
    --live: #58b775;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 28px -10px rgba(0, 0, 0, 0.55);
    --shadow-lg: 0 2px 6px rgba(0, 0, 0, 0.35), 0 36px 80px -16px rgba(0, 0, 0, 0.7);
  }
}

/* ==========================================================================
   Base
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 24px);
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
}

svg.icon {
  display: inline-block;
  flex-shrink: 0;
  vertical-align: -0.2em;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.15;
  color: var(--text);
}

p {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
}

code,
pre,
kbd {
  font-family: var(--font-mono);
  font-size: 0.88em;
}

::selection {
  background: var(--accent-soft-2);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 0;
}

main {
  flex: 1;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 100;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: var(--on-ink);
  font-weight: 500;
}

.skip-link:focus {
  top: 12px;
}

.muted {
  color: var(--text-3);
}

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

.nowrap {
  white-space: nowrap;
}

.eyebrow {
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
}

.serif {
  font-family: var(--font-serif);
}

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

@media (max-width: 640px) {
  .container {
    padding: 0 16px;
  }
}
