/* Base Brain Build site styles
   Layout: one drawing sheet. Hairline-ruled sections, a system diagram as the
   hero, and an engineering title block as the footer. One accent (cobalt). */

@font-face {
  font-family: "Archivo";
  src: url("/fonts/archivo-var.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("/fonts/source-serif-4-var.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/fonts/ibm-plex-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/fonts/ibm-plex-mono-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  /* Color: light */
  --paper: #eef0f3;        /* the desk around the sheet (wide screens) */
  --sheet: #fbfbfc;        /* the drawing sheet */
  --ink: #111419;          /* text and strong lines */
  --ink-2: #4a5061;        /* secondary text */
  --rule: #d8dce4;         /* hairlines */
  --rule-strong: #7a8294;  /* diagram wires, outlines */
  --cobalt: #2441c2;       /* the one accent */
  --cobalt-wash: #e9edfc;  /* accent tint */
  --on-cobalt: #ffffff;
  --panel: #2441c2;        /* contact block */
  --on-panel: #ffffff;
  --panel-2: #c9d2ff;      /* secondary text on the panel */
  --panel-rule: rgba(255, 255, 255, 0.55);

  /* Type */
  --font-display: "Archivo", "Helvetica Neue", Arial, system-ui, sans-serif;
  --font-body: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --step--2: 0.75rem;                                   /* 12px captions */
  --step--1: 0.8125rem;                                 /* 13px labels */
  --step-0: 1.0625rem;                                  /* 17px body */
  --step-1: 1.25rem;                                    /* 20px lede, h3 */
  --step-2: clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem);     /* h2 */
  --step-3: clamp(2.4rem, 1.5rem + 3.2vw, 3.9rem);      /* h1 */

  /* Space */
  --gutter: 16px;
  --pad: 0px;
  --section: clamp(56px, 8vw, 112px);
  --radius: 3px;

  --bg: var(--sheet);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #07090c;
    --sheet: #101318;
    --ink: #e8ebf1;
    --ink-2: #a0a7b6;
    --rule: #252a34;
    --rule-strong: #6a7388;
    --cobalt: #93a5ff;
    --cobalt-wash: #1a2140;
    --on-cobalt: #0b0e14;
    --panel: #1b2560;
    --on-panel: #eef1ff;
    --panel-2: #b8c3ff;
    --panel-rule: rgba(238, 241, 255, 0.45);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #07090c;
  --sheet: #101318;
  --ink: #e8ebf1;
  --ink-2: #a0a7b6;
  --rule: #252a34;
  --rule-strong: #6a7388;
  --cobalt: #93a5ff;
  --cobalt-wash: #1a2140;
  --on-cobalt: #0b0e14;
  --panel: #1b2560;
  --on-panel: #eef1ff;
  --panel-2: #b8c3ff;
  --panel-rule: rgba(238, 241, 255, 0.45);
  color-scheme: dark;
}

@media (min-width: 960px) {
  :root {
    --gutter: 28px;
    --pad: clamp(40px, 4.5vw, 72px);
    --bg: var(--paper);
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  padding-inline: var(--gutter);
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  text-wrap: balance;
}
h1 {
  font-size: var(--step-3);
  font-weight: 760;
  font-stretch: 112%;
  line-height: 1.02;
  letter-spacing: -0.022em;
}
h2 {
  font-size: var(--step-2);
  font-weight: 720;
  font-stretch: 110%;
  line-height: 1.1;
  letter-spacing: -0.012em;
}
h3 {
  font-size: var(--step-1);
  font-weight: 650;
  font-stretch: 104%;
  line-height: 1.25;
}
p { margin: 0; text-wrap: pretty; }

a { color: var(--cobalt); text-decoration-thickness: 1px; text-underline-offset: 3px; }

::selection { background: var(--cobalt-wash); color: var(--ink); }

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

.skip {
  position: absolute;
  left: -9999px;
  top: 12px;
  z-index: 100;
  padding: 8px 12px;
  background: var(--sheet);
  color: var(--ink);
  border: 1px solid var(--ink);
}
.skip:focus { left: 16px; }

/* Small uppercase label with a drafting lead line */
.label {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.label::before {
  content: "";
  width: 24px;
  height: 1px;
  background: currentColor;
}

.mono-title {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
}

/* ---------- Sheet ---------- */
.sheet {
  max-width: 1240px;
  margin-inline: auto;
}
@media (min-width: 960px) {
  .sheet {
    margin-block: 28px;
    background: var(--sheet);
    border: 1px solid var(--rule);
  }
}
.site-header,
.hero,
.section,
.site-footer {
  padding-inline: var(--pad);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--sheet);
  border-bottom: 1px solid var(--rule);
}
.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 68px;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  font-stretch: 116%;
  letter-spacing: -0.01em;
}
.mark {
  width: 30px;
  height: 30px;
  flex: none;
}
.mark-ink { stroke: var(--ink); }
.mark-accent { stroke: var(--cobalt); }
.nav-list {
  display: flex;
  align-items: center;
  gap: 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.nav-link {
  color: var(--ink);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 540;
}
.nav-link:hover { color: var(--cobalt); }
@media (max-width: 1023px) {
  .nav-item { display: none; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 20px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 620;
  font-stretch: 106%;
  line-height: 1;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn svg { flex: none; }
.btn-primary { background: var(--cobalt); color: var(--on-cobalt); }
.btn-primary:hover { background: color-mix(in srgb, var(--cobalt) 84%, var(--ink)); }
.btn-ghost { color: var(--ink); border-color: var(--rule-strong); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-sm { padding: 10px 14px; font-size: 0.9375rem; }

/* ---------- Hero ---------- */
.hero {
  padding-block: clamp(44px, 7vw, 96px) clamp(48px, 7vw, 88px);
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 48px;
  align-items: center;
}
@media (min-width: 1200px) {
  .hero-grid {
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    gap: clamp(40px, 4vw, 64px);
  }
}
.hero-copy {
  display: grid;
  gap: 24px;
  justify-items: start;
  min-width: 0;
}
.lede {
  max-width: 31em;
  color: var(--ink-2);
  font-size: var(--step-1);
  line-height: 1.55;
}
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 4px;
}
.stack-line {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  color: var(--ink-2);
}
.stack-line span,
.stack span { white-space: nowrap; }

/* ---------- Diagram ---------- */
.diagram { margin: 0; min-width: 0; width: 100%; max-width: 620px; }
@media (min-width: 1200px) { .diagram { max-width: none; } }
.diagram svg { display: block; width: 100%; height: auto; }
.diagram .tall { display: none; }
@media (max-width: 599px) {
  .diagram .wide { display: none; }
  .diagram .tall { display: block; }
}
.diagram figcaption {
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: var(--step--2);
  color: var(--ink-2);
}
.dg-dot { fill: var(--rule); }
.dg-node { fill: var(--sheet); stroke: var(--rule-strong); stroke-width: 1; }
.dg-core { fill: var(--cobalt-wash); stroke: var(--cobalt); stroke-width: 1.5; }
.dg-hair { stroke: var(--cobalt); stroke-width: 1; opacity: 0.35; }
.dg-wire { fill: none; stroke: var(--rule-strong); stroke-width: 1.25; }
.dg-arrow { fill: var(--rule-strong); }
.dg-label {
  fill: var(--ink);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 640;
  font-stretch: 104%;
}
.tall .dg-label { font-size: 13px; }
.dg-sub { fill: var(--ink-2); font-family: var(--font-mono); font-size: 11px; }
.tall .dg-sub { font-size: 11.5px; }
.dg-kicker {
  fill: var(--cobalt);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.14em;
}
.dg-packet { fill: var(--cobalt); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .dg-packet { display: none; }
}

/* ---------- Facts strip (proof without logos) ---------- */
.facts-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--rule);
}
.fact {
  display: grid;
  gap: 6px;
  align-content: start;
  min-width: 0;
  padding-block: 22px;
  border-bottom: 1px solid var(--rule);
}
.fact strong {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 680;
  font-stretch: 106%;
}
.fact span { color: var(--ink-2); font-size: 0.9375rem; line-height: 1.5; }
@media (min-width: 640px) {
  .facts-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fact:nth-child(odd) { padding-right: 28px; }
  .fact:nth-child(even) { padding-left: 28px; border-left: 1px solid var(--rule); }
}
@media (min-width: 1040px) {
  .facts-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: 1px solid var(--rule); }
  .fact { border-bottom: 0; padding: 24px 28px; }
  .fact:first-child { padding-left: 0; }
  .fact + .fact { border-left: 1px solid var(--rule); }
  .fact:nth-child(odd), .fact:nth-child(even) { padding-inline: 28px; }
  .fact:first-child { padding-left: 0; }
}

/* ---------- Sections ---------- */
.section {
  padding-block: var(--section);
  border-top: 1px solid var(--rule);
}
.section-head {
  display: grid;
  gap: 16px;
  justify-items: start;
  max-width: 46rem;
  margin-bottom: clamp(32px, 4.5vw, 56px);
}
.section-head p { color: var(--ink-2); }

/* Services: a ruled grid, like cells on a drawing */
.services {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--rule);
}
.service {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  padding-block: 28px;
  border-bottom: 1px solid var(--rule);
}
@media (min-width: 760px) {
  .services {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-left: 1px solid var(--rule);
  }
  .service {
    padding: clamp(24px, 3vw, 36px);
    border-right: 1px solid var(--rule);
  }
}
.service-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.icon {
  width: 28px;
  height: 28px;
  color: var(--cobalt);
  flex: none;
}
.service p { color: var(--ink-2); max-width: 34em; }
.dash-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.dash-list li {
  position: relative;
  padding-left: 20px;
}
.dash-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.8em;
  width: 10px;
  height: 1px;
  background: var(--cobalt);
}
.stack {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px dashed var(--rule);
  font-family: var(--font-mono);
  font-size: var(--step--1);
  color: var(--ink-2);
}

/* Selected work */
.work {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--rule);
}
.project {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px 56px;
  padding-block: 32px;
  border-bottom: 1px solid var(--rule);
}
.project { grid-template-areas: "title" "meta" "body"; }
.project-title { grid-area: title; }
.meta { grid-area: meta; }
.project-body { grid-area: body; }
@media (min-width: 760px) {
  .project {
    grid-template-columns: 220px minmax(0, 1fr);
    grid-template-areas: "meta title" "meta body";
    row-gap: 12px;
  }
}
.meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 24px;
  align-content: start;
  margin: 0;
}
@media (min-width: 760px) {
  .meta { grid-template-columns: minmax(0, 1fr); }
}
.meta dt,
.tb-label {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.meta dd {
  margin: 4px 0 0;
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 540;
}
.project-body {
  display: grid;
  gap: 12px;
  min-width: 0;
  max-width: 46rem;
}
.project-body p { color: var(--ink-2); }
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
}
.tags li {
  padding: 5px 9px;
  border: 1px solid var(--rule);
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: var(--step--2);
  color: var(--ink-2);
}
.note {
  margin-top: 20px;
  font-family: var(--font-mono);
  font-size: var(--step--2);
  color: var(--ink-2);
}

/* How we work: engagement models */
.engage {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  margin: 0 0 clamp(48px, 6vw, 80px);
  padding: 0;
  list-style: none;
}
@media (min-width: 760px) {
  .engage { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.model {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  padding: clamp(22px, 3vw, 34px);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}
.model-best {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  color: var(--cobalt);
}
.model p { color: var(--ink-2); }
.check-list {
  display: grid;
  gap: 10px;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
}
.check-list li {
  position: relative;
  padding-left: 26px;
}
.check-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.42em;
  width: 11px;
  height: 6px;
  border-left: 1.5px solid var(--cobalt);
  border-bottom: 1.5px solid var(--cobalt);
  transform: rotate(-45deg);
}
.always {
  margin: 0 0 clamp(48px, 6vw, 80px);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px 28px;
  padding: 0;
  list-style: none;
  font-family: var(--font-mono);
  font-size: var(--step--1);
  color: var(--ink-2);
}
.always li { position: relative; padding-left: 18px; }
.always li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 7px;
  height: 7px;
  border: 1.5px solid var(--cobalt);
}

/* Process: a real sequence, drawn as nodes on one line */
.steps {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 32px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
@media (min-width: 640px) {
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 32px; }
}
@media (min-width: 1040px) {
  .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; }
  .step { padding-right: 32px; }
}
.step {
  position: relative;
  display: grid;
  gap: 10px;
  align-content: start;
  padding-top: 26px;
  border-top: 1px solid var(--ink);
  counter-increment: step;
}
.step::before {
  content: "";
  position: absolute;
  top: -5px;
  left: 0;
  width: 9px;
  height: 9px;
  background: var(--sheet);
  border: 1.5px solid var(--cobalt);
}
.step-no::before { content: counter(step, decimal-leading-zero); }
.step-no {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  font-weight: 500;
  color: var(--cobalt);
}
.step p { color: var(--ink-2); }
.sub-head { margin-bottom: 28px; }

/* FAQ */
.faq {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--rule);
  max-width: 52rem;
}
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 20px;
  cursor: pointer;
  list-style: none;
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 620;
  font-stretch: 104%;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  flex: none;
  width: 12px;
  height: 12px;
  background:
    linear-gradient(var(--cobalt), var(--cobalt)) center / 12px 1.5px no-repeat,
    linear-gradient(var(--cobalt), var(--cobalt)) center / 1.5px 12px no-repeat;
  transition: transform 0.2s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p {
  padding: 0 0 22px;
  max-width: 44rem;
  color: var(--ink-2);
}
@media (prefers-reduced-motion: reduce) {
  .faq summary::after { transition: none; }
}

/* Contact: the one set-off block */
.contact { border-top: 0; padding-top: 0; }
.panel {
  display: grid;
  gap: 22px;
  justify-items: start;
  padding: clamp(28px, 5.5vw, 72px);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--on-panel);
}
.panel-copy,
.panel-actions {
  display: grid;
  gap: 22px;
  justify-items: start;
  min-width: 0;
}
@media (min-width: 900px) {
  .panel {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: clamp(40px, 5vw, 72px);
    align-items: end;
  }
  .panel .email { font-size: clamp(1.5rem, 0.7rem + 1.5vw, 2rem); }
}
.panel .label { color: var(--panel-2); }
.panel h2 { color: var(--on-panel); max-width: 16ch; }
.panel p { color: var(--panel-2); max-width: 34rem; }
.panel :focus-visible { outline-color: var(--on-panel); }
.email {
  max-width: 100%;
  color: var(--on-panel);
  font-family: var(--font-display);
  font-size: clamp(1.375rem, 0.9rem + 2.2vw, 2.25rem);
  font-weight: 680;
  font-stretch: 108%;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 7px;
  overflow-wrap: anywhere;
}
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.chip {
  display: inline-flex;
  padding: 10px 14px;
  border: 1px solid var(--panel-rule);
  border-radius: var(--radius);
  color: var(--on-panel);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 560;
}
.chip:hover { border-color: var(--on-panel); }

/* ---------- Footer: title block ---------- */
.site-footer {
  padding-block: 0 clamp(28px, 4vw, 44px);
}
.titleblock {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
}
@media (min-width: 760px) {
  .titleblock { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 1040px) {
  .titleblock { grid-template-columns: minmax(0, 1.4fr) repeat(4, minmax(0, 1fr)); }
}
.tb-cell {
  display: grid;
  gap: 6px;
  align-content: start;
  min-width: 0;
  padding: 16px 18px;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.tb-cell dd { margin: 0; }
.tb-name { grid-column: 1 / -1; }
@media (min-width: 1040px) {
  .tb-name { grid-column: auto; }
}
.tb-value {
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 560;
  font-variant-numeric: tabular-nums;
}
.tb-mark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 800;
  font-stretch: 116%;
}
.tb-mark .mark { width: 24px; height: 24px; }
.tb-sub {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}

/* ---------- 404 ---------- */
.notfound {
  display: grid;
  gap: 22px;
  justify-items: start;
  padding-block: clamp(72px, 12vw, 160px);
}
.notfound p { color: var(--ink-2); max-width: 34rem; }

.step h4 {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-weight: 650;
  font-stretch: 104%;
  line-height: 1.25;
}

/* Separators stay at the end of a line when a stack list wraps */
.stack-line span:not(:last-child)::after,
.stack span:not(:last-child)::after { content: "\00a0\00b7"; content: "\00a0\00b7" / ""; }

.facts-strip { margin-top: clamp(40px, 6vw, 72px); }

/* Services: one lead service across the full width, then a 2 x 2 grid */
@media (min-width: 760px) {
  .service-lead { grid-column: 1 / -1; }
}
.service-lead { display: grid; gap: 14px 56px; }
@media (min-width: 900px) {
  .service-lead { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: start; }
}
.lead-main,
.lead-side {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}
.service-lead h3 {
  font-size: clamp(1.5rem, 1.1rem + 1.2vw, 2rem);
  font-weight: 720;
  font-stretch: 110%;
}
.service-lead .lead-main p { font-size: var(--step-1); line-height: 1.55; }
.service-lead .stack { margin-top: 8px; }

/* Secondary: what we build on top */
.also {
  display: grid;
  gap: 20px 56px;
  margin-top: clamp(40px, 5vw, 64px);
  padding-top: 28px;
  border-top: 1px solid var(--rule);
}
@media (min-width: 900px) {
  .also { grid-template-columns: minmax(0, 0.8fr) minmax(0, 2fr); }
}
.also-head { display: grid; gap: 8px; align-content: start; }
.also-head h3 { font-size: 1.125rem; }
.also-head p { color: var(--ink-2); font-size: 0.9375rem; line-height: 1.5; }
.also-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px 32px;
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 640px) {
  .also-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.also-list li { display: grid; gap: 4px; align-content: start; min-width: 0; }
.also-list strong {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 650;
  font-stretch: 104%;
}
.also-list span { color: var(--ink-2); font-size: 0.9375rem; line-height: 1.5; }

/* Entry offer: Architecture Review */
.offer {
  display: grid;
  gap: 28px 56px;
  padding: clamp(24px, 4vw, 48px);
  border: 1px solid var(--cobalt);
  border-radius: var(--radius);
  background: var(--cobalt-wash);
}
@media (min-width: 900px) {
  .offer { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
}
.offer-main { display: grid; gap: 16px; justify-items: start; min-width: 0; }
.offer-for { max-width: 30em; font-size: var(--step-1); line-height: 1.5; }
.offer-length {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  color: var(--ink-2);
}
.offer-side { display: grid; gap: 14px; align-content: start; min-width: 0; }

/* Project title with an optional status */
.project-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}
.status {
  padding: 2px 7px;
  border: 1px solid var(--cobalt);
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: var(--step--2);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cobalt);
}

/* ---------- Review fixes ---------- */
.wide .dg-sub { font-size: 12px; }
.dg-kicker { font-size: 11px; }
@media (max-width: 599px) {
  .diagram .tall { max-width: 420px; }
}

/* Cards in the same row share row tracks, so their parts line up */
@media (min-width: 760px) {
  .service:not(.service-lead) {
    display: grid;
    grid-row: span 6;
    grid-template-rows: subgrid;
    row-gap: 14px;
  }
  .service:not(.service-lead) .stack { margin-top: 0; }
  .model {
    display: grid;
    grid-row: span 5;
    grid-template-rows: subgrid;
    row-gap: 14px;
  }
}
.model .model-best { color: var(--cobalt); }

@media (min-width: 640px) {
  .always { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1040px) {
  .always { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* Touch targets */
.nav-link { display: inline-block; padding-block: 12px; }
@media (max-width: 600px) {
  .btn-sm { padding-block: 14px; }
  .wordmark { min-height: 44px; }
  .email { display: inline-block; padding-block: 4px; }
}

/* Wrapping */
.label { align-items: flex-start; }
.label::before { margin-top: 0.8em; flex: none; }
.faq summary { text-wrap: balance; }
.check-list li { text-wrap: pretty; }
@media (max-width: 480px) {
  .links li { flex: 1 1 auto; }
  .chip { width: 100%; justify-content: center; }
}
@media (max-width: 400px) {
  .stack span,
  .stack-line span { white-space: normal; }
}
@media (max-width: 759px) {
  .also { border-top: 0; padding-top: 0; }
}

/* Windows high contrast: draw the FAQ marker as text */
@media (forced-colors: active) {
  .faq summary::after {
    content: "+";
    width: auto;
    height: auto;
    background: none;
  }
  .faq details[open] summary::after {
    content: "\2212";
    transform: none;
  }
}

/* Lists keep their natural spacing when a subgrid row is taller */
.dash-list,
.check-list { align-content: start; }

/* Longer wordmark: keep the header on one line on phones */
.wordmark { white-space: nowrap; }
.site-header .btn-sm { white-space: nowrap; }
@media (max-width: 480px) {
  .wordmark { font-size: 1.0625rem; font-stretch: 100%; gap: 8px; }
  .wordmark .mark { width: 26px; height: 26px; }
}
@media (max-width: 359px) {
  .bar { gap: 12px; }
  .wordmark { font-size: 0.9375rem; }
  .site-header .btn-sm { padding-inline: 12px; }
}
