/* ============================================================================
   claude-modules site — stylesheet

   Layer order (ITCSS):
     1. Settings     — design tokens (:root custom properties)
     2. Generic      — reset, box-sizing, reduced-motion, skip link, focus
     3. Elements     — bare element selectors (a, h1–h4, p, table, pre, …)
     4. Layout       — page scaffolding (.container, .site-header, .docs-shell, …)
     5. Components    — self-contained UI (.btn, .card, .code-block, .callout, …)
     6. Utilities     — single-purpose helpers
     7. Media queries — responsive overrides, grouped by breakpoint

   All colours, spacing, type sizes, radii, shadows, z-index and motion are
   tokens defined in section 1. Add new values there rather than inline.
   ============================================================================ */

/* ----------------------------------------------------------------------------
   1. SETTINGS — design tokens
   ---------------------------------------------------------------------------- */

:root {
  /* -- Colour primitives (raw palette — not used directly in rules) -------- */
  --color-white: #ffffff;
  --color-zinc-900: #18181b;
  --color-zinc-700: #3f3f46;
  --color-zinc-600: #52525b;
  --color-zinc-500: #71717a;
  --color-zinc-400: #a1a1aa;
  --color-zinc-300: #d4d4d8;
  --color-zinc-200: #e4e4e7;
  --color-zinc-100: #f4f4f5;
  --color-stone-50: #fafaf9;
  --color-orange-700: #c2410c; /* accent as body-text: 5.18:1 on white, WCAG-AA */
  --color-orange-600: #ea580c;
  --color-orange-500: #f97316;
  --color-orange-200: #ffedd5;
  --color-orange-100: #fff7ed;
  --color-orange-tint: #ffe8d1; /* compare-table striped emphasis cell */
  --color-green-400: #4ade80;
  --color-espresso: #1c0a00; /* readable ink on an orange fill */

  /* -- Semantic colour roles -------------------------------------------- */
  --bg: var(--color-white);
  --bg-alt: var(--color-orange-100);
  --bg-dim: var(--color-stone-50);

  --ink: var(--color-zinc-900);
  --ink-soft: var(--color-zinc-600);
  --ink-on-accent: var(--color-espresso);
  --on-dark: var(--color-white);

  --border: var(--color-zinc-900);
  --border-soft: var(--color-zinc-200);

  --accent: var(--color-orange-500);
  --accent-dark: var(--color-orange-600);
  --accent-light: var(--color-orange-200);
  --accent-lighter: var(--color-orange-100);
  /* Accent used AS TEXT — links, the eyebrow label, active nav. Meets WCAG-AA
     (4.5:1) on white and on the orange-tinted section grounds; --accent /
     --accent-dark stay for fills, borders and focus rings (3:1 UI threshold). */
  --accent-text: var(--color-orange-700);

  --header-bg: rgba(255, 255, 255, 0.85);
  --footer-bg: var(--color-zinc-900);
  --footer-ink: var(--color-zinc-300);

  /* Contrast-safe muted text (WCAG AA):
       on a light ground  → zinc-500 (~4.7:1 on white)
       on the dark footer → zinc-400 (~7:1 on zinc-900) */
  --text-subtle-on-light: var(--color-zinc-500);
  --text-subtle-on-dark: var(--color-zinc-400);

  /* -- Code / syntax --------------------------------------------------- */
  --code-bg: var(--color-zinc-900);
  --code-ink: var(--color-zinc-100);
  --code-border: var(--color-zinc-700);
  --code-label: var(--color-zinc-400);
  --code-out: var(--color-zinc-300);
  --code-btn-ink: var(--color-zinc-300);
  --code-btn-border: var(--color-zinc-600);
  --code-ok: var(--color-green-400);

  /* -- Typography --------------------------------------------------- */
  --font-sans:
    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --text-2xs: 0.72rem;
  --text-xs: 0.8rem;
  --text-sm: 0.9rem;
  --text-sms: 0.95rem;
  --text-base: 1rem;
  --text-md: 1.05rem;
  --text-lead: 1.1rem;
  --text-lg: 1.2rem;

  --font-size-h1: clamp(2.25rem, 5vw, 3.5rem);
  --font-size-h1-docs: clamp(2rem, 4vw, 2.75rem);
  --font-size-h2: clamp(1.6rem, 3.4vw, 2.25rem);
  --font-size-h3: 1.3rem;
  --font-size-h4: 1.05rem;

  --leading-tight: 1.15;
  --leading-normal: 1.6;
  --leading-relaxed: 1.65;

  --tracking-tight: -0.02em;
  --tracking-wide: 0.05em;
  --tracking-wider: 0.06em;
  --tracking-widest: 0.08em;

  --weight-normal: 400;
  --weight-semibold: 600;
  --weight-bold: 700;
  --weight-extrabold: 800;

  /* -- Spacing scale (names the values already used across the site) --- */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-7: 1.75rem;
  --space-8: 2rem;
  --space-9: 2.75rem;
  --space-10: 3rem;
  --space-11: 4rem;
  --space-12: 4.5rem;
  --space-14: 5rem;
  --space-16: 6rem;

  /* -- Radii ------------------------------------------------------- */
  --radius: 0.75rem;
  --radius-sm: 0.5rem;
  --radius-2xs: 0.3rem;
  --radius-pill: 999px;
  --radius-circle: 50%;

  /* -- Borders --------------------------------------------------- */
  --border-width: 2px;
  --border-width-hair: 1px;
  --border-width-accent: 6px;

  /* -- Elevation (hard offset "sticker" shadows) --------------- */
  --shadow-sm: 2px 2px 0 var(--border);
  --shadow: 4px 4px 0 var(--border);
  --shadow-hover: 6px 6px 0 var(--border);
  --shadow-sm-hover: 3px 3px 0 var(--border);

  /* -- Motion ------------------------------------------------- */
  --transition-fast: 0.12s ease;
  --transition-base: 0.2s ease;

  /* -- Z-index --------------------------------------------- */
  --z-header: 50;
  --z-back-to-top: 40;
  --z-skip-link: 100;

  /* -- Layout widths ------------------------------------- */
  --container-max: 76rem;
  --container-narrow: 56rem;
  --measure: 46rem;
  --measure-wide: 52rem;
  --measure-narrow: 26rem;
  --docs-toc-w: 15.5rem;
  --header-h: 4.25rem;

  /* -- Breakpoints (reference only — custom properties can't be used in
     media query conditions, so these live in the queries themselves):
       30rem (480px)  — step layout tightens
       50rem (800px)  — mobile nav collapses
       56rem (896px)  — docs sidebar stacks
       62rem (992px)  — hero switches to two columns */

  color-scheme: light;
}

/* ----------------------------------------------------------------------------
   2. GENERIC — reset & global behaviour
   ---------------------------------------------------------------------------- */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + var(--space-4));
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: var(--leading-normal);
  -webkit-font-smoothing: antialiased;
}

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

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

.skip-link {
  position: absolute;
  top: var(--space-2);
  left: var(--space-2);
  z-index: var(--z-skip-link);
  padding: var(--space-2) var(--space-4);
  background: var(--bg);
  color: var(--ink);
  border: var(--border-width) solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  font-weight: var(--weight-bold);
  text-decoration: none;
  transform: translateY(-150%);
  transition: transform var(--transition-fast);
}

.skip-link:focus {
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html,
  .docs-toc {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ----------------------------------------------------------------------------
   3. ELEMENTS — bare tag styles
   ---------------------------------------------------------------------------- */

a {
  color: var(--accent-text);
  text-decoration-thickness: var(--border-width);
  text-underline-offset: 3px;
}

/* Resting colour (--accent-text, orange-700) clears WCAG-AA 4.5:1; the hover
   lightens toward the old accent, same direction as before. */
a:hover {
  color: var(--accent-dark);
}

h1,
h2,
h3,
h4 {
  font-weight: var(--weight-extrabold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  margin: 0 0 0.6em;
}

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

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

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

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

p {
  margin: 0 0 1em;
  color: var(--ink-soft);
}

pre {
  margin: 0;
  padding: 1.1rem var(--space-5);
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  line-height: var(--leading-relaxed);
}

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

:not(pre) > code {
  background: var(--bg-alt);
  border: var(--border-width-hair) solid var(--border-soft);
  border-radius: var(--radius-2xs);
  padding: 0.15em 0.4em;
  font-size: 0.88em;
  color: var(--accent-text);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

th,
td {
  text-align: left;
  padding: var(--space-3) var(--space-4);
  border-bottom: var(--border-width-hair) solid var(--border-soft);
  vertical-align: top;
}

thead th {
  background: var(--ink);
  color: var(--on-dark);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
}

tbody tr:last-child td {
  border-bottom: none;
}

tbody tr:nth-child(even) {
  background: var(--bg-dim);
}

td code,
th code {
  white-space: nowrap;
}

hr.rule {
  border: none;
  border-top: var(--border-width) dashed var(--border-soft);
  margin: 2.5rem 0;
}

/* ----------------------------------------------------------------------------
   4. LAYOUT — page scaffolding
   ---------------------------------------------------------------------------- */

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

.container-narrow {
  max-width: var(--container-narrow);
}

section {
  padding: var(--space-12) 0;
}

.section-alt {
  background: var(--bg-alt);
  border-top: var(--border-width) solid var(--border);
  border-bottom: var(--border-width) solid var(--border);
}

.section-head {
  max-width: var(--measure);
  margin: 0 0 var(--space-9);
}

.section-head p {
  font-size: var(--text-lead);
  margin: 0;
}

/* -- Header / nav -- */

.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: var(--header-bg);
  backdrop-filter: blur(8px);
  border-bottom: var(--border-width) solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: var(--weight-extrabold);
  font-size: var(--text-md);
  color: var(--ink);
  text-decoration: none;
}

.brand:hover {
  color: var(--ink);
}

.brand-mark {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: var(--radius-sm);
  border: var(--border-width) solid var(--border);
  /* 2x2 grid — the favicon.svg motif, so tab icon and on-page mark match */
  background:
    var(--accent)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Crect x='7' y='7' width='8' height='8' rx='1.6' fill='%2318181b'/%3E%3Crect x='17' y='7' width='8' height='8' rx='1.6' fill='%23fff'/%3E%3Crect x='7' y='17' width='8' height='8' rx='1.6' fill='%23fff'/%3E%3Crect x='17' y='17' width='8' height='8' rx='1.6' fill='%2318181b'/%3E%3C/svg%3E")
    center / 70% no-repeat;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-7);
  font-size: var(--text-sms);
  font-weight: var(--weight-semibold);
}

.nav-links a {
  color: var(--ink);
  text-decoration: none;
}

.nav-links a:hover {
  color: var(--accent-text);
}

.nav-links a.is-active {
  color: var(--accent-text);
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.nav-toggle {
  display: none;
  border: var(--border-width) solid var(--border);
  background: var(--bg);
  border-radius: var(--radius-sm);
  width: 2.5rem;
  height: 2.5rem;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* -- Footer -- */

.site-footer {
  border-top: var(--border-width) solid var(--border);
  padding: var(--space-10) 0;
  background: var(--footer-bg);
  color: var(--footer-ink);
}

.site-footer a {
  color: var(--on-dark);
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-8);
}

.footer-grid .brand {
  color: var(--on-dark);
}

.footer-tagline {
  margin-top: var(--space-3);
  max-width: var(--measure-narrow);
  color: var(--text-subtle-on-dark);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-7);
  font-size: 0.92rem;
}

.footer-note {
  margin-top: var(--space-8);
  font-size: 0.82rem;
  color: var(--text-subtle-on-dark);
}

/* -- Hero -- */

.hero {
  padding: var(--space-10) 0 var(--space-11);
}

.hero-grid {
  display: grid;
  gap: 2.5rem;
}

.hero h1 {
  max-width: 30ch;
}

.hero-sub {
  font-size: var(--text-lg);
  max-width: 46ch;
  margin-bottom: var(--space-8);
}

/* -- Docs layout -- */

.docs-shell {
  display: grid;
  grid-template-columns: var(--docs-toc-w) minmax(0, 1fr);
  gap: var(--space-10);
  align-items: start;
  padding: var(--space-10) 0 var(--space-16);
  max-width: 100%;
}

.docs-toc {
  position: sticky;
  top: calc(var(--header-h) + var(--space-6));
  max-height: calc(100vh - var(--header-h) - var(--space-10));
  overflow-y: auto;
  overflow-x: hidden;
  font-size: var(--text-sm);
  padding-right: var(--space-2);
  min-width: 0;
  scroll-behavior: smooth;
}

.docs-content {
  min-width: 0;
  max-width: 100%;
}

.docs-toc-group {
  font-size: 0.75rem;
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  color: var(--text-subtle-on-light);
  margin: var(--space-6) 0 var(--space-2);
}

.docs-toc-group:first-of-type {
  margin-top: 0;
}

.docs-toc ul {
  list-style: none;
  margin: 0 0 var(--space-2);
  padding: 0;
}

.docs-toc a {
  display: block;
  padding: 0.3rem 0 0.3rem var(--space-3);
  border-left: var(--border-width) solid var(--border-soft);
  color: var(--ink-soft);
  text-decoration: none;
}

.docs-toc a:hover {
  color: var(--accent-text);
  border-left-color: var(--accent);
}

.docs-toc a.is-active {
  color: var(--accent-text);
  border-left-color: var(--accent);
  font-weight: var(--weight-semibold);
}

.docs-intro h1 {
  font-size: var(--font-size-h1-docs);
}

.docs-content h2 {
  padding-top: var(--space-6);
  border-top: var(--border-width) solid var(--border-soft);
  margin-top: var(--space-10);
}

.docs-content > .docs-intro h2:first-child,
.docs-content h2:first-child {
  border-top: none;
  margin-top: 0;
  padding-top: 0;
}

.docs-content h3 {
  margin-top: 2.25rem;
}

.docs-content h4 {
  margin-top: var(--space-6);
}

/* ----------------------------------------------------------------------------
   5. COMPONENTS
   ---------------------------------------------------------------------------- */

/* -- Eyebrow label -- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-widest);
  color: var(--accent-text);
  background: var(--accent-light);
  border: var(--border-width) solid var(--border);
  border-radius: var(--radius-pill);
  padding: 0.3em 0.9em;
  margin-bottom: var(--space-5);
}

/* -- Buttons -- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  font-family: var(--font-sans);
  font-weight: var(--weight-bold);
  font-size: var(--text-sms);
  text-decoration: none;
  padding: 0.7em 1.3em;
  border: var(--border-width) solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--ink);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-fast);
  white-space: nowrap;
}

.btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-hover);
  color: var(--ink);
}

.btn:active {
  transform: translate(0, 0);
  box-shadow: var(--shadow-sm);
}

.btn:focus-visible,
.copy-btn:focus-visible,
.nav-toggle:focus-visible {
  outline-offset: 3px;
}

.btn-primary {
  background: var(--accent);
  color: var(--ink-on-accent);
}

.btn-sm {
  font-size: var(--text-xs);
  padding: 0.45em 0.9em;
  box-shadow: var(--shadow-sm);
}

.btn-sm:hover {
  box-shadow: var(--shadow-sm-hover);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-8);
}

.badge-row img {
  height: 1.4rem;
}

/* -- Cards -- */

.card {
  background: var(--bg);
  border: var(--border-width) solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: var(--space-7);
}

.card > :last-child {
  margin-bottom: 0;
}

.card-grid {
  display: grid;
  gap: var(--space-6);
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}

.feature-card .icon {
  width: var(--space-9);
  height: var(--space-9);
  border: var(--border-width) solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-4);
  color: var(--accent-dark);
}

.feature-card h3 {
  margin-bottom: 0.4em;
}

.feature-card p {
  margin: 0;
  font-size: 0.96rem;
}

/* -- Code blocks -- */

.code-block {
  background: var(--code-bg);
  color: var(--code-ink);
  border: var(--border-width) solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin: var(--space-6) 0;
}

.code-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem var(--space-4);
  border-bottom: var(--border-width-hair) solid var(--code-border);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--code-label);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
}

.copy-btn {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: var(--weight-semibold);
  text-transform: none;
  letter-spacing: normal;
  background: transparent;
  color: var(--code-btn-ink);
  border: var(--border-width-hair) solid var(--code-btn-border);
  border-radius: 0.35rem;
  padding: 0.25em 0.7em;
  cursor: pointer;
}

.copy-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.copy-btn.copied {
  border-color: var(--code-ok);
  color: var(--code-ok);
}

.tok-comment {
  color: var(--code-label);
}

.tok-out {
  color: var(--code-out);
}

/* -- Tables -- */

.table-wrap {
  overflow-x: auto;
  margin: var(--space-6) 0;
  border: var(--border-width) solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.table-wrap.compact th,
.table-wrap.compact td {
  padding: 0.6rem 0.85rem;
  font-size: 0.88rem;
}

/* Emphasis on the "claude-modules" column — body cells only; the header row
   stays uniformly dark so all three column headers read the same. */
.table-wrap.compare tbody td:nth-child(3) {
  background: var(--accent-lighter);
}

.table-wrap.compare tbody tr:nth-child(even) td:nth-child(3) {
  background: var(--color-orange-tint);
}

/* Secondary line under a comparison-table column header. */
.compare .th-sub {
  display: block;
  margin-top: 0.35em;
  font-weight: var(--weight-normal);
  font-size: var(--text-2xs);
  text-transform: none;
  letter-spacing: normal;
  color: var(--text-subtle-on-dark);
}

/* -- Callouts -- */

.callout {
  border: var(--border-width) solid var(--border);
  border-left-width: var(--border-width-accent);
  border-radius: var(--radius-sm);
  padding: var(--space-4) var(--space-5);
  margin: var(--space-6) 0;
  background: var(--bg-dim);
  font-size: var(--text-sms);
}

.callout > :last-child {
  margin-bottom: 0;
}

.callout-warn {
  border-left-color: var(--accent);
  background: var(--accent-lighter);
}

.callout strong {
  color: var(--ink);
}

/* -- Numbered steps -- */

.steps {
  counter-reset: step;
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

.step {
  display: grid;
  grid-template-columns: var(--space-10) 1fr;
  gap: var(--space-5);
}

.step-num {
  counter-increment: step;
  width: var(--space-10);
  height: var(--space-10);
  border: var(--border-width) solid var(--border);
  border-radius: var(--radius-circle);
  background: var(--accent);
  color: var(--ink-on-accent);
  font-weight: var(--weight-extrabold);
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}

.step-num::before {
  content: counter(step);
}

.step h3 {
  margin-bottom: 0.4em;
}

/* -- Docs helpers -- */

.cmd-sig {
  margin: var(--space-3) 0 var(--space-5);
}

/* -- Back to top -- */

.back-to-top {
  display: none;
  position: fixed;
  bottom: var(--space-7);
  right: var(--space-7);
  z-index: var(--z-back-to-top);
}

.back-to-top.is-visible {
  display: inline-flex;
}

/* ----------------------------------------------------------------------------
   6. UTILITIES
   ---------------------------------------------------------------------------- */

.section-note {
  margin-top: var(--space-6);
}

.docs-lede {
  font-size: var(--text-md);
  max-width: var(--measure);
}

.u-measure-wide {
  max-width: var(--measure-wide);
}

.u-mt-8 {
  margin-top: var(--space-8);
}

.u-text-sm {
  font-size: var(--text-sm);
}

.card-grid--single {
  grid-template-columns: 1fr;
}

/* Present to assistive tech, removed from the visual layout. */
.u-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ----------------------------------------------------------------------------
   7. MEDIA QUERIES
   ---------------------------------------------------------------------------- */

@media (min-width: 62rem) {
  .hero {
    padding-top: var(--space-14);
  }

  .hero-grid {
    grid-template-columns: 1.05fr 0.95fr;
    align-items: center;
  }
}

@media (max-width: 56rem) {
  .docs-shell {
    grid-template-columns: 1fr;
  }

  .docs-toc {
    position: static;
    max-height: none;
    border: var(--border-width) solid var(--border);
    border-radius: var(--radius);
    padding: var(--space-4) var(--space-5);
    margin-bottom: var(--space-4);
  }
}

@media (max-width: 50rem) {
  .nav-links {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: var(--border-width) solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: var(--space-2) var(--space-6) var(--space-4);
    visibility: hidden;
    transform: translateY(-130%);
    transition:
      transform var(--transition-base),
      visibility var(--transition-base);
  }

  .nav-links.is-open {
    visibility: visible;
    transform: translateY(0);
  }

  .nav-links a {
    padding: var(--space-3) 0;
    width: 100%;
    border-bottom: var(--border-width-hair) solid var(--border-soft);
  }

  .nav-toggle {
    display: flex;
  }

  section {
    padding: var(--space-10) 0;
  }
}

@media (max-width: 30rem) {
  .step {
    grid-template-columns: 2.5rem 1fr;
  }

  .step-num {
    width: 2.5rem;
    height: 2.5rem;
    font-size: var(--text-base);
  }
}
