/* ==========================================================================
   Detail Suite — public marketing site
   Layout concept: a spec-sheet grid. A narrow left margin column carries
   section labels; content sits in the wide right column. The homepage hero
   splits hard down the middle (brand ink on the left, light panel on the
   right) — the detailer's 50/50 shot. Hairlines are used sparingly.
   Scope: marketing pages only. Nothing here is loaded by the application.
   ========================================================================== */

:root {
  /* color */
  --ink: #0B0A2E;        /* brand indigo-black, from the logo's deepest tone */
  --ink-2: #15133F;      /* raised dark surface */
  --ink-3: #211E52;      /* dark hairline / dark panel edge */
  --paper: #F6F7FA;      /* cool white ground */
  --panel: #ECEEF4;      /* cool grey panel */
  --text: #15132E;
  --muted: #5B5F7A;
  --muted-dark: #AEB2C9; /* secondary text on ink */
  --line: rgba(21, 19, 46, 0.14);
  --line-strong: rgba(21, 19, 46, 0.32);
  --line-dark: rgba(246, 247, 250, 0.14);
  --accent: #02E0FA;     /* brand cyan, from the logo: used on ink and as fills, never as text on paper */
  --accent-deep: #076E8C; /* cyan deepened for small text on light surfaces (AA) */
  --good: #1F7A4D;       /* semantic: paid / complete (illustrations only) */
  --focus: #02E0FA;

  /* type */
  --font-display: "Besley", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-wordmark: "Montserrat", "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --font-body: "IBM Plex Sans", "Helvetica Neue", Arial, system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: clamp(1.375rem, 1.2rem + 0.6vw, 1.625rem);
  --step-3: clamp(1.9rem, 1.35rem + 1.9vw, 3.1rem);
  --step-4: clamp(2.5rem, 1.5rem + 3.4vw, 4.1rem);

  /* rhythm */
  --gutter: clamp(16px, 4vw, 48px);
  --section: clamp(60px, 8vw, 120px);
  --radius: 6px;
  --measure: 62ch;
  --wrap: 1200px;

  color-scheme: light;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; display: block; }
h1, h2, h3, h4, p, ul, ol, figure, dl { margin: 0; }
ul, ol { padding: 0; }
a { color: inherit; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }

h1, h2 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
h1 { font-size: var(--step-4); line-height: 1.02; }
h2 { font-size: var(--step-3); line-height: 1.08; }
h3 { font-size: var(--step-2); font-weight: 600; line-height: 1.25; letter-spacing: -0.01em; text-wrap: balance; }
h4 { font-size: var(--step-1); font-weight: 600; line-height: 1.3; }

.lead { font-size: var(--step-1); line-height: 1.5; color: var(--muted); max-width: var(--measure); }
.measure { max-width: var(--measure); }
.muted { color: var(--muted); }
.mono { font-family: var(--font-mono); }
.num { font-variant-numeric: tabular-nums; }

/* eyebrow labels: mono, small, tracked */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.on-ink .eyebrow { color: var(--muted-dark); }

/* ---------- focus ---------- */
:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 2px;
}
.on-ink :focus-visible, .site-header :focus-visible, .site-footer :focus-visible { outline-color: var(--focus); }

.skip-link {
  position: absolute; left: var(--gutter); top: -100px;
  background: var(--accent); color: var(--ink);
  padding: 10px 14px; border-radius: var(--radius);
  font-weight: 600; z-index: 100; text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* ---------- layout ---------- */
.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section); }
.section + .section { border-top: 1px solid var(--line); }
.on-ink { background: var(--ink); color: var(--paper); }
.on-ink .muted, .on-ink .lead { color: var(--muted-dark); }
.on-panel { background: var(--panel); }

/* spec-sheet chapter: label column + content column */
.chapter { display: grid; gap: 28px; }
@media (min-width: 900px) {
  .chapter { grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: 48px; }
  .chapter > .chapter-label { position: sticky; top: 96px; align-self: start; }
}
.chapter-label .eyebrow { display: block; margin-bottom: 10px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 20px;
  border-radius: var(--radius); border: 1px solid transparent;
  font-weight: 600; font-size: 1rem; line-height: 1;
  text-decoration: none; cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease, transform .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--ink-2); }
.btn-accent { background: var(--accent); color: var(--ink); }
.btn-accent:hover { background: #33E6FB; }
/* Cyan is held back to the header button, route markers, focus rings and the
   current-page underline. Large calls to action on ink are paper-white. */
.hero-copy .btn-accent, .page-head .btn-accent, .cta-final .btn-accent { background: var(--paper); color: var(--ink); }
.hero-copy .btn-accent:hover, .page-head .btn-accent:hover, .cta-final .btn-accent:hover { background: #FFFFFF; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--ink); }
.on-ink .btn-ghost, .site-header .btn-ghost, .hero-copy .btn-ghost, .page-head .btn-ghost { color: var(--paper); border-color: rgba(246, 247, 249, 0.35); }
.on-ink .btn-ghost:hover, .site-header .btn-ghost:hover, .hero-copy .btn-ghost:hover, .page-head .btn-ghost:hover { border-color: var(--paper); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.btn-note { font-size: var(--step--1); color: var(--muted); }
.on-ink .btn-note, .hero-copy .btn-note, .page-head .btn-note { color: var(--muted-dark); }

/* text links */
.link { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: var(--line-strong); }
.link:hover { text-decoration-color: currentColor; }
.arrow-link { text-decoration: none; font-weight: 600; }
.arrow-link::after { content: " →"; display: inline-block; margin-left: 6px; transition: transform .15s ease; }
.arrow-link:hover::after { transform: translateX(3px); }

/* ---------- header ---------- */
.site-header {
  background: var(--ink); color: var(--paper);
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid var(--line-dark);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--paper); }
.brand-mark { height: 30px; width: auto; flex: none; }
.brand-name { font-family: var(--font-wordmark); font-weight: 800; font-size: 0.98rem; letter-spacing: 0.05em; text-transform: uppercase; white-space: nowrap; line-height: 1; padding-top: 2px; }
.site-footer .brand-mark { height: 36px; }

.nav-toggle {
  display: none; align-items: center; gap: 8px;
  background: transparent; border: 1px solid var(--line-dark); color: var(--paper);
  border-radius: var(--radius); min-height: 40px; padding: 0 12px; cursor: pointer;
}
.nav-toggle .bars { width: 18px; height: 12px; position: relative; display: inline-block; }
.nav-toggle .bars::before, .nav-toggle .bars::after {
  content: ""; position: absolute; left: 0; right: 0; height: 2px; background: currentColor; border-radius: 1px;
  transition: transform .2s ease, top .2s ease;
}
.nav-toggle .bars::before { top: 0; } .nav-toggle .bars::after { top: 10px; }
.nav-toggle[aria-expanded="true"] .bars::before { top: 5px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bars::after { top: 5px; transform: rotate(-45deg); }

.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav ul { list-style: none; display: flex; gap: 24px; }
.site-nav a:not(.btn) { color: var(--muted-dark); text-decoration: none; font-weight: 500; font-size: 0.95rem; padding: 6px 0; }
.site-nav a:not(.btn):hover, .site-nav a[aria-current="page"] { color: var(--paper); }
.site-nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--accent); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.nav-actions .btn { min-height: 40px; padding: 0 16px; font-size: 0.95rem; }

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--ink); border-bottom: 1px solid var(--line-dark);
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px var(--gutter) 20px;
  }
  .js .site-nav:not(.is-open) { display: none; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav ul a:not(.btn) { display: block; padding: 14px 0; border-bottom: 1px solid var(--line-dark); font-size: 1.05rem; }
  .site-nav a[aria-current="page"] { box-shadow: none; color: var(--accent); }
  .nav-actions { flex-direction: column; align-items: stretch; padding-top: 16px; }
  .nav-actions .btn { min-height: 48px; }
}

/* ---------- hero (homepage 50/50) ---------- */
.hero { display: grid; background: var(--ink); color: var(--paper); }
.hero-copy { padding: clamp(48px, 7vw, 104px) var(--gutter) clamp(48px, 6vw, 88px); }
.hero-copy .eyebrow { color: var(--muted-dark); margin-bottom: 22px; display: block; }
.hero-copy h1 { max-width: 16ch; }
.hero-copy .lead { margin-top: 24px; color: var(--muted-dark); max-width: 46ch; }
.hero-copy .btn-row { margin-top: 36px; }
.hero-copy .btn-note { margin-top: 14px; display: block; }
.hero-visual { background: var(--paper); color: var(--text); padding: clamp(28px, 5vw, 64px) var(--gutter); display: grid; align-content: center; }
.hero-visual figure { max-width: 640px; margin-inline: auto; width: 100%; }
@media (min-width: 960px) {
  /* the 50/50: brand ink on the left, light panel on the right */
  .hero { grid-template-columns: 1fr 1fr; }
  .hero-copy { padding-left: max(var(--gutter), calc((100vw - var(--wrap)) / 2 + var(--gutter))); padding-right: clamp(24px, 4vw, 56px); }
  .hero-visual { padding-right: clamp(32px, 5vw, 80px); padding-left: clamp(32px, 4vw, 64px); }
}

/* illustration frames */
.illo { width: 100%; height: auto; }
.illo-caption { margin-top: 12px; font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.on-ink .illo-caption { color: var(--muted-dark); }

/* ---------- strip of facts under the hero ---------- */
.facts { border-bottom: 1px solid var(--line); }
.facts ul { list-style: none; display: grid; gap: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.facts li { padding: 20px 20px 20px 0; border-top: 1px solid var(--line); }
.facts li:nth-child(-n+2) { border-top: 0; }
.facts strong { display: block; font-family: var(--font-display); font-weight: 500; font-size: 1.5rem; letter-spacing: -0.01em; }
.facts span { color: var(--muted); font-size: var(--step--1); }
@media (min-width: 760px) {
  .facts ul { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .facts li { border-top: 0; border-left: 1px solid var(--line); padding-left: 20px; }
  .facts li:first-child { border-left: 0; padding-left: 0; }
}

/* ---------- the day: a route down the page ---------- */
.day-head { margin-bottom: clamp(40px, 5vw, 72px); }
.day-head h2 { max-width: 20ch; }
.day-head .lead { margin-top: 18px; }
.route { position: relative; display: grid; gap: clamp(48px, 6vw, 88px); }
.route::before {
  content: ""; position: absolute; left: 11px; top: 8px; bottom: 8px; width: 2px;
  background: var(--line-strong);
}
.stop { position: relative; display: grid; gap: 24px; padding-left: 44px; }
.stop::before {
  content: ""; position: absolute; left: 4px; top: 6px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--paper); border: 3px solid var(--ink);
}
.stop-time { font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.08em; color: var(--muted); text-transform: uppercase; display: block; margin-bottom: 10px; }
.stop h3 { max-width: 18ch; }
.stop p { margin-top: 14px; max-width: 52ch; }
.stop ul { margin-top: 16px; list-style: none; display: grid; gap: 8px; color: var(--text); }
.stop ul li { padding-left: 18px; position: relative; font-size: var(--step--1); color: var(--muted); }
.stop ul li::before { content: ""; position: absolute; left: 0; top: 0.65em; width: 8px; height: 2px; background: var(--accent-deep); }
.stop figure { align-self: start; min-width: 0; }
@media (min-width: 900px) {
  /* copy in the left third, visual in the right two-thirds; the route line
     runs down the far left like the time rail of a schedule */
  .route::before { left: 11px; }
  .stop { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; padding-left: 44px; }
  .stop::before { left: 4px; }
}

/* ---------- founder band ---------- */
.founder { display: grid; gap: 32px; }
.founder blockquote { margin: 0; font-family: var(--font-display); font-size: var(--step-3); line-height: 1.15; letter-spacing: -0.015em; font-weight: 400; max-width: 24ch; text-wrap: balance; }
.founder em { font-style: italic; color: var(--accent); }
.founder .about { color: var(--muted-dark); max-width: 48ch; display: grid; gap: 14px; }
.founder .about strong { color: var(--paper); font-weight: 600; }
.founder .about a { color: var(--paper); }
@media (min-width: 900px) { .founder { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 64px; align-items: start; } }

/* ---------- fit: mobile vs shop ---------- */
.fit { display: grid; gap: 0; border: 1px solid var(--line); background: var(--paper); }
.fit > div { padding: clamp(24px, 3.5vw, 44px); }
.fit > div + div { border-top: 1px solid var(--line); }
.fit h3 { margin-top: 10px; }
.fit p { margin-top: 12px; color: var(--muted); }
.fit ul { margin-top: 18px; list-style: none; display: grid; gap: 10px; }
.fit li { padding-left: 22px; position: relative; }
.fit li::before { content: ""; position: absolute; left: 0; top: 0.5em; width: 10px; height: 10px; border: 2px solid var(--ink); border-radius: 2px; }
@media (min-width: 820px) {
  .fit { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .fit > div + div { border-top: 0; border-left: 1px solid var(--line); }
}

/* ---------- pricing ledger ---------- */
.ledger { display: grid; border: 1px solid var(--line-strong); background: var(--paper); }
.ledger-main { padding: clamp(24px, 4vw, 48px); }
.ledger-main .plan { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.price { font-family: var(--font-display); font-size: clamp(3rem, 2rem + 4vw, 5rem); line-height: 1; letter-spacing: -0.02em; font-weight: 500; }
.price-unit { font-size: var(--step-1); color: var(--muted); }
.ledger-main .terms { margin-top: 18px; color: var(--muted); max-width: 44ch; }
.ledger-main .btn-row { margin-top: 28px; }
.ledger-main .btn-note { margin-top: 12px; display: block; }
.ledger-side { border-top: 1px solid var(--line); padding: clamp(24px, 4vw, 48px); background: var(--panel); }
.ledger-side h3 { font-size: var(--step-0); font-family: var(--font-mono); font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.included { list-style: none; margin-top: 18px; columns: 1; display: grid; gap: 0; }
.included li { display: flex; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); font-size: var(--step--1); }
.included li:first-child { border-top: 0; }
.included li::before { content: "✓"; font-family: var(--font-mono); color: var(--good); flex: none; }
@media (min-width: 900px) {
  .ledger { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
  .ledger-side { border-top: 0; border-left: 1px solid var(--line); }
  .included { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; }
  .included li:nth-child(2) { border-top: 0; }
}

/* team-growth table (pricing page) */
.table-wrap { overflow-x: auto; }
table.spec { width: 100%; border-collapse: collapse; font-size: var(--step--1); }
table.spec th, table.spec td { text-align: left; padding: 12px 16px 12px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
table.spec th { font-family: var(--font-mono); font-weight: 500; letter-spacing: .06em; text-transform: uppercase; font-size: 0.72rem; color: var(--muted); }
table.spec td.num, table.spec th.num { text-align: right; padding-right: 0; font-variant-numeric: tabular-nums; }

/* ---------- FAQ ---------- */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 24px; align-items: baseline;
  padding: 20px 0; font-weight: 600; font-size: var(--step-1); line-height: 1.3;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--font-mono); font-size: 1.4rem; color: var(--muted); flex: none; line-height: 1; transition: transform .2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .answer { padding: 0 0 22px; color: var(--muted); max-width: var(--measure); display: grid; gap: 10px; }
.faq .answer a { color: var(--text); }

/* ---------- guides row ---------- */
.guides { list-style: none; display: grid; gap: 0; border-top: 1px solid var(--line); }
.guides li { border-bottom: 1px solid var(--line); }
.guides a { display: grid; gap: 6px; padding: 22px 0; text-decoration: none; }
.guides a:hover h3, .guides a:hover h2 { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.guides h3, .guides h2 { font-size: var(--step-1); font-family: var(--font-body); font-weight: 600; letter-spacing: -0.01em; line-height: 1.25; }
.guides p { color: var(--muted); font-size: var(--step--1); max-width: 60ch; }
@media (min-width: 820px) {
  .guides { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; border-top: 0; }
  .guides li { border-top: 1px solid var(--line); border-bottom: 0; }
}

/* ---------- final CTA ---------- */
.cta-final { text-align: left; }
.cta-final .inner { display: grid; gap: 28px; }
.cta-final h2 { max-width: 16ch; }
.cta-final p { color: var(--muted-dark); max-width: 44ch; }
@media (min-width: 900px) { .cta-final .inner { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: center; } .cta-final .btn-row { justify-content: flex-end; } }

/* ---------- footer ---------- */
.site-footer { background: var(--ink); color: var(--muted-dark); border-top: 1px solid var(--line-dark); font-size: var(--step--1); }
.site-footer .top { display: grid; gap: 36px; padding-block: 56px 40px; }
.site-footer .brand { color: var(--paper); }
.site-footer .tag { margin-top: 14px; max-width: 32ch; }
.site-footer h3 { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--paper); font-weight: 500; margin-bottom: 14px; }
.site-footer ul { list-style: none; display: grid; gap: 10px; }
.site-footer a { color: var(--muted-dark); text-decoration: none; }
.site-footer a:hover { color: var(--paper); }
.site-footer .bottom { border-top: 1px solid var(--line-dark); padding-block: 20px 28px; display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; }
@media (min-width: 820px) { .site-footer .top { grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)); } }

/* ---------- inner page header ---------- */
.page-head { background: var(--ink); color: var(--paper); padding-block: clamp(44px, 6vw, 88px) clamp(40px, 5vw, 72px); }
.page-head .eyebrow { display: block; color: var(--muted-dark); margin-bottom: 18px; }
.page-head h1 { max-width: 16ch; }
.page-head .lead { margin-top: 22px; color: var(--muted-dark); }
.page-head .btn-row { margin-top: 30px; }

/* ---------- features page ---------- */
.feature-index { list-style: none; display: grid; gap: 8px; }
.feature-index a { text-decoration: none; color: var(--muted); display: flex; gap: 10px; align-items: baseline; padding: 4px 0; }
.feature-index a:hover { color: var(--text); }
.feature-index .mono { font-size: 0.75rem; color: var(--muted); }
.feature-group { padding-block: clamp(40px, 5vw, 72px); border-top: 1px solid var(--line); }
.feature-group:first-of-type { border-top: 0; }
.feature-group .intro { max-width: var(--measure); color: var(--muted); margin-top: 14px; }
.feature-list { list-style: none; display: grid; gap: 0; margin-top: 28px; border-top: 1px solid var(--line); }
.feature-list li { display: grid; gap: 6px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.feature-list h3 { font-size: var(--step-0); font-weight: 600; letter-spacing: 0; }
.feature-list p { color: var(--muted); font-size: var(--step--1); max-width: 58ch; }
@media (min-width: 760px) {
  .feature-list { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 40px; }
  .feature-list li:nth-child(2) { border-top: 0; }
}
.feature-visual { margin-top: 32px; padding: clamp(16px, 3vw, 32px); background: var(--panel); border: 1px solid var(--line); }
.feature-visual .illo { max-width: 560px; margin-inline: auto; }

/* ---------- contact ---------- */
.contact-grid { display: grid; gap: 40px; }
@media (min-width: 900px) { .contact-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 64px; } }
.contact-ways { display: grid; gap: 22px; }
.contact-ways dt { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.contact-ways dd { margin: 4px 0 0; font-size: var(--step-1); }
.contact-ways dd small { display: block; font-size: var(--step--1); color: var(--muted); margin-top: 4px; }

form.contact { display: grid; gap: 18px; padding: clamp(20px, 3vw, 36px); border: 1px solid var(--line-strong); background: var(--paper); }
.field { display: grid; gap: 6px; }
.field label { font-weight: 600; font-size: var(--step--1); }
.field .hint { color: var(--muted); font-size: 0.8rem; }
.field input, .field select, .field textarea {
  font: inherit; color: var(--text); background: #fff;
  border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 11px 12px; min-height: 46px; width: 100%;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; border-color: var(--ink); }
.field-row { display: grid; gap: 18px; }
@media (min-width: 640px) { .field-row { grid-template-columns: 1fr 1fr; } }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: var(--step--1); color: var(--muted); }
.check input { width: 18px; height: 18px; margin-top: 3px; flex: none; accent-color: var(--ink); }
.form-status { font-size: var(--step--1); padding: 12px 14px; border: 1px solid var(--line); background: var(--panel); }
.form-note { font-size: 0.8rem; color: var(--muted); }

/* ---------- blog ---------- */
.post-list { list-style: none; display: grid; border-top: 1px solid var(--line); }
.post-list li { border-bottom: 1px solid var(--line); }
.post-list a { display: grid; gap: 10px; padding: 28px 0; text-decoration: none; }
.post-list a:hover h2 { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }
.post-list h2 { font-size: var(--step-2); }
.post-list p { color: var(--muted); max-width: 64ch; }
.post-meta { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); display: flex; gap: 14px; flex-wrap: wrap; }
@media (min-width: 900px) { .post-list a { grid-template-columns: 160px minmax(0, 1fr); gap: 32px; } .post-list a > * { grid-column: 2; } .post-list a .post-meta { grid-column: 1; grid-row: 1 / span 3; display: block; } .post-list a .post-meta span { display: block; margin-bottom: 6px; } }

.article { display: grid; gap: 40px; padding-block: clamp(40px, 6vw, 80px); }
@media (min-width: 1000px) { .article { grid-template-columns: minmax(0, 3fr) minmax(0, 7fr); gap: 64px; } .article aside { position: sticky; top: 96px; align-self: start; } }
.article aside .toc { list-style: none; display: grid; gap: 8px; margin-top: 12px; border-left: 2px solid var(--line); padding-left: 16px; }
.article aside .toc a { text-decoration: none; color: var(--muted); font-size: var(--step--1); }
.article aside .toc a:hover { color: var(--text); }
.prose { max-width: var(--measure); display: grid; gap: 1.1em; font-size: 1.125rem; line-height: 1.65; }
.prose h2 { font-size: var(--step-2); margin-top: 1.2em; font-family: var(--font-body); font-weight: 600; letter-spacing: -0.01em; }
.prose h3 { font-size: var(--step-1); margin-top: .6em; }
.prose ul, .prose ol { padding-left: 1.3em; display: grid; gap: .5em; }
.prose li::marker { color: var(--muted); }
.prose .callout { border-left: 3px solid var(--accent); padding: 14px 18px; background: var(--panel); color: var(--text); font-size: 1rem; }
.prose .callout strong { font-weight: 600; }
.prose table { font-size: 0.95rem; }
.article-head .post-meta { margin-top: 18px; color: var(--muted-dark); }
.article-head h1 { max-width: 22ch; font-size: clamp(2.2rem, 1.4rem + 3vw, 3.75rem); }

/* ---------- affiliates ---------- */
.steps { list-style: none; counter-reset: step; display: grid; gap: 0; border-top: 1px solid var(--line); }
.steps li { counter-increment: step; display: grid; gap: 8px; padding: 22px 0; border-bottom: 1px solid var(--line); grid-template-columns: 56px minmax(0, 1fr); }
.steps li::before { content: counter(step, decimal-leading-zero); font-family: var(--font-mono); color: var(--muted); font-size: 0.85rem; padding-top: 4px; }
.steps h3 { font-size: var(--step-1); }
.steps p { color: var(--muted); grid-column: 2; max-width: 60ch; }
.math { display: grid; gap: 0; border: 1px solid var(--line-strong); }
.math > div { padding: 20px 24px; }
.math > div + div { border-top: 1px solid var(--line); }
.math .eyebrow { display: block; margin-bottom: 6px; }
.math strong { font-family: var(--font-display); font-size: 1.75rem; font-weight: 500; letter-spacing: -0.01em; }
@media (min-width: 760px) { .math { grid-template-columns: repeat(3, minmax(0, 1fr)); } .math > div + div { border-top: 0; border-left: 1px solid var(--line); } }

/* ---------- preview banner (remove for production) ---------- */
.preview-banner { background: var(--ink-2); color: var(--muted-dark); font-size: 0.75rem; text-align: center; padding: 5px var(--gutter); font-family: var(--font-mono); letter-spacing: .04em; text-transform: uppercase; border-bottom: 1px solid var(--line-dark); }
.preview-banner::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-right: 8px; vertical-align: 1px; }
.preview-banner a { color: inherit; }

/* ---------- entrance (homepage, first visit only) ---------- */
.is-entering .ent { animation: ent-rise .7s cubic-bezier(.2, .7, .2, 1) both; animation-delay: var(--d, 0s); }
.is-entering .ent-fade { animation: ent-fade .8s ease both; animation-delay: var(--d, 0s); }
.is-entering .ent-draw { stroke-dasharray: 900; stroke-dashoffset: 900; animation: ent-draw 1s cubic-bezier(.3, .6, .3, 1) .35s forwards; }
@keyframes ent-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes ent-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes ent-draw { to { stroke-dashoffset: 0; } }

/* small reveal for sections as they scroll in (opt-in, JS adds .in-view) */
.js .reveal { opacity: 0; transform: translateY(10px); transition: opacity .5s ease, transform .5s ease; }
.js .reveal.in-view, .no-js .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-delay: 0ms !important; transition-duration: 0.001ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* ---------- print ---------- */
@media print {
  .site-header, .site-footer, .preview-banner, .nav-toggle { display: none; }
  body { background: #fff; color: #000; }
}
