/*
  Technician Diagnostics: the "Sheet" layout in Navy (PRO-118).
  Every color, size and space comes from tokens.css, which each page loads
  first. tokens.css is a copy of docs/design/tokens.css, and a test keeps the
  two the same. Each screen is one white page; rows sit in soft grey groups;
  navy appears where you can act. Light theme only.
*/

:root { color-scheme: light; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: var(--text-body);
  line-height: var(--line-height);
}

/* The focus ring: navy on light surfaces, light blue on dark ones. */
:focus-visible { outline: var(--focus-ring) solid var(--focus-color); outline-offset: 2px; }
.split-panel :focus-visible,
.banner-stop :focus-visible,
.banner-lock :focus-visible { outline-color: var(--focus-color-on-dark); }

h1, .title { font-size: var(--text-title); font-weight: 700; line-height: 1.2; margin: 0 0 var(--space-6); }
h2 { font-size: var(--text-row); font-weight: 600; line-height: 1.3; margin: var(--space-6) 0 var(--space-2); }
h3 { font-size: var(--text-row); font-weight: 600; line-height: 1.3; margin: 0 0 var(--space-2); }
p { margin: 0 0 var(--space-3); }
.hint { color: var(--ink-2); font-size: var(--text-small); margin: var(--space-1) 0 0; }
p.hint { margin-bottom: var(--space-3); }
.number { font-family: var(--font-number); font-variant-numeric: tabular-nums slashed-zero; }
a { color: var(--navy); }

/* Sign-in: a navy panel with the logo, the step line and a faint meter image, then the form.
   On the phone the panel is a band above the form (docs/design/ux-concepts-navy.md, section 4). */
.split { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
.split-panel {
  position: relative;
  overflow: hidden;
  padding: var(--space-8) var(--edge-phone) var(--space-6);
  background: var(--navy);
  color: var(--white);
}
.split-image { display: none; }
.brand {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin: 0;
  color: var(--white);
  font-size: var(--text-brand-phone);
  font-weight: 700;
  line-height: 1.15;
}
.logo { width: var(--logo-phone); height: var(--logo-phone); flex: none; color: var(--white); }
/* The step line: six dots on one 2 px light-blue line. Flat with no labels on the phone. */
.steps {
  position: relative;
  display: flex;
  justify-content: space-between;
  list-style: none;
  margin: var(--edge-phone) 0 0;
  padding: 0;
  color: var(--sky);
  font-size: var(--text-small);
  font-weight: 600;
}
.steps::before {
  content: "";
  position: absolute;
  left: calc(var(--dot) / 2);
  right: calc(var(--dot) / 2);
  top: calc(var(--dot) / 2 - 1px);
  border-top: var(--outline) solid var(--sky);
}
.steps li { position: relative; width: var(--dot); height: var(--dot); overflow: hidden; text-indent: 100%; white-space: nowrap; }
.steps li::before {
  content: "";
  position: absolute;
  inset: 0;
  border: var(--outline) solid var(--sky);
  border-radius: 50%;
  background: var(--navy);
}
.steps li:first-child::before { background: var(--sky); }
.split-main { display: flex; justify-content: center; align-items: flex-start; padding: var(--space-8) var(--edge-phone); }
.sign-in { width: 100%; max-width: var(--form-width); }
.sign-in h1 { margin-bottom: var(--space-6); }
.sign-in label:not(.check) { font-size: var(--text-small); margin: var(--space-4) 0 var(--space-2); }
.sign-in h1 + label { margin-top: 0; }
.sign-in .field { margin-top: 0; }
.sign-in .check { margin-top: var(--space-4); font-size: var(--text-body); font-weight: 400; }
.sign-in .check input { width: 22px; height: 22px; }
.sign-in .btn-main { margin-top: var(--space-6); font-weight: 700; }
/* The demo's one-tap people (PRO-124), only on npm run demo: one button each, two across from 600 px. */
.demo-people { margin-bottom: var(--space-2); }
.demo-people h2 { font-size: var(--text-body); margin: 0; }
.demo-buttons { display: grid; grid-template-columns: 1fr; gap: var(--space-2); margin-top: var(--space-2); }
.demo-person { min-height: var(--tap-main); flex-direction: column; align-items: flex-start; justify-content: center; text-align: left; }
.demo-name { font-weight: 700; }
.demo-role { font-size: var(--text-small); color: var(--ink-2); font-weight: 400; }
.demo-or { margin: var(--space-6) 0 0; padding-top: var(--space-4); border-top: 1px solid var(--edge); font-size: var(--text-small); color: var(--ink-2); }
@media (min-width: 600px) { .demo-buttons { grid-template-columns: 1fr 1fr; } }
/* The server's own words under the password, on a red tint, with a cross. Empty, it takes no room. */
.sign-in .error:empty { min-height: 0; margin: 0; }
.sign-in .error:not(:empty) {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin: var(--space-2) 0 0;
  padding: var(--space-2) var(--space-3);
  background: var(--fail-tint);
  color: var(--fail);
  border-radius: var(--radius-control);
  font-size: var(--text-small);
}
/* A quiet action that reads as a link. */
.link-button {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap-min);
  margin-top: var(--space-4);
  padding: 0;
  background: transparent;
  border: 0;
  color: var(--navy);
  font: inherit;
  font-size: var(--text-link);
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}
#forgot-line { margin: 0; }

/* The page on every signed-in screen: a full-width navy bar, then one white column. */
.screen-full { margin: 0; padding: 0; }
.column { max-width: var(--column-pc); margin: 0 auto; padding: var(--space-6) var(--edge-phone) 0; }
.screen { max-width: var(--column-pc); margin: 0 auto; padding: var(--space-4) var(--edge-phone) var(--space-8); }
.screen-wide { max-width: 72rem; }

/* The navy top bar: back on the left, your initials on the right. */
.bar { background: var(--navy); color: var(--white); }
.bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  min-height: var(--tap-main);
  max-width: var(--column-pc);
  margin: 0 auto;
  padding: 0 var(--edge-phone);
}
.bar :focus-visible { outline-color: var(--focus-color-on-dark); }
.bar-end { margin-left: auto; }
.bar-title { font-size: var(--text-row); font-weight: 600; }
.back {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  min-height: var(--tap-min);
  min-width: var(--tap-min);
  color: var(--white);
  font-size: var(--text-row);
  font-weight: 600;
  text-decoration: none;
}
.back .icon { width: 1.3em; height: 1.3em; margin-left: calc(-1 * var(--space-1)); }

/* Words for a screen reader only. */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* A short screen in a narrow column: the lock screen, a notice. */
.narrow { max-width: var(--form-width); margin: 0 auto; padding: calc(var(--space-12) * 2 + var(--space-6)) var(--edge-phone) var(--space-8); }
.lock-title { margin-bottom: var(--space-8); }
.mark.mark-title { font-size: var(--text-lock); font-weight: 700; padding: var(--space-1) var(--space-3); }
.narrow label { font-size: var(--text-small); margin: 0 0 var(--space-2); }
.narrow .field { margin-top: 0; }
.narrow .btn-main { margin-top: var(--space-6); font-weight: 700; }

/* The account menu: initials in a light-blue circle that open your name and Sign out. */
.account { position: relative; }
.account summary {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap-min);
  min-width: var(--tap-min);
  border-radius: 50%;
  background: var(--sky);
  color: var(--navy);
  font-size: var(--text-small);
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}
.account summary::-webkit-details-marker { display: none; }
.account-menu {
  position: absolute;
  right: 0;
  top: calc(100% + var(--space-2));
  z-index: 3;
  min-width: 14rem;
  padding: var(--space-3);
  background: var(--white);
  color: var(--ink);
  border: var(--outline) solid var(--hairline);
  border-radius: var(--radius-group);
}
.account-menu p { margin: 0 0 var(--space-2); font-weight: 600; overflow-wrap: anywhere; }

/* Group: rows or fields that belong together, on soft grey. No outline. */
.group, .card {
  background: var(--frost);
  color: var(--ink);
  border-radius: var(--radius-group);
  padding: var(--space-4);
  margin-bottom: var(--space-6);
}
.group > :first-child, .card > :first-child { margin-top: 0; }
.group > :last-child, .card > :last-child { margin-bottom: 0; }
.group-title { font-size: var(--text-small); font-weight: 600; color: var(--ink-2); margin: var(--space-6) 0 var(--space-2); }

/* Two short fields side by side. */
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--tap-gap); }
/* What a choice turns on, shown as soon as it is picked. */
.choice-result { margin: var(--space-3) 0 0; }

.group > .field-row:first-child label { margin-top: 0; }

/* Fields: the label always above, never inside. */
label { display: block; font-weight: 600; margin-top: var(--space-4); }
.field {
  display: block;
  width: 100%;
  min-height: var(--tap-field);
  margin-top: var(--space-1);
  padding: var(--space-3);
  background: var(--white);
  color: var(--ink);
  border: var(--outline) solid var(--edge);
  border-radius: var(--radius-control);
  font: inherit;
}
.field.field-number { font-family: var(--font-number); font-variant-numeric: tabular-nums slashed-zero; }
textarea.field { min-height: calc(var(--tap-field) * 2); resize: vertical; }
.field[aria-invalid="true"] { border-color: var(--fail); border-width: var(--outline-chosen); }
.field:disabled { background: var(--off); color: var(--ink-2); }
/* Always rendered, so a screen reader speaks the alert when words appear in it. */
.error { color: var(--fail); font-weight: 600; margin: var(--space-2) 0 0; min-height: 1.35em; }

/* A tick box with its words. The whole label is the target. */
.check {
  display: flex;
  gap: var(--space-3);
  align-items: center;
  min-height: var(--tap-min);
  padding: var(--space-2) 0;
  font-weight: 600;
}
.check input { width: 24px; height: 24px; margin: 0; flex: none; accent-color: var(--navy); }
.check .hint { display: block; font-weight: 400; }

/* Buttons. One main button per screen: it is the next step. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: var(--tap);
  min-width: var(--tap-min);
  padding: var(--space-2) var(--space-4);
  border: var(--outline) solid transparent;
  border-radius: var(--radius-control);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
}
.btn-block { display: flex; width: 100%; margin-top: var(--space-4); }
.btn-main { background: var(--navy); border-color: var(--navy); color: var(--white); font-weight: 700; }
.btn-main:active { background: var(--blue-deep); border-color: var(--blue-deep); }
/* The main action is 56 high, so a gloved thumb finds it. */
.btn-main.btn-block { min-height: var(--tap-main); }
.btn-quiet { background: var(--white); border-color: var(--edge); color: var(--navy); }
.btn-quiet:active { background: var(--frost); }
/* A quiet action that reads as a link: Sign out, Sign out from the lock screen. */
.btn-link { background: transparent; border-color: transparent; color: var(--navy); text-decoration: underline; padding-left: 0; padding-right: 0; }
.btn-danger { background: var(--fail); border-color: var(--fail); color: var(--white); }
.btn:disabled,
.btn[aria-disabled="true"] { background: var(--off); border-color: var(--off); color: var(--ink-2); cursor: not-allowed; }
.btn-link:disabled { background: transparent; border-color: transparent; }
/* A main button that is off says why in its own label; a longer reason, when the app sends one, sits above it. */
.reason { color: var(--ink-2); font-size: var(--text-small); margin: 0 0 var(--space-2); }

/* The main action: pinned to the bottom, under the thumb. */
.bottom-bar {
  position: sticky;
  bottom: 0;
  z-index: 1;
  margin: var(--space-6) calc(-1 * var(--edge-phone)) 0;
  padding: var(--space-3) var(--edge-phone);
  background: var(--white);
  border-top: var(--outline-thin) solid var(--hairline);
}
.bottom-bar .btn-main { min-height: var(--tap-main); }
.bottom-bar .btn-block { margin-top: 0; }
.bottom-bar .btn-block + .btn-block { margin-top: var(--space-2); }

/* Choice strip: one choice out of two to four. Its options touch: they are one control. */
.choice { border: 0; margin: var(--space-4) 0 0; padding: 0; min-width: 0; }
.choice legend { font-weight: 600; padding: 0; margin-bottom: var(--space-1); }
.choice-options { display: flex; }
.choice-options label { flex: 1 1 0; display: flex; margin: 0; }
/* Each segment fills its label, so a two-line word keeps the strip even. */
.choice-options label > span { flex: 1 1 auto; text-align: center; }
.choice-options input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice-options span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  min-height: var(--tap);
  padding: var(--space-2) var(--space-3);
  background: var(--white);
  color: var(--ink);
  border: var(--outline) solid var(--edge);
  margin-left: calc(-1 * var(--outline));
  cursor: pointer;
}
.choice-options label:first-child span { margin-left: 0; border-radius: var(--radius-control) 0 0 var(--radius-control); }
.choice-options label:last-child span { border-radius: 0 var(--radius-control) var(--radius-control) 0; }
.choice-options input:checked + span { background: var(--navy); border-color: var(--navy); color: var(--white); position: relative; }
.choice-options .tick { display: none; }
.choice-options input:checked + span .tick { display: inline; }
.choice-options input:focus-visible + span { outline: var(--focus-ring) solid var(--focus-color); outline-offset: 2px; position: relative; }

/* Toggle tiles: pick any number. A lit tile has a tick. */
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--tap-gap); margin-top: var(--space-1); }
.tiles label { display: flex; margin: 0; }
.tiles label > span { flex: 1 1 auto; }
.tiles input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tiles span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  min-height: var(--tap);
  padding: var(--space-2) var(--space-3);
  background: var(--white);
  color: var(--ink);
  border: var(--outline) solid var(--edge);
  border-radius: var(--radius-control);
  cursor: pointer;
}
.tiles .tick { display: none; }
.tiles input:checked + span { background: var(--sky); border-color: var(--navy); border-width: var(--outline-chosen); color: var(--navy); }
.tiles input:checked + span .tick { display: inline; }
.tiles input:focus-visible + span { outline: var(--focus-ring) solid var(--focus-color); outline-offset: 2px; }
/* A choice that is off until something else is done first. */
.tiles input:disabled + span,
.choice-options input:disabled + span { background: var(--off); color: var(--ink-2); border-color: var(--hairline); cursor: not-allowed; }

/* A gap Paul's PRD leaves open: dashed, so it is never read as content. */
.gap { display: inline-block; margin: var(--space-1) 0 0; padding: 2px var(--space-2); color: var(--ink); background: var(--white); border: var(--outline-thin) dashed var(--edge); border-radius: var(--radius-mark); font-size: var(--text-small); }

/* The four answers to a Tier-1 check: two rows of two, each with an icon and the full word (A24). */
.check-item { padding: var(--space-3) 0; }
.check-item + .check-item { border-top: var(--outline-thin) solid var(--hairline); }
.check-item-text { font-weight: 600; margin: 0; }
.answers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--tap-gap); margin-top: var(--space-3); }
.answer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  min-height: var(--tap-answer);
  padding: var(--space-2);
  background: var(--white);
  color: var(--ink);
  border: var(--outline) solid var(--edge);
  border-radius: var(--radius-control);
  font: inherit;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
}
.answer:disabled { cursor: not-allowed; }
.answer-chosen { border-width: var(--outline-chosen); }
.answer-chosen.answer-pass { background: var(--pass-tint); color: var(--pass); border-color: var(--pass); }
.answer-chosen.answer-fail { background: var(--fail); color: var(--white); border-color: var(--fail); }
.answer-chosen.answer-not_applicable { background: var(--off); color: var(--ink); border-color: var(--ink); }
.answer-chosen.answer-not_accessible { background: var(--off); color: var(--ink); border-color: var(--ink); }
/* A cause and its mark on one line; its tests under it. */
.item-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2); }
.test-line { margin: var(--space-3) 0 0; color: var(--ink-2); font-size: var(--text-small); overflow-wrap: anywhere; }
.test-line + .mark { margin-top: var(--space-2); }
/* What a test means for a cause: three choices. Dashed while none is confirmed. */
.effects { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--tap-gap); margin-top: var(--space-2); padding: var(--space-1); border: var(--outline) solid transparent; border-radius: var(--radius-control); }
.effects .btn { padding-left: var(--space-2); padding-right: var(--space-2); }
.effects-open { border-color: var(--edge); border-style: dashed; }
/* The meaning already chosen: lit, like a chosen tile, and off so it is not written twice. */
.effects .btn[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: var(--white); cursor: default; }
/* A reading: 32 shown, 28 while typed, in the number face. The unit sits beside it, in its own field when typed. */
.reading-shown { white-space: nowrap; }
.reading { font-family: var(--font-number); font-variant-numeric: tabular-nums slashed-zero; font-size: var(--number-reading); font-weight: 600; line-height: 1.1; color: var(--ink); }
.reading-fields .field-number { font-size: var(--number-reading-edit); }
.reading-fields { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: var(--tap-gap); }
.reading-fields label { margin-top: var(--space-2); }

/* Icons are drawn in the text color, beside a word, never alone. */
.icon { width: 1.1em; height: 1.1em; flex: none; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }

/* Status mark: a word, an icon and a fill, always all three. */
.mark {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 2px var(--space-2);
  border: var(--outline) solid transparent;
  border-radius: var(--radius-mark);
  font-size: var(--text-small);
  font-weight: 600;
  max-width: 100%;
  /* A long mark wraps between words; a short one never breaks inside a word. */
  overflow-wrap: break-word;
}
.mark-pass { background: var(--pass-tint); color: var(--pass); }
.mark-fail { background: var(--fail); color: var(--white); }
.mark-stopped { background: var(--fail); color: var(--white); }
/* Yellow: high voltage, and the locked safety steps. Charcoal text on it. */
.mark-hv, .mark-locked, .mark-warn { background: var(--lock-mark); color: var(--ink); }
/* Neutral: told apart by word and icon, never by a color of their own. */
.mark-neutral, .mark-na, .mark-not-accessible, .mark-waiting, .mark-parked { background: var(--off); color: var(--ink); }
.mark-step { background: var(--white); color: var(--ink); border-color: var(--hairline); }
/* High voltage on a list: quiet, white with an outline. The yellow one is for inside the job. */
.mark-hv-quiet { background: var(--white); color: var(--ink); border-color: var(--edge); }
/* A cause in Tier-2: untested (a dashed ring), supported, ruled out, the root cause. */
.mark-untested { background: var(--white); color: var(--ink-2); border-style: dashed; border-color: var(--edge); }
.mark-supported { background: var(--sky); color: var(--navy); }
.mark-confirmed { background: var(--pass); color: var(--white); }
/* Read or proposed by the app and not confirmed: a dashed outline, not a color. */
.mark-proposal { background: var(--white); color: var(--ink); border-style: dashed; border-color: var(--edge); }

/* Banner: something about the whole screen or the whole job. */
.banner {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-group);
  margin-bottom: var(--space-6);
}
.banner .icon { width: 24px; height: 24px; margin-top: 1px; }
.banner p { margin: 0; }
.banner p + p { margin-top: var(--space-1); }
.banner .btn { margin-top: var(--space-3); }
.banner-title { font-weight: 700; }
.banner-info { background: var(--frost); color: var(--ink); }
.banner-good { background: var(--pass-tint); color: var(--ink); }
.banner-warn { background: var(--off); color: var(--ink); }
.banner-good .icon { color: var(--pass); }
.banner-stop { background: var(--fail); color: var(--white); }
.banner-lock { background: var(--lock); color: var(--white); }
.banner-lock .icon,
.banner-lock .banner-title { color: var(--lock-mark); }
/* A mark on the band keeps its own text color for its icon. */
.banner-lock .mark .icon { color: inherit; }
.banner-lock p { margin-top: var(--space-2); }

/* List rows: the whole row is the target, 56 or taller. */
.rows { list-style: none; margin: 0 0 var(--space-6); padding: 0 var(--space-4); background: var(--frost); border-radius: var(--radius-group); }
.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  min-height: var(--tap-row);
  padding: var(--space-3) 0;
  color: var(--ink);
  text-decoration: none;
}
.rows li + li { border-top: var(--outline-thin) solid var(--hairline); }
/* Rows inside a group sit on the group's own wash. */
.rows-inset { padding: 0; margin: 0 0 var(--space-3); background: transparent; }
a.row:active { background: var(--frost); }
.row-main { min-width: 0; flex: 1 1 auto; display: flex; flex-direction: column; gap: 2px; }
.row-title { font-weight: 600; overflow-wrap: anywhere; }
.row-sub { display: block; color: var(--ink-2); font-size: var(--text-small); }
.row-end { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--space-1); flex: none; max-width: 50%; }

/* A row that opens: the record, a finished step. */
.fold { background: var(--frost); border-radius: var(--radius-group); padding: 0 var(--space-4); margin-bottom: var(--space-6); }
.fold > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  min-height: var(--tap-row);
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary::after {
  content: "";
  flex: none;
  width: var(--space-2);
  height: var(--space-2);
  margin: 0 var(--space-1);
  border-right: var(--outline) solid var(--navy);
  border-bottom: var(--outline) solid var(--navy);
  transform: rotate(45deg);
}
.fold[open] > summary::after { transform: rotate(225deg); }
.fold-count { margin-left: auto; color: var(--ink-2); font-size: var(--text-small); font-weight: 400; }
.fold > summary .mark:first-child + .fold-count { margin-left: auto; }
.fold > .group, .fold > .banner { margin-bottom: var(--space-3); }
.fold > .group { background: var(--white); }
.group-white { background: var(--white); border: var(--outline-thin) solid var(--hairline); }
.fold > .hint { margin: 0 0 var(--space-3); }
.fold[open] { padding-bottom: var(--space-3); }
.fold .rows { padding: 0; margin: 0; background: transparent; border-top: var(--outline-thin) solid var(--hairline); }

/* Sample strip: on any part that shows made-up entries. */
.sample-strip {
  display: inline-block;
  padding: 2px var(--space-2);
  margin: 0 0 var(--space-3);
  background: var(--white);
  color: var(--ink);
  border: var(--outline) dashed var(--edge);
  border-radius: var(--radius-mark);
  font-size: var(--text-small);
  font-weight: 600;
}

/* The job's header: RO, the customer's words, the car, its marks. */
.job-head { margin-bottom: var(--space-6); }
.job-head h1 { margin-bottom: var(--space-2); }
/* PRO-58: the QR code that opens the job on a phone, on wide screens only. */
.job-qr { display: none; }
/* The step strip: a segment per step. Done is charcoal, now is light blue and taller, later is pale, skippable is dashed. */
.step-strip { display: flex; align-items: center; gap: var(--space-1); list-style: none; margin: 0 0 var(--space-3); padding: 0; }
.step-strip li { flex: 1 1 0; height: var(--strip); border-radius: var(--radius-mark); }
.step-strip .strip-done { background: var(--ink); }
.step-strip .strip-now { height: var(--strip-current); background: var(--sky); }
.step-strip .strip-later { background: var(--hairline); }
.step-strip .strip-done.strip-skippable,
.step-strip .strip-later.strip-skippable { background: transparent; border-top: var(--outline) dashed var(--edge); height: 0; }
.step-name { margin: 0 0 var(--space-1); color: var(--navy); font-size: var(--text-small); font-weight: 700; }
.job-line { margin: 0 0 var(--space-3); color: var(--ink-2); font-size: var(--text-small); overflow-wrap: anywhere; }

/* New job: rows of a label at left and its field, no box around the field. */
.form-rows { padding-top: 0; padding-bottom: 0; }
.form-row { display: grid; grid-template-columns: var(--label-width) minmax(0, 1fr); align-items: center; gap: var(--space-3); min-height: var(--tap-field); }
.form-row + .form-row { border-top: var(--outline-thin) solid var(--hairline); }
.form-row label { margin: 0; font-size: var(--text-small); }
/* No outline round the field: a white well in the row shows where to type. */
.form-row { padding: var(--space-1) 0; }
.form-row .field { margin: 0; min-height: var(--tap-min); padding: var(--space-2) var(--space-3); border-color: transparent; background: var(--white); }

/* A row with an action after its field: the VIN and its Decode button. */
/* On a phone the button sits under the field, so a whole VIN stays in view; from 768 up it sits beside it. */
.form-row-action .btn { grid-column: 2; justify-self: start; min-height: var(--tap-min); padding-top: 0; padding-bottom: 0; margin-bottom: var(--space-2); }
.decode-note { margin: 0; }
/* A whole VIN, 17 characters, fits the phone's row. */
.form-row #vin { font-size: var(--text-small); }
.decode-note:empty { display: none; }

/* "Add a cause": the field and a square plus button side by side. */
.add-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--tap-gap); align-items: end; }
.btn-square { width: var(--tap-field); min-height: var(--tap-field); padding: 0; }

/* A dollar amount: "$" before the field. */
.money { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: var(--space-2); }
.money-sign { font-family: var(--font-number); font-weight: 600; }
.money .field { margin-top: 0; }
.rests-on { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin-top: var(--space-4); }

/* The sheet over the page: Record a test. */
.sheet { position: fixed; inset: 0; z-index: 4; overflow-y: auto; background: var(--white); color: var(--ink); }
.sheet-top {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  gap: var(--space-4);
  max-width: var(--column-pc);
  margin: 0 auto;
  padding: 0 var(--edge-phone);
  background: var(--white);
  border-bottom: var(--outline-thin) solid var(--hairline);
}
.sheet-top .link-button { margin: 0; }
.sheet-top h2 { margin: 0; }
.sheet-body { max-width: var(--column-pc); margin: 0 auto; padding: var(--space-4) var(--edge-phone) var(--space-8); }

/* Sending the job back: the one main move that is not navy. */
.btn-back { background: var(--white); border-color: var(--fail); color: var(--fail); font-weight: 700; }

/* A34 at the top of the job: verified or not, and by whom. */
.verify-line { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin: 0 0 var(--space-3); }
.verify-line .hint { margin: 0; }
#job-intake .fold { margin-top: var(--space-3); }
/* Paul's record on a closed job: a heading per section, spaced apart. */
.record-sections h3 { margin: var(--space-6) 0 var(--space-2); }
.record-sections h3:first-child { margin-top: 0; }

/* Closed: a full-width green-tint banner. */
.banner-closed { align-items: center; }
.banner-closed .banner-title { font-size: var(--text-banner); }

/* The parts page lays its examples out side by side when there is room. */
.parts-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-3); }
.parts-row { display: flex; flex-wrap: wrap; gap: var(--tap-gap); align-items: center; }

/* What a step recorded, as label and value pairs. The value is always text a person typed or chose. */
.facts { margin: var(--space-3) 0 0; }
.facts dt { color: var(--ink-2); font-size: var(--text-small); margin-top: var(--space-3); }
.facts dt:first-child { margin-top: 0; }
.facts dd { margin: 0; overflow-wrap: anywhere; }
/* One part of a repair: its number, brand, and OE or aftermarket. */
.part-fields + .part-fields { border-top: var(--outline-thin) solid var(--hairline); margin-top: var(--space-3); }

@media (min-width: 768px) {
  .split { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); grid-template-rows: none; min-height: 100vh; }
  .split-panel { padding: var(--space-12); }
  .split-image { display: block; position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
  .brand { align-items: flex-start; gap: var(--space-4); font-size: var(--text-brand); }
  .brand-line { display: block; }
  .logo { width: var(--logo); height: var(--logo); }
  .steps { display: block; margin-top: var(--space-12); }
  .steps::before { left: calc(var(--dot) / 2 - 1px); right: auto; top: calc(var(--step-node) / 2); bottom: calc(var(--step-node) / 2); border-top: 0; border-left: var(--outline) solid var(--sky); }
  .steps li { display: flex; align-items: center; width: auto; height: var(--step-node); padding-left: calc(var(--dot) + var(--space-4)); overflow: visible; text-indent: 0; }
  .steps li::before { inset: auto; left: 0; top: calc(50% - var(--dot) / 2); width: var(--dot); height: var(--dot); }
  .split-main { align-items: center; padding: var(--space-12) var(--space-8); }
  .answers { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .form-row-action { grid-template-columns: var(--label-width) minmax(0, 1fr) auto; }
  .form-row-action .btn { grid-column: auto; margin-bottom: 0; }
}

@media (min-width: 900px) {
  .screen { padding: var(--space-6) var(--space-8) var(--space-12); }
  .bottom-bar { margin: var(--space-6) 0 0; padding: var(--space-3) 0; }
  .parts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .job-qr:not(:empty) { display: block; float: right; width: 8.5rem; margin: 0 0 var(--space-3) var(--space-4); text-align: center; }
  .job-qr svg { display: block; width: 100%; height: auto; }
  .job-qr figcaption { margin-top: var(--space-1); font-size: var(--text-small); color: var(--ink-2); }
}

/* A35: how many entries wait on this device, in the top bar. */
.outbox { margin: 0 0 0 auto; color: var(--sky); font-size: var(--text-small); font-weight: 600; }
.outbox + .bar-end { margin-left: 0; }

/* PRO-121: the photos and PDFs on a step, and the buttons that add one. */
.step-files { margin-top: var(--space-3); }
.step-files .rows { margin-bottom: var(--space-2); }
.step-files-for { margin: var(--space-3) 0 0; font-size: var(--text-small); font-weight: 600; color: var(--ink-2); }
.file-picks { display: flex; flex-wrap: wrap; gap: var(--tap-gap); }

/* PRO-60: reading values from a photo. The file sits beside each proposed value on a PC, above them on a phone. */
.step-files .row { flex-wrap: wrap; }
.read-values { flex: none; }
.reading-panel { margin-top: var(--space-3); padding: var(--space-3); border: 1px solid var(--hairline); border-radius: var(--radius-group); background: var(--paper); }
.reading-panel .banner { margin-bottom: var(--space-3); }
.reading-confirm { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-4); }
.reading-source { margin: 0; min-width: 0; }
.reading-source img { display: block; max-width: 100%; max-height: 320px; height: auto; border: 1px solid var(--hairline); border-radius: var(--radius-control); background: var(--frost); }
.reading-proposals { min-width: 0; }
.reading-proposal { padding: var(--space-3) 0; border-top: 1px solid var(--hairline); }
.reading-proposal:first-child { border-top: 0; padding-top: 0; }
.reading-proposal-label { font-weight: 600; margin: 0 0 var(--space-1); overflow-wrap: anywhere; }
.reading-proposal-buttons { display: flex; flex-wrap: wrap; gap: var(--tap-gap); margin-top: var(--space-2); }
.reading-from-photo { font-weight: 600; color: var(--ink); }
.test-photo-reading { margin-top: var(--space-3); }
.test-photo-reading .rows { margin-bottom: var(--space-2); }
@media (min-width: 600px) {
  .reading-confirm { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); align-items: start; }
}
.file-pick { position: relative; flex: 1 1 8rem; }
.row-link { display: inline-flex; align-items: center; min-height: var(--tap-min); min-width: var(--tap-min); padding: 0 var(--space-2); color: var(--navy); font-weight: 600; text-decoration: underline; }
/* Entries that waited on the phone and were refused when they arrived, each with the app's reason. */
.refused-list { margin: var(--space-2) 0 0; padding-left: var(--space-4); }
.refused-list li + li { margin-top: var(--space-1); }

/* PRO-122: the job's clock and what covers its time. */
.clock-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2); }
.clock-head h3 { margin: 0; }
.clock-minutes { margin: var(--space-2) 0; font-size: var(--text-row); font-weight: 600; }
.clock .parts-row { margin-bottom: var(--space-2); }
.authorization-form { margin-top: var(--space-4); }

/* PRO-51: the manager's Team page, one card per tech. */
.team-tech, .team-scope { margin-bottom: var(--space-6); }
.team-scope h2 { margin: 0; }
.team-tech .clock-head h2 { margin: 0; }

/* PRO-56: the progress view's lists. */
.plain-list { margin: 0; padding-left: var(--space-4); }
.plain-list li + li { margin-top: var(--space-1); }

/* PRO-57: the shop board. Each job is a card of stacked lines: what it is, who it waits on, and the rest. */
.board-wait { display: block; margin: var(--space-1) 0; }
.board-row .row-title { font-weight: 600; }

/* PRO-59: everything the completeness check found missing, folded under the main button. */
.missing { margin: 0 0 var(--space-2); font-size: var(--text-small); color: var(--ink); }
.missing summary { cursor: pointer; color: var(--ink-2); min-height: var(--tap-min); display: flex; align-items: center; }
.missing-list { margin: 0; padding-left: var(--space-6); }
.missing-list li + li { margin-top: var(--space-1); }
/* PRO-59: a failed Tier-1 check marked as the root cause. */
.tier1-root { margin-top: var(--space-2); display: grid; gap: var(--space-2); }

/* PRO-127: the repair order story, plain text to copy. */
.ro-story { font-family: var(--font-number); font-size: var(--text-small); line-height: 1.45; resize: vertical; }

/* PRO-96: the manager's people actions, and a one-time password shown once. */
.people-row { flex-wrap: wrap; gap: var(--space-2); }
.people-actions { display: grid; gap: var(--space-2); width: 100%; }
.one-time { font-size: var(--number-reading); font-weight: 600; letter-spacing: 0.04em; margin: var(--space-2) 0; overflow-wrap: anywhere; }

/* PRO-66: the weekly pilot numbers, one table per week. */
.pilot-table { width: 100%; border-collapse: collapse; font-size: var(--text-small); }
.pilot-table th { text-align: left; font-weight: 400; color: var(--ink); padding: var(--space-2) var(--space-2) var(--space-2) 0; }
.pilot-table td { text-align: right; font-weight: 600; padding: var(--space-2) 0; white-space: nowrap; }
.pilot-table tr + tr { border-top: var(--outline-thin) solid var(--hairline); }

/* PRO-77: the downtime card, one printed page per job. */
.downtime { background: var(--white); color: var(--ink); }
.downtime-card { max-width: 46rem; margin: 0 auto; padding: var(--space-6) var(--edge-phone); font-size: var(--text-small); }
.downtime-card h1 { margin: 0 0 var(--space-2); }
.downtime-card h2 { font-size: var(--text-body, 1rem); margin: var(--space-4) 0 var(--space-2); border-bottom: var(--outline-thin) solid var(--edge); }
.downtime-card p { margin: var(--space-1) 0; }
.downtime-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--space-4); }
.downtime .blank { display: inline-block; min-width: 8rem; border-bottom: var(--outline-thin) solid var(--ink); height: 1.1em; vertical-align: bottom; }
.downtime .blank.wide { display: block; width: 100%; min-width: 0; margin-top: var(--space-2); }
.downtime-table { width: 100%; border-collapse: collapse; margin: var(--space-2) 0; }
.downtime-table th, .downtime-table td { border: var(--outline-thin) solid var(--ink); padding: var(--space-1) var(--space-2); text-align: left; height: 1.6em; vertical-align: top; }
@media (max-width: 599px) {
  .downtime-grid { grid-template-columns: 1fr; }
}
@media print {
  @page { size: letter portrait; margin: 0.4in; }
  .downtime-card { max-width: none; padding: 0; font-size: 9pt; }
  .downtime-card h1 { font-size: 14pt; }
  .downtime-card h2 { font-size: 10pt; margin-top: 6pt; }
  .downtime-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .downtime section { break-inside: avoid; }
}
