/*
  Otis: the only stylesheet. Tokens, the page frame, and every component the screens use.
  Feel: a well-made paper form from a local bank. Orange is for the one main action on a screen.
  Views build markup with ui.js el(); use these classes as written and add none of your own.

  TOKENS (on :root; use them if a style= attribute is ever needed)
    colour    --paper --card --field --ink --muted --line --rule --border --accent (main action only)
              --tint-info/-good/-wait/-problem/-neutral with --good --wait --problem --neutral
    type      --step--1 0.9em  --step-1 1.15em  --step-2 1.25em  --step-3 1.4em (h2)
              --step-4 1.9em (h1)
    spacing   --space-1 0.25em  --space-2 0.5em  --space-3 0.75em  --space-4 1em  --space-5 1.5em
              --space-6 2em;  --slip-line 1.6em (the slip's ruled lines)
    layout    --column 40em (the page), --measure 28em (text blocks: under 70 characters a line)

  PAGE
    <body class="roomy">        20px text on owners' and customers' screens (the build sets it per
                                page); without it, 18px. Everything below scales with it.
    <body class="bare">         hides the two header links (set by the build on app pages)
    <main id="main">            the one column. Views mount() a single node into it.
    h1.display                  Instrument Serif italic, for the few headline moments only
    p.lead                      a larger first paragraph
    .hint                       secondary text (still 7:1)
    p.loading                   "Opening your handoff." while a view loads
    .visually-hidden            read by screen readers, not shown
    .num                        figures that line up (money, counts)
    .actions                    a row of buttons: <p class="actions"> or <div class="actions">

  BUTTONS (all at least 48px; use <button> or <a>)
    .button.primary             orange: the single main action on a screen. One per screen.
    .button                     quiet secondary: outlined
    .button.link                looks like a link, sized like a button ("Change", "Back"); also for a
                                link on a line of its own ("Read all the questions")
    disabled / aria-busy="true" set by ui.js busy(); a busy button shows a small turning ring

  FORMS
    ui.js field(label, input, hint) builds:
      <div class="field"><label for>…</label><p class="hint">…</p><input…><p class="error" role="alert"></p></div>
    .field.short                for ZIP, price, dates: a narrower input
    input, select, textarea     styled everywhere; aria-invalid="true" marks a field with a problem
    <fieldset><legend>…</legend> … </fieldset>   groups of checkboxes or radios
    <label class="check"><input type="checkbox"> Also share my service notes</label>
                                a checkbox or radio row with a large target (also for type="radio")

  CHOOSING A COMPANY (radio "choice cards"; spans only inside the label)
    <div class="choices" role="radiogroup" aria-labelledby="…">
      <label class="choice"><input type="radio" name="successor" value="…">
        <span class="choice-title">GreenScape</span>
        <span class="choice-body">Mowing since 2004. Licensed and insured.</span>
        <span class="choice-promise">Same service at $45 a visit through November 2027</span>
      </label> …
    </div>
    The checked card gets a heavy outline.

  OTIS
    <section class="guide"><p class="guide-from">Otis</p><h2>…</h2><p>…</p><p class="actions">one button</p></section>
                                the card at the top of every owner and successor screen: a boxed form
                                section with "Otis" and the mark set into its top rule
    <section class="ask"><h2>Ask Otis</h2> field + button … <div class="answer"><p>…</p></div></section>
                                the small "Ask Otis" panel

  PAPER
    <article class="slip"><p class="slip-head">Offer for the Tuesday route</p><p class="slip-title">GreenScape</p>
      <p>…sentence…</p><dl class="facts">…</dl><p class="actions">buttons last</p></article>
                                the paper slip: ruled card with a perforated top edge, for offers, terms and a
                                customer's choice. Keep its text at one size so it sits on the lines.
    <dl class="facts"><div><dt>Customers</dt><dd>60</dd></div> … </dl>
                                key and value facts with dotted leaders, inside or outside a slip
    <div class="letter">…</div> the owner's letter; keeps line breaks in the text

  LISTS OF CUSTOMERS (a table from 700px up, stacked cards below)
    <table class="customers"><thead><tr><th scope="col">Name</th>…</tr></thead>
      <tbody><tr class="customer-row"><td data-label="Name">Ann Lee</td><td data-label="Price" class="num">$45</td>…</tr></tbody></table>
                                every td needs data-label (the card shows it); the first cell is the card's title.
                                A td may hold any mix of text and elements ("$45 <span class="hint">a visit</span>",
                                a .status then a button): in the card it all stays beside the label.
                                Columns share the width equally; set style="width: 6em" on a th to narrow one.
    .unsure                     on a td or field: Otis wasn't sure. Also say so in words, e.g. a .status.waiting

  STATE
    <span class="status">Invited</span>           neutral
    <span class="status waiting">Waiting</span>   amber: waiting for someone; Otis wasn't sure
    <span class="status good">Chosen</span>       green: done, agreed, paid
    <span class="status problem">Disputed</span>  red: needs attention
                                muted colour plus a word; the word always carries the meaning. A long
                                one ("Chose Northfield Lawn") wraps inside its cell.
    <ol class="steps" aria-label="Your progress"><li class="done"><span>About your business</span></li>
      <li aria-current="step"><span>Your customer list</span></li><li><span>Check the list</span></li> …</ol>
                                the step indicator: one bar per step; only the current step's name shows ("Step 2: …")
    <div class="notice" role="status"><p>…</p></div>          information
    <div class="notice problem" role="alert"><p>…</p></div>   a problem, with a ! mark

  OTHER
    <section class="qa"><h2>question</h2><p>answer</p></section>   FAQ entries (written by the build)
    <div class="doors"><a class="button" href="/sell">I'm handing off my customers</a>…</div>
                                two big choices, side by side from 700px
    <ol class="how">            a short numbered sequence (the landing page's five steps)
    .no-print / .print-only     hide on paper / show only on paper

  Print drops the header, footer, navigation, buttons and the guide, and prints black on white.
  Motion: a short fade as a view arrives in <main>; none under prefers-reduced-motion.
*/

@font-face {
  font-family: Barlow;
  src: url("/fonts/barlow-regular.woff") format("woff");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Barlow;
  src: url("/fonts/barlow-semibold.woff") format("woff");
  font-style: normal;
  font-weight: 600 900;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("/fonts/instrument-italic.woff") format("woff");
  font-style: italic;
  font-weight: 400;
  font-display: swap;
}

:root {
  /* colour; contrast is checked in test/unit/build.test.mjs */
  --paper: #f6f4ec;
  --card: #fffdf7;
  --field: #fffefb;
  --ink: #192d24;
  --muted: #3b483f;
  --line: #d5d8c9;
  --rule: #e2e5d7;
  --border: #6b756c;
  --accent: #963712; /* white on it is 7.4:1 */
  --accent-dark: #7d2d0d;
  --on-accent: #ffffff;
  --problem: #8f2a17;
  --tint-info: #e8ede4;
  --tint-good: #e0ebe0;
  --tint-wait: #f3e8cb;
  --tint-problem: #f7e3da;
  --tint-neutral: #e8e7de;
  --good: #2e6b47;
  --wait: #8a6411;
  --neutral: #6b716a;
  /* type: sizes are em, so they follow the page's 18px or 20px */
  --sans: Barlow, Arial, sans-serif;
  --display: "Instrument Serif", Georgia, serif;
  --step--1: 0.9em;
  --step-1: 1.15em;
  --step-2: 1.25em;
  --step-3: 1.4em;
  --step-4: 1.9em;
  /* spacing: em of the text it sits in */
  --space-1: 0.25em;
  --space-2: 0.5em;
  --space-3: 0.75em;
  --space-4: 1em;
  --space-5: 1.5em;
  --space-6: 2em;
  --slip-line: 1.6em;
  /* layout: --measure keeps lines under 70 characters of Barlow */
  --column: 40em;
  --measure: 28em;
  --gutter: 1rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  background: var(--paper);
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.125rem/1.55 var(--sans);
  font-synthesis: none;
  overflow-wrap: break-word;
}
body.roomy {
  font-size: 1.25rem;
}

/* ---------- text ---------- */
h1,
h2,
h3 {
  font-weight: 600;
  line-height: 1.2;
  text-wrap: balance;
  max-width: var(--measure);
}
h1 {
  width: fit-content; /* its focus outline hugs the words, not the whole column */
  font-size: var(--step-4);
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 var(--space-2);
}
h2 {
  font-size: var(--step-3);
  margin: var(--space-6) 0 var(--space-2);
}
h3 {
  font-size: var(--step-1);
  margin: var(--space-5) 0 var(--space-1);
}
.display {
  font-family: var(--display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(2.4em, 1.4em + 4.5vw, 4em);
  line-height: 1.02;
  letter-spacing: -0.015em;
  max-width: 11em;
}
p,
ul,
ol,
dl {
  margin: 0 0 1em;
}
p,
li {
  max-width: var(--measure);
}
ul,
ol {
  padding-left: 1.3em;
}
li + li {
  margin-top: 0.35em;
}
strong {
  font-weight: 600;
}
.lead {
  font-size: var(--step-1);
  line-height: 1.5;
  max-width: 25em;
}
.hint,
.loading {
  color: var(--muted);
}
.num {
  font-variant-numeric: tabular-nums;
}
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

a {
  color: var(--ink);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
a:hover {
  text-decoration-thickness: 2px;
}
/* A phone number to call stays on one line, not "763-555-" over "0100." (review round 7). */
a[href^="tel:"] {
  white-space: nowrap;
}
:focus-visible,
input:focus,
select:focus,
textarea:focus {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}
#main:focus,
[tabindex="-1"]:focus:not(:focus-visible) {
  outline: none;
}

/* ---------- page frame ---------- */
.frame,
#main {
  width: 100%;
  max-width: var(--column);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
#main {
  flex: 1;
  padding-block: 2em 3.5em;
}
#main > * {
  animation: arrive 0.16s ease-out;
}
@keyframes arrive {
  from {
    opacity: 0;
  }
}
#main > section + section {
  margin-top: 2.5em;
  border-top: 1px solid var(--line);
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -10em;
  z-index: 10;
  padding: 0.75em 1em;
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
}
.skip:focus {
  top: 0.75em;
}

.site-header {
  border-bottom: 1px solid var(--line);
}
.site-header .frame {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 1.5em;
  padding-block: 0.4em;
}
.lockup {
  display: inline-flex;
  align-items: center;
  gap: 0.65em;
  min-height: 48px;
  text-decoration: none;
}
.wordmark {
  font-weight: 600;
  font-size: 1.8em;
  line-height: 1;
  letter-spacing: -0.015em;
}
/* the orange dot over the i: a dotless i with the dot drawn in */
.dot-i {
  position: relative;
}
.dot-i::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0.16em;
  width: 0.19em;
  height: 0.19em;
  border-radius: 50%;
  background: var(--accent);
  transform: translateX(-50%);
}
.service {
  padding-left: 0.65em;
  border-left: 2px solid var(--ink);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.12em;
  line-height: 1.3;
  text-transform: uppercase;
}
.site-nav {
  display: flex;
  gap: 0 1.25em;
}
.site-nav a,
.site-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding-inline: 0.2em;
}
.site-nav,
.footer-links {
  margin-left: -0.2em;
}
.bare .site-nav {
  display: none;
}

.site-footer {
  margin-top: 2em;
  border-top: 1px solid var(--line);
  padding-block: 1.25em 2.5em;
  color: var(--muted);
}
.site-footer p {
  margin: 0 0 0.5em;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.5em;
  font-weight: 600;
}

/* ---------- buttons ---------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  min-height: 48px;
  min-width: 48px;
  padding: 0.5em 1.15em;
  border: 2px solid var(--ink);
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.button:hover {
  background: var(--tint-neutral);
}
.button.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--on-accent);
}
.button.primary:hover {
  border-color: var(--accent-dark);
  background: var(--accent-dark);
}
.button.link {
  border-color: transparent;
  border-inline-width: 0;
  background: none;
  padding-inline: 0;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
.button.link:hover {
  text-decoration-thickness: 2px;
}
.button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
[aria-busy="true"] {
  cursor: progress;
}
.button[aria-busy="true"]::after {
  content: "";
  width: 0.85em;
  height: 0.85em;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: turn 0.8s linear infinite;
}
@keyframes turn {
  to {
    transform: rotate(1turn);
  }
}
.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3) var(--space-4);
  margin: var(--space-5) 0;
}
@media (max-width: 479.98px) {
  .actions > .button.primary {
    flex: 1 1 100%;
  }
}

/* ---------- forms ---------- */
.field {
  margin: 0 0 var(--space-5);
  max-width: var(--measure);
}
.field > label,
legend {
  display: block;
  padding: 0;
  margin-bottom: 0.2em;
  font-weight: 600;
}
.field .hint {
  margin: 0 0 0.4em;
}
input:not([type="checkbox"], [type="radio"], [type="file"]),
select,
textarea {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 0.45em 0.7em;
  border: 2px solid var(--border);
  border-radius: 4px;
  background: var(--field);
  color: var(--ink);
  font: inherit;
}
select {
  appearance: none;
  padding-right: 2.4em;
  background: var(--field) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 10'%3E%3Cpath d='M1 1l7 7 7-7' fill='none' stroke='%23192d24' stroke-width='2.5'/%3E%3C/svg%3E") no-repeat right 0.8em center / 0.9em auto;
}
textarea {
  min-height: 8em;
  line-height: 1.5;
  resize: vertical;
}
input[type="file"] {
  max-width: 100%;
  font: inherit;
}
::file-selector-button {
  min-height: 48px;
  margin-right: 0.8em;
  padding: 0.45em 1em;
  border: 2px solid var(--ink);
  border-radius: 6px;
  background: var(--card);
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.field.short input,
.field.short select {
  max-width: 11em;
}
[aria-invalid="true"] {
  border-color: var(--problem) !important;
  box-shadow: inset 0 0 0 1px var(--problem);
}
.error {
  margin: 0.4em 0 0;
  color: var(--problem);
  font-weight: 600;
}
.error:empty {
  display: none;
}
.error::before,
.notice.problem::before {
  content: "!" / "";
  display: inline-grid;
  place-items: center;
  width: 1.3em;
  height: 1.3em;
  margin-right: 0.45em;
  border-radius: 50%;
  background: var(--problem);
  color: #fff;
  font-size: 0.85em;
  font-weight: 600;
  line-height: 1;
}
fieldset {
  min-width: 0;
  margin: 0 0 1.35em;
  padding: 0;
  border: 0;
}
.check {
  display: flex;
  align-items: flex-start;
  gap: 0.7em;
  min-height: 48px;
  max-width: var(--measure);
  padding-block: 0.55em;
  cursor: pointer;
}
.check input,
.choice input {
  flex: none;
  width: 1.45em;
  height: 1.45em;
  margin: 0.05em 0 0;
  accent-color: var(--ink);
}

.choices {
  display: grid;
  gap: 0.8em;
  max-width: var(--measure);
  margin: 0 0 1.5em;
}
.choice {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.25em 0.9em;
  align-items: start;
  padding: 1em 1.15em;
  border: 2px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  cursor: pointer;
}
.choice > span {
  display: block;
  grid-column: 2;
}
.choice-title {
  grid-row: 1;
  font-size: var(--step-1);
  font-weight: 600;
}
.choice-body {
  color: var(--muted);
}
.choice-promise {
  font-weight: 600;
}
.choice:has(input:checked) {
  border-color: var(--ink);
  box-shadow: inset 0 0 0 2px var(--ink);
  background: var(--field);
}
.choice:has(input:focus-visible) {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

/* ---------- Otis ---------- */
/* The guide is a boxed section of a form, its "Otis" label set into the top rule. */
.guide {
  position: relative;
  max-width: var(--measure);
  margin: var(--space-4) 0 var(--space-6);
  padding: var(--space-5) var(--space-4) var(--space-4);
  border: 2px solid var(--ink);
  border-radius: 8px;
}
.guide-from,
.ask h2 {
  display: flex;
  align-items: center;
  gap: 0.5em;
}
.guide-from {
  position: absolute;
  top: 0;
  left: 0.9em;
  margin: 0;
  padding: 0 0.45em;
  background: var(--paper);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.1em;
  line-height: 1;
  text-transform: uppercase;
  transform: translateY(-50%);
}
.guide-from::before,
.ask h2::before {
  content: "";
  flex: none;
  width: 1.6em;
  height: 1.6em;
  background: url("/brand/icon.svg") center / contain no-repeat;
}
.guide h2 {
  margin: 0 0 var(--space-1);
  font-size: var(--step-2);
}
.guide .actions {
  margin-bottom: 0;
}
.guide > :last-child,
.notice > :last-child,
.ask > :last-child,
.answer > :last-child {
  margin-bottom: 0;
}

.ask {
  max-width: var(--measure);
  margin: 2.5em 0 1em;
  padding: 1em 1.25em;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
}
.ask h2 {
  margin: 0 0 0.6em;
  font-size: var(--step-2);
  font-weight: 600;
}
.answer {
  margin: 0.8em 0;
  padding: 0.75em 1em;
  border-radius: 6px;
  background: var(--tint-info);
}

/* ---------- paper ---------- */
/* The slip: one rule every --slip-line; text sits on the lines, so its children keep one size. */
.slip {
  position: relative;
  max-width: var(--measure);
  margin: 0 0 var(--space-5);
  padding: calc(2 * var(--slip-line)) var(--space-4) var(--slip-line);
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 6px 6px;
  background-color: var(--card);
  background-image: linear-gradient(var(--card), var(--card)),
    linear-gradient(transparent calc(var(--slip-line) - 1px), var(--rule) 0);
  background-size: 100% calc(2 * var(--slip-line)), 100% var(--slip-line);
  background-position: 0 0, 0 -0.3em;
  background-repeat: no-repeat, repeat;
  box-shadow: 0 12px 20px -16px rgb(25 45 36 / 0.5);
  line-height: var(--slip-line);
}
.slip::before {
  /* the torn edge: half holes along the top */
  content: "";
  position: absolute;
  inset: 0 -1px auto;
  height: 8px;
  background: radial-gradient(circle at 7px 0, var(--paper) 4.5px, transparent 5px) 0 0 / 14px 8px repeat-x;
}
.slip::after {
  /* the perforation */
  content: "";
  position: absolute;
  inset: 1.45em 1.25em auto;
  border-top: 2px dashed var(--border);
}
.slip > *,
.slip .facts > div {
  margin: 0;
  padding: 0;
  font-size: inherit;
  line-height: inherit;
}
.slip > * + * {
  margin-top: var(--slip-line);
}
.slip-head {
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.slip > .slip-title {
  margin-top: 0;
  font-size: var(--step-2);
  line-height: 2.56em; /* two slip lines: 2 × 1.6em of the slip, in em of this 1.25em text */
  font-weight: 600;
}
.slip > .actions {
  margin-top: var(--slip-line);
}

.facts {
  max-width: var(--measure);
  padding: 0;
}
.facts > div {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 0.45em;
  padding-block: 0.15em;
}
.facts > div::after {
  /* the dotted leader between the words and the figure */
  content: "";
  order: 1;
  flex: 1 0 0.75em;
  border-bottom: 2px dotted var(--border);
}
.facts dt {
  order: 0;
}
.facts dd {
  order: 2;
  margin: 0 0 0 auto;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.facts dd a {
  /* a phone number or email to tap: 48px tall without moving the rows */
  display: inline-block;
  padding-block: 13px;
  margin-block: -13px;
}

.letter {
  max-width: var(--measure);
  margin: 0 0 1.5em;
  padding: 1.5em 1.5em 1.75em;
  border: 1px solid var(--line);
  background: var(--field);
  box-shadow: 0 12px 20px -16px rgb(25 45 36 / 0.5);
  white-space: pre-line;
}

/* ---------- customers ---------- */
/* fixed layout: the table always fits the column; give narrow columns a width on their th */
.customers {
  width: 100%;
  margin: 0 0 1.5em;
  border-collapse: collapse;
  table-layout: fixed;
}
.customers th {
  padding: 0.5em 0.6em;
  border-bottom: 2px solid var(--ink);
  color: var(--muted);
  font-size: var(--step--1);
  font-weight: 600;
  text-align: left;
}
.customers td {
  padding: 0.6em;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.customers .num {
  text-align: right;
}
.unsure {
  background: var(--tint-wait);
  box-shadow: inset 0 -3px 0 var(--wait);
}
@media (max-width: 699.98px) {
  .customers thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  .customers,
  .customers tbody,
  .customer-row {
    display: block;
  }
  .customer-row {
    margin: 0 0 0.8em;
    padding: 0.7em 1em;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--card);
  }
  /* each cell is a one-row table: the label is the first cell, and the browser wraps everything
     else in the td (text, spans, buttons, in any mix) in one second cell beside it */
  .customers td {
    display: table;
    table-layout: fixed;
    width: 100%;
    padding: 0.25em 0;
    border: 0;
  }
  .customers td.num {
    text-align: left;
  }
  .customers td::before {
    content: attr(data-label);
    display: table-cell;
    width: 6.5em; /* a length, not max(): fixed table layout ignores max() and splits 50/50 */
    padding-right: 0.75em;
    color: var(--muted);
    font-weight: 600;
  }
  .customers td:first-child {
    display: block;
    font-size: var(--step-1);
    font-weight: 600;
  }
  .customers td:first-child::before {
    content: none;
  }
}

/* ---------- state ---------- */
/* a long status wraps inside its cell; the dot stays on the first line */
.status {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.45em;
  max-width: 100%;
  padding: 0.1em 0.6em;
  border-radius: 4px;
  background: var(--tint-neutral);
  color: var(--ink);
  font-size: var(--step--1);
  font-weight: 600;
  line-height: 1.5;
}
.status::before {
  content: "";
  flex: none;
  width: 0.6em;
  height: 0.6em;
  margin-top: 0.45em;
  border-radius: 50%;
  background: var(--neutral);
}
.status.good {
  background: var(--tint-good);
}
.status.good::before {
  background: var(--good);
}
.status.waiting {
  background: var(--tint-wait);
}
.status.waiting::before {
  background: var(--wait);
}
.status.problem {
  background: var(--tint-problem);
}
.status.problem::before {
  background: var(--problem);
}

.steps {
  position: relative;
  display: flex;
  gap: 4px;
  max-width: var(--measure);
  margin: 0 0 1.5em;
  padding: 0 0 2em;
  list-style: none;
  counter-reset: step;
}
.steps li {
  flex: 1;
  height: 6px;
  margin: 0;
  border-radius: 3px;
  background: var(--line);
  counter-increment: step;
}
.steps li.done {
  background: var(--border);
}
.steps li[aria-current="step"] {
  height: 10px;
  margin-top: -2px;
  background: var(--ink);
}
.steps li > span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.steps li[aria-current="step"] > span {
  left: 0;
  bottom: 0;
  width: auto;
  height: auto;
  overflow: visible;
  clip-path: none;
  font-weight: 600;
}
.steps li[aria-current="step"] > span::before {
  content: "Step " counter(step) ": ";
}

.notice {
  position: relative;
  max-width: var(--measure);
  margin: 0 0 var(--space-5);
  padding: var(--space-3) var(--space-4);
  border: 2px solid var(--line);
  border-radius: 6px;
  background: var(--tint-info);
}
.notice.problem {
  padding-left: 2.9em;
  border-color: var(--problem);
  background: var(--tint-problem);
}
.notice.problem::before {
  position: absolute;
  left: 0.85em;
  top: 0.95em;
  margin: 0;
}

/* ---------- other ---------- */
.qa {
  border-top: 1px solid var(--line);
}
.qa h2,
.qa h3 {
  margin: var(--space-4) 0 var(--space-1);
  font-size: var(--step-1);
}
.doors {
  display: grid;
  gap: 1em;
  max-width: var(--measure);
  margin: 0 0 1.5em;
}
.doors a {
  display: block;
  height: 100%;
  padding: 1em 1.2em;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--card);
  font-size: var(--step-1);
  font-weight: 600;
  text-decoration: none;
}
.doors a:hover {
  background: var(--field);
  box-shadow: inset 0 0 0 1px var(--ink);
}
@media (min-width: 700px) {
  .doors {
    grid-template-columns: 1fr 1fr;
  }
}
.how {
  padding: 0;
  list-style: none;
  counter-reset: how;
}
.how li {
  display: grid;
  grid-template-columns: 2em 1fr;
  gap: 0.6em;
  margin: 0;
  padding-block: 0.7em;
  border-bottom: 1px solid var(--line);
  counter-increment: how;
}
.how li::before {
  content: counter(how);
  font-family: var(--display);
  font-size: 1.7em;
  font-style: italic;
  line-height: 0.95;
}
.hero {
  padding-top: 0.5em;
}
.hero .lead {
  margin-top: 1em;
}
.print-only {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  .site-header,
  .site-footer,
  .skip,
  nav,
  .steps,
  .guide,
  .ask,
  .no-print,
  button,
  .button,
  input[type="file"] {
    display: none !important;
  }
  .print-only {
    display: block !important;
  }
  *,
  *::before,
  *::after {
    color: #000 !important;
    background: transparent !important;
    box-shadow: none !important;
    animation: none !important;
  }
  html,
  body {
    background: #fff !important;
  }
  body {
    font-size: 12pt;
  }
  #main {
    max-width: none;
    padding: 0;
  }
  .slip::before {
    display: none;
  }
  .slip,
  .letter,
  .notice,
  .choice,
  .customer-row,
  .status {
    border: 1px solid #000 !important;
    break-inside: avoid;
  }
}
