/*
  Lancer public site. Continues the demo app's pleading-paper language: one serif for
  prose and headings (TeX Gyre Schola, a Century Schoolbook), one sans for apparatus
  (Public Sans), and two inks. Margin red marks the attorney's judgment; docket blue
  marks Lancer.

  The ledger (.ledger) is the one memorable element. Everything else stays quiet: paper,
  hairlines, one tinted band per page (.cta), one load-time rise in the hero.

  Page skeleton. The header, the footer and the CTA band are written once in
  /index.html and copied verbatim into every page; only aria-current="page" moves to
  the current page's nav link.
    a.skip
    header.site-header > div.wrap.site-header__row > a.wordmark,
      nav.site-nav (the four page links),
      div.site-header__actions > a.btn.btn--small (Talk to us) + a.site-nav__signin
    main#main > section.section > div.wrap, with the layout class on the wrap
      (div.wrap.band, div.wrap.title-grid, ...); section.section.cta comes last
    footer.site-footer
  Sections own vertical spacing; main > .section + .section draws the hairline between
  them. Components inside a section never add outer spacing of their own.

  Layout patterns (markup):
    .title-grid    Inner-page opening, title left, context right. Child 1: h1, or
                   div > h1 + p.doc__date on legal pages. Child 2: p.lead, or
                   div > p.lead + nav.toc on the FAQ, or nothing.
    .band          The section pattern. div.band__head (p.eyebrow, h2, then an
                   optional p or p > a) + div.band__body (the content). Add
                   .band__head--sticky to pin the head below the header (FAQ, legal).
    .stage         One how-it-works stage. div.stage__intro (p.stage__num, h2, p) +
                   dl.role.role--lancer + dl.role.role--attorney, each dt.role__label
                   + dd.
    .cols-2/.cols-3  Equal columns of divs, inside a .band__body or on the wrap.
    .cost-grid     div.cols-3.cost-grid > div > h3 + p
    .qa-grid       div.qa-grid > div.qa > h3 + p
    .toc           nav.toc[aria-label="On this page"] > p.toc__heading + ul > li >
                   a[href="#id"]; the ids sit on the h2s they point to.
    .company       dl.cols-2.company > div > dt + dd
    .contact-grid  div.wrap.contact-grid > div (h1, p.lead, p.eyebrow, ol.steps > li,
                   p) + form.form; paired fields sit in div.form__row > div.field +
                   div.field.

  Specificity: element defaults are plain or wrapped in :where() so any single class
  wins. Component links are styled as .component :where(a) for the same reason.
*/

/* Fonts ---------------------------------------------------------------------------- */

@font-face {
  font-family: "Schola";
  src: url("/fonts/texgyreschola-regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Schola";
  src: url("/fonts/texgyreschola-italic.otf") format("opentype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Schola";
  src: url("/fonts/texgyreschola-bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

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

@font-face {
  font-family: "Public Sans";
  src: url("/fonts/PublicSans-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* Tokens --------------------------------------------------------------------------- */

:root {
  --paper: #f8f8f6;
  --paper-2: #efefeb;
  --ink: #141414;
  --ink-soft: #5f605c;
  /* 3.2:1 on paper: below AA for text, so it is used only for non-text marks. */
  --ink-mute: #8a8b86;
  --rule: #d8d8d2;
  --rule-strong: #b9b9b2;
  --blue: #26437a;
  --blue-deep: #1b3260;
  --blue-wash: rgba(38, 67, 122, 0.08);
  --red: #b5221f;

  --serif:
    "Schola", "Century Schoolbook", "New Century Schoolbook", Charter, Georgia, serif;
  --sans:
    "Public Sans", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --measure: 66ch;
  --gutter: clamp(1.25rem, 4vw, 4rem);
  --column-gap: clamp(2rem, 4vw, 5rem);
  --section-y: clamp(3rem, 8vw, 5.5rem);
  /* Clears the sticky header for anchor targets and pinned band heads. */
  --header-clear: 5.5rem;
}

/* Base ----------------------------------------------------------------------------- */

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

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

/* Column flex keeps the footer at the bottom of short pages such as 404. */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-variant-numeric: lining-nums;
  -webkit-font-smoothing: antialiased;
}

main {
  flex: 1;
}

/* Anchor targets land below the sticky header, not under it. */
[id] {
  scroll-margin-top: var(--header-clear);
}

h1,
h2,
h3 {
  font-weight: 400;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.75rem, 1.9rem + 3.2vw, 5.25rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.75rem, 1.4rem + 1.4vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1.25rem;
  line-height: 1.3;
}

/* Flow: block elements space themselves from what follows; the last child does not. */
:where(h1) {
  margin-block: 0 0.5em;
}

:where(h2) {
  margin-block: 0 0.75em;
}

:where(h3) {
  margin-block: 0 0.5em;
}

:where(:not(.eyebrow, .stage__num) + h2) {
  margin-top: 2em;
}

:where(:not(.eyebrow) + h3) {
  margin-top: 1.6em;
}

:where(p, ul, ol, dl, table, form) {
  margin-block: 0 1em;
}

:where(h1, h2, h3, p, ul, ol, dl, table, form):where(:last-child) {
  margin-bottom: 0;
}

:where(ul, ol) {
  padding-left: 1.25em;
}

:where(li + li) {
  margin-top: 0.35em;
}

dd {
  margin: 0;
}

a {
  color: var(--blue);
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(38, 67, 122, 0.45);
  text-underline-offset: 0.18em;
}

a:where(:hover) {
  color: var(--blue-deep);
  text-decoration-color: currentColor;
}

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

/* Visually hidden, announced by screen readers. */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Header --------------------------------------------------------------------------- */

.skip {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 10;
  padding: 0.5rem 0.875rem;
  background: var(--paper);
  color: var(--blue);
  font-family: var(--sans);
  font-size: 0.9375rem;
  font-weight: 600;
  transform: translateY(-300%);
}

.skip:focus {
  transform: none;
}

/* Sticky, on paper: the four pages and the two actions stay one click away. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
}

/* Wordmark, then the nav beside it; the actions are pushed to the right edge. */
.site-header__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 2.5rem;
  padding-block: 0.875rem;
}

.wordmark {
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.01em;
  text-decoration: none;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 1.5rem;
  font-family: var(--sans);
  font-size: 0.9375rem;
  font-weight: 500;
}

.site-nav :where(a) {
  padding-block: 0.625rem;
  color: var(--ink-soft);
  text-decoration: none;
}

.site-nav :where(a):hover {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--rule-strong);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.45em;
}

.site-nav a[aria-current="page"] {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--blue);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.45em;
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-left: auto;
}

/* Sign in leads to the product, not a page: set off by a hairline, in docket blue. */
.site-nav__signin {
  padding: 0.5rem 0 0.5rem 1.25rem;
  border-left: 1px solid var(--rule);
  color: var(--blue);
  font-family: var(--sans);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
}

.site-nav__signin:hover {
  color: var(--blue-deep);
  text-decoration: underline;
  text-underline-offset: 0.3em;
}

/* Layout --------------------------------------------------------------------------- */

/* Edge to edge up to 1600px of content, then centered. */
.wrap {
  width: 100%;
  max-width: 100rem;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: var(--section-y);
}

main > .section + .section {
  border-top: 1px solid var(--rule);
}

/* The hero sits right under the header rule, so it needs less air above. */
.section--hero {
  padding-block: clamp(2.5rem, 6vw, 4.5rem) var(--section-y);
}

/* A single row of facts does not need full section air. */
.section--compact {
  padding-block: clamp(1.75rem, 4vw, 2.5rem);
}

/* Inner-page opening: the title takes the wider left column and the lead (or the
   table of contents) sits to its right, bottoms aligned. */
.title-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  align-items: end;
  gap: 1.5rem var(--column-gap);
}

.title-grid > * {
  margin-block: 0;
}

/* The section pattern: a head column (eyebrow, h2, an optional line) beside a body
   column with the content. The head's measure only binds once the band stacks. */
.band {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  align-items: start;
  gap: 1.75rem var(--column-gap);
}

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

.band__body {
  min-width: 0;
}

.band__head--sticky {
  position: sticky;
  top: var(--header-clear);
}

/* Equal columns. One column below the breakpoint; children carry no outer margins. */
.cols-2,
.cols-3 {
  display: grid;
  gap: 2rem clamp(2rem, 3vw, 3.5rem);
  margin-block: 0 2.5rem;
}

.cols-2:last-child,
.cols-3:last-child {
  margin-bottom: 0;
}

/* Type helpers --------------------------------------------------------------------- */

.eyebrow {
  margin: 0 0 0.875rem;
  color: var(--blue);
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.lead {
  max-width: 36em;
  font-size: 1.3rem;
  line-height: 1.5;
  text-wrap: pretty;
}

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

.muted {
  color: var(--ink-soft);
}

/* Keeps a hyphenated term such as "pre-suit" from breaking at its hyphen. */
.nowrap {
  white-space: nowrap;
}

/* Hero ----------------------------------------------------------------------------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 6fr);
  align-items: start;
  gap: 3rem clamp(2.5rem, 5vw, 4.5rem);
}

.hero__text {
  min-width: 0;
}

.hero__ledger {
  --reveal-delay: 0.12s;
  min-width: 0;
}

/* Load-only rise. Nothing animates on scroll. */
.reveal {
  animation: rise 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) var(--reveal-delay, 0s) both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(0.5rem);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    animation: none;
  }
}

/* Actions -------------------------------------------------------------------------- */

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  margin-top: 2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.625rem 1.25rem;
  border: 1px solid var(--blue);
  border-radius: 2px;
  background: var(--blue);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}

.btn:hover {
  border-color: var(--blue-deep);
  background: var(--blue-deep);
  color: var(--paper);
}

.btn:disabled {
  opacity: 0.6;
  cursor: progress;
}

.btn--secondary {
  background: transparent;
  color: var(--blue);
}

.btn--secondary:hover {
  background: var(--blue-wash);
  color: var(--blue-deep);
}

/* The header's Talk to us. */
.btn--small {
  min-height: 2.25rem;
  padding: 0.375rem 0.875rem;
  font-size: 0.875rem;
}

/* Ledger --------------------------------------------------------------------------- */

/* Who does what. Attorney column ruled in margin red; Lancer column ruled in docket
   blue and washed blue, so the split reads before a word of it does. Each td carries
   data-label ("The attorney" / "Lancer") for the stacked phone layout. */
.ledger {
  width: 100%;
  border-collapse: collapse;
  border-bottom: 1px solid var(--rule);
  font-size: 0.9375rem;
  line-height: 1.45;
}

.ledger caption {
  padding-bottom: 0.875rem;
  color: var(--blue);
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.12em;
  text-align: left;
  text-transform: uppercase;
}

.ledger th {
  width: 50%;
  padding: 0.75rem 1.125rem 0.625rem;
  font-family: var(--sans);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.1em;
  text-align: left;
  text-transform: uppercase;
  vertical-align: bottom;
}

.ledger td {
  padding: 0.875rem 1.125rem;
  border-top: 1px solid var(--rule);
  vertical-align: top;
}

.ledger th:first-child,
.ledger td:first-child {
  padding-left: 0;
}

.ledger td:last-child {
  background: var(--blue-wash);
}

.ledger__attorney {
  border-bottom: 2px solid var(--red);
  color: var(--red);
}

.ledger__lancer {
  border-bottom: 2px solid var(--blue);
  background: var(--blue-wash);
  color: var(--blue);
}

/* Facts ---------------------------------------------------------------------------- */

/* Markup: dl.facts > div > dt + dd (four items). The About page's company cells,
   dl.cols-2.company > div > dt + dd, share the same type. */
.facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem clamp(1.5rem, 3vw, 2.5rem);
}

.facts dt,
.company dt {
  margin-bottom: 0.375rem;
  color: var(--blue);
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.facts dd,
.company dd {
  font-size: 1.125rem;
  line-height: 1.4;
}

/* Stages (home) -------------------------------------------------------------------- */

/* The six stages are a real sequence, so they are the one ordered list on the home
   page. Ruled cells, the Schola numeral above the text.
   Markup: ol.stages > li > span.stages__name + text */
.stages {
  display: grid;
  gap: 1.75rem clamp(2rem, 3vw, 3.5rem);
  padding: 0;
  list-style: none;
  counter-reset: stage;
}

.stages li {
  margin: 0;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  counter-increment: stage;
}

.stages li::before {
  content: counter(stage);
  display: block;
  margin-bottom: 0.625rem;
  color: var(--blue);
  font-family: var(--serif);
  font-size: 1.75rem;
  line-height: 1;
}

.stages__name {
  font-weight: 700;
}

/* Stage (how it works) ------------------------------------------------------------- */

/* One stage per section: what happens, then who does what, as two ruled columns in
   the ledger's inks. */
.stage {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 3.5fr) minmax(0, 3.5fr);
  align-items: start;
  gap: 1.75rem var(--column-gap);
}

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

.stage__num {
  display: block;
  margin: 0 0 0.75rem;
  color: var(--blue);
  font-family: var(--serif);
  font-size: 3.5rem;
  line-height: 1;
}

.role {
  margin: 0;
}

.role--lancer {
  --role-ink: var(--blue);
}

.role--attorney {
  --role-ink: var(--red);
}

.role__label {
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid currentColor;
  color: var(--role-ink, var(--blue));
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Lists ---------------------------------------------------------------------------- */

.list {
  padding: 0;
  border-bottom: 1px solid var(--rule);
  list-style: none;
}

.list li {
  margin: 0;
  padding-block: 0.625rem;
  border-top: 1px solid var(--rule);
}

/* Cost grid ------------------------------------------------------------------------ */

/* Ruled cells like the stages. Markup: div.cols-3.cost-grid > div > h3 + p */
.cost-grid > * {
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
}

/* Questions ------------------------------------------------------------------------ */

/* Plain headings, not accordions: every answer is visible. Markup: div.qa-grid >
   div.qa > h3 + p */
.qa-grid {
  display: grid;
  gap: 2rem clamp(2rem, 3vw, 3.5rem);
  margin-block: 0 2.5rem;
}

.qa-grid:last-child {
  margin-bottom: 0;
}

.qa {
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
}

.qa h3 {
  margin: 0 0 0.5rem;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.3;
}

/* FAQ ------------------------------------------------------------------------------ */

/* Markup: div.faq > div.faq__group > h2 + (h3 + p)... */
.faq {
  max-width: var(--measure);
  margin-bottom: 1.5rem;
}

.faq:last-child {
  margin-bottom: 0;
}

.faq__group + .faq__group {
  margin-top: clamp(2.5rem, 6vw, 4rem);
  padding-top: clamp(2.5rem, 6vw, 4rem);
  border-top: 1px solid var(--rule);
}

.faq h2 {
  margin: 0 0 1.25rem;
}

.faq h3 {
  margin: 1.75rem 0 0.375rem;
  font-size: 1.25rem;
  line-height: 1.3;
}

.faq h3:first-child {
  margin-top: 0;
}

.faq p {
  margin: 0;
}

/* On this page --------------------------------------------------------------------- */

/* Markup: nav.toc[aria-label="On this page"] > p.toc__heading + ul > li > a */
.toc :where(ul) {
  margin: 0;
  padding: 0;
  list-style: none;
}

.toc :where(li) {
  margin: 0;
}

.toc :where(a) {
  display: inline-block;
  padding-block: 0.3rem;
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 0.9375rem;
  line-height: 1.4;
  text-decoration: none;
}

.toc :where(a):hover {
  color: var(--ink);
  text-decoration: underline;
}

.toc__heading {
  margin: 0 0 0.5rem;
  color: var(--blue);
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Legal pages ---------------------------------------------------------------------- */

/* Markup: div.band__body > div.doc > h2[id], p... */
.doc {
  max-width: 72ch;
}

.doc h2 {
  margin: 2.5rem 0 0.625rem;
  font-size: 1.375rem;
  line-height: 1.3;
  letter-spacing: 0;
}

.doc h2:first-child {
  margin-top: 0;
}

.doc__date {
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 0.875rem;
}

/* CTA band ------------------------------------------------------------------------- */

/* The one tinted band. Sits last in main; the footer's top rule is its bottom hairline.
   Markup: section.section.cta > div.wrap.cta__row > div (h2, p) + div.actions */
.cta {
  border-top: 1px solid var(--rule);
  background: var(--paper-2);
}

.cta__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 0 4rem;
}

/* Footer --------------------------------------------------------------------------- */

/* Brand, then Site, Legal and Contact columns. */
.site-footer {
  padding-block: clamp(2.5rem, 6vw, 3.5rem) 2rem;
  border-top: 1px solid var(--rule);
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 0.875rem;
  line-height: 1.5;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--rule);
}

.site-footer__heading {
  margin: 0 0 0.75rem;
  color: var(--ink);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.site-footer__links {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer__links :where(li) {
  margin: 0;
}

.site-footer__links :where(a) {
  display: inline-block;
  padding-block: 0.25rem;
  color: var(--ink-soft);
  text-decoration: none;
}

.site-footer__links :where(a):hover {
  color: var(--ink);
  text-decoration: underline;
}

.tagline {
  margin: 0.25rem 0 1rem;
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 1rem;
  font-style: italic;
}

.site-footer__legal {
  max-width: 88ch;
  margin: 1.25rem 0 0;
  color: var(--ink-soft);
  font-size: 0.8125rem;
}

.site-footer__legal :where(a) {
  color: inherit;
  text-decoration-color: currentColor;
}

/* Forms ---------------------------------------------------------------------------- */

/* Markup: form.form > div.field > label + .field__input; button.btn; p.form-status */
.form {
  display: grid;
  gap: 1.25rem;
  max-width: 36rem;
}

.field {
  display: grid;
  gap: 0.375rem;
}

.field label {
  font-family: var(--sans);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.3;
}

/* Border uses --ink-mute, not --rule-strong: input edges need 3:1 against the paper
   (WCAG 1.4.11) and --rule-strong measures 1.9:1. */
.field__input {
  width: 100%;
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--ink-mute);
  border-radius: 2px;
  background: var(--paper-2);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1rem;
  line-height: 1.4;
}

.field__input::placeholder {
  color: var(--ink-soft);
}

.field__input:focus {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.field__input:where(textarea) {
  min-height: 9rem;
  resize: vertical;
}

/* The submit button keeps its own width instead of stretching across the grid. */
.form :where(.btn) {
  justify-self: start;
}

.form-status {
  margin: 0;
  font-family: var(--sans);
  font-size: 0.9375rem;
}

.form-status--error {
  color: var(--red);
}

/* Paired fields: name beside email, firm beside practice. */
.form__row {
  display: grid;
  gap: 1.25rem;
}

/* Contact -------------------------------------------------------------------------- */

/* What happens next on the left, the form on the right. */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: start;
  gap: 2.5rem var(--column-gap);
}

/* Same specificity as .form and later in the file, so the form fills its column. */
.contact-grid :where(.form) {
  max-width: none;
}

/* Numbered like the home stages, without the rules. Markup: ol.steps > li */
.steps {
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  position: relative;
  margin: 0;
  padding-left: 2.25rem;
  counter-increment: step;
}

.steps li + li {
  margin-top: 0.875rem;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  top: -0.125rem;
  left: 0;
  color: var(--blue);
  font-family: var(--serif);
  font-size: 1.5rem;
  line-height: 1.1;
}

/* Breakpoints ---------------------------------------------------------------------- */

@media (min-width: 700px) {
  .stages {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 720px) {
  .cols-2,
  .form__row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 900px) {
  .qa-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* The brand column is exactly as wide as a .band head, so Site, Legal and Contact
     start on the band body's left edge. */
  .site-footer__grid {
    grid-template-columns:
      calc((100% - var(--column-gap)) / 3)
      repeat(3, minmax(0, 1fr));
    column-gap: var(--column-gap);
  }
}

@media (min-width: 1000px) {
  .cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .stages {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 900px) {
  .title-grid,
  .band,
  .contact-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  /* A stacked band head is a plain block; pinning it would cover the body. */
  .band__head--sticky {
    position: static;
  }

  /* The intro spans the row; the two roles sit side by side beneath it. */
  .stage {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stage__intro {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  /* The two-row header is taller. */
  :root {
    --header-clear: 7rem;
  }

  /* Wordmark and actions on the first row, the four links across the second. */
  .site-header__row {
    padding-block: 0.625rem 0.125rem;
  }

  .site-header__actions {
    order: 2;
  }

  .site-nav {
    flex-basis: 100%;
    order: 3;
    justify-content: space-between;
    gap: 0 0.75rem;
  }

  .facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cta__row {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  /* Ledger as stacked pairs: the header row hides and each cell names its column. */
  .ledger,
  .ledger caption,
  .ledger tbody,
  .ledger tr,
  .ledger td {
    display: block;
  }

  .ledger thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .ledger tr {
    padding-block: 1rem;
    border-top: 1px solid var(--rule);
  }

  .ledger td {
    padding: 0;
    border: 0;
  }

  .ledger td:last-child {
    margin-top: 0.75rem;
    padding: 0.75rem 0.875rem;
  }

  .ledger td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 0.25rem;
    color: var(--red);
    font-family: var(--sans);
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: 0.12em;
    text-transform: uppercase;
  }

  .ledger td:last-child::before {
    color: var(--blue);
  }
}

@media (max-width: 600px) {
  .stage {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media print {
  .site-header,
  .site-footer,
  .cta {
    display: none;
  }
}
