* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); }

.shell { max-width: var(--measure); margin: 0 auto; padding: var(--space-5) var(--space-4) var(--space-6); }

/* ── masthead ─────────────────────────────────────────── */
.masthead {
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(6px);
  position: sticky; top: 0; z-index: 40;
}
.masthead__inner {
  max-width: var(--measure); margin: 0 auto;
  padding: var(--space-3) var(--space-4);
  display: flex; align-items: center; gap: var(--space-4);
}
.wordmark {
  font-weight: 650; letter-spacing: -0.01em; text-decoration: none;
  color: var(--ink);
  display: inline-flex; align-items: center; gap: var(--space-2);
}
/* Height is fixed and width follows, so a logo that is wider than it is
   tall does not shove the navigation sideways. A bitmap supplied at 2x
   or 3x is scaled down by the browser, which is what keeps it sharp on
   a high-resolution screen. */
.wordmark__logo {
  height: 28px;
  width: auto;
  display: block;
  /* Chrome otherwise softens a downscaled PNG more than it needs to. */
  image-rendering: -webkit-optimize-contrast;
}
.masthead nav { margin-left: auto; display: flex; align-items: center; gap: var(--space-3); }
.masthead nav a { color: var(--ink-muted); text-decoration: none; font-size: var(--step--1); font-weight: 550; }
.masthead nav a:hover { color: var(--ink); }
/* The rule above outranks .btn on specificity, which left the header's
   primary action as invisible text on a teal fill. */
.masthead nav a.btn { color: #fff; }
.masthead nav a.btn:hover { color: #fff; }

/* ── type ─────────────────────────────────────────────── */
h1 { font-size: var(--step-3); line-height: 1.15; letter-spacing: -0.02em; font-weight: 620; }
h2 { font-size: var(--step-2); line-height: 1.25; letter-spacing: -0.01em; font-weight: 600; }
h3 { font-size: var(--step-1); font-weight: 600; }
.lede { color: var(--ink-muted); font-size: var(--step-1); max-width: 58ch; margin-top: var(--space-3); }
.eyebrow {
  font-family: var(--font-mono); font-size: var(--step--1);
  text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-muted);
}
.muted { color: var(--ink-muted); }
.mono  { font-family: var(--font-mono); }

/* ── surfaces ─────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  box-shadow: var(--shadow-1);
}
.card + .card { margin-top: var(--space-3); }
.stack > * + * { margin-top: var(--space-3); }
.row { display: flex; gap: var(--space-3); align-items: center; flex-wrap: wrap; }
.grid { display: grid; gap: var(--space-3); grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

/* ── controls ─────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: var(--space-2);
  border-radius: var(--radius-pill);
  padding: 0.62rem 1.2rem; font-size: var(--step-0); font-weight: 600;
  border: 1px solid var(--primary); background: var(--primary); color: #fff;
  text-decoration: none; cursor: pointer;
  box-shadow: var(--shadow-1);
  transition: transform var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease),
              background-color var(--dur) var(--ease),
              border-color var(--dur) var(--ease),
              color var(--dur) var(--ease);
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-2); }
/* Pressing returns it past its resting place, which is what makes a
   button feel like it was pushed rather than merely clicked. */
.btn:active { transform: translateY(0); box-shadow: var(--shadow-1); }
.btn--quiet { background: var(--surface); color: var(--primary); }
.btn--ghost { background: transparent; border-color: var(--line); color: var(--ink-muted); }
.btn[disabled], .btn--disabled {
  background: var(--canvas); border-color: var(--line);
  color: var(--ink-faint); cursor: not-allowed;
  box-shadow: none; transform: none;
}
.btn[disabled]:hover, .btn--disabled:hover { transform: none; box-shadow: none; }
/* A ring rather than a hard outline: same contrast, less jagged on a
   rounded corner, and it does not shift the layout. */
.btn:focus-visible, a:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, summary:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

label { display: block; font-weight: 550; margin-bottom: var(--space-1); }
input[type="text"], input[type="email"], input[type="password"],
input[type="number"], input[type="date"], input[type="url"], select, textarea {
  width: 100%;
  padding: 0.65rem 0.8rem;
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease);
}
input[type="text"]:hover, input[type="email"]:hover, input[type="password"]:hover,
input[type="number"]:hover, input[type="date"]:hover, input[type="url"]:hover,
select:hover, textarea:hover { border-color: var(--accent); }
input:focus, select:focus, textarea:focus {
  border-color: var(--primary); box-shadow: var(--ring); outline: none;
}
textarea { min-height: 6rem; resize: vertical; }
.field + .field { margin-top: var(--space-3); }
.field__help { font-size: var(--step--1); color: var(--ink-muted); margin-top: var(--space-1); }
.errorlist { list-style: none; color: var(--warn-deep); font-size: var(--step--1); margin-top: var(--space-1); }

/* ── timeline ─────────────────────────────────────────── */
.timeline { list-style: none; border-left: 2px solid var(--line); padding-left: var(--space-4); }
.timeline li { position: relative; padding-bottom: var(--space-4); }
.timeline li::before {
  content: ""; position: absolute; left: calc(-1 * var(--space-4) - 6px); top: 6px;
  width: 10px; height: 10px; border-radius: var(--radius-pill);
  background: var(--surface); border: 2px solid var(--line);
}
.timeline li.is-done::before    { background: var(--accent); border-color: var(--accent); }
.timeline li.is-current::before { background: var(--primary); border-color: var(--primary); box-shadow: 0 0 0 4px var(--canvas); }
.timeline__when { font-family: var(--font-mono); font-size: var(--step--1); color: var(--ink-muted); }

/* ── tags & banners ───────────────────────────────────── */
.tag {
  display: inline-block; border-radius: var(--radius-pill);
  padding: 0.15rem 0.6rem; font-size: var(--step--1); font-weight: 600;
  border: 1px solid var(--line); color: var(--ink-muted); background: var(--surface);
}
.tag--you  { border-color: var(--warn); color: var(--warn-deep); background: var(--warn-soft); }
.tag--us   { border-color: var(--accent); color: var(--primary); background: var(--canvas); }

.banner { border: 1px solid var(--line); border-left: 3px solid var(--primary);
  background: var(--surface-2); border-radius: var(--radius); padding: var(--space-3) var(--space-4); }
.banner--attention { border-left-color: var(--warn); background: var(--warn-soft); }

/* ── question list ────────────────────────────────────── */
.question { border-bottom: 1px solid var(--line); padding: var(--space-4) 0; }
.question:last-child { border-bottom: 0; }
.question__why { color: var(--ink-muted); font-size: var(--step--1); margin-top: var(--space-1); }
.choice {
  display: flex; gap: var(--space-2); align-items: flex-start;
  padding: var(--space-2) 0; font-weight: 400;
}
.choice input { width: auto; margin-top: 0.25rem; }

/* Native controls, sized up and tinted. Replacing them outright costs
   keyboard behaviour, indeterminate state and the platform's own
   high-contrast handling for a tick that looks marginally different. */
input[type="checkbox"], input[type="radio"] {
  accent-color: var(--primary);
  width: 1.05rem; height: 1.05rem;
  cursor: pointer;
}

.progress { position: sticky; bottom: 0; background: rgba(255,255,255,0.95);
  border-top: 1px solid var(--line); padding: var(--space-3) var(--space-4); }

@media (max-width: 640px) {
  .shell { padding: var(--space-4) var(--space-3) var(--space-6); }
  h1 { font-size: var(--step-2); }
}

/* Nothing above is load-bearing; it all just makes movement legible.
   Someone who has asked the operating system to stop animating things
   has asked for a reason. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ── intake questionnaire ─────────────────────────────── */
/* Two blocks appear only when the answer above calls for them. Both are
   validated on the server either way; this is disclosure, not enforcement. */

/* The rush block, once you have asked for a rush order. Browsers without
   :has() simply show it, which still works. */
.deadline__rush { margin-top: var(--space-4); }
.deadline:has(.choice--standard input:checked) .deadline__rush { display: none; }

/* The broader question set, once you have declined AI. Hidden by default
   because nothing is preselected — so a browser without :has() would hide
   it for good, and the @supports rule below shows it instead. */
.no-ai-only { display: none; }
.intake:has(.choice--mode-manual input:checked) .no-ai-only { display: block; }
@supports not selector(:has(*)) { .no-ai-only { display: block; } }

/* Checkbox and radio groups: the group gets the label weight, the options
   inside it read as options. Django renders them as nested divs. */
.field__legend { display: block; font-weight: 550; margin-bottom: var(--space-1); }
.choices label {
  font-weight: 400; display: flex; gap: var(--space-2);
  align-items: baseline; margin-bottom: 0; padding: var(--space-1) 0;
}
.choices input { width: auto; }

/* ── landing ──────────────────────────────────────────── */
.lp { display: grid; gap: var(--space-6); }

.lp-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr);
  gap: var(--space-6);
  align-items: center;
}
.lp-display {
  font-size: clamp(2rem, 1.1rem + 2.9vw, 3.1rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 650;
  text-wrap: balance;
  margin-top: var(--space-3);
}
.lp-hero .lede { max-width: 46ch; }
.lp-actions {
  display: flex; gap: var(--space-3); align-items: center;
  flex-wrap: wrap; margin-top: var(--space-5);
}
.btn--lg { padding: 0.72rem 1.35rem; font-size: var(--step-1); }
.lp-facts {
  display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4);
  margin-top: var(--space-5); padding-top: var(--space-4);
  border-top: 1px solid var(--line);
  font-family: var(--font-mono); font-size: var(--step--1);
  color: var(--ink-muted);
}
.lp-facts b { color: var(--ink); font-weight: 500; }

/* ── the product shot ─────────────────────────────────── */
.lp-shot { display: block; width: 100%; height: auto; }
.lp-shot text { font-family: var(--font-body); font-size: 11px; }
.lp-shot .s-ground { fill: var(--surface-2); stroke: var(--line); }
.lp-shot .s-card   { fill: var(--surface); stroke: var(--line); }
.lp-shot .s-line   { fill: var(--line); }
.lp-shot .s-line--head { fill: var(--ink-faint); opacity: .45; }
.lp-shot .s-eyebrow {
  font-family: var(--font-mono); font-size: 9.5px;
  letter-spacing: .1em; fill: var(--ink-faint);
}
.lp-shot .s-label { fill: var(--ink-muted); }
.lp-shot .s-input { fill: var(--surface-2); stroke: var(--line); }
.lp-shot .s-glyph { fill: none; stroke: var(--ink-faint); }
.lp-shot .s-radio { fill: var(--surface); stroke: var(--ink-faint); }
.lp-shot .s-radio-dot { fill: var(--primary); }
.lp-shot .s-flag { fill: var(--warn-soft); stroke: var(--warn); }
.lp-shot .s-flag-line { fill: var(--warn); opacity: .38; }
.lp-shot .s-flag-tag { font-family: var(--font-mono); font-size: 9.5px; fill: var(--warn-deep); }
.lp-shot .s-conn { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; }
.lp-shot .s-arrow { fill: var(--accent); }
.lp-shot .s-node { fill: var(--surface); stroke: var(--accent); stroke-width: 1.5; }
.lp-shot .s-node-n { font-family: var(--font-mono); font-size: 17px; fill: var(--primary); }
.lp-shot .s-cap {
  font-family: var(--font-mono); font-size: 9px;
  letter-spacing: .12em; fill: var(--ink-faint);
}
.lp-shot .s-btn { fill: var(--primary); }
.lp-shot .s-btn-text { fill: #fff; font-size: 11px; font-weight: 600; }

/* ── section scaffolding ──────────────────────────────── */
.lp-section { display: grid; gap: var(--space-4); }
.lp-section__head { display: grid; gap: var(--space-2); max-width: 56ch; }
.lp-section__head h2 { font-size: var(--step-2); }
.lp-section__head p { color: var(--ink-muted); }

/* ── what we ask ──────────────────────────────────────── */
.lp-asks { display: grid; }
.lp-asks li {
  display: grid; grid-template-columns: 2.5rem minmax(0, 1fr);
  gap: var(--space-3); align-items: baseline;
  padding: var(--space-3) 0; border-top: 1px solid var(--line);
}
.lp-asks li:last-child { border-bottom: 1px solid var(--line); }
.lp-asks li::before {
  content: counter(lp-ask, decimal-leading-zero);
  counter-increment: lp-ask;
  font-family: var(--font-mono); font-size: var(--step--1); color: var(--ink-faint);
}
.lp-asks { counter-reset: lp-ask; }
.lp-ask b { font-weight: 600; }
.lp-ask span { display: block; color: var(--ink-muted); font-size: var(--step--1); }

/* ── the route across the page ────────────────────────── */
.lp-flow { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--space-3); }
.lp-step {
  display: grid; gap: var(--space-2); align-content: start;
  padding-top: var(--space-3); border-top: 2px solid var(--accent);
}
.lp-step:last-child { border-top-color: var(--primary); }
.lp-step h3 { font-size: var(--step-0); }
.lp-step p { font-size: var(--step--1); color: var(--ink-muted); }
.lp-step .who { font-family: var(--font-mono); font-size: var(--step--1); color: var(--ink-faint); }

/* ── the three routes ─────────────────────────────────── */
.lp-modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: var(--space-3); }
.lp-mode {
  display: grid; gap: var(--space-2); align-content: start;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: var(--space-4);
}
.lp-mode--sigma { border-color: var(--accent); background: var(--surface-2); }
.lp-mode p { color: var(--ink-muted); }
.lp-mode .then {
  margin-top: var(--space-2); padding-top: var(--space-3);
  border-top: 1px solid var(--line);
  font-size: var(--step--1); color: var(--ink-faint);
}

/* ── closing band ─────────────────────────────────────── */
.lp-close {
  background: var(--ink); border-radius: var(--radius);
  padding: var(--space-6) var(--space-5);
  display: grid; gap: var(--space-4); justify-items: start;
}
.lp-close h2 {
  color: var(--surface); font-size: var(--step-3);
  letter-spacing: -0.02em; max-width: 22ch; text-wrap: balance;
}
.lp-close p { color: var(--accent); max-width: 48ch; }
.lp-close .btn { background: var(--accent); border-color: var(--accent); color: var(--ink); }

@media (max-width: 60rem) {
  .lp-hero { grid-template-columns: minmax(0, 1fr); gap: var(--space-5); }
  .lp-flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 34rem) {
  .lp-flow { grid-template-columns: minmax(0, 1fr); }
  .lp-close { padding: var(--space-5) var(--space-4); }
}

/* ── money tables ─────────────────────────────────────── */
.money { width: 100%; border-collapse: collapse; }
.money th, .money td { text-align: left; padding: var(--space-3) 0; font-weight: 400; }
.money td {
  text-align: right; font-family: var(--font-mono);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.money tbody tr + tr th, .money tbody tr + tr td { border-top: 1px solid var(--line); }
.money tfoot { color: var(--ink-muted); }
.money tfoot tr:first-child th, .money tfoot tr:first-child td { border-top: 1px solid var(--line); }
.money tfoot th, .money tfoot td { padding: var(--space-2) 0; }
.money__total th, .money__total td {
  color: var(--ink); font-weight: 650; font-size: var(--step-1);
  padding-top: var(--space-3); border-top: 2px solid var(--ink);
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

/* ── build plan ───────────────────────────────────────── */
/* A note is the client's objection pinned to one section, so it sits
   inside the section it argues with rather than in a list elsewhere. */
.note {
  border-left: 3px solid var(--warn);
  background: var(--warn-soft);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: var(--space-3) var(--space-4);
  margin-top: var(--space-3);
}
.note .field__help { color: var(--warn-deep); opacity: .8; }

.note-form { margin-top: var(--space-4); border-top: 1px solid var(--line); padding-top: var(--space-3); }
.note-form summary {
  cursor: pointer; font-size: var(--step--1); font-weight: 600;
  color: var(--primary); list-style: none;
}
.note-form summary::-webkit-details-marker { display: none; }
.note-form summary::before { content: "+ "; font-weight: 700; }
.note-form[open] summary::before { content: "– "; }

.segment + .segment { margin-top: var(--space-3); }

/* ── delivery ─────────────────────────────────────────── */
.files { width: 100%; border-collapse: collapse; }
.files td { padding: var(--space-3) 0; vertical-align: baseline; }
.files tr + tr td { border-top: 1px solid var(--line); }
.files__what { display: block; color: var(--ink-muted); font-size: var(--step--1); }
.files__size {
  text-align: right; white-space: nowrap; color: var(--ink-muted);
  font-family: var(--font-mono); font-size: var(--step--1);
  font-variant-numeric: tabular-nums;
}

/* A defect is a client saying the build is wrong, so it reads as an open
   item until someone has answered it. */
.defect {
  border-left: 3px solid var(--warn);
  background: var(--warn-soft);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: var(--space-3) var(--space-4);
}
.defect--done {
  border-left-color: var(--accent);
  background: var(--surface-2);
}
.defect--done strong { color: var(--ink-muted); }

/* ── pick: a selectable service card with a hover panel ──────────────
   Used for question two of the questionnaire. The summary is always
   visible because a label alone ("SOP") does not tell a researcher
   whether they need it; the panel on hover carries the rest, so eleven
   options stay scannable instead of becoming eleven paragraphs. */

.picks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17.5rem, 1fr));
  gap: var(--space-3);
}

.pick {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: var(--space-3);
  align-items: start;
  margin: 0;
  padding: var(--space-3) var(--space-4);
  font-weight: 400;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: border-color var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease),
              transform var(--dur) var(--ease),
              background-color var(--dur) var(--ease);
}
.pick:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-2);
  transform: translateY(-1px);
  z-index: 2;
}
.pick:focus-within { border-color: var(--primary); box-shadow: var(--ring); z-index: 3; }

/* The whole card reads as chosen, not just the box. */
.pick:has(input:checked) {
  border-color: var(--primary);
  background: var(--surface-2);
}
.pick:has(input:checked) .pick__price { color: var(--primary); font-weight: 650; }

.pick input { width: auto; margin: 0.15rem 0 0; }
.pick__body { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.pick__title { font-weight: 600; color: var(--ink); }
.pick__summary { font-size: var(--step--1); color: var(--ink-muted); line-height: 1.45; }
.pick__price {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  color: var(--ink-faint);
  white-space: nowrap;
  transition: color var(--dur) var(--ease);
}

/* The panel. Hidden by visibility rather than display so it can fade,
   and pointer-events off so it never sits between the cursor and the
   card underneath it. */
.pick__more {
  position: absolute;
  left: 0; right: 0; top: calc(100% + 6px);
  z-index: 20;
  padding: var(--space-4);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-3);
  font-size: var(--step--1);
  line-height: 1.6;
  color: var(--ink-muted);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  pointer-events: none;
  transition: opacity var(--dur-slow) var(--ease),
              transform var(--dur-slow) var(--ease),
              visibility var(--dur-slow) var(--ease);
}
.pick:hover .pick__more,
.pick:focus-within .pick__more {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.pick__more p { margin: 0 0 var(--space-2); white-space: pre-line; }
.pick__more p:last-child { margin-bottom: 0; }
.pick__cues { display: flex; flex-wrap: wrap; gap: var(--space-1); margin-top: var(--space-3); }
.pick__cue {
  font-size: var(--step--1);
  padding: 0.1em 0.6em;
  border-radius: var(--radius-pill);
  background: var(--canvas);
  color: var(--ink-muted);
}
.pick__note {
  margin-top: var(--space-3);
  padding-top: var(--space-2);
  border-top: 1px solid var(--line);
  color: var(--ink-faint);
}

/* Near the bottom of the viewport the panel would open off-screen, so
   the last row opens upward instead. */
.picks > .pick:nth-last-child(-n+2) .pick__more {
  top: auto; bottom: calc(100% + 6px); transform: translateY(4px);
}
.picks > .pick:nth-last-child(-n+2):hover .pick__more,
.picks > .pick:nth-last-child(-n+2):focus-within .pick__more { transform: translateY(0); }

/* The support block is the last thing in the section, so its panel
   always opens upward; it sits outside .picks and the nth-last-child
   rule above cannot see it. */
.pick--wide { grid-template-columns: 1fr; }
.pick--wide .pick__more {
  top: auto; bottom: calc(100% + 6px); transform: translateY(4px);
}
.pick--wide:hover .pick__more,
.pick--wide:focus-within .pick__more { transform: translateY(0); }

.pick-group + .pick-group { margin-top: var(--space-4); }
.pick-group__name {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  margin-bottom: var(--space-2);
}

/* A touch screen has no hover, and a panel that only opens on hover is
   a panel that never opens. Show the detail inline instead. */
@media (hover: none) {
  .pick__more {
    position: static;
    opacity: 1; visibility: visible; transform: none;
    box-shadow: none;
    border: 0;
    border-top: 1px solid var(--line);
    border-radius: 0;
    padding: var(--space-3) 0 0;
    grid-column: 1 / -1;
  }
  .pick { grid-template-columns: auto 1fr auto; }
}
