/* ==========================================================================
   CorX Labs — corx-labs.com
   Design system: warm paper, espresso ink, editorial serif, layered glass.
   Derived from the CorX mark: an old-style serif C on textured off-white.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */
:root {
  /* Surface */
  --paper:        #f4f2ec;
  --paper-raised: #faf9f5;
  --paper-sunk:   #edeae1;

  /* Ink */
  --ink:          #211a13;
  --ink-strong:   #100c08;
  --espresso:     #3d3025;
  --muted:        #6d6357;
  --faint:        #93897c;

  /* Lines & glass */
  --line:         rgba(33, 26, 19, .11);
  --line-strong:  rgba(33, 26, 19, .20);
  --glass-bg:     rgba(255, 253, 248, .58);
  --glass-brd:    rgba(255, 255, 255, .70);
  --glass-shadow: 0 1px 2px rgba(33,26,19,.04), 0 8px 24px -12px rgba(33,26,19,.16);
  --glow:         rgba(61, 48, 37, .07);

  /* Typography */
  --serif: "Cormorant Garamond", ui-serif, "Iowan Old Style", "Palatino Linotype",
           Palatino, Georgia, "Times New Roman", serif;
  --sans:  "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
           "Helvetica Neue", Arial, sans-serif;
  --mono:  ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas,
           "Liberation Mono", monospace;

  /* Rhythm */
  --shell:   1180px;
  --measure: 68ch;
  --gutter:  clamp(20px, 5vw, 48px);
  --section: clamp(72px, 11vw, 148px);
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-pill: 999px;

  /* Motion */
  --ease: cubic-bezier(.22, .68, .26, 1);
  --fast: 160ms;
  --slow: 620ms;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper:        #14100c;
    --paper-raised: #1c1712;
    --paper-sunk:   #0e0b08;
    --ink:          #f2eee6;
    --ink-strong:   #fffdf8;
    --espresso:     #d8c9b6;
    --muted:        #a89c8c;
    --faint:        #7d7264;
    --line:         rgba(242, 238, 230, .12);
    --line-strong:  rgba(242, 238, 230, .22);
    --glass-bg:     rgba(38, 31, 24, .55);
    --glass-brd:    rgba(242, 238, 230, .10);
    --glass-shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 30px -14px rgba(0,0,0,.7);
    --glow:         rgba(216, 201, 182, .06);
  }
}

/* --------------------------------------------------------------------------
   2. Reset & base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.65;
  letter-spacing: -.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* The paper grain from the logo, carried across the whole site. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .5;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.32'/%3E%3C/svg%3E");
}
@media (prefers-color-scheme: dark) {
  body::before { mix-blend-mode: screen; opacity: .22; }
}

img, svg, video { display: block; max-width: 100%; height: auto; }
button, input, textarea, select { font: inherit; color: inherit; }

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

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

::selection { background: var(--espresso); color: var(--paper); }

/* --------------------------------------------------------------------------
   3. Typography
   -------------------------------------------------------------------------- */
.display,
h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -.02em;
  color: var(--ink-strong);
  text-wrap: balance;
}

h1 { font-size: clamp(2.85rem, 7.2vw, 5.4rem); }
h2 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); }
h3 { font-size: clamp(1.35rem, 2.2vw, 1.75rem); line-height: 1.2; }

h4, h5, h6 {
  font-family: var(--sans);
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--ink-strong);
}

p { text-wrap: pretty; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--sans);
  font-size: .705rem;
  font-weight: 500;
  letter-spacing: .17em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--line-strong);
}
.eyebrow.is-plain::before { display: none; }

.lede {
  font-size: clamp(1.075rem, 1.5vw, 1.235rem);
  line-height: 1.62;
  color: var(--muted);
  max-width: 60ch;
}

.prose { max-width: var(--measure); }
.prose > * + * { margin-top: 1.15em; }
.prose h2 { margin-top: 2.1em; }
.prose h3 { margin-top: 1.7em; }
.prose p, .prose li { color: var(--muted); }
.prose strong { color: var(--ink-strong); font-weight: 600; }
.prose ul, .prose ol { padding-left: 1.15rem; }
.prose li + li { margin-top: .45em; }
.prose li::marker { color: var(--faint); }
.prose a {
  color: var(--ink-strong);
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 3px;
  transition: text-decoration-color var(--fast) var(--ease);
}
.prose a:hover { text-decoration-color: currentColor; }

code, kbd, samp {
  font-family: var(--mono);
  font-size: .855em;
  background: var(--paper-sunk);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: .12em .38em;
}

pre {
  font-family: var(--mono);
  font-size: .82rem;
  line-height: 1.7;
  background: var(--paper-sunk);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 20px 22px;
  overflow-x: auto;
  color: var(--ink);
}
pre code { background: none; border: 0; padding: 0; font-size: inherit; }
/* Inline code can't scroll the way <pre> does, so let long identifiers break
   rather than push the page sideways on a phone. */
:not(pre) > code { overflow-wrap: anywhere; margin-inline: .06em; }

/* --------------------------------------------------------------------------
   4. Layout
   -------------------------------------------------------------------------- */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
  position: relative;
  z-index: 1;
}
.shell-narrow { max-width: 840px; }
/* Narrow measure that keeps the page's left edge — used where a block sits
   beside full-width sections and must not look indented. */
.column-narrow { max-width: 860px; }

.section { padding-block: var(--section); }
.section-tight { padding-block: clamp(52px, 7vw, 92px); }

.rule { height: 1px; background: var(--line); border: 0; }

.section-head { max-width: 720px; margin-bottom: clamp(38px, 5vw, 62px); }
.section-head .eyebrow { margin-bottom: 18px; }
.section-head h2 + p { margin-top: 20px; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 12px;
  z-index: 100;
  background: var(--ink-strong);
  color: var(--paper);
  padding: 10px 18px;
  border-radius: var(--r-pill);
  font-size: .85rem;
}
.skip-link:focus { left: 16px; }

/* --------------------------------------------------------------------------
   5. Logo mark
   -------------------------------------------------------------------------- */
.mark {
  font-family: var(--serif);
  font-weight: 500;
  color: var(--espresso);
  line-height: 1;
  display: inline-block;
  font-feature-settings: "lnum";
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
}
.brand .mark {
  font-size: 1.95rem;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--paper-raised);
  padding-bottom: .12em;
  transition: border-color var(--fast) var(--ease), transform var(--fast) var(--ease);
}
.brand:hover .mark { border-color: var(--line-strong); transform: translateY(-1px); }
.brand-name {
  font-family: var(--sans);
  font-size: .805rem;
  font-weight: 600;
  letter-spacing: .155em;
  text-transform: uppercase;
  color: var(--ink-strong);
}

/* --------------------------------------------------------------------------
   6. Header / nav
   -------------------------------------------------------------------------- */
.masthead {
  position: sticky;
  top: 0;
  z-index: 60;
  border-bottom: 1px solid transparent;
  transition: background var(--fast) var(--ease), border-color var(--fast) var(--ease),
              backdrop-filter var(--fast) var(--ease);
}
.masthead.is-stuck {
  background: var(--glass-bg);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
  border-bottom-color: var(--line);
}
.masthead-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 74px;
}

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  padding: 8px 14px;
  font-size: .875rem;
  font-weight: 450;
  color: var(--muted);
  border-radius: var(--r-pill);
  transition: color var(--fast) var(--ease), background var(--fast) var(--ease);
}
.nav a:hover { color: var(--ink-strong); background: rgba(125, 114, 100, .09); }
.nav a[aria-current="page"] { color: var(--ink-strong); font-weight: 550; }

.masthead-actions { display: flex; align-items: center; gap: 10px; }

.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  align-items: center; justify-content: center;
  background: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  color: var(--ink-strong);
}

.mobile-nav {
  display: none;
  border-bottom: 1px solid var(--line);
  background: var(--glass-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
}
.mobile-nav[data-open="true"] { display: block; }
.mobile-nav ul { list-style: none; padding: 10px 0 22px; margin: 0; }
.mobile-nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  font-family: var(--serif);
  font-size: 1.55rem;
  color: var(--ink-strong);
  border-bottom: 1px solid var(--line);
}
.mobile-nav a svg { color: var(--faint); }
.mobile-nav .btn { margin-top: 20px; width: 100%; }

/* --------------------------------------------------------------------------
   7. Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 24px;
  border-radius: var(--r-pill);
  font-size: .885rem;
  font-weight: 550;
  letter-spacing: -.005em;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: transform var(--fast) var(--ease), background var(--fast) var(--ease),
              border-color var(--fast) var(--ease), box-shadow var(--fast) var(--ease),
              color var(--fast) var(--ease);
}
.btn svg { width: 15px; height: 15px; flex: none; }
.btn:active { transform: translateY(1px); }

/* The black button — primary call to action across the site. */
.btn-primary {
  background: var(--ink-strong);
  color: var(--paper-raised);
  box-shadow: 0 1px 2px rgba(16,12,8,.18), 0 10px 22px -12px rgba(16,12,8,.55);
}
.btn-primary:hover {
  background: var(--espresso);
  box-shadow: 0 2px 4px rgba(16,12,8,.2), 0 16px 30px -14px rgba(16,12,8,.6);
  transform: translateY(-1px);
}

.btn-ghost {
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-color: var(--line-strong);
  color: var(--ink-strong);
}
.btn-ghost:hover { border-color: var(--ink); transform: translateY(-1px); }

.btn-quiet { background: none; color: var(--muted); padding-inline: 4px; }
.btn-quiet:hover { color: var(--ink-strong); }

.btn-sm { padding: 9px 17px; font-size: .82rem; }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: .875rem;
  font-weight: 550;
  color: var(--ink-strong);
}
.arrow-link svg { width: 14px; height: 14px; transition: transform var(--fast) var(--ease); }
.arrow-link:hover svg { transform: translateX(3px); }

/* --------------------------------------------------------------------------
   8. Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  padding-block: clamp(64px, 11vw, 132px) clamp(56px, 8vw, 104px);
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  top: -22%;
  left: 50%;
  width: min(1100px, 130vw);
  aspect-ratio: 1;
  translate: -50% 0;
  background: radial-gradient(circle at 50% 50%, var(--glow) 0%, transparent 62%);
  pointer-events: none;
  z-index: 0;
}
.hero > * { position: relative; z-index: 1; }

.hero-mark {
  font-family: var(--serif);
  font-size: clamp(7rem, 20vw, 15rem);
  line-height: .8;
  color: var(--espresso);
  opacity: .1;
  position: absolute;
  right: -.06em;
  top: 50%;
  translate: 0 -50%;
  z-index: 0;
  user-select: none;
  pointer-events: none;
}

.hero h1 { margin-top: 26px; max-width: 15ch; }
.hero .lede { margin-top: 26px; }
.hero .btn-row { margin-top: 38px; }

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  margin-top: 46px;
  font-size: .8rem;
  color: var(--faint);
}
.hero-meta span { display: inline-flex; align-items: center; gap: 8px; }
.hero-meta .dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--espresso);
}

/* --------------------------------------------------------------------------
   9. Glass cards & grids
   -------------------------------------------------------------------------- */
.card {
  position: relative;
  background: var(--glass-bg);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border: 1px solid var(--glass-brd);
  outline: 1px solid var(--line);
  outline-offset: -1px;
  border-radius: var(--r-lg);
  box-shadow: var(--glass-shadow);
  padding: clamp(24px, 3vw, 34px);
  transition: transform var(--slow) var(--ease), box-shadow var(--slow) var(--ease);
}
a.card:hover,
.card.is-interactive:hover {
  transform: translateY(-3px);
  box-shadow: 0 2px 4px rgba(33,26,19,.05), 0 22px 44px -20px rgba(33,26,19,.28);
}
.card h3 { margin-bottom: 10px; }
.card p { color: var(--muted); font-size: .945rem; }

.icon-badge {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  color: var(--espresso);
  margin-bottom: 20px;
}
.icon-badge svg { width: 20px; height: 20px; }

.grid { display: grid; gap: clamp(16px, 2vw, 22px); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* Stats */
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  overflow: hidden;
}
.stat { padding: clamp(22px, 3vw, 32px); border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat dt {
  font-size: .715rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 10px;
}
.stat dd {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2rem, 3.6vw, 2.9rem);
  line-height: 1;
  color: var(--ink-strong);
  letter-spacing: -.02em;
}
.stat dd small { font-size: .42em; color: var(--muted); letter-spacing: 0; }

/* --------------------------------------------------------------------------
   10. Model cards
   -------------------------------------------------------------------------- */
.model-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}
.model-card .model-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.model-card h3 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: var(--paper-raised);
  font-size: .715rem;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.tag-live { color: var(--espresso); }
.tag-live .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: currentColor;
}
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; }

/* Cell separators are drawn with box-shadow rather than a gap over a coloured
   background, so a partly-filled last row leaves paper behind it, not a slab. */
.spec-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  margin: 0;
}
.spec-list > div {
  padding: 16px 18px;
  box-shadow: 1px 0 0 var(--line), 0 1px 0 var(--line);
}
.spec-list dt {
  font-size: .705rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 6px;
}
.spec-list dd {
  margin: 0;
  font-size: .95rem;
  font-weight: 500;
  color: var(--ink-strong);
}

/* --------------------------------------------------------------------------
   11. Feature list / checks
   -------------------------------------------------------------------------- */
.check-list { list-style: none; padding: 0; display: grid; gap: 14px; }
.check-list li {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 13px;
  align-items: start;
  color: var(--muted);
  font-size: .95rem;
}
.check-list svg { width: 18px; height: 18px; margin-top: 3px; color: var(--espresso); flex: none; }
.check-list.is-limits svg { color: var(--faint); }

/* --------------------------------------------------------------------------
   12. Steps / timeline
   -------------------------------------------------------------------------- */
.steps { list-style: none; padding: 0; display: grid; gap: 0; counter-reset: step; }
.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 24px;
  padding: 28px 0;
  border-top: 1px solid var(--line);
}
.steps li:last-child { border-bottom: 1px solid var(--line); }
.steps li::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--serif);
  font-size: 1.5rem;
  color: var(--faint);
  line-height: 1.2;
}
.steps h3 { font-family: var(--sans); font-size: 1.02rem; font-weight: 600; letter-spacing: -.01em; }
.steps p { margin-top: 8px; color: var(--muted); font-size: .945rem; max-width: 62ch; }

/* --------------------------------------------------------------------------
   13. Accordion (FAQ)
   -------------------------------------------------------------------------- */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 0;
  cursor: pointer;
  list-style: none;
  font-family: var(--serif);
  font-size: clamp(1.2rem, 2.1vw, 1.5rem);
  color: var(--ink-strong);
  transition: color var(--fast) var(--ease);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--espresso); }
.faq summary .plus {
  flex: none;
  width: 26px; height: 26px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  transition: transform var(--fast) var(--ease), border-color var(--fast) var(--ease);
}
.faq details[open] summary .plus { transform: rotate(45deg); border-color: var(--line-strong); }
.faq .faq-body { padding: 0 0 26px; max-width: var(--measure); }
.faq .faq-body p { color: var(--muted); font-size: .965rem; }
.faq .faq-body p + p { margin-top: .9em; }
.faq .faq-body a { color: var(--ink-strong); text-decoration: underline; text-underline-offset: 3px; }

/* --------------------------------------------------------------------------
   14. Breadcrumbs & page header
   -------------------------------------------------------------------------- */
.crumbs { display: flex; align-items: center; gap: 8px; font-size: .78rem; color: var(--faint); flex-wrap: wrap; }
.crumbs ol { display: contents; list-style: none; padding: 0; margin: 0; }
.crumbs li { display: inline-flex; align-items: center; gap: 8px; }
.crumbs li + li::before { content: "/"; color: var(--line-strong); }
.crumbs a:hover { color: var(--ink-strong); }
.crumbs [aria-current="page"] { color: var(--muted); }

.page-head { padding-block: clamp(40px, 6vw, 72px) clamp(34px, 4vw, 52px); }
.page-head h1 { margin-top: 22px; font-size: clamp(2.5rem, 5.6vw, 4.2rem); max-width: 18ch; }
.page-head .lede { margin-top: 22px; }

/* Answer-first summary block — the paragraph search engines and
   AI assistants lift as the definition of the page. */
.answer-box {
  border-left: 2px solid var(--espresso);
  padding: 4px 0 4px 22px;
  margin-block: 32px;
  max-width: var(--measure);
}
.answer-box p { font-size: 1.05rem; color: var(--ink); line-height: 1.6; }
.answer-box p + p { margin-top: .8em; }

/* --------------------------------------------------------------------------
   15. Table of contents
   -------------------------------------------------------------------------- */
.doc-layout {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  gap: clamp(32px, 6vw, 76px);
  align-items: start;
}
/* Grid children default to min-width:auto, which lets the wide spec table push
   the whole page sideways on narrow screens. Let them shrink instead. */
.doc-layout > * { min-width: 0; }
.toc { position: sticky; top: 104px; }
.toc-title {
  font-size: .705rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 16px;
}
.toc ol { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
.toc a {
  display: block;
  padding: 7px 12px;
  font-size: .855rem;
  color: var(--muted);
  border-radius: 8px;
  border-left: 2px solid transparent;
  transition: color var(--fast) var(--ease), background var(--fast) var(--ease),
              border-color var(--fast) var(--ease);
}
.toc a:hover { color: var(--ink-strong); background: rgba(125,114,100,.08); }
.toc a.is-active {
  color: var(--ink-strong);
  border-left-color: var(--espresso);
  background: rgba(125,114,100,.06);
  font-weight: 550;
}

.doc-section { scroll-margin-top: 100px; padding-block: clamp(34px, 4vw, 52px); }
.doc-section + .doc-section { border-top: 1px solid var(--line); }
.doc-section > h2 { font-size: clamp(1.75rem, 3.2vw, 2.4rem); }
.doc-section > h2 + * { margin-top: 20px; }

/* --------------------------------------------------------------------------
   16. Tables
   -------------------------------------------------------------------------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-md); }
table { width: 100%; border-collapse: collapse; font-size: .9rem; min-width: 460px; }
th, td { padding: 13px 18px; text-align: left; border-bottom: 1px solid var(--line); }
thead th {
  font-size: .705rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 500;
  background: var(--paper-sunk);
}
tbody tr:last-child td { border-bottom: 0; }
td:first-child { color: var(--ink-strong); font-weight: 500; }
td { color: var(--muted); }

/* --------------------------------------------------------------------------
   17. Contact
   -------------------------------------------------------------------------- */
.contact-card {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.contact-card > div { background: var(--paper-raised); padding: clamp(24px, 3vw, 34px); }
.contact-card h3 { font-family: var(--sans); font-size: 1rem; font-weight: 600; letter-spacing: -.01em; }
.contact-card p { margin-top: 8px; color: var(--muted); font-size: .93rem; }
.contact-card .mail {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  font-size: .95rem;
  font-weight: 550;
  color: var(--ink-strong);
  word-break: break-all;
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 2px;
}
.contact-card .mail:hover { border-bottom-color: currentColor; }

.copy-btn {
  border: 1px solid var(--line);
  background: var(--paper-raised);
  border-radius: var(--r-pill);
  padding: 7px 14px;
  font-size: .78rem;
  color: var(--muted);
  cursor: pointer;
  transition: border-color var(--fast) var(--ease), color var(--fast) var(--ease);
}
.copy-btn:hover { border-color: var(--line-strong); color: var(--ink-strong); }
.copy-btn[data-copied="true"] { color: var(--espresso); border-color: var(--espresso); }

/* --------------------------------------------------------------------------
   17b. Announcement / press release
   -------------------------------------------------------------------------- */
.announce {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background:
    radial-gradient(110% 130% at 96% 4%, var(--glow) 0%, transparent 55%),
    var(--paper-raised);
  padding: clamp(28px, 4vw, 48px);
  overflow: hidden;
}
.announce-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 9px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-strong);
  background: var(--paper);
  font-size: .705rem;
  font-weight: 600;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--espresso);
}
.announce-tag .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: currentColor;
}
.announce h2 {
  margin-top: 20px;
  font-size: clamp(1.8rem, 3.4vw, 2.7rem);
  max-width: 22ch;
}
.announce .dateline {
  margin-top: 20px;
  font-size: .74rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--faint);
}
.announce .prose { margin-top: 14px; }
.announce blockquote {
  margin: 26px 0 0;
  padding-left: 22px;
  border-left: 2px solid var(--espresso);
  max-width: 62ch;
}
.announce blockquote p {
  font-family: var(--serif);
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  line-height: 1.35;
  color: var(--ink-strong);
}
.announce blockquote cite {
  display: block;
  margin-top: 12px;
  font-family: var(--sans);
  font-size: .8rem;
  font-style: normal;
  color: var(--faint);
}

/* --------------------------------------------------------------------------
   17c. Blog
   -------------------------------------------------------------------------- */
.post-list { display: grid; gap: 1px; background: var(--line); border-block: 1px solid var(--line); }
.post-item {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 28px;
  background: var(--paper);
  padding: clamp(24px, 3.2vw, 36px) 0;
  transition: background var(--fast) var(--ease);
}
.post-item:hover { background: var(--paper-raised); }
.post-item time {
  font-size: .78rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--faint);
  padding-top: 6px;
}
.post-item h2 {
  font-size: clamp(1.5rem, 2.8vw, 2.05rem);
  max-width: 24ch;
}
.post-item p { margin-top: 12px; color: var(--muted); font-size: .95rem; max-width: 62ch; }
.post-item .tag-row { margin-top: 18px; }

.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  margin-top: 26px;
  font-size: .82rem;
  color: var(--faint);
}
.post-meta a { color: var(--muted); border-bottom: 1px solid var(--line-strong); }
.post-meta a:hover { color: var(--ink-strong); }

/* Pull-out for the one idea a section turns on. */
.callout {
  border: 1px solid var(--line);
  border-left: 2px solid var(--espresso);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  background: var(--paper-raised);
  padding: 22px 24px;
  margin-block: 28px;
  max-width: var(--measure);
}
.callout p { color: var(--ink); font-size: .97rem; }
.callout p + p { margin-top: .8em; }
.callout strong { font-weight: 600; }

figure { margin: 28px 0; }
figcaption {
  margin-top: 12px;
  font-size: .8rem;
  color: var(--faint);
  max-width: 62ch;
}

/* --------------------------------------------------------------------------
   17d. Developer profile
   -------------------------------------------------------------------------- */
.dev-card {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: clamp(24px, 3vw, 40px);
  align-items: start;
}
.dev-portrait {
  width: 132px;
  height: 132px;
  display: grid;
  place-items: center;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--paper-raised);
  font-family: var(--serif);
  font-size: 4.6rem;
  line-height: 1;
  color: var(--espresso);
  padding-bottom: .08em;
}
.dev-card h3 { font-size: clamp(1.7rem, 3vw, 2.2rem); }
.dev-role {
  margin-top: 8px;
  font-size: .78rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--faint);
}
.dev-card .prose { margin-top: 20px; }

.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 24px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
}
.timeline li:last-child { border-bottom: 1px solid var(--line); }
.timeline .when {
  font-size: .78rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--faint);
  padding-top: 3px;
}
.timeline h3 { font-family: var(--sans); font-size: 1.02rem; font-weight: 600; letter-spacing: -.01em; }
.timeline p { margin-top: 8px; color: var(--muted); font-size: .945rem; max-width: 62ch; }

/* --------------------------------------------------------------------------
   18. CTA band
   -------------------------------------------------------------------------- */
.cta-band {
  position: relative;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background:
    radial-gradient(120% 140% at 12% 0%, var(--glow) 0%, transparent 58%),
    var(--paper-raised);
  padding: clamp(38px, 6vw, 76px);
  overflow: hidden;
  text-align: center;
}
.cta-band h2 { max-width: 20ch; margin-inline: auto; }
.cta-band p { margin: 20px auto 0; max-width: 52ch; color: var(--muted); }
.cta-band .btn-row { justify-content: center; margin-top: 32px; }

/* --------------------------------------------------------------------------
   19. Footer
   -------------------------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--line); padding-block: clamp(48px, 6vw, 76px) 34px; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 40px 24px;
}
.footer-brand p { margin-top: 18px; font-size: .885rem; color: var(--muted); max-width: 34ch; }
.footer-col h4 {
  font-size: .705rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 500;
  margin-bottom: 16px;
}
.footer-col ul { list-style: none; padding: 0; display: grid; gap: 10px; }
.footer-col a { font-size: .885rem; color: var(--muted); }
.footer-col a:hover { color: var(--ink-strong); }

.footer-base {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  justify-content: space-between;
  align-items: center;
  margin-top: clamp(40px, 5vw, 64px);
  padding-top: 26px;
  border-top: 1px solid var(--line);
  font-size: .8rem;
  color: var(--faint);
}
.footer-base .made { display: inline-flex; align-items: center; gap: 8px; }

/* --------------------------------------------------------------------------
   20. Utilities
   -------------------------------------------------------------------------- */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.text-center { text-align: center; }
.mt-s { margin-top: 18px; }
.mt-m { margin-top: 30px; }
.mt-l { margin-top: clamp(38px, 5vw, 58px); }

/* Scroll reveal.
   Gated on `scripting: enabled` so that without JavaScript — and for any crawler
   that does not execute it — the content is simply visible, never stuck at
   opacity 0. Browsers without the media query support degrade the same way. */
@media (scripting: enabled) {
  [data-reveal] {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity var(--slow) var(--ease), transform var(--slow) var(--ease);
  }
}
[data-reveal].is-visible { opacity: 1; transform: none; }

/* --------------------------------------------------------------------------
   21. Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1000px) {
  .doc-layout { grid-template-columns: 1fr; }
  .toc {
    position: static;
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    padding: 20px;
    background: var(--paper-raised);
  }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 860px) {
  .nav, .masthead-actions .btn { display: none; }
  .nav-toggle { display: inline-flex; }
  .masthead { background: var(--glass-bg); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .hero-mark { display: none; }
}

@media (max-width: 620px) {
  html { scroll-padding-top: 84px; }
  body { font-size: 16px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .steps li { grid-template-columns: 44px 1fr; gap: 16px; }
  .post-item, .timeline li { grid-template-columns: 1fr; gap: 10px; }
  .post-item time { padding-top: 0; }
  .dev-card { grid-template-columns: 1fr; }
  .dev-portrait { width: 96px; height: 96px; font-size: 3.4rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  /* Long button labels must wrap rather than push the page sideways. */
  .btn-row .btn { flex: 1 1 100%; min-width: 0; white-space: normal; text-align: center; }
  .hero h1 { max-width: none; }
}

/* --------------------------------------------------------------------------
   22. Motion & print
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
}

@media print {
  .masthead, .mobile-nav, .site-footer, .cta-band, .toc { display: none !important; }
  body { background: #fff; color: #000; }
  body::before { display: none; }
  .card { box-shadow: none; border: 1px solid #ddd; }
}
