/* Forked from dailies/styles/app.css (2026-11-18). Shared building blocks: buttons,
   inputs, cards, combobox, email chips, photo tiles, the processing overlay.
   Colours come from tokens.css; inspection screens are styled in inspect.css. */

/* Self-hosted, not a CDN: a cross-origin font request is returned early by the
   service worker (sw.js leaves cross-origin to the browser), so an offline
   launch would silently fall back to system fonts. */
@font-face {
  font-family: 'DM Sans'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('./fonts/dm-sans-400.woff2') format('woff2');
}
@font-face {
  font-family: 'DM Sans'; font-style: normal; font-weight: 700; font-display: swap;
  src: url('./fonts/dm-sans-700.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('./fonts/plex-mono-400.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 600; font-display: swap;
  src: url('./fonts/plex-mono-600.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 700; font-display: swap;
  src: url('./fonts/plex-mono-700.woff2') format('woff2');
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

/* viewport-fit=cover + black-translucent means content sits under the notch and
   home indicator. Without these insets the top of the UI is unreachable. */
body {
  margin: 0;
  padding-left: var(--safe-left);
  padding-right: var(--safe-right);
  min-height: 100vh;
  min-height: 100dvh;
  background-color: var(--color-bg);
  background-image:
    radial-gradient(120% 60% at 50% -10%, rgb(var(--steel-rgb) / 0.10), transparent 60%),
    linear-gradient(var(--color-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--color-grid) 1px, transparent 1px);
  background-size: 100% 100%, 24px 24px, 24px 24px;
  background-attachment: fixed;
  color: var(--color-text);
  font-family: var(--font-prose);
  font-size: 16px;
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}
body.is-busy { overflow: hidden; }

.wrap { max-width: 40rem; margin: 0 auto; padding: 1.25rem 1rem calc(3rem + var(--safe-bottom)); }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; padding: 0; margin: -1px;
}

h1 { margin: 0.2rem 0 0.4rem; font-size: clamp(1.6rem, 6.4vw, 2.1rem); line-height: 1.15; letter-spacing: -0.015em; }
h1:focus { outline: none; }
.eyebrow {
  margin: 0; font-family: var(--font-data); font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--color-accent);
}
.lede { margin: 0 0 1.25rem; color: var(--color-text-dim); max-width: 36rem; }
.hint { margin: 0.1rem 0 0.6rem; font-size: 0.88rem; color: var(--color-text-dim); }

.icon { width: 1.35em; height: 1.35em; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ── app bar ─────────────────────────────────────────────────────────── */
/* First thing on every screen, so it gets the processing animation's level of
   care: a retro wordmark, Gus peeking at it from a hard-hat-orange badge, a
   progress rail that fills as the report moves along, and a hazard-tape edge.
   No backdrop-filter: a blurred sticky layer is a known blank-render risk on
   Android Chrome, and a solid blueprint panel reads better anyway. */
.app-bar {
  position: sticky; top: 0; z-index: 30;
  padding-top: var(--safe-top);
  background:
    linear-gradient(var(--color-grid) 1px, transparent 1px) 0 0 / 16px 16px,
    linear-gradient(90deg, var(--color-grid) 1px, transparent 1px) 0 0 / 16px 16px,
    linear-gradient(180deg, var(--color-bar-top), var(--color-bg-deep));
  box-shadow: 0 10px 24px rgb(0 0 0 / 0.35);
}
.app-bar-main {
  display: flex; align-items: center; gap: 0.75rem;
  max-width: 40rem; margin: 0 auto; padding: 1rem 1rem 0.55rem;   /* room for Gus's hat above the badge */
}
.brand { display: flex; align-items: center; gap: 0.8rem; min-width: 0; }
.brand-text { display: flex; flex-direction: column; min-width: 0; line-height: 1; }
.brand-name {
  font-family: var(--font-data); font-weight: 700; font-size: 1.32rem;
  letter-spacing: 0.16em; text-transform: uppercase; color: #fff1ef;
  /* Two hard offsets, no blur: the stepped shadow of an arcade marquee. */
  text-shadow: 2px 2px 0 var(--color-accent-deep), 4px 4px 0 rgb(0 0 0 / 0.4);
}
.brand-tag {
  margin-top: 0.4rem; font-family: var(--font-data); font-size: 0.62rem; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--color-blueprint);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.brand-badge {
  position: relative; flex: none; width: 48px; height: 48px; border-radius: 13px;
  background:
    radial-gradient(circle at 50% 75%, rgb(var(--accent-rgb) / 0.28), transparent 70%),
    linear-gradient(180deg, var(--color-badge-top), var(--color-surface-2));
  border: 2px solid var(--color-accent);
  box-shadow: inset 0 -4px 0 rgb(0 0 0 / 0.28), 0 0 0 3px rgb(var(--accent-rgb) / 0.14);
}
/* Larger than the frame and anchored to its floor, so the hard hat pops out
   over the top edge; clipped only along the bottom, where the close-up is cropped. */
.brand-badge .gus-canvas {
  position: absolute; left: 50%; bottom: 2px; width: 62px; height: 62px;
  transform: translateX(-50%);
  clip-path: inset(-50% -50% 0 -50%);
}
.app-bar-actions { margin-left: auto; display: flex; align-items: center; gap: 0.45rem; }
.icon-btn {
  display: grid; place-items: center; width: 44px; height: 44px; flex: none;
  border-radius: 13px; border: 1px solid var(--color-border);
  background: rgb(255 255 255 / 0.03); color: var(--color-text-dim); cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}
.icon-btn:hover { color: var(--color-text); border-color: var(--color-blueprint); }
.icon-btn:active { transform: scale(0.94); }
.icon-btn .icon { width: 21px; height: 21px; }

.rail {
  --progress: 0;
  position: relative; display: grid; grid-template-columns: repeat(4, 1fr);
  max-width: 40rem; margin: 0 auto; padding: 0.1rem 1rem 0.75rem; list-style: none;
  font-family: var(--font-data); font-size: 0.64rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--color-text-dim);
}
/* Track and fill run centre-to-centre between the first and last markers. */
.rail::before, .rail::after {
  content: ""; position: absolute; top: calc(0.1rem + 9px); height: 3px; border-radius: 2px;
  left: calc(1rem + (100% - 2rem) / 8);
}
.rail::before { width: calc((100% - 2rem) * 3 / 4); background: var(--color-border); }
.rail::after {
  width: calc((100% - 2rem) * 3 / 4 * var(--progress));
  background: linear-gradient(90deg, var(--color-hivis), var(--color-accent));
  box-shadow: 0 0 10px rgb(var(--accent-rgb) / 0.45);
  transition: width 0.7s cubic-bezier(0.3, 1.3, 0.5, 1);
}
.rail li { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 0.4rem; }
.rail-dot {
  display: grid; place-items: center; width: 21px; height: 21px; border-radius: 6px;
  background: var(--color-bg-deep); border: 2px solid var(--color-border);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}
.rail-dot::after { content: ""; width: 6px; height: 6px; border-radius: 2px; }
.rail li.is-complete { color: var(--color-hivis); }
.rail li.is-complete .rail-dot { background: var(--color-hivis); border-color: var(--color-hivis); }
.rail li.is-complete .rail-dot::after {
  width: 9px; height: 5px; border-radius: 0;
  border: solid var(--color-accent-ink); border-width: 0 0 2.5px 2.5px;
  transform: translateY(-1px) rotate(-45deg);
}
.rail li.is-current { color: var(--color-text); }
.rail li.is-current .rail-dot {
  background: var(--color-accent); border-color: var(--color-accent);
  animation: rail-pulse 2.4s ease-in-out infinite;
}
.rail li.is-current .rail-dot::after { background: var(--color-accent-ink); }

/* Hazard tape along the bottom edge, crawling slowly. One animation cycle
   shifts the stripes by exactly two periods (16px stripe / sin 45deg), so the
   loop is seamless. */
.hazard {
  height: 6px;
  background: repeating-linear-gradient(-45deg, var(--color-accent) 0 8px, #17120c 8px 16px);
  animation: tape 7s linear infinite;
}

@media (max-width: 23rem) {
  .brand-name { font-size: 1.1rem; letter-spacing: 0.1em; }
  .brand-tag { display: none; }
}

.net-banner {
  position: relative; z-index: 25;
  margin: 0; padding: 0.55rem 1rem; text-align: center; font-size: 0.9rem; font-weight: 700;
  color: var(--color-accent-ink); background: var(--color-hivis);
}

/* ── controls ────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
  min-height: var(--tap); min-width: var(--tap);
  padding: 0 1.1rem;
  border: 1px solid transparent; border-radius: 999px;
  background: var(--color-surface-2); color: var(--color-text);
  font: 700 1rem/1.1 var(--font-prose);
  text-decoration: none; cursor: pointer;
  transition: transform 0.12s ease, background-color 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
  touch-action: manipulation;
}
.btn:active:not(:disabled) { transform: scale(0.97); }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn-primary {
  background: var(--color-accent); color: var(--color-accent-ink);
  box-shadow: 0 6px 18px rgb(var(--accent-rgb) / 0.28), inset 0 -2px 0 rgb(0 0 0 / 0.14);
}
.btn-primary:hover:not(:disabled) { background: var(--color-accent-strong); }
.btn-secondary { background: var(--color-surface-2); border-color: var(--color-border); }
.btn-secondary:hover:not(:disabled) { border-color: var(--color-blueprint); }
.btn-ghost { background: transparent; border-color: var(--color-border); font-weight: 400; }
.btn-ghost:hover:not(:disabled) { background: var(--color-surface); }
.btn-link {
  background: none; border: 0; color: var(--color-text-dim); font-weight: 700;
  text-decoration: underline; text-underline-offset: 3px;
}
.btn-block { display: flex; width: 100%; }
.btn-lg { min-height: 56px; font-size: 1.08rem; }
.btn-small { min-height: 40px; min-width: 40px; padding: 0 0.8rem; font-size: 0.88rem; }
:where(button, input, textarea, a, select):focus-visible {
  outline: 3px solid var(--color-blueprint); outline-offset: 2px;
}

.card {
  margin: 0 0 1rem; padding: 1.1rem 1rem 0.6rem;
  background: linear-gradient(180deg, color-mix(in srgb, var(--color-surface) 96%, white 4%), var(--color-surface));
  border: 1px solid var(--color-border); border-radius: var(--radius);
  box-shadow: var(--shadow);
}
fieldset.card { min-width: 0; }
.card-title {
  display: flex; align-items: center; gap: 0.6rem; float: left; width: 100%;
  margin: 0 0 0.9rem; padding: 0; font-size: 1.12rem; font-weight: 700;
}
/* Every sibling, not just the next one: a hidden element straight after the
   legend (the previous-plan card) took the clear, and the narrative field slid
   beside the full-width floated legend and overflowed the card. */
.card-title ~ * { clear: both; }
.card-num {
  font-family: var(--font-data); font-size: 0.72rem; color: var(--color-blueprint);
  border: 1px solid color-mix(in srgb, var(--color-blueprint) 50%, transparent);
  border-radius: 6px; padding: 0.1rem 0.35rem;
}

.field { margin-bottom: 0.35rem; min-width: 0; }
.field label, .label-row label, .q-text { display: block; margin-bottom: 0.3rem; font-weight: 700; font-size: 0.95rem; }
.label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.count { font-family: var(--font-data); font-size: 0.75rem; color: var(--color-text-dim); }
.count[data-warn="true"] { color: var(--color-accent); }
.optional {
  margin-left: 0.35rem; font-family: var(--font-data); font-size: 0.66rem; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-text-dim);
}
.field-row { display: grid; gap: 0 0.75rem; }
@media (min-width: 30rem) { .field-row { grid-template-columns: 1fr 1fr; } }
.field-row-tight { grid-template-columns: 1fr 1fr; }

.input {
  display: block; width: 100%;
  min-height: var(--tap); padding: 0.7rem 0.85rem;
  border: 1.5px solid var(--color-border); border-radius: var(--radius-sm);
  background: var(--color-bg-deep); color: var(--color-text);
  font: 16px/1.4 var(--font-prose);   /* below 16px, iOS Safari zooms the page on focus */
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  -webkit-appearance: none; appearance: none;
}
.input::placeholder { color: color-mix(in srgb, var(--color-text-dim) 70%, transparent); }
.input:focus { outline: none; border-color: var(--color-accent); box-shadow: 0 0 0 3px rgb(var(--accent-rgb) / 0.22); }
.input[aria-invalid="true"] { border-color: var(--color-danger); box-shadow: 0 0 0 3px rgb(255 107 107 / 0.16); }
.input-mono { font-family: var(--font-data); letter-spacing: 0.02em; }
input[type="date"].input, input[type="time"].input { color-scheme: dark; min-width: 0; }
.textarea { resize: vertical; min-height: 4.5rem; }
.textarea-lg { min-height: 12rem; line-height: 1.55; }
.field-error { min-height: 1.3rem; margin: 0.25rem 0 0.1rem; font-size: 0.86rem; font-weight: 700; color: var(--color-danger); }
.field-error:empty { min-height: 0.5rem; }

/* ── dictation ───────────────────────────────────────────────────────── */
.dictate-row { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; margin: 0.2rem 0 0.8rem; }
.mic-btn {
  --level: 0;
  position: relative; padding-left: 0.4rem; padding-right: 1.2rem;
  background: var(--color-surface-2); border-color: var(--color-border);
}
.mic-icon {
  position: relative; display: grid; place-items: center;
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--color-accent); color: var(--color-accent-ink);
}
.mic-icon .icon { width: 20px; height: 20px; grid-area: 1 / 1; }
.icon-stop { display: none; fill: currentColor; stroke: none; }
.mic-btn[data-state="recording"] { background: #3a1620; border-color: #ff6b6b; }
.mic-btn[data-state="recording"] .mic-icon {
  background: #ff5a5a; color: #fff;
  box-shadow: 0 0 0 calc(4px + var(--level) * 16px) rgb(255 90 90 / 0.28);
  transition: box-shadow 0.08s linear;
}
.mic-btn[data-state="recording"] .icon-mic { display: none; }
.mic-btn[data-state="recording"] .icon-stop { display: block; }
.mic-btn[data-state="working"] .mic-icon::after,
.mic-btn[data-state="starting"] .mic-icon::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%;
  border: 2.5px solid transparent; border-top-color: var(--color-accent);
  animation: spin 0.8s linear infinite;
}
.mic-btn-small { min-height: 44px; }
.mic-btn-small .mic-icon { width: 32px; height: 32px; }
.dictate-status { flex: 1 1 12rem; margin: 0; font-size: 0.9rem; color: var(--color-text-dim); }
.dictate-status[data-tone="live"] { color: #ff9b9b; font-family: var(--font-data); font-size: 0.85rem; }
.dictate-status[data-tone="ok"] { color: var(--color-ok); }
.dictate-status[data-tone="error"] { color: var(--color-danger); font-weight: 700; }

/* ── photos ──────────────────────────────────────────────────────────── */
.photo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.7rem; margin: 0 0 0.8rem; padding: 0; list-style: none; }
@media (min-width: 30rem) { .photo-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.photo-grid:empty { display: none; }
.photo-tile { display: flex; flex-direction: column; gap: 0.4rem; animation: pop-in 0.25s ease both; }
.photo-frame { position: relative; aspect-ratio: 1; border-radius: var(--radius-sm); overflow: hidden; background: var(--color-bg-deep); border: 1px solid var(--color-border); }
.photo-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-label {
  position: absolute; left: 0.4rem; bottom: 0.4rem;
  padding: 0.1rem 0.4rem; border-radius: 6px;
  font-family: var(--font-data); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
  background: rgb(10 11 13 / 0.78); color: var(--color-text);
}
.photo-remove {
  position: absolute; top: 0.3rem; right: 0.3rem;
  display: grid; place-items: center; width: 40px; height: 40px;
  border: 0; border-radius: 50%; background: rgb(10 11 13 / 0.78); color: #fff; cursor: pointer;
}
.photo-remove .icon { width: 18px; height: 18px; }
.input-caption { min-height: 40px; padding: 0.45rem 0.6rem; font-size: 16px; border-radius: 8px; }
.photo-tile.is-pending {
  aspect-ratio: 1; align-items: center; justify-content: center; position: relative;
  border: 1.5px dashed var(--color-border); border-radius: var(--radius-sm); background: var(--color-bg-deep);
}
.photo-tile.is-pending .photo-label { position: static; background: none; color: var(--color-text-dim); }
.meter { height: 6px; margin: 0 0 0.8rem; border-radius: 999px; background: var(--color-bg-deep); overflow: hidden; }
.meter span { display: block; height: 100%; width: var(--fill, 0%); background: var(--color-blueprint); border-radius: inherit; transition: width 0.3s ease; }
.meter[data-warn="true"] span { background: var(--color-accent); }

/* ── alerts, notes ───────────────────────────────────────────────────── */
.alert {
  display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap;
  margin: 0 0 1rem; padding: 0.75rem 0.9rem;
  border-radius: var(--radius-sm); border: 1px solid rgb(255 107 107 / 0.45);
  background: var(--color-danger-bg); color: #ffd0d0;
  animation: pop-in 0.2s ease both;
}
.alert p { flex: 1 1 14rem; margin: 0; font-weight: 700; }
.alert[data-tone="info"] { border-color: rgb(var(--steel-rgb) / 0.45); background: var(--color-info-bg); color: #d4efff; }
.note { margin: 0 0 1rem; padding: 0.75rem 1rem; border-left: 3px solid var(--color-hivis); border-radius: 6px; background: rgb(212 236 58 / 0.07); }
.note-title { margin: 0 0 0.25rem; font-weight: 700; color: var(--color-hivis); }
.note ul { margin: 0; padding-left: 1.1rem; color: var(--color-text-dim); }

.form-actions {
  position: sticky; bottom: 0; z-index: 5;
  margin: 1.2rem -1rem 0; padding: 0.9rem 1rem calc(0.9rem + var(--safe-bottom));
  background: linear-gradient(180deg, transparent, var(--color-bg) 30%);
}
.form-actions-split { display: grid; grid-template-columns: auto 1fr; gap: 0.6rem; }

/* ── login ───────────────────────────────────────────────────────────── */
.login-hero { text-align: center; padding-top: 0.5rem; }
.login-hero .lede { margin-left: auto; margin-right: auto; }
.login-hero .gus { margin: 0 auto 0.4rem; }
.login-card { padding-bottom: 1.1rem; }
.password-row { display: flex; gap: 0.5rem; }
.password-row .input { flex: 1; }
.shake { animation: shake 0.4s ease; }

/* ── clarify ─────────────────────────────────────────────────────────── */
.clarify-head { display: flex; align-items: center; gap: 0.85rem; }
.clarify-head .lede { margin-bottom: 1rem; }
.question-list { margin: 0; padding: 0; list-style: none; counter-reset: q; }
.question { padding-top: 0.9rem; animation: rise-in 0.35s ease both; }
.question:nth-child(2) { animation-delay: 0.06s; }
.question:nth-child(3) { animation-delay: 0.12s; }
.question:nth-child(4) { animation-delay: 0.18s; }
.question:nth-child(5) { animation-delay: 0.24s; }
.q-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.45rem; }
.q-number { font-family: var(--font-data); font-size: 0.75rem; font-weight: 700; color: var(--color-blueprint); }
.q-badge {
  font-family: var(--font-data); font-size: 0.66rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 0.15rem 0.5rem; border-radius: 999px; border: 1px solid var(--color-border); color: var(--color-text-dim);
}
.question[data-required="true"] .q-badge { color: var(--color-accent-ink); background: var(--color-accent); border-color: transparent; }
.q-text { font-size: 1.05rem !important; line-height: 1.35; }
.q-reason { margin: -0.1rem 0 0.6rem; font-size: 0.86rem; color: var(--color-text-dim); }

/* ── done ────────────────────────────────────────────────────────────── */
.screen-done { text-align: center; }
.screen-done .lede { margin-left: auto; margin-right: auto; }
.done-hero { position: relative; display: grid; place-items: center; margin: 0.5rem auto 0.4rem; width: fit-content; }
.done-hero .stamp { position: absolute; right: -1.6rem; top: 1.2rem; animation: stamp-in 0.5s 0.9s cubic-bezier(.2,1.6,.4,1) both; }
.file-card { display: flex; align-items: center; gap: 0.8rem; text-align: left; padding: 0.9rem 1rem; }
.file-icon { width: 2.4rem; height: 2.4rem; color: var(--color-accent); }
.file-text { display: flex; flex-direction: column; min-width: 0; }
.file-text strong { font-family: var(--font-data); font-size: 0.9rem; overflow-wrap: anywhere; }
.file-text span { font-size: 0.85rem; color: var(--color-text-dim); }
.done-actions { display: grid; gap: 0.6rem; margin-top: 1rem; }

/* ── Gus ─────────────────────────────────────────────────────────────── */
.gus { display: grid; place-items: end center; }
.gus-canvas { width: 100%; height: auto; display: block; }
.gus-canvas.is-pixel { image-rendering: pixelated; image-rendering: crisp-edges; }
.gus-lg { width: 176px; height: 176px; }
.gus-md { width: 150px; height: 150px; }
.gus-sm { width: 84px; height: 84px; flex: none; }

.stamp {
  display: inline-block; padding: 0.15rem 0.6rem;
  font-family: var(--font-data); font-size: 1.05rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--color-accent); border: 3px solid var(--color-accent); border-radius: 8px;
  transform: rotate(-12deg); background: rgb(7 17 31 / 0.6);
  box-shadow: inset 0 0 0 2px rgb(var(--accent-rgb) / 0.25);
}

/* ── processing overlay ──────────────────────────────────────────────── */
.processing {
  position: fixed; inset: 0; z-index: 50;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: calc(1.5rem + var(--safe-top)) 1.25rem calc(1.5rem + var(--safe-bottom));
  background:
    radial-gradient(70% 50% at 50% 40%, rgb(var(--steel-rgb) / 0.13), transparent 70%),
    var(--color-bg-deep);   /* opaque: at 97% the report form ghosted through behind Gus on a phone */
  animation: fade-in 0.25s ease both;
  outline: none;
}
.processing-stage { position: relative; width: min(94vw, 440px); aspect-ratio: 320 / 200; }
.blueprint { width: 100%; height: 100%; color: var(--color-blueprint); overflow: visible; }
.blueprint path, .blueprint rect { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.blueprint > rect { stroke: none; }
.blueprint .thin { stroke-width: 1.1; stroke-opacity: 0.7; }
.bp-ground { stroke-opacity: 0.5; stroke-dasharray: 3 5; }
.draw { stroke-dasharray: 100; stroke-dashoffset: 100; animation: draft 5.2s var(--d, 0s) ease-in-out infinite; }
.bp-hook { transform-origin: 238px 40px; animation: swing 3.2s ease-in-out infinite; }
.bp-cable { stroke-width: 1.2 !important; }
.bp-load { fill: rgb(var(--accent-rgb) / 0.25) !important; stroke: var(--color-accent) !important; }
.bp-page rect { fill: rgb(238 243 249 / 0.05) !important; stroke: var(--color-text) !important; stroke-opacity: 0.8; }
.bp-line { stroke: var(--color-text) !important; stroke-width: 2.4 !important; stroke-dasharray: 44; stroke-dashoffset: 44; animation: type-line 5.2s var(--d, 0s) ease-out infinite; }
.processing-gus { position: absolute; left: 20%; bottom: 3%; width: 38%; height: auto; aspect-ratio: 1; }
.stamp-processing { position: absolute; left: 3%; top: 40%; opacity: 0; transform: rotate(-14deg) scale(2.4); }
.processing.is-final .stamp-processing { animation: stamp-in 0.45s cubic-bezier(.2,1.6,.4,1) forwards; }
.processing.is-final .draw, .processing.is-final .bp-line { animation: none; stroke-dashoffset: 0; }
.processing-text {
  margin: 1.4rem 0 0.35rem; min-height: 2.6em; max-width: 22rem;
  font-size: clamp(1.15rem, 5vw, 1.4rem); font-weight: 700; text-align: center; line-height: 1.3;
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.processing-text.is-swapping { opacity: 0; transform: translateY(4px); }
.processing-sub { margin: 0; font-size: 0.88rem; color: var(--color-text-dim); text-align: center; }
.processing.is-final .processing-sub { visibility: hidden; }

.spinner { width: 26px; height: 26px; border-radius: 50%; border: 3px solid var(--color-border); border-top-color: var(--color-accent); animation: spin 0.8s linear infinite; }

/* ── banner + toast ──────────────────────────────────────────────────── */
.banner, .toast {
  position: fixed; left: 1rem; right: 1rem; z-index: 40;
  bottom: calc(1rem + var(--safe-bottom));
  display: flex; align-items: center; gap: var(--gap);
  padding: 0.75rem 1rem;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border); border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.banner-text, .toast-text { flex: 1; margin: 0; font-size: 0.92rem; }
.toast { border-color: var(--color-accent); }
@media (min-width: 34rem) {
  .banner, .toast { left: auto; right: 1rem; max-width: 26rem; }
}

/* ── motion ──────────────────────────────────────────────────────────── */
/* ── review: page one on paper ───────────────────────────────────────── */
/* A white sheet that reads like the PDF's first page, because it is the
   first page: same header band, details grid, section bars and bullets. */
.btn-back {
  display: inline-flex; gap: 0.2rem; min-height: 40px; padding: 0; margin: -0.7rem 0 0.8rem;
  color: var(--color-blueprint); text-decoration: none;
}
.btn-back .icon { width: 18px; height: 18px; }
.paper-stage { perspective: 1400px; margin: 0 0 0.7rem; }
.paper {
  overflow: hidden; border-radius: 6px; background: #fff; color: #1b2533;
  font-family: var(--font-prose); transform-origin: 50% 0;
  box-shadow: 0 24px 50px rgb(0 0 0 / 0.5), 0 0 0 1px rgb(0 0 0 / 0.25);
  animation: paper-in 0.65s cubic-bezier(0.2, 0.9, 0.25, 1.04) both;
}
/* Kimball's Daily Job Report, drawn as server/pdf.py draws it: black grid
   lines, printed labels in sans, typed values in blue mono. */
.pf-banner { display: block; width: 100%; height: auto; }
.pf-address { margin: 8px 12px 0; font-size: 0.62rem; text-align: center; }
.pf-title { margin: 1px 12px 6px; font-size: 1rem; font-weight: 800; text-align: center; letter-spacing: 0.01em; color: #000; }
.pf-cell { display: flex; align-items: baseline; gap: 6px; min-height: 18px; padding: 2px 5px; border-bottom: 1px solid #000; font-size: 0.62rem; line-height: 1.3; }
.pf-cell:last-child { border-bottom: 0; }
.pf-label { flex: none; color: #000; }
.pf-value { min-width: 0; font-family: var(--font-data); font-size: 0.6rem; color: #2340b0; overflow-wrap: anywhere; white-space: pre-line; }
.pf-details { display: grid; grid-template-columns: 1.15fr 1fr; margin: 0 8px; border: 1px solid #000; }
.pf-col { display: flex; flex-direction: column; min-width: 0; }
.pf-col + .pf-col { border-left: 1px solid #000; }
.pf-notice { flex: 1; display: grid; place-items: center; padding: 6px; border-bottom: 0; color: #e2231a; font-weight: 800; font-size: 0.62rem; text-align: center; }
.pf-findings { margin: 0 8px; border: 1px solid #000; border-top: 0; }
.paper-section.pf-section { margin: 0; padding: 0; border-radius: 0; }
.paper .pf-section h3 { margin: 0; padding: 2px 5px; border-bottom: 1px solid #000; font-size: 0.62rem; font-weight: 400; color: #000; }
.paper .pf-section h3::before { display: none; }
.pf-findings .pf-section + .pf-section { border-top: 1px solid #000; }
.pf-text { min-height: 18px; padding: 2px 5px; }
.paper-section .pf-text p { margin: 0 0 2px; font-family: var(--font-data); font-size: 0.6rem; line-height: 1.45; color: #2340b0; }
.paper-section.pf-notes { margin: 8px 8px 0; border: 1.5px solid #000; }
.paper .pf-notes h3 { border-bottom: 0; font-weight: 800; font-size: 0.68rem; }
.paper-section.pf-notes .pf-text p { margin-bottom: 7px; }
.pf-section .paper-edit { width: calc(100% - 8px); margin: 4px; }
.pf-parts { display: grid; grid-template-columns: 4fr 1fr 4fr 1fr; margin: 8px 8px 0; border-left: 1px solid #000; border-top: 1px solid #000; }
.pf-parts > div { min-height: 16px; padding: 1px 4px; border-right: 1px solid #000; border-bottom: 1px solid #000; }
.pf-head { font-size: 0.6rem; font-weight: 800; text-align: center; color: #000; }
.pf-span { grid-column: 1 / -1; }
.pf-footer { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 4px; margin: 8px 8px 0; }
.pf-box { border: 1px solid #000; min-width: 0; }
.pf-box .pf-head { padding: 2px; border-bottom: 1.5px solid #000; }
.pf-box .pf-cell { justify-content: space-between; }
.pf-big .pf-value { font-size: 0.72rem; }
.pf-sig .pf-value { font: italic 700 0.8rem/1.2 Georgia, 'Times New Roman', serif; color: #2340b0; }
@media (max-width: 26rem) {
  .pf-details, .pf-footer { grid-template-columns: 1fr; }
  .pf-col + .pf-col { border-left: 0; border-top: 1px solid #000; }
}
.paper-section { position: relative; margin: 10px 8px 0; padding: 3px 4px 4px; border-radius: 6px; }
.paper-section h3 {
  display: flex; align-items: center; gap: 8px; margin: 0 0 5px; padding-bottom: 4px;
  border-bottom: 1px solid #d9e1ea; font-size: 0.86rem; font-weight: 700; color: #0b1a2e;
}
.paper-section h3::before { content: ""; flex: none; width: 3px; height: 13px; background: #ff8a1f; }
.paper-section ul { margin: 0; padding: 0; list-style: none; }
.paper-section li, .paper-section p { margin: 0 0 3px; font-size: 0.8rem; line-height: 1.45; overflow-wrap: anywhere; }
.paper-section li { position: relative; padding-left: 13px; }
.paper-section li::before { content: "•"; position: absolute; left: 1px; font-weight: 700; color: #ff8a1f; }
.paper-section .paper-empty { color: #5b6b80; }
.paper-updated {
  margin-left: auto; padding: 1px 7px; border-radius: 999px; background: #e6f6c8; color: #3f6b00;
  font-family: var(--font-data); font-size: 0.52rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
}
.paper-section.is-changed { animation: section-changed 2.4s ease-out both; }
.paper-edit-hint { margin: 10px 12px 0; font-size: 0.72rem; color: #5b6b80; }
.paper-edit {
  display: block; width: 100%; min-height: 4.5rem; margin: 2px 0 4px; padding: 8px 9px;
  border: 1.5px dashed #ff8a1f; border-radius: 6px; background: #fffaf3; color: #1b2533;
  font: 16px/1.45 var(--font-prose);   /* 16px: smaller makes iOS zoom the page */
  resize: vertical;
}
.paper-edit:focus { outline: none; border-style: solid; box-shadow: 0 0 0 3px rgb(var(--accent-rgb) / 0.22); }
.paper-foot {
  display: flex; justify-content: space-between; gap: 8px; margin: 12px 12px 0; padding: 7px 0 10px;
  border-top: 1px solid #d9e1ea; font-family: var(--font-data); font-size: 0.52rem; color: #5b6b80;
}
.review-photos { text-align: center; }
/* Not sticky, unlike the other screens' actions: two rows of buttons pinned to
   the bottom covered a fifth of the page preview while reading it. The
   manager reads the page, then acts. The manual-edit Save bar stays sticky. */
.review-actions {
  position: static; display: grid; gap: 0.6rem;
  margin-top: 0.4rem; background: none;
}
.review-edit-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.review-edit-row .btn { padding: 0 0.6rem; font-size: 0.95rem; }
.btn-ai { border-color: rgb(212 236 58 / 0.45); }
.btn-ai .icon, .ai-edit-head .icon { color: var(--color-hivis); }
.btn-undo { justify-self: center; display: inline-flex; gap: 0.3rem; min-height: 36px; text-decoration: none; }
.btn-undo .icon { width: 18px; height: 18px; }
.ai-edit { padding-bottom: 0.2rem; animation: rise-in 0.3s ease both; }
.ai-edit-head { display: flex; align-items: center; gap: 0.5rem; }
.ai-edit-head label { margin: 0; }
.ai-edit-actions { margin: 0.2rem 0 0.8rem; }

/* ── home ────────────────────────────────────────────────────────────── */
.home-hero { display: flex; align-items: center; gap: 0.85rem; margin-bottom: 1.1rem; }
.home-actions { display: grid; gap: 0.8rem; }
.home-tile {
  display: flex; align-items: center; gap: 0.9rem; width: 100%; margin: 0;
  padding: 1.1rem 1rem; text-align: left; color: var(--color-text); font: inherit; cursor: pointer;
  transition: transform 0.12s ease, border-color 0.15s ease;
  touch-action: manipulation;
}
.home-tile:hover { border-color: var(--color-blueprint); }
.home-tile:active { transform: scale(0.985); }
.home-tile > .icon {
  width: 2.8rem; height: 2.8rem; padding: 0.65rem; border-radius: 12px;
  background: var(--color-surface-2); color: var(--color-blueprint);
}
.home-tile-primary { border-color: rgb(var(--accent-rgb) / 0.55); }
.home-tile-primary > .icon { background: var(--color-accent); color: var(--color-accent-ink); }
.home-tile-text { display: flex; flex-direction: column; min-width: 0; }
.home-tile-text strong { font-size: 1.15rem; }
.home-tile-text span { font-size: 0.9rem; color: var(--color-text-dim); }
.home-phones { display: flex; gap: 0.35rem; margin: 1.3rem auto 0; min-height: 44px; text-decoration: none; }
.home-phones .icon { width: 18px; height: 18px; }

/* ── previous dailies, signed-in phones ─────────────────────────────── */
.history-list { display: grid; gap: 0.75rem; margin: 0; padding: 0; list-style: none; }
.tech-tile { animation: rise-in 0.3s ease both; }
.tech-initials {
  display: grid; place-items: center; flex: none; width: 2.8rem; height: 2.8rem; border-radius: 12px;
  background: var(--color-surface-2); color: var(--color-blueprint);
  font-family: var(--font-data); font-weight: 700; letter-spacing: 0.02em;
}
.tech-tile .home-tile-text { flex: 1 1 auto; }
.tech-tile .tech-name { overflow-wrap: anywhere; }
.tech-chevron { flex: none; width: 20px; height: 20px; color: var(--color-text-dim); transform: rotate(180deg); }
.daily-sent { margin-top: 0.6rem; padding-top: 0.6rem; border-top: 1px solid var(--color-border); }
.daily-sent-title { margin: 0 0 0.3rem; font-size: 0.8rem; font-weight: 700; color: var(--color-text-dim); }
.daily-sent-list { display: grid; gap: 0.25rem; margin: 0; padding: 0; list-style: none; font-size: 0.88rem; }
.daily-sent-list li { overflow-wrap: anywhere; }
.daily-sent-when { font-family: var(--font-data); font-size: 0.74rem; color: var(--color-text-dim); }
.daily { margin: 0; padding: 0.85rem 0.9rem 0.8rem; animation: rise-in 0.3s ease both; }
.daily-head { display: flex; align-items: baseline; justify-content: space-between; gap: 0.75rem; }
.daily-date { font-weight: 700; overflow-wrap: anywhere; }
.daily-expires { font-family: var(--font-data); font-size: 0.68rem; letter-spacing: 0.04em; color: var(--color-text-dim); white-space: nowrap; }
.daily-badge {
  font-family: var(--font-data); font-size: 0.66rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 0.15rem 0.5rem; border-radius: 999px; color: var(--color-accent-ink); background: var(--color-hivis); white-space: nowrap;
}
.daily-project { margin: 0.15rem 0 0; overflow-wrap: anywhere; }
.daily-number { margin-right: 0.45rem; font-family: var(--font-data); font-weight: 600; color: var(--color-blueprint); }
.daily-meta { margin: 0.1rem 0 0.65rem; font-size: 0.86rem; color: var(--color-text-dim); overflow-wrap: anywhere; }
.daily-actions, .daily-confirm, .daily-file { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.daily-actions .icon { width: 18px; height: 18px; }
.daily-delete { margin-left: auto; color: #ffb3b3; }
.daily-confirm p { flex: 1 1 100%; margin: 0; font-size: 0.92rem; font-weight: 700; color: #ffd0d0; }
.daily-file { margin-top: 0.6rem; padding-top: 0.6rem; border-top: 1px solid var(--color-border); }
.daily-file-name { flex: 1 1 100%; font-family: var(--font-data); font-size: 0.78rem; color: var(--color-text-dim); overflow-wrap: anywhere; }
.btn-danger { background: #c93c3c; color: #fff; }
.btn-danger:hover:not(:disabled) { background: #dd4a4a; }

/* ── project autofill ────────────────────────────────────────────────── */
.combo { position: relative; }
.combo-list {
  position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px);
  max-height: 16rem; margin: 0; padding: 0.3rem; overflow-y: auto; list-style: none;
  background: var(--color-surface-2); border: 1px solid var(--color-border); border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
}
.combo-list [role="option"] {
  display: flex; flex-direction: column; justify-content: center;
  min-height: var(--tap); padding: 0.4rem 0.6rem; border-radius: 8px; cursor: pointer;
}
.combo-list [role="option"]:hover,
.combo-list [role="option"][aria-selected="true"] { background: var(--color-surface); box-shadow: inset 0 0 0 1px var(--color-blueprint); }
.combo-main { font-weight: 700; overflow-wrap: anywhere; }
.combo-sub { font-size: 0.82rem; color: var(--color-text-dim); overflow-wrap: anywhere; }

/* ── the previous daily's plan, above the narrative ─────────────────── */
.plan-card {
  margin: 0 0 0.9rem; padding: 0.45rem 0.35rem 0.65rem 0.85rem;
  border-left: 3px solid var(--color-blueprint); border-radius: 6px; background: var(--color-info-bg);
  animation: rise-in 0.3s ease both;
}
.plan-card-head { display: flex; align-items: center; gap: 0.5rem; }
.plan-card-head > .icon { color: var(--color-blueprint); }
.plan-card-title { flex: 1; margin: 0; font-size: 0.92rem; font-weight: 700; color: #d4efff; }
.plan-card-close {
  display: grid; place-items: center; flex: none; width: 40px; height: 40px;
  border: 0; border-radius: 50%; background: transparent; color: var(--color-text-dim); cursor: pointer;
}
.plan-card-close:hover { background: rgb(var(--steel-rgb) / 0.12); color: var(--color-text); }
.plan-card-close .icon { width: 18px; height: 18px; }
.plan-card-list { margin: 0; padding: 0 0.5rem 0 1.1rem; font-size: 0.9rem; }
.plan-card-list li { margin: 0.1rem 0; overflow-wrap: anywhere; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes pop-in { from { opacity: 0; transform: scale(0.96); } }
@keyframes rise-in { from { opacity: 0; transform: translateY(10px); } }
@keyframes shake { 20%, 60% { transform: translateX(-7px); } 40%, 80% { transform: translateX(7px); } }
@keyframes draft {
  0% { stroke-dashoffset: 100; opacity: 1; }
  45%, 82% { stroke-dashoffset: 0; opacity: 1; }
  100% { stroke-dashoffset: 0; opacity: 0.15; }
}
@keyframes type-line {
  0% { stroke-dashoffset: 44; opacity: 1; }
  30%, 85% { stroke-dashoffset: 0; opacity: 1; }
  100% { stroke-dashoffset: 0; opacity: 0.2; }
}
@keyframes swing { 0%, 100% { transform: rotate(-5deg); } 50% { transform: rotate(5deg); } }
@keyframes tape { to { background-position: 45.255px 0; } }
@keyframes paper-in {
  from { opacity: 0; transform: translateY(30px) rotateX(12deg) scale(0.97); }
}
@keyframes section-changed {
  0%, 30% { background: rgb(212 236 58 / 0.32); box-shadow: 0 0 0 4px rgb(212 236 58 / 0.32); }
  100% { background: transparent; box-shadow: 0 0 0 4px transparent; }
}
@keyframes rail-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgb(var(--accent-rgb) / 0.22); }
  50% { box-shadow: 0 0 0 7px rgb(var(--accent-rgb) / 0.06); }
}
@keyframes stamp-in {
  0% { opacity: 0; transform: rotate(-14deg) scale(2.4); }
  100% { opacity: 1; transform: rotate(-12deg) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .draw, .bp-line { stroke-dashoffset: 0; animation: none !important; }
  .bp-hook { animation: none; }
  .processing-text::after { content: ""; }
  .processing.is-final .stamp-processing, .done-hero .stamp { opacity: 1; transform: rotate(-12deg); animation: none !important; }
  .mic-btn[data-state="working"] .mic-icon::after, .mic-btn[data-state="starting"] .mic-icon::after, .spinner {
    animation: none !important; border-top-color: var(--color-accent); opacity: 0.8;
  }
}

/* ── job report form: switches, segmented choices, folds, parts, time ─── */
.label { display: block; margin: 0 0 0.3rem; font-weight: 700; font-size: 0.95rem; }
.segmented { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.segmented label { flex: 1 1 6rem; position: relative; margin: 0; font-weight: 400; }
.segmented input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.segmented span {
  display: grid; place-items: center; min-height: var(--tap); padding: 0 0.6rem; border-radius: var(--radius-sm);
  border: 1px solid var(--color-border); background: var(--color-bg-deep); font-weight: 700;
}
.segmented input:checked + span { background: var(--color-accent); border-color: var(--color-accent); color: var(--color-accent-ink); }
.segmented input:focus-visible + span { box-shadow: 0 0 0 3px rgb(var(--accent-rgb) / 0.35); }
.segmented[aria-invalid="true"] span { border-color: var(--color-danger); }

.switch { display: flex; align-items: center; gap: 0.75rem; min-height: var(--tap); margin: 0 0 0.6rem; font-weight: 700; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-track { position: relative; flex: none; width: 50px; height: 30px; border-radius: 999px; background: var(--color-bg-deep); border: 1px solid var(--color-border); transition: background 0.2s; }
.switch-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--color-text-dim); transition: transform 0.2s, background 0.2s; }
.switch input:checked + .switch-track { background: var(--color-accent); border-color: var(--color-accent); }
.switch input:checked + .switch-track::after { transform: translateX(20px); background: var(--color-accent-ink); }
.switch input:focus-visible + .switch-track { box-shadow: 0 0 0 3px rgb(var(--accent-rgb) / 0.35); }
.reveal { animation: rise-in 0.25s ease both; }

.fold > summary {
  display: flex; align-items: center; gap: 0.6rem; min-height: var(--tap); cursor: pointer; list-style: none;
  font-weight: 700;
}
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary::after {
  content: ""; margin-left: auto; flex: none; width: 9px; height: 9px;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg); transition: transform 0.2s; color: var(--color-text-dim);
}
.fold[open] > summary::after { transform: rotate(-135deg); }
.fold-card { padding-top: 0.5rem; }
.fold-card > summary { font-size: 1.12rem; margin-bottom: 0.2rem; }
.fold-card[open] > summary { margin-bottom: 0.6rem; }
#engine-details { margin: 0.2rem 0 0.6rem; padding: 0 0.8rem; border: 1px solid var(--color-border); border-radius: var(--radius-sm); }
#engine-details[open] { padding-bottom: 0.4rem; }
.fold-summary { min-width: 0; font-family: var(--font-data); font-size: 0.78rem; font-weight: 400; color: var(--color-text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.parts-list { margin: 0 0 0.5rem; padding: 0; list-style: none; display: grid; gap: 0.45rem; }
.parts-list:empty { display: none; }
.part-row { display: grid; grid-template-columns: minmax(0, 1fr) 5.2rem auto; gap: 0.45rem; align-items: center; }
.btn-icon { min-width: var(--tap); padding: 0; }
.parts-suggest { padding-bottom: 0.8rem; }
.part-suggest { grid-template-columns: minmax(0, 1fr) 4.4rem auto; }
.part-suggest-name { grid-column: 1 / -1; font-weight: 700; font-size: 0.92rem; }

.time-breakdown { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.4rem; margin: 0 0 0.8rem; }
.time-breakdown[hidden] { display: none; }
.time-breakdown dt { grid-row: 1; font-size: 0.72rem; color: var(--color-text-dim); }
.time-breakdown dd { grid-row: 2; margin: 0; font-family: var(--font-data); font-weight: 700; }

.hours-hint:empty { display: none; }
.hours-hint[data-warn="true"] { color: var(--color-accent); font-weight: 700; }
.warranty-hint[data-tone="warn"] { border-left-color: var(--color-accent); background: rgb(var(--accent-rgb) / 0.08); }
/* A report started from an open job: required blanks stand out, optional ones are outlined. */
.field[data-needs] { position: relative; }
.field[data-needs="required"] .input, .field[data-needs="required"] .segmented span {
  border-color: var(--color-hivis); box-shadow: 0 0 0 3px rgb(212 236 58 / 0.18);
}
.field[data-needs="optional"] .input { border-style: dashed; border-color: color-mix(in srgb, var(--color-hivis) 55%, var(--color-border)); }
.field[data-needs="required"] > label::after, .field[data-needs="required"] > .label::after,
.field[data-needs="required"] .label-row label::after {
  content: "Needs filling"; margin-left: 0.5rem; padding: 0.05rem 0.4rem; border-radius: 999px;
  background: var(--color-hivis); color: #1c2400; font-family: var(--font-data); font-size: 0.66rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.04em; vertical-align: 0.1em;
}
.email-card { margin: 0.4rem 0 0.8rem; text-align: left; }
.card.email-card { padding-bottom: 0.9rem; }
.daily .email-card { margin-top: 0.6rem; }
.email-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.45rem; align-items: center; }
.email-chips { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0 0 0.45rem; padding: 0; list-style: none; }
.email-chips[hidden] { display: none; }
.email-chip {
  display: inline-flex; align-items: center; gap: 0.2rem; padding: 0.15rem 0.2rem 0.15rem 0.6rem;
  border-radius: 999px; background: var(--color-surface-2); border: 1px solid var(--color-border);
  font-family: var(--font-data); font-size: 0.82rem; max-width: 100%; overflow-wrap: anywhere;
}
.email-chip-remove { min-width: 32px; min-height: 32px; border: 0; background: none; color: var(--color-text-dim); font-size: 1.2rem; cursor: pointer; }
.email-status { margin-top: 0.5rem; }
.email-status[data-tone="ok"] { color: var(--color-ok); }
.email-status[data-tone="error"] { color: var(--color-danger); font-weight: 700; }
/* Open jobs: the board's one-line description, and the create button under the list. */
.job-description { margin: 0.2rem 0 0; font-weight: 600; overflow-wrap: anywhere; }
.job-description[hidden] { display: none; }
.jobs-create { display: inline-flex; justify-content: center; gap: 0.4rem; margin-top: 1rem; }
.jobs-create .icon { width: 18px; height: 18px; }
.home-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 1rem; }
.list-heading { margin: 1.2rem 0 0.3rem; font-size: 1.05rem; }
.form-actions-split > [hidden] + .btn { grid-column: 1 / -1; }
/* Fill from a photo: the plate reader sits at the top of the equipment fields. */
.plate-read { margin-bottom: 0.9rem; }
.plate-read > .label { margin: 0 0 0.4rem; }
.plate-buttons { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.5rem; }
.plate-buttons .btn { white-space: nowrap; }
.plate-read .hint { margin-top: 0.35rem; }
.plate-read .alert { margin-top: 0.5rem; }
/* Filled from the photo: outlined in the blueprint blue until the technician edits it. */
.field[data-from-photo] .input {
  border-color: var(--color-blueprint); box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-blueprint) 22%, transparent);
}
.field[data-from-photo] > label::after {
  content: "From photo, check it"; margin-left: 0.5rem; padding: 0.05rem 0.4rem; border-radius: 999px;
  background: var(--color-blueprint); color: #04263a; font-family: var(--font-data); font-size: 0.66rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.04em; vertical-align: 0.1em;
}
.plate-note {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.6rem; margin: 0.35rem 0 0;
  font-size: 0.85rem; color: var(--color-text-dim);
}
.plate-note code { font-family: var(--font-data); color: var(--color-text); overflow-wrap: anywhere; }
#done-photos-file { margin: 0 0 0.4rem; text-align: left; }
