/*
 * ═══════════════════════════════════════════════════════════════════════════
 *  STYLE.CSS  —  OpenChronology.org shared design system
 *  Source of truth for all openchronology.org pages.
 *
 *  Required in every <head> (before this stylesheet):
 *    <link rel="preconnect" href="https://fonts.googleapis.com">
 *    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
 *    <link href="https://fonts.googleapis.com/css2?family=Source+Serif+4:ital,opsz,wght@0,8..60,300;0,8..60,400;0,8..60,600;1,8..60,300;1,8..60,400&family=DM+Sans:wght@400;500;600&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet">
 *
 *  Table of contents
 *  ─────────────────────────────────────────────────────────────────────────
 *   1.  Reset
 *   2.  Design tokens
 *   3.  Base / typography
 *   4.  Layout helpers
 *   5.  Navigation
 *   6.  Page headers  (hero + inner-page variants)
 *   7.  Prose & content typography  (spec pages)
 *   8.  Tables
 *   9.  Code blocks
 *  10.  Callouts  (note, warning, info)
 *  11.  Buttons & interactive links
 *  12.  Cards  (tool, next-step, use-case)
 *  13.  Steps  (numbered instruction sequences)
 *  14.  Context block  (copyable AI primer)
 *  15.  Tips list
 *  16.  Path selector  (two-up choice cards)
 *  17.  Footer
 *  18.  Utility classes
 *  19.  Animations
 *  20.  Responsive / mobile
 * ═══════════════════════════════════════════════════════════════════════════
 */


/* ─────────────────────────────────────────────────────────────────────────
   1. RESET
   ───────────────────────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
img, svg               { display: block; max-width: 100%; }
ul, ol                 { list-style: none; }
button                 { cursor: pointer; font: inherit; }
a                      { color: inherit; }


/* ─────────────────────────────────────────────────────────────────────────
   2. DESIGN TOKENS
   ───────────────────────────────────────────────────────────────────────── */

:root {

  /* Navy — primary brand, navigation, headers */
  --navy:           #1a3a5c;
  --navy-mid:       #2a5080;
  --navy-light:     #3a6a9c;
  --navy-pale:      #e0ecf8;
  --navy-ghost:     #f0f6fc;

  /* Blue — interactive accents, links, highlights */
  --blue:           #2e6fac;
  --blue-hi:        #3a84c8;
  --blue-dim:       #1e5090;
  --blue-pale:      #e8f2fb;
  --blue-ghost:     #f3f8fd;

  /* Ink — text scale */
  --ink:            #1a1f2a;
  --ink-mid:        #3a4252;
  --ink-soft:       #5a6478;
  --ink-muted:      #8a96a8;
  --ink-faint:      #b8c0cc;

  /* Surface scale */
  --surface:        #ffffff;
  --surface-warm:   #fafbfc;
  --surface-tinted: #f4f7fc;
  --surface-deep:   #edf2f8;

  /* Borders */
  --border:         #dde3ee;
  --border-mid:     #cad2e0;
  --border-strong:  #bec8da;

  /* Status colors */
  --green:          #1e7a4a;
  --green-pale:     #e4f5ee;
  --amber:          #a06010;
  --amber-pale:     #fef3e2;
  --red:            #b03020;
  --red-pale:       #fdecea;

  /* Typography */
  --font-body:      'DM Sans', system-ui, -apple-system, sans-serif;
  --font-serif:     'Source Serif 4', Georgia, 'Times New Roman', serif;
  --font-mono:      'JetBrains Mono', 'Fira Code', 'Courier New', monospace;

  /* Layout */
  --wrap:           860px;
  --wrap-wide:      1100px;
  --wrap-narrow:    640px;

  /* Spacing scale */
  --space-xs:       4px;
  --space-sm:       8px;
  --space-md:       16px;
  --space-lg:       32px;
  --space-xl:       64px;
  --space-2xl:      96px;

  /* Radii */
  --radius-sm:      4px;
  --radius-md:      8px;
  --radius-lg:      12px;

  /* Shadows */
  --shadow-sm:      0 1px 4px rgba(26,58,92,0.08);
  --shadow-md:      0 4px 16px rgba(26,58,92,0.10);
  --shadow-lg:      0 8px 32px rgba(26,58,92,0.12);

  /* Transitions */
  --transition:     0.15s ease;
}


/* ─────────────────────────────────────────────────────────────────────────
   3. BASE / TYPOGRAPHY
   ───────────────────────────────────────────────────────────────────────── */

html {
  font-size: 16px;
  scroll-behavior: smooth;
  scroll-padding-top: 72px; /* account for sticky nav */
}

body {
  font-family: var(--font-body);
  background: var(--surface);
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Headings — serif for editorial weight */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--navy);
}

h1 { font-size: clamp(28px, 4.5vw, 44px); margin-bottom: 20px; }
h2 { font-size: clamp(22px, 3vw, 30px);   margin-bottom: 16px; margin-top: 48px; }
h3 { font-size: clamp(18px, 2.5vw, 22px); margin-bottom: 12px; margin-top: 36px; }
h4 { font-size: 17px; font-family: var(--font-body); font-weight: 600; margin-bottom: 8px; margin-top: 24px; }

p { margin-bottom: 16px; color: var(--ink-mid); font-size: 16px; }
p:last-child { margin-bottom: 0; }

strong { font-weight: 600; color: var(--ink); }
em { font-style: italic; }

a {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color var(--transition);
}
a:hover { color: var(--navy); }

code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--surface-tinted);
  border: 1px solid var(--border);
  padding: 1px 5px;
  border-radius: var(--radius-sm);
  color: var(--navy-mid);
}

pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: inherit;
  color: inherit;
}

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

blockquote {
  border-left: 3px solid var(--blue);
  padding: 12px 20px;
  margin: 24px 0;
  background: var(--blue-ghost);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}
blockquote p { color: var(--ink-mid); font-size: 15px; }


/* ─────────────────────────────────────────────────────────────────────────
   4. LAYOUT HELPERS
   ───────────────────────────────────────────────────────────────────────── */

.wrap       { max-width: var(--wrap);        margin: 0 auto; padding: 0 var(--space-lg); }
.wrap-wide  { max-width: var(--wrap-wide);   margin: 0 auto; padding: 0 var(--space-lg); }
.wrap-narrow{ max-width: var(--wrap-narrow); margin: 0 auto; padding: 0 var(--space-lg); }

/* Page body — standard inner-page content wrapper */
.page-body {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: var(--space-xl) var(--space-lg) var(--space-2xl);
}

/* Standard section spacing */
.section { margin-bottom: 72px; }
.section:last-child { margin-bottom: 0; }

.divider { border: none; border-top: 1px solid var(--border); margin: 0; }

/* Section labels (eyebrow text above headings) */
.section-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 10px;
  display: block;
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(20px, 2.8vw, 28px);
  font-weight: 400;
  color: var(--navy);
  margin-bottom: 16px;
  line-height: 1.3;
  margin-top: 0;
}

.section-body {
  font-size: 16px;
  color: var(--ink-mid);
  line-height: 1.75;
}
.section-body p + p { margin-top: 14px; }
.section-body a { color: var(--blue); }
.section-body a:hover { color: var(--navy); }


/* ─────────────────────────────────────────────────────────────────────────
   5. NAVIGATION
   ───────────────────────────────────────────────────────────────────────── */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--navy);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.nav-inner {
  max-width: var(--wrap-wide);
  margin: 0 auto;
  padding: 0 var(--space-lg);
  display: flex;
  align-items: center;
  height: 54px;
  gap: 0;
}

.nav-brand {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 400;
  color: #ffffff;
  text-decoration: none;
  letter-spacing: 0.01em;
  margin-right: auto;
  display: flex;
  align-items: center;
  gap: 9px;
  white-space: nowrap;
  flex-shrink: 0;
}

.nav-brand-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #5aabef;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-links li { display: block; }

.nav-links a {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,0.72);
  text-decoration: none;
  padding: 6px 14px;
  border-radius: 5px;
  transition: color var(--transition), background var(--transition);
  letter-spacing: 0.01em;
  display: block;
  white-space: nowrap;
}

.nav-links a:hover  { color: #fff; background: rgba(255,255,255,0.10); }
.nav-links a.active { color: #fff; }

/* Studio CTA in nav */
.nav-studio-link {
  margin-left: 10px;
  background: var(--blue) !important;
  color: #fff !important;
  border-radius: 5px;
}
.nav-studio-link:hover { background: var(--navy-mid) !important; }

/* Mobile nav toggle (hidden on desktop) */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: rgba(255,255,255,0.8);
  padding: 6px;
  margin-left: var(--space-sm);
}


/* ─────────────────────────────────────────────────────────────────────────
   6. PAGE HEADERS
   ───────────────────────────────────────────────────────────────────────── */

/* Standard inner-page header */
.page-header {
  background: var(--navy);
  padding: 64px var(--space-lg) 56px;
  color: #fff;
}

.page-header-inner {
  max-width: var(--wrap);
  margin: 0 auto;
}

.page-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #5aabef;
  margin-bottom: 16px;
  display: block;
}

.page-title {
  font-family: var(--font-serif);
  font-size: clamp(28px, 4.5vw, 44px);
  font-weight: 300;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: #fff;
  margin: 0 0 20px;
}

.page-title em {
  font-style: italic;
  color: #7fc4f8;
}

.page-lead {
  font-family: var(--font-body);
  font-size: 17px;
  color: rgba(255,255,255,0.72);
  max-width: 640px;
  line-height: 1.72;
  margin: 0;
}

/* Hero variant — for landing page (index.html) */
.page-header--hero {
  padding: 80px var(--space-lg) 72px;
  text-align: center;
}

.page-header--hero .page-header-inner {
  max-width: var(--wrap-wide);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page-header--hero .page-title {
  font-size: clamp(36px, 6vw, 64px);
  max-width: 800px;
}

.page-header--hero .page-lead {
  max-width: 560px;
  text-align: center;
}

.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  margin-top: 36px;
  flex-wrap: wrap;
}

/* Spec page header — includes version badge */
.page-header--spec .spec-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.spec-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 20px;
  letter-spacing: 0.04em;
}

.spec-badge--version { background: rgba(90,171,239,0.2); color: #7fc4f8; }
.spec-badge--draft   { background: rgba(255,200,80,0.2); color: #ffcc50; }
.spec-badge--stable  { background: rgba(60,200,120,0.2); color: #60d090; }


/* ─────────────────────────────────────────────────────────────────────────
   7. PROSE & CONTENT TYPOGRAPHY  (spec pages)
   ───────────────────────────────────────────────────────────────────────── */

.prose { max-width: var(--wrap); }

.prose h1 { border-bottom: 2px solid var(--navy-pale); padding-bottom: 12px; margin-top: 56px; }
.prose h1:first-child { margin-top: 0; }
.prose h2 { border-bottom: 1px solid var(--border); padding-bottom: 8px; }

.prose p    { line-height: 1.78; color: var(--ink-mid); }
.prose li   { color: var(--ink-mid); font-size: 16px; line-height: 1.7; margin-bottom: 6px; }
.prose ul   { padding-left: 24px; list-style: disc; margin-bottom: 16px; }
.prose ol   { padding-left: 24px; list-style: decimal; margin-bottom: 16px; }

/* Inline spec term */
.term {
  font-weight: 600;
  color: var(--navy);
}

/* Required/optional badges used in spec field tables */
.badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 10px;
  white-space: nowrap;
}
.badge--required { background: var(--red-pale);   color: var(--red); }
.badge--optional { background: var(--blue-pale);  color: var(--blue-dim); }
.badge--new      { background: var(--green-pale); color: var(--green); }


/* ─────────────────────────────────────────────────────────────────────────
   8. TABLES
   ───────────────────────────────────────────────────────────────────────── */

.table-wrap {
  overflow-x: auto;
  margin: 24px 0;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
}

thead { background: var(--navy); }
thead th {
  padding: 11px 16px;
  text-align: left;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.85);
  white-space: nowrap;
}

tbody tr { border-bottom: 1px solid var(--border); }
tbody tr:last-child { border-bottom: none; }
tbody tr:nth-child(even) { background: var(--surface-warm); }
tbody tr:hover { background: var(--blue-ghost); }

tbody td {
  padding: 10px 16px;
  color: var(--ink-mid);
  vertical-align: top;
  line-height: 1.6;
}

tbody td:first-child {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--navy-mid);
  font-weight: 500;
  white-space: nowrap;
}


/* ─────────────────────────────────────────────────────────────────────────
   9. CODE BLOCKS
   ───────────────────────────────────────────────────────────────────────── */

pre {
  background: #0f1923;
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  overflow-x: auto;
  margin: 20px 0;
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow: var(--shadow-sm);
}

pre code {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.75;
  color: #ccd6e8;
}

/* Inline code in prose */
.prose code {
  font-size: 13.5px;
  background: var(--surface-tinted);
  border: 1px solid var(--border);
  color: var(--navy-mid);
  padding: 1px 6px;
  border-radius: var(--radius-sm);
}


/* ─────────────────────────────────────────────────────────────────────────
   10. CALLOUTS  (note, warning, info)
   ───────────────────────────────────────────────────────────────────────── */

.callout {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 12px;
  padding: 16px 20px;
  border-radius: var(--radius-md);
  border-left: 3px solid;
  margin: 20px 0;
  align-items: start;
}

.callout-icon {
  font-size: 14px;
  line-height: 1.6;
  flex-shrink: 0;
}

.callout-body {
  font-size: 14.5px;
  line-height: 1.7;
}

.callout-body p { font-size: inherit; margin-bottom: 0; }
.callout-body strong { font-size: 13px; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.05em; }

.callout--note {
  background: var(--blue-ghost);
  border-color: var(--blue);
}
.callout--note .callout-body { color: var(--ink-mid); }
.callout--note strong { color: var(--blue-dim); }

.callout--warning {
  background: var(--amber-pale);
  border-color: var(--amber);
}
.callout--warning .callout-body { color: #4a3010; }
.callout--warning strong { color: var(--amber); }

.callout--info {
  background: var(--navy-ghost);
  border-color: var(--navy-light);
}
.callout--info .callout-body { color: var(--ink-mid); }
.callout--info strong { color: var(--navy); }


/* ─────────────────────────────────────────────────────────────────────────
   11. BUTTONS & INTERACTIVE LINKS
   ───────────────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid transparent;
  transition: background var(--transition), color var(--transition),
              border-color var(--transition), box-shadow var(--transition),
              transform 0.1s ease;
  cursor: pointer;
  letter-spacing: 0.01em;
  line-height: 1;
  white-space: nowrap;
}

.btn:active { transform: scale(0.97); }

/* Primary — filled navy */
.btn--primary {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}
.btn--primary:hover {
  background: var(--navy-mid);
  border-color: var(--navy-mid);
  color: #fff;
  box-shadow: var(--shadow-md);
}

/* Secondary — outlined */
.btn--secondary {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.5);
}
.btn--secondary:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.8);
  color: #fff;
}

/* Blue variant */
.btn--blue {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}
.btn--blue:hover {
  background: var(--blue-hi);
  border-color: var(--blue-hi);
  color: #fff;
  box-shadow: var(--shadow-md);
}

/* Ghost — on light background */
.btn--ghost {
  background: transparent;
  color: var(--navy);
  border-color: var(--border-strong);
}
.btn--ghost:hover {
  background: var(--surface-tinted);
  border-color: var(--navy);
  color: var(--navy);
}

/* Small variant */
.btn--sm { padding: 7px 16px; font-size: 13px; }

/* Copy button — special state */
.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 18px;
  background: var(--navy);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), transform 0.1s;
  letter-spacing: 0.01em;
  flex-shrink: 0;
  line-height: 1;
}
.copy-btn:hover  { background: var(--navy-mid); }
.copy-btn:active { transform: scale(0.97); }
.copy-btn.copied { background: var(--green); }


/* ─────────────────────────────────────────────────────────────────────────
   12. CARDS
   ───────────────────────────────────────────────────────────────────────── */

/* Next-step cards (3-up grid) */
.next-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 28px;
}

.next-card {
  background: var(--blue-ghost);
  border: 1px solid var(--blue-pale);
  border-radius: var(--radius-lg);
  padding: 22px 20px;
  text-decoration: none;
  display: block;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.next-card:hover {
  border-color: var(--blue);
  box-shadow: var(--shadow-md);
}

.next-card-num {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 8px;
}

.next-card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 6px;
  line-height: 1.3;
}

.next-card-desc {
  font-size: 13.5px;
  color: var(--ink-soft);
  line-height: 1.6;
}

/* Use-case cards (2-up grid) */
.use-cases {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 28px;
}

.use-case {
  background: var(--surface-warm);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.use-case-head {
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}

.use-case-icon {
  width: 30px;
  height: 30px;
  background: var(--blue-pale);
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}

.use-case-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
}

.use-case-body { padding: 16px 20px; }

.prompt-box {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 13px 16px 13px 28px;
  font-family: var(--font-serif);
  font-size: 14px;
  font-style: italic;
  color: var(--ink-mid);
  line-height: 1.6;
  position: relative;
  margin-bottom: 10px;
}

.prompt-box::before {
  content: '"';
  font-family: var(--font-serif);
  font-size: 36px;
  color: var(--blue-pale);
  line-height: 1;
  position: absolute;
  top: 6px;
  left: 10px;
}

.use-case-note {
  font-size: 12.5px;
  color: var(--ink-muted);
  line-height: 1.6;
}
.use-case-note strong { color: var(--ink-soft); font-weight: 600; }


/* ─────────────────────────────────────────────────────────────────────────
   13. STEPS  (numbered instruction sequences)
   ───────────────────────────────────────────────────────────────────────── */

.steps {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 28px;
}

.step {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 0 20px;
  padding-bottom: 32px;
  position: relative;
}
.step:last-child { padding-bottom: 0; }

.step-num {
  width: 36px;
  height: 36px;
  background: var(--navy);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.step:not(:last-child) .step-num::after {
  content: '';
  position: absolute;
  top: 36px;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: calc(100% + 14px);
  background: var(--border-strong);
}

.step-body { padding-top: 6px; }

.step-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 6px;
}

.step-desc {
  font-size: 14.5px;
  color: var(--ink-mid);
  line-height: 1.7;
}


/* ─────────────────────────────────────────────────────────────────────────
   14. CONTEXT BLOCK  (copyable AI primer)
   ───────────────────────────────────────────────────────────────────────── */

.context-block-wrap {
  background: var(--surface-tinted);
  border: 1px solid var(--border);
  border-top: 3px solid var(--blue);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-top: 28px;
}

.context-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: var(--surface-tinted);
  border-bottom: 1px solid var(--border);
  gap: 12px;
  flex-wrap: wrap;
}

.context-block-title {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-soft);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.context-block-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-muted);
  letter-spacing: 0.04em;
}

.context-block-text {
  display: block;
  width: 100%;
  padding: 24px;
  background: #fff;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.72;
  color: var(--ink-mid);
  border: none;
  outline: none;
  resize: vertical;
  min-height: 520px;
  white-space: pre;
  overflow: auto;
  tab-size: 2;
}

.context-block-footer {
  padding: 12px 20px;
  background: var(--surface-tinted);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}

.context-block-footer-note {
  font-size: 12px;
  color: var(--ink-muted);
  line-height: 1.5;
}
.context-block-footer-note strong { color: var(--ink-soft); font-weight: 600; }


/* ─────────────────────────────────────────────────────────────────────────
   15. TIPS LIST
   ───────────────────────────────────────────────────────────────────────── */

.tips-list {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.tip {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 12px;
  align-items: start;
}

.tip-bullet {
  width: 20px;
  height: 20px;
  background: var(--green-pale);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
  flex-shrink: 0;
}

.tip-text {
  font-size: 15px;
  color: var(--ink-mid);
  line-height: 1.72;
}
.tip-text strong { color: var(--ink); font-weight: 600; }


/* ─────────────────────────────────────────────────────────────────────────
   16. PATH SELECTOR  (two-up choice cards)
   ───────────────────────────────────────────────────────────────────────── */

.path-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 32px;
}

.path-card {
  background: var(--surface-warm);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color var(--transition), box-shadow var(--transition),
              background var(--transition);
  cursor: default;
}

.path-card:hover {
  border-color: var(--blue);
  box-shadow: var(--shadow-md);
  background: var(--blue-ghost);
}

.path-card-icon {
  font-size: 28px;
  line-height: 1;
}

.path-card-title {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 400;
  color: var(--navy);
  line-height: 1.25;
  margin: 0;
}

.path-card-desc {
  font-size: 14.5px;
  color: var(--ink-soft);
  line-height: 1.7;
  flex: 1;
}

.path-card-anchor {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue);
  margin-top: 4px;
}


/* ─────────────────────────────────────────────────────────────────────────
   17. FOOTER
   ───────────────────────────────────────────────────────────────────────── */

.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,0.55);
  padding: 48px var(--space-lg);
}

.footer-inner {
  max-width: var(--wrap-wide);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 32px;
}

.footer-brand {
  font-family: var(--font-serif);
  font-size: 15px;
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.footer-brand-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #5aabef;
}

.footer-tagline {
  font-size: 13px;
  color: rgba(255,255,255,0.4);
  margin-top: 6px;
  line-height: 1.5;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  align-items: center;
  justify-content: flex-end;
}

.footer-links a {
  font-size: 13px;
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  transition: color var(--transition);
}
.footer-links a:hover { color: rgba(255,255,255,0.9); }

.footer-copy {
  grid-column: 1 / -1;
  font-size: 12px;
  color: rgba(255,255,255,0.28);
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.08);
}


/* ─────────────────────────────────────────────────────────────────────────
   18. UTILITY CLASSES
   ───────────────────────────────────────────────────────────────────────── */

.text-muted   { color: var(--ink-muted); }
.text-soft    { color: var(--ink-soft); }
.text-navy    { color: var(--navy); }
.text-blue    { color: var(--blue); }
.text-small   { font-size: 13px; }
.text-mono    { font-family: var(--font-mono); font-size: 0.85em; }
.text-serif   { font-family: var(--font-serif); }
.font-normal  { font-weight: 400; }
.font-medium  { font-weight: 500; }
.font-semibold{ font-weight: 600; }

.mt-0  { margin-top: 0; }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }

.mb-0  { margin-bottom: 0; }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }

.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;
}


/* ─────────────────────────────────────────────────────────────────────────
   19. ANIMATIONS
   ───────────────────────────────────────────────────────────────────────── */

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0);    }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.animate-fade-up { animation: fadeUp 0.6s ease both; }
.animate-fade-in { animation: fadeIn 0.4s ease both; }

/* Stagger helpers */
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }


/* ─────────────────────────────────────────────────────────────────────────
   20. RESPONSIVE / MOBILE
   ───────────────────────────────────────────────────────────────────────── */

/* Tablet — 900px and below */
@media (max-width: 900px) {
  .next-grid { grid-template-columns: 1fr 1fr; }
  .wrap, .wrap-wide, .wrap-narrow { padding: 0 var(--space-md); }
  .page-body { padding: var(--space-xl) var(--space-md) var(--space-2xl); }
}

/* Mobile — 700px and below */
@media (max-width: 700px) {

  /* Nav — collapse links, show toggle */
  .nav-links         { display: none; flex-direction: column; align-items: stretch; }
  .nav-links.is-open {
    display: flex;
    position: absolute;
    top: 54px; left: 0; right: 0;
    background: var(--navy);
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 8px 0;
    z-index: 200;
  }
  .nav-links.is-open a { padding: 10px 24px; border-radius: 0; }
  .nav-studio-link { margin-left: 0; }
  .nav-toggle { display: block; }
  .site-nav { position: sticky; }

  /* Page header */
  .page-header         { padding: 48px var(--space-md) 40px; }
  .page-header--hero   { padding: 56px var(--space-md) 48px; text-align: left; }
  .page-header--hero .page-header-inner { align-items: flex-start; }
  .page-header--hero .page-lead { text-align: left; }
  .hero-actions { justify-content: flex-start; }
  .page-title  { font-size: clamp(24px, 6vw, 32px); }
  .page-lead   { font-size: 15px; }

  /* Page body */
  .page-body { padding: 36px var(--space-md) 56px; }

  /* Section spacing */
  .section { margin-bottom: 48px; }
  h2 { margin-top: 36px; }

  /* Grids → single column */
  .use-cases   { grid-template-columns: 1fr; }
  .next-grid   { grid-template-columns: 1fr; }
  .path-grid   { grid-template-columns: 1fr; }

  /* Context block */
  .context-block-header { flex-direction: column; align-items: flex-start; }
  .context-block-text   { font-size: 11.5px; min-height: 320px; }

  /* Tables — horizontal scroll */
  .table-wrap { border-radius: var(--radius-md); }
  table { min-width: 500px; }
  thead th, tbody td { padding: 9px 12px; font-size: 13px; }

  /* Steps */
  .step { grid-template-columns: 36px 1fr; gap: 0 14px; }

  /* Footer */
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .footer-links { justify-content: flex-start; }
  .footer-copy  { padding-top: 16px; }

  /* Hide decorative elements on small screens */
  .hide-mobile { display: none; }
}

/* Very small screens — 400px and below */
@media (max-width: 400px) {
  :root { --space-lg: 16px; }
  .page-title { font-size: 24px; }
  .section-title { font-size: 18px; }
  .context-block-text { font-size: 11px; }
  pre { padding: 14px 16px; }
  pre code { font-size: 12px; }
}
