/* Hallmark · pre-emit critique: P5 H5 E5 S5 R5 V4
 * genre: editorial · macrostructure: Marquee Hero
 * H1 marquee knobs: size=xl, alignment=left-bias, underlay=single rule below
 * nav: N9 edge-aligned minimal (cta=text+arrow, wordmark=sans, padding=default)
 * footer: Ft4 dense colophon (family=monospace, layout=single block, includes=date+attribution)
 * theme: custom (tuned) · vibe: "quiet, engineered, near-neutral, editorial"
 * paper: oklch(97.5% 0.004 40) · accent: oklch(48% 0.17 27)
 * display: Cabinet Grotesk · body: Switzer · outlier: JetBrains Mono
 * axes: light / geometric-sans / warm
 * enrichment: none (typography only) · studied: no · context: user-provided
 * fills: none, except `.btn` — a form's terminal action, the one documented
 *   exception to "no boxes, no fills" (see the Links and Application form banners)
 */

@import url("tokens.css");

/* ==========================================================================
   Fonts — self-hosted, no third-party requests
   ========================================================================== */

@font-face {
  font-family: "Cabinet Grotesk";
  src: url("../fonts/cabinet-grotesk-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Cabinet Grotesk";
  src: url("../fonts/cabinet-grotesk-800.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Switzer";
  src: url("../fonts/switzer-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Switzer";
  src: url("../fonts/switzer-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/jetbrains-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ==========================================================================
   Base
   ========================================================================== */

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

html {
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
}

body {
  overflow-x: clip; /* Safari fallback; `clip` keeps position:sticky alive */
  margin: 0;
  background-color: var(--color-paper);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: var(--text-md);
  font-weight: 400;
  line-height: var(--leading-body);
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 800;
  font-style: normal; /* display is always roman */
  line-height: var(--leading-tight);
  letter-spacing: var(--track-display);
  margin: 0;
  overflow-wrap: anywhere;
  min-width: 0;
}

p {
  margin: 0;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
}

:focus-visible {
  /* Never transitioned — a focus ring must be present the instant focus lands. */
  outline: var(--rule-thick) solid var(--color-focus);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

.skip-link {
  position: absolute;
  left: var(--space-md);
  top: var(--space-md);
  z-index: var(--z-sticky);
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: var(--space-xs) var(--space-md);
  background-color: var(--color-ink);
  color: var(--color-paper);
  font-size: var(--text-sm);
  text-decoration: none;
  transform: translateY(-200%);
}

.skip-link:focus-visible {
  transform: none;
}

/* ==========================================================================
   Layout primitives
   ========================================================================== */

.shell {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--page-gutter);
}

.prose {
  max-width: var(--measure);
}

.rule {
  height: var(--rule-hair);
  border: 0;
  margin: 0;
  background-color: var(--color-rule);
}

/* The one register that is not the body font: the work table's meta column and
   the colophon carry this class; the application form's label column is a third
   use of the same register, restated on `.field__label` because a <label>
   cannot carry it. Nothing else may borrow it. */
.meta {
  font-family: var(--font-outlier);
  font-size: var(--text-2xs);
  font-variant-numeric: tabular-nums;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--color-muted);
}

/* ==========================================================================
   Links — the typographic CTA (C3). No boxes, no fills.
   The single exception is `.btn`, the terminal action of the application form
   and the apply CTA that leads to it — justified at its own rule below.
   ========================================================================== */

.link {
  --underline: currentColor;
  display: inline-block;
  color: var(--color-accent);
  font-weight: 500;
  text-decoration: none;
  background-image: linear-gradient(var(--underline), var(--underline));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 100% 1px;
  padding-bottom: 1px;
  transition: background-size var(--dur-short) var(--ease-out);
}

.link:hover {
  background-size: 100% var(--rule-thick);
}

.link--quiet {
  color: var(--color-ink);
}

.link--quiet:hover {
  color: var(--color-accent);
}

/* Prose links get the same treatment without the inline-block. */
.prose a:not(.link) {
  color: var(--color-accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

.arrow {
  display: inline-block;
  transition: transform var(--dur-short) var(--ease-out);
}

.link:hover .arrow {
  transform: translateX(0.2em);
}

/* ==========================================================================
   N9 · Edge-aligned minimal nav
   The empty middle is the design. Do not fill it with a link row.
   ========================================================================== */

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-md);
  padding-block: var(--space-lg);
}

.nav__wordmark {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--text-md);
  letter-spacing: -0.02em;
  text-decoration: none;
  white-space: nowrap;
}

/* The single accent mark on the page's chrome — a full stop, in signal red. */
.nav__wordmark::after {
  content: ".";
  color: var(--color-accent);
}

.nav__action {
  font-size: var(--text-sm);
  white-space: nowrap; /* a nav affordance never wraps to two lines */
}

/* Section links, between the wordmark and the terminal action. The list is
   absent from the DOM entirely until src/_data/nav.js has entries, so this rule
   is inert on a site with no interior pages. */
.nav__list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-lg);
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: var(--text-sm);
}

/* ==========================================================================
   H1 · Marquee hero — the fold is one statement. No subhead, no CTA.
   ========================================================================== */

.hero {
  display: grid;
  align-content: end;
  min-height: min(58dvh, 30rem);
  padding-block: var(--space-2xl) var(--space-xl);
}

.hero__display {
  font-size: var(--text-display);
  line-height: var(--leading-display);
  /* Deliberately narrow so the statement breaks after "Programmers" — a
     one-line marquee at this size leaves the fold looking half-drawn. */
  max-width: 11ch;
}

.hero__display .full-stop {
  color: var(--color-accent);
}

/* ==========================================================================
   Proof strip
   Three facts directly under the fold, in the mono label register. This is the
   client-logo row that a practice with no publishable client logos gets to run
   instead — and a 2013 product still online is the stronger credential anyway.
   Figures are set at display weight; the labels stay in the .meta register so
   the row reads as evidence rather than as marketing.

   Source order is label-then-figure because that is the only order <dl> permits
   (a <dt> must precede its <dd>). The figure is lifted above its label with
   `order`, which changes the paint order and nothing else.
   ========================================================================== */

.proof {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: var(--space-xl);
  padding-block: var(--space-2xl);
  margin: 0;
}

.proof__item {
  display: grid;
  gap: var(--space-xs);
}

.proof__figure {
  order: -1;
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--text-2xl);
  line-height: var(--leading-tight);
  letter-spacing: -0.02em;
  color: var(--color-ink);
}

.proof__label {
  font-family: var(--font-outlier);
  font-size: var(--text-2xs);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--color-muted);
}

/* ==========================================================================
   Offer cards
   Services framed as outcomes, not as a technology list. Same hairline grid as
   .work__item: this is the same kind of object, so it gets the same treatment.
   ========================================================================== */

.offer {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: var(--rule-hair) solid var(--color-rule);
}

.offer__item {
  padding-block: var(--space-lg);
  border-bottom: var(--rule-hair) solid var(--color-rule);
}

.offer__name {
  margin-bottom: var(--space-xs);
  font-size: var(--text-lg);
  letter-spacing: -0.02em;
}

.offer__body {
  max-width: var(--measure);
  color: var(--color-ink-2);
}

/* ==========================================================================
   Sections — deliberately uneven rhythm. Equal padding everywhere reads flat.
   ========================================================================== */

.section {
  padding-block: var(--space-3xl);
}

.section--work {
  padding-block: var(--space-2xl) var(--space-3xl);
}

.section--practice {
  padding-block: var(--space-4xl) var(--space-3xl);
}

.section--hiring {
  padding-block: var(--space-2xl);
}

.section--contact {
  padding-block: var(--space-4xl) var(--space-3xl);
}

/* S2 · Hanging section head — stacked single column, never tag-left/heading-right. */
.section__head {
  margin-bottom: var(--space-xl);
}

.section__title {
  font-size: var(--text-xl);
}

.section__lede {
  margin-top: var(--space-md);
  color: var(--color-ink-2);
}

/* ==========================================================================
   Work — F3 spec-sheet energy: hairline rules, tabular meta, no cards
   ========================================================================== */

.work {
  border-top: var(--rule-hair) solid var(--color-rule);
}

/* Two columns: the identifying column (name + meta) and the body column.
   This is the spec-sheet shape — it uses the container's width instead of
   leaving half the page blank beside a 60ch measure. */
.work__item {
  display: grid;
  grid-template-columns: minmax(0, var(--label-col)) minmax(0, 1fr);
  gap: var(--space-sm) var(--space-xl);
  padding-block: var(--space-xl);
  border-bottom: var(--rule-hair) solid var(--color-rule);
}

.work__line {
  display: grid;
  gap: var(--space-2xs);
  align-content: start;
}

.work__name {
  font-size: var(--text-lg);
  letter-spacing: -0.02em;
}

.work__status {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-xs);
}

/* Status is carried by the word itself, never by colour alone. */
.work__status[data-status="live"] {
  color: var(--color-accent);
}

.work__body {
  display: grid;
  gap: var(--space-md);
  justify-items: start;
  max-width: var(--measure);
}

.work__description {
  color: var(--color-ink-2);
}

.work__note {
  padding-top: var(--space-lg);
  max-width: var(--measure);
  font-size: var(--text-sm);
  color: var(--color-muted);
}

/* ==========================================================================
   Practice — prose, not an icon grid
   ========================================================================== */

.practice__body > * + * {
  margin-top: var(--space-md);
}

.practice__body strong {
  font-weight: 500;
  color: var(--color-ink);
}

/* ==========================================================================
   Contact — the page's one real call to action
   ========================================================================== */

.contact__statement {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--text-display-s);
  line-height: var(--leading-tight);
  letter-spacing: var(--track-display);
  max-width: 18ch;
  overflow-wrap: anywhere;
  min-width: 0;
}

.contact__actions {
  margin-top: var(--space-xl);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md) var(--space-xl);
  font-size: var(--text-md);
}

/* ==========================================================================
   Ft4 · Dense colophon — one block of small mono, ragged right
   ========================================================================== */

.colophon {
  border-top: var(--rule-thick) solid var(--color-ink);
  padding-block: var(--space-xl) var(--space-2xl);
}

.colophon__text {
  font-family: var(--font-outlier);
  font-size: var(--text-xs);
  line-height: 1.75;
  color: var(--color-muted);
  max-width: 78ch;
}

.colophon__text a {
  color: var(--color-ink-2);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

.colophon__text a:hover {
  color: var(--color-accent);
}

/* ==========================================================================
   Jobs
   ========================================================================== */

.page-head {
  padding-block: var(--space-3xl) var(--space-xl);
}

.page-head__title {
  font-size: var(--text-3xl);
  max-width: 20ch;
}

.page-head__lede {
  margin-top: var(--space-lg);
  max-width: var(--measure);
  color: var(--color-ink-2);
}

.roles {
  border-top: var(--rule-hair) solid var(--color-rule);
  margin-bottom: var(--space-2xl);
}

.roles__item {
  display: grid;
  /* Wider than the work sheet's label column — role titles are long, and a
     clickable title that wraps mid-phrase reads as a styling error. */
  grid-template-columns: minmax(0, var(--role-col)) minmax(0, 1fr);
  gap: var(--space-sm) var(--space-xl);
  padding-block: var(--space-xl);
  border-bottom: var(--rule-hair) solid var(--color-rule);
}

.roles__name {
  font-size: var(--text-lg);
}

.roles__name a {
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0 var(--rule-thick);
  transition: background-size var(--dur-short) var(--ease-out);
}

.roles__name a:hover {
  background-size: 100% var(--rule-thick);
  color: var(--color-accent);
}

.roles__summary {
  max-width: var(--measure);
  color: var(--color-ink-2);
}

/* Job detail body copy */
.job-body {
  max-width: var(--measure);
  padding-bottom: var(--space-2xl);
}

.job-body > * + * {
  margin-top: var(--space-md);
}

.job-body h2 {
  font-size: var(--text-lg);
  margin-top: var(--space-2xl);
}

.job-body ul {
  list-style: none;
  display: grid;
  gap: var(--space-sm);
}

.job-body li {
  position: relative;
  padding-left: var(--space-lg);
  color: var(--color-ink-2);
}

.job-body li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: var(--space-sm);
  height: var(--rule-hair);
  background-color: var(--color-accent);
}

.job-body li ul {
  margin-top: var(--space-sm);
}

.job-foot {
  border-top: var(--rule-hair) solid var(--color-rule);
  padding-block: var(--space-xl) var(--space-3xl);
  display: flex;
  flex-wrap: wrap;
  /* `.btn` is taller than the quiet links beside it. Without baseline
     alignment the flex default (stretch) would stretch those links to the
     button's height and drag their underlines away from the text. */
  align-items: baseline;
  gap: var(--space-md) var(--space-xl);
}

/* ==========================================================================
   Application form — the spec sheet, made fillable
   The same two-column hairline grid as .work__item / .roles__item: mono label
   left, control right, a rule between rows. An application is a document in
   this family, not a card dropped onto it.
   ========================================================================== */

.form-sheet {
  border-top: var(--rule-hair) solid var(--color-rule);
}

.field {
  display: grid;
  grid-template-columns: minmax(0, var(--label-col)) minmax(0, 1fr);
  gap: var(--space-sm) var(--space-xl);
  align-items: start;
  padding-block: var(--space-lg);
  border-bottom: var(--rule-hair) solid var(--color-rule);
}

/* The mono `.meta` register, restated because a <label> in this form cannot
   carry that class. The top padding drops the label onto the control's first
   line; it is reset when the row collapses to a single column. */
.field__label {
  padding-top: var(--space-sm);
  font-family: var(--font-outlier);
  font-size: var(--text-2xs);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--color-muted);
}

/* The convention is inverted: optional rows are marked, required rows are not.
   Marking the required ones would put an asterisk on half the sheet and needs a
   legend to explain itself; a word does not. The marker is subordinated by case
   and tracking rather than by a lighter colour, because --color-muted is
   already the lightest ink the system allows on text. */
.field__opt {
  margin-left: var(--space-xs);
  letter-spacing: normal;
  text-transform: lowercase;
}

.field__control {
  display: grid;
  gap: var(--space-xs);
  min-width: 0;
  max-width: var(--measure);
}

.field__hint {
  font-size: var(--text-sm);
  color: var(--color-muted);
}

/* The inline counterpart to .notice__item on the server-rendered error page:
   same accent, same job. Created by /assets/js/form-validate.js and appended
   after the hint, so the guidance and the complaint about it are both readable
   at once. Nothing renders this without JavaScript, and nothing needs to — the
   Worker's problem list is that path. */
.field__error {
  font-size: var(--text-sm);
  color: var(--color-accent);
}

/* The bordered controls carry the state on the border as well, so a bad field is
   findable by scanning rather than by reading every message. `.file` is not in
   this list: it has no border of its own, and inventing one for the error state
   would give the form a control shape it does not otherwise have. */
.input[aria-invalid="true"],
.textarea[aria-invalid="true"] {
  border-color: var(--color-accent);
}

/* The surface is what marks a field as fillable. The border is an interactive
   boundary, so it is ink and never --color-rule. --text-base is also the floor
   that stops iOS Safari zooming the page when a field takes focus. The global
   :focus-visible ring is left alone; only its corner radius is squared here,
   which is what a square control wants. */
.input,
.textarea {
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  border: var(--rule-hair) solid var(--color-ink-2);
  border-radius: var(--radius-none);
  background-color: var(--color-paper-2);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-body);
}

.textarea {
  min-height: 12rem;
  resize: vertical;
}

/* Native control, no custom uploader and no JS. It gets no fillable surface of
   its own — nothing is typed into it, and a box that looks fillable but is not
   would be a lie. The button carries the affordance. The fixed width plus
   clipping is load-bearing: an unconstrained file input widens to fit a long
   filename, which at 320px would push the page sideways. */
.file {
  display: block;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-family: var(--font-outlier);
  font-size: var(--text-xs);
  color: var(--color-ink-2);
}

.file::file-selector-button {
  margin-right: var(--space-sm);
  padding: var(--space-xs) var(--space-sm);
  border: var(--rule-hair) solid var(--color-ink-2);
  border-radius: var(--radius-none);
  background-color: var(--color-paper-2);
  color: var(--color-ink);
  font-family: var(--font-outlier);
  font-size: var(--text-2xs);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  cursor: pointer;
  transition:
    background-color var(--dur-micro) var(--ease-out),
    color var(--dur-micro) var(--ease-out);
}

.file::file-selector-button:hover {
  background-color: var(--color-ink);
  color: var(--color-accent-ink);
}

/* The one earned fill in a system whose CTAs are typographic (see the Links
   banner). A form's terminal action is the one place a fill belongs, and the
   precedent is already here: .skip-link is an ink fill with paper text. Hover
   moves to accent instead of resting there, which keeps the accent inside its
   signal footprint rather than spending it on a large idle rectangle — and the
   arrow still translates, so hover is never carried by colour alone. Fonts are
   declared rather than inherited because a <button> inherits neither; the rule
   has to work as both <button> and <a>. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: var(--space-sm) var(--space-lg);
  border: none;
  border-radius: var(--radius-none);
  background-color: var(--color-ink);
  color: var(--color-accent-ink);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 500;
  line-height: var(--leading-tight);
  text-align: center;
  text-decoration: none;
  appearance: none;
  cursor: pointer;
  transition: background-color var(--dur-short) var(--ease-out);
}

.btn:hover {
  background-color: var(--color-accent);
}

.btn:hover .arrow {
  transform: translateX(0.2em);
}

/* Busy state — driven entirely by the `aria-busy` attribute that
   /assets/js/apply.js sets while the POST is in flight. The label is left
   alone (a résumé upload is slow enough that the motion, not a word change,
   is what reads as progress); the arrow gives up its slot to a ring. */
.btn[aria-busy="true"] .arrow {
  display: none;
}

.btn[aria-busy="true"]::after {
  content: "";
  /* flex: none — .btn is an inline-flex row, and without this the ring is a
     shrinkable flex item that would squash below 1em in a tight column. */
  flex: none;
  width: 1em;
  height: 1em;
  /* 0.2em lands the ring within ~1.5px of the width the arrow (nbsp + glyph)
     vacated, so the button does not visibly resize on click. */
  margin-left: 0.2em;
  border: var(--rule-thick) solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  /* Exempt from the global reduced-motion clamp (`*::after`, which this
     out-specifies at 0,2,1 vs 0,0,1). The label is unchanged, so this rotation
     is the only thing saying the upload is alive, and a 1em ring is not the
     large-area entrance motion that clamp exists to stop. The shorthand is
     load-bearing: it makes both animation-duration and animation-iteration-count
     important, which is the pair the clamp sets. Timing is raw because no
     duration token fits (--dur-long, 420ms, is too fast to read as a spin) and
     easing must be linear — a spinner on --ease-out stutters once per turn. */
  animation: btn-spin 700ms linear infinite !important;
}

/* A disabled button still matches :hover in several engines. Without this the
   fill would go accent mid-upload, which reads as an error, not progress. */
.btn[aria-busy="true"],
.btn[aria-busy="true"]:hover {
  background-color: var(--color-ink);
  cursor: default;
}

@keyframes btn-spin {
  to {
    transform: rotate(1turn);
  }
}

.form-foot {
  display: grid;
  justify-items: start;
  gap: var(--space-lg);
  padding-block: var(--space-xl) var(--space-3xl);
}

/* Turnstile renders a fixed 300px iframe, wider than the content column at
   320px. Scroll it inside its own box rather than let it widen the page. */
.cf-turnstile {
  max-width: 100%;
  overflow-x: auto;
}

.form-note {
  max-width: var(--measure);
  font-size: var(--text-sm);
  color: var(--color-muted);
}

/* The colophon's quiet-link treatment: this address is a route to erasure,
   not a call to action. */
.form-note a {
  color: var(--color-ink-2);
  text-decoration-thickness: var(--rule-hair);
  text-underline-offset: 0.2em;
}

.form-note a:hover {
  color: var(--color-accent);
}

/* The server-rendered problem list on the error page. The heading above it
   already says the application was not sent, so accent here is emphasis
   rather than the only signal. */
.notice {
  display: grid;
  gap: var(--space-sm);
  max-width: var(--measure);
  margin-bottom: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: var(--rule-hair) solid var(--color-rule);
}

.notice__item {
  position: relative;
  padding-left: var(--space-lg);
  color: var(--color-accent);
}

/* The same hairline dash the job-body list uses — one marker vocabulary. */
.notice__item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: var(--space-sm);
  height: var(--rule-hair);
  background-color: var(--color-accent);
}

/* ==========================================================================
   Motion — one orchestrated entrance, staggered by DOM index. Nothing else moves.
   ========================================================================== */

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(8px);
    animation: reveal var(--dur-long) var(--ease-out) forwards;
    animation-delay: calc(var(--i, 0) * 60ms);
  }
}

@keyframes reveal {
  to {
    opacity: 1;
    transform: none;
  }
}

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

/* ==========================================================================
   Responsive — verified at 320 / 375 / 414 / 768
   ========================================================================== */

/* The header's own breakpoint, wider than the page's. Wordmark, five section
   links and a contact address stop fitting on one line well before the body
   copy needs anything, so the links drop to a second row of their own and the
   original wordmark/action pair is restored above them. */
@media (max-width: 48rem) {
  .nav__list {
    order: 1;
    flex-basis: 100%;
    gap: var(--space-md);
  }
}

@media (max-width: 40rem) {
  body {
    font-size: var(--text-base);
  }

  /* At 320px the wordmark/action pair only fits on one line with a tightened
     column gap and a smaller action label. Neither element may wrap — a header
     three rows deep would push the fold off the screen. */
  .nav {
    gap: var(--space-md) var(--space-xs);
  }

  .nav__action {
    font-size: var(--text-xs);
  }

  .hero {
    min-height: min(62dvh, 30rem);
    padding-block: var(--space-2xl) var(--space-xl);
  }

  .hero__display {
    max-width: 100%;
  }

  .contact__statement {
    max-width: 100%;
  }

  .section,
  .section--work,
  .section--practice,
  .section--hiring,
  .section--contact {
    padding-block: var(--space-2xl);
  }

  .page-head {
    padding-block: var(--space-2xl) var(--space-lg);
  }

  /* The spec sheets collapse to one column; the identifying block sits above
     its body copy, keeping the same reading order. */
  .work__item,
  .roles__item {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-md);
  }

  /* The form rows collapse with their siblings above. The label now sits
     directly over its control, so it loses the baseline nudge. */
  .field {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-xs);
  }

  .field__label {
    padding-top: 0;
  }

  /* .textarea and .btn already exceed 44px at every width; these two do not.
     The file input's own box is inert — its button is the hit target. */
  .input,
  .file::file-selector-button {
    min-height: 44px;
  }

  /* Every standalone affordance clears the 44px WCAG hit target on touch.
     `.link` is only ever used on standalone links — prose links are styled
     through `.prose a:not(.link)` — so this can safely apply to all of them. */
  .link,
  .nav__wordmark,
  .roles__name a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
}

/* ==========================================================================
   Facts panel
   The quick-read strip on a case study: the five things a skim-reader wants
   before deciding whether to read the prose. Same two-column hairline grid as
   .field and .work__item, because it is the same kind of object.
   ========================================================================== */

.facts {
  margin: 0 0 var(--space-2xl);
  padding: 0;
  border-top: var(--rule-hair) solid var(--color-rule);
}

.facts__row {
  display: grid;
  grid-template-columns: minmax(0, var(--label-col)) minmax(0, 1fr);
  gap: var(--space-sm) var(--space-xl);
  padding-block: var(--space-sm);
  border-bottom: var(--rule-hair) solid var(--color-rule);
}

.facts__label {
  font-family: var(--font-outlier);
  font-size: var(--text-2xs);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--color-muted);
}

.facts__value {
  margin: 0;
  max-width: var(--measure);
}

/* ==========================================================================
   Scorecard — the radio row
   Appended at the end of the file on purpose: it is the whole of phase 6's CSS,
   and keeping it in one block at the bottom keeps the rest of this file out of
   the diff.
   ========================================================================== */

/* Native controls, unstyled. This page runs no JavaScript at all and a faked
   radio would need some — quite apart from needing to reimplement arrow keys,
   the roving tab stop and the focus ring the browser already gets right. The
   44px floor is the touch target; the labels wrap the inputs, so the whole
   word is part of it. */
.choices {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2xs) var(--space-lg);
  margin-top: var(--space-2xs);
}

.choices label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  min-height: 44px;
  font-size: var(--text-sm);
}

/* The one place accent is spent on a control: it marks the answer that has been
   given, which is the only state on this page worth signalling. */
.choices input[type="radio"] {
  accent-color: var(--color-accent);
  margin: 0;
}
