/* Hallmark · macrostructure: Workbench · theme: Cobalt · genre: modern-minimal · nav: N1b · footer: Ft2 · tone: technical · anchor hue: cobalt
   knobs — nav: 3 centre links · no dropdowns · always-solid · text+fill CTA pair
         — hero: H2 split diptych 7/5, left-biased · code-as-screenshot (plain pre, hairline border, no chrome)
         — heads: S2 hanging, stacked single column, zero eyebrows
         — radii: 6px controls / 10px code cards · type scale 1.25 · spacing 4pt scale
         — motion: 3 primitives (hero one-shot load reveal · copy-label swap · hover lift/underline) · ease-out only
         — dark beat: one graphite band (quick start) — light page with one dark band
   slop-test — contrast: pass (40–41) · slop: pass (42–45) · honest: pass (46) · chrome: pass (47)
             · tokens: pass (48) · responsive: pass (49) · icons: pass (30) · mobile: pass (34, 49, 50–57) */
/* Hallmark · pre-emit critique: P4 H4 E4 S4 R4 V4 */


*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: clip; scroll-behavior: smooth; }
body {
  margin: 0;
  overflow-x: clip;
  background: var(--color-paper);
  color: var(--color-ink-2);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

h1, h2, h3 {
  font-family: var(--font-display);
  font-style: normal; /* headings roman, always */
  color: var(--color-ink);
  letter-spacing: -0.025em;
  line-height: 1.12;
  margin: 0;
  overflow-wrap: anywhere;
  min-width: 0;
}
p { margin: 0; }
a { color: inherit; }
::selection { background: color-mix(in oklch, var(--color-accent) 18%, transparent); }

:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 3px;
  border-radius: 2px;
  transition: none; /* focus rings never animate */
}
.band :focus-visible { outline-color: var(--color-focus-dark); }

.wrap {
  max-width: var(--page-max);
  margin-inline: auto;
  padding-inline: var(--page-gutter);
}

/* ---------- Nav · N1b canonical SaaS three-section (always-solid knob) ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  background: color-mix(in oklch, var(--color-paper) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-rule);
}
.nav__inner {
  max-width: var(--page-max);
  margin-inline: auto;
  padding-inline: var(--page-gutter);
  height: 64px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}
.nav__brand {
  justify-self: start;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--color-ink);
  text-decoration: none;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
}
.nav__brand::before {
  content: "";
  width: 0.55em;
  height: 0.55em;
  border-radius: 2px;
  background: var(--color-accent);
}
.nav__center { justify-self: center; display: flex; gap: var(--space-2xs); }
.nav__right { justify-self: end; display: flex; align-items: center; gap: var(--space-sm); }
.nav__link {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-ink-2);
  text-decoration: none;
  white-space: nowrap;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-ctrl);
  background-image: linear-gradient(var(--color-accent), var(--color-accent));
  background-repeat: no-repeat;
  background-size: 0 1.5px;
  background-position: var(--space-sm) calc(100% - 0.375rem);
  transition: background-size var(--dur-short) var(--ease-out), color var(--dur-short) var(--ease-out);
}
.nav__link:hover { color: var(--color-ink); background-size: calc(100% - 1.5rem) 1.5px; }
.nav__link:active, .link-quiet:active { opacity: 0.75; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4em;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  border-radius: var(--radius-ctrl);
  min-height: 40px;
  padding: var(--space-xs) var(--space-md);
  transition: background-color var(--dur-short) var(--ease-out),
              border-color var(--dur-short) var(--ease-out),
              transform var(--dur-micro) var(--ease-out);
}
.btn:active { transform: translateY(1px); }
.btn--accent { background: var(--color-accent); color: var(--color-accent-ink); border: 1px solid var(--color-accent); }
.btn--accent:hover { background: var(--color-accent-deep); border-color: var(--color-accent-deep); }
.btn--text { color: var(--color-ink-2); border: 1px solid transparent; padding-inline: var(--space-sm); }
.btn--text:hover { color: var(--color-ink); }

/* C1 outlined chip */
.cta-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--color-ink);
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid var(--color-ink);
  border-radius: var(--radius-ctrl);
  min-height: 44px;
  padding: var(--space-sm) 1.25rem;
  transition: border-color var(--dur-short) var(--ease-out),
              color var(--dur-short) var(--ease-out),
              transform var(--dur-micro) var(--ease-out);
}
.cta-outline:hover { border-color: var(--color-accent); color: var(--color-accent-deep); }
.cta-outline:active { transform: translateY(1px); }

.link-quiet {
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--color-ink-2);
  text-decoration: none;
  white-space: nowrap;
  padding-block: var(--space-sm);
  background-image: linear-gradient(var(--color-accent), var(--color-accent));
  background-repeat: no-repeat;
  background-size: 0 1.5px;
  background-position: 0 calc(100% - 0.5rem);
  transition: background-size var(--dur-short) var(--ease-out), color var(--dur-short) var(--ease-out);
}
.link-quiet:hover { color: var(--color-ink); background-size: 100% 1.5px; }

/* ---------- Hero · H2 split diptych 7/5 ---------- */
.hero {
  /* bottom-heavier padding pulls the hero into the page (gate 44a) */
  padding-block: var(--space-2xl) var(--space-3xl);
}
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: var(--space-2xl);
  align-items: center;
}
.hero h1 {
  font-size: var(--text-display);
  font-weight: 600;
}
.hero__lede {
  margin-top: var(--space-lg);
  font-size: var(--text-md);
  line-height: 1.55;
  max-width: 34rem;
}
.hero__lede strong { font-weight: 600; color: var(--color-ink); }
.hero__actions {
  margin-top: var(--space-xl);
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  flex-wrap: wrap;
}

/* one-shot page-load reveal — the page's single orchestrated entrance */
.reveal {
  opacity: 0;
  transform: translateY(10px);
  animation: reveal var(--dur-long) var(--ease-out) forwards;
  animation-delay: calc(var(--i, 0) * 70ms);
}
@keyframes reveal { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .reveal { animation: none; opacity: 1; transform: none; }
}

/* ---------- Code figures — plain pre, hairline border, no chrome (gate 47) ---------- */
.code-fig { margin: 0; min-width: 0; }
.code-fig figcaption {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-neutral);
  padding-bottom: var(--space-xs);
  border-bottom: 1px solid var(--color-rule);
  margin-bottom: var(--space-sm);
  display: flex;
  justify-content: space-between;
  gap: var(--space-md);
}
.code-fig figcaption .pkg { text-transform: none; letter-spacing: 0; color: var(--color-accent-deep); }
pre.code {
  margin: 0;
  background: var(--color-graphite);
  border: 1px solid var(--color-graphite-rule);
  border-radius: var(--radius-code);
  box-shadow: 0 1px 2px var(--color-shadow);
  padding: var(--space-lg);
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.65;
  color: var(--color-code-ink);
  tab-size: 2;
}
pre.code code { font-family: inherit; }
.tk-d { color: var(--color-code-accent); }   /* decorators, keywords */
.tk-s { color: var(--color-code-str); }      /* strings, templates */
.tk-m { color: var(--color-code-muted); }    /* punctuation, comments */

/* ---------- T4 numbered stat strip ---------- */
.stat-strip {
  border-block: 1px solid var(--color-rule);
  padding-block: var(--space-xl);
}
.stat-strip__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-lg);
  font-variant-numeric: tabular-nums;
}
.stat-strip__grid > div { border-left: 1px solid var(--color-rule); padding-left: var(--space-lg); min-width: 0; }
.stat-strip__grid > div:first-child { border-left: 0; padding-left: 0; }
.stat-strip b {
  display: block;
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--color-ink);
  line-height: 1.1;
}
.stat-strip span {
  display: block;
  margin-top: var(--space-2xs);
  font-size: var(--text-sm);
  color: var(--color-neutral);
}

/* ---------- Sections · S2 hanging heads ---------- */
.head-hang { padding-block: var(--space-3xl) var(--space-xl); }
.head-hang h2 { font-size: var(--text-2xl); font-weight: 600; max-width: 24ch; }
.head-hang .sub {
  margin-top: var(--space-md);
  max-width: 58ch;
  font-size: var(--text-md);
  line-height: 1.55;
  color: var(--color-ink-2);
}
.head-hang .sub code, .step p code, .spec-note code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--color-paper-2);
  border: 1px solid var(--color-rule);
  border-radius: 4px;
  padding: 0.1em 0.35em;
  white-space: nowrap;
}

/* Workbench tour steps — code block is the screenshot, caption beside it */
.step {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: var(--space-2xl);
  align-items: start;
  padding-block: var(--space-xl) var(--space-2xl);
  border-top: 1px solid var(--color-rule);
}
.step:nth-of-type(even) { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); }
.step:nth-of-type(even) .step__text { order: 2; }
.step h3 { font-size: var(--text-lg); font-weight: 600; }
.step p { margin-top: var(--space-sm); line-height: 1.6; max-width: 48ch; }
.step p + p { margin-top: var(--space-sm); }
.step .fine { font-size: var(--text-sm); color: var(--color-neutral); }

/* ---------- F3 tabular spec sheet ---------- */
.spec-scroll { overflow-x: auto; border: 1px solid var(--color-rule); border-radius: var(--radius-code); }
table.spec-sheet {
  width: 100%;
  min-width: 44rem;
  border-collapse: collapse;
  font-size: var(--text-sm);
  font-variant-numeric: tabular-nums;
}
.spec-sheet th, .spec-sheet td {
  text-align: left;
  vertical-align: top;
  padding: var(--space-sm) var(--space-lg);
  border-top: 1px solid var(--color-rule);
}
.spec-sheet thead th {
  border-top: 0;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-neutral);
  background: var(--color-paper-2);
}
.spec-sheet tbody th {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.8rem;
  color: var(--color-ink);
  white-space: nowrap;
}
.spec-sheet td.note { color: var(--color-neutral); }
.spec-sheet tbody tr:hover { background: var(--color-paper-2); }
.spec-note {
  margin-top: var(--space-lg);
  font-size: var(--text-sm);
  color: var(--color-neutral);
  max-width: 62ch;
}

/* ---------- Quick start · the one dark graphite band ---------- */
.band {
  margin-top: var(--space-3xl);
  background: var(--color-graphite);
  color: var(--color-code-ink);
  border-block: 1px solid var(--color-graphite-rule);
}
.band__inner {
  max-width: var(--page-max);
  margin-inline: auto;
  padding: var(--space-3xl) var(--page-gutter);
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: var(--space-2xl);
  align-items: center;
}
.band h2 { color: var(--color-code-str); font-size: var(--text-2xl); font-weight: 600; }
.band p { margin-top: var(--space-md); max-width: 40ch; color: var(--color-code-muted); }
.band__actions { margin-top: var(--space-xl); display: flex; align-items: center; gap: var(--space-lg); flex-wrap: wrap; }
.band .cta-outline { color: var(--color-code-str); border-color: var(--color-code-muted); }
.band .cta-outline:hover { border-color: var(--color-code-accent); color: var(--color-code-accent); }
.band .link-quiet { color: var(--color-code-muted); }
.band .link-quiet:hover { color: var(--color-code-str); }

.install {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  background: var(--color-graphite-2);
  border: 1px solid var(--color-graphite-rule);
  border-radius: var(--radius-code);
  padding: var(--space-md) var(--space-lg);
  font-family: var(--font-mono);
  font-size: 0.95rem;
  min-width: 0;
}
.install code { overflow-x: auto; white-space: nowrap; flex: 1; padding-block: var(--space-2xs); }
.install .ps1 { color: var(--color-code-muted); user-select: none; }
.install .cmd { color: var(--color-code-str); }
.install .pkg { color: var(--color-code-accent); }
.install yn-copy { flex-shrink: 0; }

/* full catalog under the curated spec sheet */
.explorer-head {
  margin-top: var(--space-2xl);
  padding-bottom: var(--space-md);
}
.explorer-head h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
}
.explorer-head p {
  margin-top: var(--space-xs);
  font-size: var(--text-sm);
  color: var(--color-neutral);
  max-width: 62ch;
}

/* ---------- Footer · Ft2 inline rule single line ---------- */
.foot-line {
  border-top: 1px solid var(--color-rule);
  margin-top: var(--space-3xl);
}
.foot-line p {
  max-width: var(--page-max);
  margin-inline: auto;
  padding: var(--space-lg) var(--page-gutter) max(var(--space-lg), env(safe-area-inset-bottom));
  font-size: var(--text-sm);
  color: var(--color-neutral);
  display: flex;
  flex-wrap: wrap;
  column-gap: var(--space-xs);
  row-gap: var(--space-2xs);
}
.foot-line .brand { font-family: var(--font-display); font-weight: 600; color: var(--color-ink); }
.foot-line a { color: var(--color-ink-2); text-decoration: none; white-space: nowrap; }
.foot-line a:hover { color: var(--color-accent-deep); }

/* ---------- Responsive ---------- */
@media (max-width: 56rem) {
  .nav__center { display: none; }
  .hero { padding-block: var(--space-2xl); }
  .hero__grid { grid-template-columns: minmax(0, 1fr); gap: var(--space-xl); }
  .step, .step:nth-of-type(even) { grid-template-columns: minmax(0, 1fr); gap: var(--space-lg); }
  .step:nth-of-type(even) .step__text { order: 0; }
  .band__inner { grid-template-columns: minmax(0, 1fr); gap: var(--space-xl); padding-block: var(--space-2xl); }
  .head-hang { padding-block: var(--space-2xl) var(--space-lg); }
}
@media (max-width: 40rem) {
  .stat-strip__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: var(--space-xl); }
  .stat-strip__grid > div:nth-child(3) { border-left: 0; padding-left: 0; }
  .nav__link, .btn, .cta-outline, .link-quiet { min-height: 44px; }
  .nav__link { display: inline-flex; align-items: center; }
  .nav__brand { min-height: 44px; }
  .foot-line a { display: inline-flex; align-items: center; min-height: 44px; }
  .foot-line p { align-items: center; }
  .btn--text { display: none; } /* GitHub link lives in the footer too */
  pre.code { padding: var(--space-md); font-size: 0.8rem; }
  .install { flex-wrap: wrap; }
}

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