/* SEAT styles.
   The report screen mirrors the PDF report: white page, black text and rules, pale blue-grey bands, blue links.
   "Still to do" uses a soft highlighter yellow, like marking up a printed report.
   Dark mode: tokens are redefined under [data-theme="dark"]; any dark-only rule uses :where([data-theme="dark"])
   so it has the same strength as the normal rule and must come straight after it. */

/* ---------- fonts (stored in the app so they work with no signal) ---------- */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/inter-400.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/inter-500.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/inter-600.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/inter-700.woff2") format("woff2"); }
@font-face { font-family: "Outfit"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/outfit-400.woff2") format("woff2"); }
@font-face { font-family: "Outfit"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/outfit-600.woff2") format("woff2"); }
@font-face { font-family: "Outfit"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/outfit-700.woff2") format("woff2"); }
@font-face { font-family: "Outfit"; font-style: normal; font-weight: 800; font-display: swap; src: url("fonts/outfit-800.woff2") format("woff2"); }

/* ---------- colours and fonts ---------- */
:root {
  --ui-font: "Inter", system-ui, -apple-system, Roboto, sans-serif;     /* app text */
  --brand-font: "Outfit", "Inter", system-ui, sans-serif;               /* names and headings */
  --doc-font: Calibri, Carlito, "Segoe UI", system-ui, sans-serif;      /* the report sheet, like the PDF */

  --bg: #f2f4f5;
  --card: #ffffff;
  --input-bg: #ffffff;
  --text: #000000;
  --muted: #5f6468;
  --line: #d6dcde;
  --line-strong: #9aa3a6;
  --sheet-line: #1e1e1e;   /* rules on the report sheet */
  --band: #cfd9db;         /* grey section bands */
  --link: #0000ff;
  --focus: #0000ff;

  --ink: #1e1e1e;          /* main accent: black, like the report text */
  --ink-2: #494949;
  --soft: #eaf0f1;         /* light version of the band colour */

  --todo: #e8c547;         /* highlighter yellow = needs a status */
  --todo-strong: #7a5c00;
  --todo-soft: #fff7cc;

  --green: #2e7d32;        /* ✓ ticked complete */
  --green-soft: #e6f4ea;
  --danger: #c0281e;
  --brand: #e35f03;        /* logo orange: home screen trim */
  --merge: #2563c9;        /* blue: continue / merge / backups */
  --merge-strong: #2563c9; /* blue behind white text (both themes) */
  --saved: #0b7f76;        /* teal: reports on this tablet */
  --radius: 10px;
  color-scheme: light;
}
:root:where([data-theme="dark"]) {
  --bg: #111315;
  --card: #1b1e20;
  --input-bg: #182026;
  --text: #ececec;
  --muted: #a3a9ad;
  --line: #33393c;
  --line-strong: #555d61;
  --sheet-line: #6b7478;
  --band: #2f3b3e;
  --link: #8fb0ff;
  --focus: #8fb0ff;
  --ink: #ececec;
  --ink-2: #c2c2c2;
  --soft: #263033;
  --todo: #d9b63e;
  --todo-strong: #f0d375;
  --todo-soft: #3a3418;
  --green: #7fd08a;
  --green-soft: #1f3a24;
  --danger: #ff8a80;
  --merge: #7aa7ff;
  --saved: #4cc9bb;
  color-scheme: dark;
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.45 var(--ui-font);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}
button, input, select, textarea { font: inherit; color: inherit; }
h2 { font-family: var(--brand-font); font-weight: 600; letter-spacing: 0.01em; }
.loading { padding: 40px; text-align: center; color: var(--muted); }
.muted { color: var(--muted); font-size: 0.9em; }
.center { text-align: center; }
.spacer { flex: 1; }
.danger { color: var(--danger) !important; }
.icon { display: block; flex-shrink: 0; }
.screen { min-height: 100vh; }
.content { max-width: 920px; margin: 0 auto; padding: 8px 12px 120px; }

/* ---------- top bars ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; padding-top: max(8px, env(safe-area-inset-top));
  background: var(--card); color: var(--text); border-bottom: 1px solid var(--sheet-line);
}
.topbar .muted { color: var(--muted); font-size: 0.82em; }
.topbar-title { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.topbar-title strong {
  font-size: 1.05em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-family: var(--brand-font); font-weight: 600; letter-spacing: 0.01em;
}
.topbar .btn-primary { background: var(--band); border-color: var(--sheet-line); color: #000; }
:where([data-theme="dark"]) .topbar .btn-primary { color: var(--text); }
.topbar .topbar-title { max-width: calc(50% - 70px); }
/* back to the reports list: a proper arrow + label, same height and look as Export */
.back-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 14px 0 10px; flex-shrink: 0; cursor: pointer;
  border: 1px solid var(--line-strong); border-radius: 10px; background: var(--soft); color: var(--text);
  font-family: var(--ui-font); font-size: 0.95rem; font-weight: 600;
}
.back-btn .icon { stroke-width: 2.4; }
.back-btn:hover, .back-btn:active { border-color: var(--ink-2); }
@media (max-width: 560px) { .back-label { display: none; } .back-btn { width: 44px; padding: 0; justify-content: center; } }

/* report: back + name | logo | light/dark + export.  home: light/dark | logo + name | (empty) */
.topbar-report { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; }
.topbar-report .topbar-title { max-width: none; min-width: 0; }
.topbar-home { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; }
.tb-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.tb-right { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.tb-center { display: flex; justify-content: center; }

.seat-logo {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  border-radius: 10px; overflow: hidden;
}
.seat-logo img { width: 100%; height: 100%; display: block; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-text { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.15; }
.brand-centre .brand-text { align-items: flex-start; }
.brand-text strong { color: #E35F03; font-family: var(--brand-font); font-weight: 800; font-size: 1.5em; letter-spacing: 0.08em; }
.brand-text .muted { font-family: var(--brand-font); font-weight: 400; letter-spacing: 0.02em; font-size: 0.78em; }

/* Light / Dark switch */
.theme-toggle {
  display: inline-flex; padding: 2px; gap: 2px; border-radius: 18px; cursor: pointer; flex-shrink: 0;
  border: 1px solid var(--line-strong); background: var(--bg);
}
.theme-opt {
  display: inline-flex; align-items: center; gap: 4px; padding: 5px 10px; border-radius: 16px;
  font-size: 0.82em; font-weight: 600; color: var(--muted);
}
.theme-on { background: var(--card); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25); }

.progress { height: 4px; background: var(--line); }
.progress-bar { display: block; height: 100%; background: var(--link); transition: width 0.3s; }
.progress.small { display: block; height: 4px; border-radius: 2px; overflow: hidden; margin-top: 6px; background: var(--line); }

.toolbar {
  position: sticky; top: 56px; z-index: 15;
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  max-width: 920px; margin: 0 auto; padding: 8px 12px;
  background: var(--bg); border-bottom: 1px solid var(--line); font-family: var(--ui-font);
}
/* Jump to | Undo Redo | Show only unfinished - one neat row of matching controls */
.tb-jump { flex: 1; min-width: 180px; display: flex; position: relative; }

.tb-history { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 8px; overflow: hidden; background: var(--card); }
.tb-btn {
  display: inline-flex; align-items: center; gap: 5px; min-height: 36px; padding: 0 12px; border: none; background: transparent;
  color: var(--text); font-size: 0.88em; font-weight: 600; cursor: pointer;
}
.tb-btn + .tb-btn { border-left: 1px solid var(--line); }
.tb-btn:hover:not(:disabled) { background: var(--soft); }
.tb-btn:disabled { color: var(--muted); opacity: 0.45; cursor: default; }
.tb-filter {
  display: inline-flex; align-items: center; gap: 7px; min-height: 38px; padding: 0 12px; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--line-strong); background: var(--card); font-size: 0.88em; font-weight: 600; white-space: nowrap; user-select: none;
}
.tb-filter input { width: 17px; height: 17px; margin: 0; accent-color: var(--green); }
.tb-filter-short { display: none; } /* "Unfinished" is the phone wording of "Show only unfinished" */
.tb-filter-on { border-color: var(--green); color: var(--green); background: var(--green-soft); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 560px) { .tb-btn span { display: none; }
.tb-btn { padding: 0 10px; } }

.toggle { display: flex; align-items: center; gap: 6px; font-size: 0.9em; white-space: nowrap; }
.toggle input { width: 20px; height: 20px; accent-color: #1e1e1e; }

/* ---------- cards, buttons, inputs ---------- */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 14px; margin: 10px 0;
}
.card h2 { font-size: 1.05em; margin: 0 0 6px; color: var(--text); font-family: var(--brand-font); font-weight: 600; letter-spacing: 0.01em; }
details > summary { cursor: pointer; list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details > summary h2 { display: inline; }
details > summary::before { content: "▸ "; color: var(--muted); }
details[open] > summary::before { content: "▾ "; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 6px 14px; border-radius: 8px;
  border: 1px solid var(--line-strong); background: var(--card); cursor: pointer; font-weight: 600; letter-spacing: 0.01em;
}
.btn:disabled { opacity: 0.5; }
.btn-primary { background: #1e1e1e; border-color: #1e1e1e; color: #fff; }
.btn-ghost { background: transparent; }
.icon-btn {
  min-width: 40px; height: 40px; padding: 0 8px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--card); cursor: pointer;
  font-size: 1rem; line-height: 1; flex-shrink: 0; color: var(--text);
  display: inline-flex; align-items: center; justify-content: center; font-weight: 700;
}
.icon-btn:disabled { opacity: 0.3; }
.icon-btn-sm { min-width: 34px; height: 34px; font-size: 0.9rem; }
.icon-btn-xs { min-width: 28px; height: 28px; padding: 0 4px; border-radius: 6px; }
.icon-btn-camera { background: #1e1e1e; border-color: #1e1e1e; color: #fff; }
.icon-btn-danger { color: var(--danger); }
/* bin / remove buttons */
:where([data-theme="dark"]) .btn-primary, :where([data-theme="dark"]) .icon-btn-camera { background: #ececec; border-color: #ececec; color: #111; }

.link-btn { background: none; border: none; padding: 6px 2px; color: var(--ink); cursor: pointer; text-decoration: underline; min-height: 36px; }
.link-btn-sm { min-height: 0; padding: 0; font-size: 0.85em; }

.input, .select, .textarea {
  width: 100%; min-height: 40px; padding: 7px 10px; border-radius: 8px;
  border: 1px solid var(--line-strong); background: var(--input-bg);
}
.textarea { resize: vertical; overflow: hidden; line-height: 1.4; }
.select { appearance: none; }
.select-empty { color: var(--todo-strong); }
.input:focus, .select:focus, .textarea:focus { outline: 2px solid var(--focus); outline-offset: 0; }

.pill { font-size: 0.8em; font-weight: 700; padding: 2px 9px; border-radius: 10px; white-space: nowrap; }
.pill-todo { background: var(--todo-soft); color: var(--todo-strong); border: 1px solid var(--todo); }
.pill-empty { color: var(--muted); }
.pill-ticked { display: inline-flex; align-items: center; gap: 3px; background: var(--green); color: #fff; }
:where([data-theme="dark"]) .pill-ticked { color: #0f1a11; }

.notice { padding: 8px 12px; border-radius: 8px; margin: 8px 0; font-size: 0.95em; }
.notice ul { margin: 4px 0 0; padding-left: 20px; }
.notice-warn { background: var(--todo-soft); border: 1px solid var(--todo); }
.notice-ok { background: var(--soft); border: 1px solid var(--band); }

.chev { color: var(--ink-2); width: 1em; }

/* ---------- home ---------- */
.file-chosen { font-size: 0.9em; font-weight: 600; color: var(--green); word-break: break-word; }
.start-btn { margin-top: 12px; }
.project-row { display: flex; align-items: center; gap: 8px; border-top: 1px solid var(--line); }
.project-open { flex: 1; display: flex; flex-direction: column; gap: 2px; padding: 10px 0; background: none; border: none; text-align: left; cursor: pointer; min-height: 56px; }

/* ---------- modal (photo viewer, export) ---------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 50; background: rgba(20, 28, 34, 0.78);
  display: flex; align-items: center; justify-content: center; padding: 14px;
}
.modal {
  position: relative; background: var(--card); border-radius: var(--radius); padding: 14px;
  max-width: 900px; width: 100%; max-height: 92vh; overflow: auto;
}
.modal-wide { max-width: 1000px; }
.modal-close {
  position: sticky; top: 0; float: right; z-index: 2; width: 44px; height: 44px; border-radius: 22px;
  border: 1px solid var(--sheet-line); background: var(--band); color: #000; font-size: 1.2em; cursor: pointer; margin: -4px -4px 0 8px;
}
:where([data-theme="dark"]) .modal-close { color: var(--text); }
.viewer-img { display: block; width: 100%; max-height: 75vh; object-fit: contain; border-radius: 6px; background: #000; }
.viewer-caption { margin: 8px 0 0; font-weight: 500; }
.preview {
  white-space: pre-wrap; font: 13px/1.45 ui-monospace, Menlo, Consolas, monospace;
  background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px; max-height: 50vh; overflow: auto;
}
/* "Confirm you want to delete?" */
.confirm-backdrop { z-index: 60; }
.confirm-box { max-width: 380px; text-align: center; padding: 20px 18px 16px; font-family: var(--ui-font); }
.confirm-icon { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%;
  color: var(--danger); background: color-mix(in srgb, var(--danger) 14%, transparent); margin-bottom: 8px; }
.confirm-title { font-family: var(--brand-font); font-weight: 700; font-size: 1.15em; }
.confirm-detail { margin-top: 6px; color: var(--muted); font-size: 0.92em; overflow-wrap: anywhere; }
.confirm-items { margin: 8px auto 0; padding: 8px 12px; list-style: none; display: inline-block; text-align: left; font-weight: 600;
  border-radius: 8px; background: var(--todo-soft); border: 1px solid var(--todo); }
.confirm-items li { padding: 1px 0; }
.confirm-icon-primary { color: var(--todo-strong); background: var(--todo-soft); }
.confirm-buttons { display: flex; gap: 10px; margin-top: 16px; }
.confirm-buttons .btn { flex: 1; }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
:where([data-theme="dark"]) .btn-danger { color: #111; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; margin-top: 8px; }
.gallery-item { padding: 0; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: var(--bg); cursor: pointer; text-align: left; }
.gallery-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.gallery-item span { display: block; padding: 3px 6px; font-size: 0.78em; }

/* ================= Report sheet (mirrors the PDF report layout) ================= */
.sheet {
  background: var(--card); border: 1px solid var(--sheet-line); margin-top: 8px;
  font-family: var(--doc-font); font-size: 15.5px; line-height: 1.38;
}
.sheet input, .sheet select, .sheet textarea, .sheet button { font-family: var(--doc-font); }
.sheet-head { border-bottom: 1px solid var(--sheet-line); }
.sheet-title { text-align: center; font-weight: 700; font-size: 1.15em; padding: 8px; color: var(--text); background: var(--card); border-bottom: 1px solid var(--sheet-line); }
.sheet-cells { display: grid; grid-template-columns: 1fr 1.4fr 1fr; font-size: 0.9em; }
.sheet-cells + .sheet-cells { border-top: 1px solid var(--sheet-line); }
.sheet-cells > div { padding: 4px 8px; border-left: 1px solid var(--sheet-line); display: flex; align-items: center; gap: 4px; flex-wrap: wrap; min-height: 32px; }
.sheet-cells > div:first-child { border-left: none; }

/* grey section bands; each section opens and closes */
.band-section { border-bottom: 1px solid var(--sheet-line); scroll-margin-top: 110px; }
.band-section:last-child { border-bottom: none; }
.band {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: var(--band); padding: 5px 10px; font-weight: 700; font-size: 0.95em; letter-spacing: 0.01em;
  border-bottom: 1px solid var(--sheet-line);
}
details > summary.band { list-style: none; cursor: pointer; justify-content: flex-start; }
details > summary.band::before { content: "▸"; margin-right: 6px; color: var(--muted); }
details[open] > summary.band::before { content: "▾"; }
.band-tab { cursor: pointer; user-select: none; }
.band-tab:hover { filter: brightness(0.97); }
.band-title { display: inline-flex; align-items: center; gap: 8px; }
.band-chev { width: 12px; color: var(--muted); font-size: 0.9em; }
.band-closed > .band-tab { border-bottom: none; }
/* section headers (v188, user 2026-11-15): taller and bolder, a short count, and a round ✓ to mark the section done (green) */
.band-tab { min-height: 46px; padding: 6px 10px 6px 12px; font-size: 1.04em; letter-spacing: 0.03em; }
.band-tab .band-chev { width: 14px; font-size: 1em; }
.band-right { display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; }
.band-summary { font-size: 0.76em; font-weight: 600; letter-spacing: 0; color: var(--muted); white-space: nowrap; }
.band-tick {
  width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
  border: 2px solid var(--line-strong); background: var(--card); color: transparent; flex-shrink: 0;
}
.band-tick:hover { color: var(--line-strong); }
.band-tick-on, .band-tick-on:hover { background: var(--green); border-color: var(--green); color: #fff; }
.band-done > .band-tab { background: var(--green-soft); color: var(--green); box-shadow: inset 5px 0 0 var(--green); }
.band-done > .band-tab .band-chev, .band-done > .band-tab .band-summary { color: var(--green); }
@media (max-width: 600px) { .band-summary { display: none; } }
.band-body { padding: 6px 10px 8px; }
.band-body-flush { padding: 0; }
#old-photos { margin-top: 12px; border: 1px solid var(--sheet-line); background: var(--card); }
#old-photos .gallery { padding: 8px; }
.doc-p { margin: 2px 0; }
/* inline, underlined inputs that sit inside report text */
.inline-input {
  border: none; border-bottom: 1px dashed var(--line-strong); background: transparent; padding: 2px 2px; min-height: 30px;
  border-radius: 0; color: var(--text);
}
.inline-input:focus { outline: none; border-bottom: 2px solid var(--ink-2); }
.inline-date { min-height: 28px; }
.inline-number { width: 64px; }
.inline-caption { flex: 1; min-width: 120px; color: var(--link); }
.inline-area {
  flex: 1; min-width: 200px; border: none; border-bottom: 1px dashed var(--line-strong); background: transparent;
  resize: none; overflow: hidden; padding: 2px; min-height: 28px; line-height: 1.35;
}
.inline-area:focus { outline: none; border-bottom: 2px solid var(--ink-2); }

/* ---------- element table ---------- */
.el { scroll-margin-top: 110px; }
.el-row { display: grid; grid-template-columns: 1.6fr 1fr 1fr; border-bottom: 1px solid var(--sheet-line); cursor: pointer; }
.el-row-head { font-weight: 700; cursor: default; background: var(--card); }
.el-row-new .input-heading { min-height: 32px; padding: 2px 8px; }
.el-cell { padding: 6px 10px; border-left: 1px solid var(--sheet-line); display: flex; align-items: center; gap: 6px; min-height: 40px; }
.el-cell:first-child { border-left: none; }
.el-name { font-weight: 600; color: var(--text); }
.el-name .pill { margin-left: auto; display: inline-flex; align-items: center; gap: 3px; }
.el-name .chev { width: 12px; flex-shrink: 0; }
.el-open > .el-row { background: var(--band); }
.cell-select { min-height: 32px; padding: 2px 6px; border: 1px solid var(--line-strong); background: var(--input-bg); }
.el-body { padding: 4px 12px 8px; border-bottom: 1px solid var(--sheet-line); }
.el-heading { display: flex; align-items: center; gap: 6px; font-weight: 600; padding: 2px 0 4px; font-size: 0.95em; letter-spacing: 0.02em; }
.el-heading span { cursor: text; }
.el-heading .input-heading { flex: 1; min-height: 32px; padding: 2px 6px; }

/* "+ Add sub-heading": same family as Add line / Add element, a touch stronger so it's easy to find */
.fmt-add-btn.add-sub-btn { border-color: color-mix(in srgb, var(--link) 45%, var(--line-strong)); color: var(--link); }
.fmt-add-btn.add-sub-btn .icon { color: var(--link); }
.fmt-add-btn.add-sub-btn:hover { background: color-mix(in srgb, var(--link) 8%, var(--card)); }
/* the "-" separators stay in the export */
.add-element { padding: 8px 10px; }
.el-add-btn { flex-shrink: 0; min-height: 32px; color: var(--green); border-color: color-mix(in srgb, var(--green) 50%, transparent); font-weight: 700; }
.el-add-btn:hover { background: var(--green-soft); }
/* element with every defect ticked: green row */
.el-complete > .el-row, .el-complete.el-open > .el-row { background: var(--green-soft); box-shadow: inset 4px 0 0 var(--green); }
.el-complete .el-name { color: var(--green); }

.grp:first-child { margin-top: 2px; }

.grp-title { flex: 1; cursor: pointer; font-weight: 700; text-transform: none; font-size: 0.95em; letter-spacing: 0.01em; }
.grp-chev { display: inline-block; width: 18px; color: var(--ink-2); font-size: 1.05em; }
/* ▸ / ▾ : tap to open or close the tools */

.grp > .ln:last-of-type { border-bottom: none; }
.ln::before { content: ""; position: absolute; left: 0; width: 2px; border-radius: 2px; background: var(--todo); top: 5px; bottom: 5px; }
.ln-done::before { background: transparent; }
.ln-new { background: transparent; }
.ln-new::before { background: var(--link); }
.ln-sel { background: var(--soft); }
.ln-row { display: flex; align-items: flex-start; gap: 10px; }

.ln-dash { margin-right: 4px; }
.ln-status { color: var(--text); font-weight: 700; }
.ln-see { color: var(--link); text-decoration: underline; text-underline-offset: 2px; }
.ln-edit { flex: 1; min-height: 34px; padding: 4px 6px; }
.ln-main { flex: 1; min-width: 0; }
.ln-main .ln-edit { display: block; width: 100%; box-sizing: border-box; }
/* previous report's status, always visible under the line (not part of the text) */
.ln-prev { margin-top: 3px; font-family: var(--ui-font); font-size: 0.78em; color: var(--muted); }
.ln-prev strong { color: var(--text); font-weight: 600; }
.ln-prev-note { font-style: italic; }
.ln-comment { margin: 2px 0 4px 14px; width: calc(100% - 14px); min-height: 32px; padding: 4px 6px; }
.ln-comment-text { font-style: normal; }
.ln-new-tag { flex-shrink: 0; font-size: 0.78em; font-weight: 700; color: #fff; background: var(--link); border-radius: 4px; padding: 2px 8px; margin-top: 5px; }
:where([data-theme="dark"]) .ln-new-tag { color: #111; }
/* status box */
.mini-status {
  width: 132px; flex-shrink: 0; min-height: 32px; padding: 2px 6px; margin-top: 1px; font-weight: 700; font-size: 0.88em;
  border: 1px solid var(--line-strong); background: var(--input-bg);
}
/* a status has been picked: pale green */
.mini-status:not(.select-empty), .sig-select:not(.select-empty) { background-color: var(--green-soft); border-color: color-mix(in srgb, var(--green) 45%, transparent); }
.mini-status.select-empty { border-color: var(--todo); color: var(--todo-strong); background: var(--todo-soft); }

/* tools row under a tapped line */
.ln-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 6px 0 2px 0; font-family: var(--ui-font); }
.grp-head + .ln-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; padding: 4px 0 6px 14px; font-family: var(--ui-font); }
.tools-label { font-size: 0.8em; }
.tool-btn {
  height: 34px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--card);
  color: var(--text); font-size: 0.82em; font-weight: 600; cursor: pointer; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 4px;
}
/* "Explain the change" box, shown for any status other than NFD */
.explain { margin: 4px 0 2px 0; }
.explain .ln-comment { margin: 2px 0 0; width: 100%; }
.explain-label { display: block; font-size: 0.82em; font-weight: 700; color: var(--text); font-family: var(--ui-font); }
.explain-empty .ln-comment { border: 1px solid var(--todo); background: var(--todo-soft); }

/* description lines (no status needed) */
.ln-note .ln-text { color: var(--muted); font-style: italic; }
.ln-note-tag {
  flex-shrink: 0; margin-top: 5px; font-size: 0.72em; font-weight: 600; color: var(--muted);
  border: 1px solid var(--line-strong); border-radius: 4px; padding: 1px 6px; font-family: var(--ui-font);
}

/* previous-report photo links */
.prev-ref {
  display: inline-flex; align-items: center; gap: 3px; border: none; background: none; padding: 0 2px; cursor: pointer;
  font-size: 0.74em; color: var(--link); text-decoration: underline; vertical-align: 1px;
}
.prev-ref-missing { opacity: 0.5; }
.view-ref { color: var(--link); }
.latest-ref { color: #8a2be2; }
:where([data-theme="dark"]) .latest-ref { color: #c9a2ff; }

.ln-side .ln-new-tag, .ln-side .ln-note-tag { margin-top: 0; text-align: center; padding: 6px 0; }
.ln-side .ln-new-tag {
  background: transparent; color: var(--link); border: 1.5px solid var(--link); padding: 3px 0; font-size: 0.75em; letter-spacing: 0.05em;
}
.ln-add-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px; height: 28px; width: 100%;
  border: none; border-radius: 6px; background: var(--link); color: #fff; font-weight: 700; font-size: 0.85em; cursor: pointer;
}
:where([data-theme="dark"]) .ln-add-btn { color: #111; }
.ln-photo-btns { display: flex; gap: 3px; }
.ln-pbtn {
  flex: 1; height: 22px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 5px; background: transparent; color: var(--muted); cursor: pointer; padding: 0;
}
.ln-pbtn:hover, .ln-pbtn:active { border-color: var(--line-strong); color: var(--text); background: var(--soft); }
.ln-pbtn-narrow { flex: 1; }

/* "#" turns into a small photo-number box */
.photo-no-input {
  min-width: 0; height: 34px; padding: 2px 8px; border: 1px solid var(--focus); border-radius: 6px;
  background: var(--input-bg); color: var(--text); font-size: 0.9em; width: 110px;
}
.photo-no-input:focus { outline: none; box-shadow: 0 0 0 2px var(--soft); }
.photo-no-quiet { flex: 2; width: auto; height: 22px; padding: 1px 6px; font-size: 0.85em; }
.photo-no-small { height: 34px; width: 96px; }

/* ✓ complete: turns the whole line green; tap again to undo */
.ln-tick {
  height: 20px; width: 100%; display: inline-flex; align-items: center; justify-content: center; padding: 0;
  border: 1px solid var(--line); border-radius: 5px; background: transparent; color: var(--line-strong); cursor: pointer;
}
.ln-tick:active { background: var(--green-soft); }
.ln-tick-on { background: var(--green); border-color: var(--green); color: #fff; }
:where([data-theme="dark"]) .ln-tick-on { color: #0f1a11; }
.ln-ticked, .ln-ticked.ln-sel { background: var(--green-soft); }
.ln-ticked::before { background: var(--green); }
.ln-ticked .ln-text { color: var(--text); }
.tick-wrap { display: block; position: relative; }
/* ✓ with a padlock beside it: open = can be changed, closed (green) = ticked and locked */
.tick-row { display: flex; align-items: center; gap: 4px; }
.tick-row .ln-tick { flex: 1; min-width: 0; }
.tick-lock { flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; width: 18px; color: var(--muted); cursor: pointer; }
.tick-lock-on { color: var(--green); }
/* "Please update status" under a tick box tapped before a status was chosen */
.tick-warn { display: block; margin-top: 3px; color: var(--danger); font-family: var(--ui-font); font-size: 0.72em; font-weight: 600; line-height: 1.2; text-align: center; }
.sig-tick-wrap .tick-warn { position: absolute; top: 100%; right: 0; white-space: nowrap; text-align: right; }
/* Ticked = locked: controls are disabled (taps fall through to the item, which shows the unlock reminder) */
.locked :is(select, input, textarea, button):disabled { pointer-events: none; }
.locked select:disabled, .locked input:disabled, .locked textarea:disabled { opacity: 1; color: var(--text); background: transparent; }
.locked .ln-pbtn:disabled, .locked .icon-btn:disabled { opacity: 0.35; }

/* "+ Add defect" under each sub-heading / element */
.add-line {
  display: block; background: none; border: none; cursor: pointer; padding: 6px 0 2px 10px; margin: 2px 0;
  color: var(--link); font-weight: 500; font-size: 0.84em; font-family: var(--ui-font);
}
.add-line .muted { font-size: 1em; }

.add-defect:hover, .add-defect:active { background: var(--soft); border-style: solid; }
.add-defect-plus { font-size: 1.25em; line-height: 1; }

/* ---------- photos ---------- */
.thumb {
  width: 54px; height: 40px; flex-shrink: 0; border-radius: 5px; overflow: hidden; padding: 0;
  border: 1px solid var(--line); background: var(--soft); cursor: pointer;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-manual { display: flex; align-items: center; justify-content: center; color: var(--ink-2); font-weight: 700; cursor: default; }
/* photos shown under the defect they belong to */
.pu-list { display: flex; flex-direction: column; gap: 3px; margin: 4px 0 2px 14px; }
.pu {
  display: flex; align-items: center; gap: 8px; min-height: 34px; padding: 2px 4px 2px 2px;
  border: 1px solid var(--line); border-radius: 6px; background: var(--bg); font-size: 0.86em;
}
.pu .thumb { width: 40px; height: 30px; border-radius: 4px; border: none; }
.pu .thumb-manual { font-size: 0.9em; }
.pu-n { font-weight: 700; white-space: nowrap; color: var(--text); display: inline-flex; align-items: center; gap: 4px; }
.pu-num { width: 54px; min-height: 26px; padding: 0 4px; font-weight: 700; }
.pu-dash { color: var(--muted); }
.pu-caption {
  flex: 1; min-width: 0; border: none; background: transparent; color: var(--text); padding: 4px 2px; font-size: 1em;
  border-bottom: 1px solid transparent; border-radius: 0;
}
.pu-caption::placeholder { color: var(--text); opacity: 0.85; }
.pu-caption:focus { outline: none; border-bottom-color: var(--focus); }
.pu-x {
  width: 26px; height: 26px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
  border: none; background: transparent; color: var(--muted); border-radius: 5px; cursor: pointer;
}
.pu-x:hover { background: var(--line); color: var(--danger); }
.ln-ticked .pu { background: transparent; }
/* "See photo:" list */
.see-photo { display: flex; align-items: center; gap: 5px; flex-wrap: nowrap; color: var(--link); }
.see-photo .thumb { width: 44px; height: 33px; }
.see-photo-label { white-space: nowrap; text-decoration: underline; text-underline-offset: 2px; }
.see-photo-n { min-width: 14px; }
.see-photo-date { white-space: nowrap; font-size: 0.85em; }

/* ---------- general photographs ---------- */
.gp-line { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 3px 0; border-bottom: 1px dashed var(--line); }
.gp-line .thumb { width: 44px; height: 33px; }
.gp-prev { border-bottom: none; padding: 1px 0; flex-wrap: nowrap; }
.gp-text { font-weight: 400; }
.gp-n { white-space: nowrap; font-weight: 600; min-width: 58px; }
.gp-select { width: auto; min-width: 210px; min-height: 34px; padding: 2px 6px; }
.gp-add { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 8px; padding: 6px 8px; background: var(--soft); border: 1px solid var(--line); }
.gp-add-label { font-weight: 700; font-size: 0.9em; width: 137px; flex-shrink: 0; }
.gp-btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; }
/* every row in neat columns: "Photo N" | - | title (drop-down lines up on every row and in the add row) | links | arrows */
.gp-line .gp-n { width: 128px; min-width: 128px; flex-shrink: 0; display: inline-flex; align-items: center; gap: 4px; }
.gp-dash { width: 12px; flex-shrink: 0; text-align: center; }
.gp-row .gp-select, .gp-add .gp-select { width: 240px; min-width: 240px; flex-shrink: 0; }
.gp-prev .gp-text { width: 240px; flex-shrink: 0; }
.gp-row { flex-wrap: nowrap; }
.gp-actions { display: inline-flex; gap: 4px; flex-shrink: 0; }
@media (max-width: 600px) {
  .gp-line .gp-n { width: 92px; min-width: 92px; }
  .gp-line .inline-number { width: 44px; }
  .gp-prev .gp-n { width: 64px; min-width: 64px; }
  .gp-row .gp-select, .gp-prev .gp-text { width: auto; min-width: 0; flex: 1 1 0; }
  .gp-row .spacer { display: none; }
  .gp-same-label { display: none; }
  .gp-add .gp-select { width: auto; min-width: 0; flex: 1 1 100%; }
  .gp-add-label { width: auto; }
}

/* ---------- significant defects & recommendations (one dotted rule below each) ---------- */
.latest-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; padding: 4px 0 6px; border-bottom: 1px dashed var(--line); margin-bottom: 4px; font-size: 0.92em; }
.sig { position: relative; display: flow-root; padding: 8px 4px 10px 12px; margin: 0 -4px; border-radius: 0; border-bottom: 1px dashed var(--line-strong); }
.sig:last-of-type { border-bottom: none; }
.sig::before { content: ""; position: absolute; left: 2px; top: 6px; bottom: 6px; width: 3px; border-radius: 2px; background: var(--todo); }
.sig.ln-done::before { background: transparent; }
.sig-title { font-weight: 700; }
.sig-field { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 7px; } /* a little more room between the boxes (v140) */
.sig-select { width: auto; min-width: 200px; min-height: 32px; padding: 2px 6px; }
.sig-edit { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 6px; align-items: end; }
.sig-edit label { display: flex; flex-direction: column; gap: 3px; font-size: 0.82em; color: var(--muted); }
.sig-edit label.wide { grid-column: 1 / -1; }
.sig-edit .input { color: var(--text); }
/* comment / notes box: a full light outline (a bottom-only hover line looked cut off on the tablet, v141) */
.sig .inline-area { border: 1px solid var(--line); border-radius: 6px; padding: 4px 8px; background: var(--input-bg); }
.sig .inline-area:hover { border-color: var(--line-strong); }
.sig .inline-area:focus { border-color: var(--focus); }
/* ✓ sits top-right and the text wraps round it (never under it, however narrow the screen) */
.sig-tick-wrap { float: right; position: relative; width: 80px; margin: -2px 2px 6px 12px; }
.sig-tick-wrap .ln-tick { height: 34px; border-color: var(--line-strong); border-radius: 7px; }
.sig-ticked { background: var(--green-soft); }
.sig-ticked::before { background: var(--green); }

/* ---------- comment sections, laid out and edited in place ---------- */
.fmt { position: relative; cursor: text; padding: 2px 34px 2px 0; line-height: 1.5; }
.fmt-live { padding: 2px 0; cursor: default; }
.fmt-p { margin: 0 0 6px; }
.fmt-h { margin: 12px 0 4px; font-weight: 700; font-size: 0.86em; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.fmt-h:first-child { margin-top: 0; }
.fmt-gap { height: 6px; }
.fmt-kv { display: grid; grid-template-columns: minmax(150px, 40%) 1fr; gap: 10px; padding: 2px 0; border-bottom: 1px dotted var(--line); }
.fmt-k { color: var(--muted); }
.fmt-v { font-weight: 600; }
.fmt-qa { margin: 4px 0 6px; padding: 4px 8px; border-left: 3px solid var(--line-strong); background: var(--bg); }
.fmt-wrap { display: contents; }
.fmt-row { display: flex; align-items: flex-start; gap: 4px; margin: 0 0 4px; }
.fmt-row:focus-within { background: var(--soft); border-radius: 4px; }
.fmt-in {
  flex: 1; min-width: 0; border: none; background: transparent; color: var(--text); font: inherit; line-height: 1.5;
  padding: 2px 4px; margin: 0; border-radius: 4px; resize: none; overflow: hidden; min-height: 0;
}
.fmt-in:focus { outline: none; box-shadow: inset 0 -2px 0 var(--focus); }
textarea.fmt-in { display: block; }
.fmt-row .fmt-h { margin: 8px 0 0; font-weight: 700; font-size: 0.86em; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.fmt-row.fmt-kv { display: grid; grid-template-columns: minmax(150px, 40%) 1fr auto; gap: 8px; padding: 0; border-bottom: 1px dotted var(--line); margin-bottom: 0; }
.fmt-row.fmt-kv .fmt-k { color: var(--muted); }
.fmt-row.fmt-kv .fmt-v { font-weight: 600; }

.fmt-qx { font-size: 0.9em; }
.fmt-gap-row .fmt-gap { flex: 1; height: 8px; }
.fmt-x {
  flex-shrink: 0; width: 22px; height: 22px; margin-top: 3px; display: inline-flex; align-items: center; justify-content: center;
  border: none; background: transparent; color: var(--muted); border-radius: 4px; cursor: pointer; opacity: 0.35;
}
.fmt-row:hover .fmt-x, .fmt-row:focus-within .fmt-x { opacity: 1; }
.fmt-x:hover { color: var(--danger); background: var(--line); }
.fmt-add { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); }
/* "Add line" / "Add measurement": same style as the Take photo button, a size smaller */
.fmt-add-btn { min-height: 34px; padding: 4px 12px; gap: 6px; font-size: 0.85em; border-radius: 8px; font-family: var(--ui-font); color: var(--text); }
.fmt-add-btn:hover { background: var(--soft); }
.fmt-empty { padding: 4px; }
.fmt-gap-row .fmt-x { opacity: 0; }
.fmt-gap-row:hover .fmt-x { opacity: 0.6; }

/* ---------- Method of Exam: Method / Access / Structure location ---------- */
.loc-method { --loc: #465a66; }
.loc-access { --loc: #b8540f; }
.loc-structureLocation { --loc: #23609f; }
:where([data-theme="dark"]) .loc-method { --loc: #9fb3bf; }
:where([data-theme="dark"]) .loc-access { --loc: #f0904d; }
:where([data-theme="dark"]) .loc-structureLocation { --loc: #6aa5e0; }
.loc-add { display: flex; flex-direction: column; align-items: stretch; gap: 8px; margin-top: 12px; max-width: 280px; }
.loc-add + .loc-add { margin-top: 8px; }
.loc-add-btn, .loc-here {
  display: flex; align-items: center; justify-content: center; gap: 7px; padding: 7px 14px; min-height: 38px;
  font-weight: 600; font-size: 0.92em; color: var(--loc); border-radius: 8px;
  background: color-mix(in srgb, var(--loc) 12%, transparent); border: 1px solid color-mix(in srgb, var(--loc) 45%, transparent);
}
.loc-add-btn:hover, .loc-here:hover { background: color-mix(in srgb, var(--loc) 20%, transparent); }
.loc-add-btn:active, .loc-here:active { transform: translateY(1px); }
.loc-here { display: inline-flex; margin-top: 8px; }
.loc-here:disabled { opacity: 0.6; }
.loc-card {
  margin-top: 12px; padding: 10px 12px 12px; border: 1px solid var(--line); border-left: 3px solid var(--loc); border-radius: 10px;
  background: var(--soft); font-family: var(--ui-font);
}
.loc-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.loc-badge {
  display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; color: var(--loc);
  background: color-mix(in srgb, var(--loc) 16%, transparent);
}
.loc-title { font-family: var(--brand-font); font-weight: 700; font-size: 1em; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text); }
.loc-how { width: 100%; min-height: 56px; }
.access-error { color: #e04a3a; font-size: 0.9em; margin-top: 6px; }
.loc-results { margin-top: 10px; padding: 10px 12px; border-radius: 8px; background: var(--card); border: 1px solid var(--line); }
.loc-results-title { font-size: 0.78em; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--loc); margin-bottom: 8px; }
.loc-grid { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; align-items: center; }
.loc-k { font-weight: 600; color: var(--muted); font-size: 0.92em; }
.loc-v { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; min-width: 0; }
.loc-os { font-size: 1.05em; letter-spacing: 0.03em; }
.w3w-slashes { color: #e11f26; font-weight: 700; margin-right: 2px; }
.w3w-in { flex: 1 1 11em; min-width: 11em; max-width: 16em; }
.access-link { display: inline-flex; align-items: center; gap: 3px; color: var(--link); font-size: 0.9em; }
.loc-note { margin-top: 8px; font-size: 0.8em; }
/* light outline on the text boxes in Method of Exam and the location cards */
.fmt-boxed .fmt-in.fmt-p, .loc-how, .w3w-in {
  border: 1px solid var(--line-strong); border-radius: 6px; padding: 6px 9px; background: var(--card);
}
.fmt-boxed .fmt-in.fmt-p:focus, .loc-how:focus, .w3w-in:focus { border-color: var(--focus); box-shadow: 0 0 0 2px color-mix(in srgb, var(--focus) 25%, transparent); }

/* ---------- small screens ---------- */
@media (max-width: 600px) {
  .sheet { font-size: 15px; }
  .sheet-cells { grid-template-columns: 1fr; }
  .sheet-cells > div { border-left: none; border-top: 1px solid var(--line); }
  .el-cell { padding: 6px; }
  .mini-status { width: 104px; }
  .brand-text .muted { display: none; }
  .tb-center { display: none; }
  .topbar-report { grid-template-columns: 1fr auto; }
  .topbar-home { grid-template-columns: auto 1fr; }
  .topbar-home .tb-right { display: none; }
  .brand-centre { justify-content: flex-end; }
}
@media (max-width: 560px) {
  html, body { font-size: 15px; }
  .toolbar { top: 52px; }
}
@media (max-width: 520px) {
  .loc-grid { grid-template-columns: 1fr; gap: 2px; }
  .loc-k { margin-top: 6px; }
}

/* ---------- drop-down arrow: the same chevron on every drop-down, sized to its text, clear of the edge ----------
   (!important because many boxes set their colour with the `background` shorthand, which would otherwise wipe it) */
select {
  -webkit-appearance: none !important; appearance: none !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 7'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%235f6468' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important; background-size: 0.8em auto !important; background-position: right 0.85em center !important;
  padding-right: 2.2em !important; cursor: pointer;
}
:where([data-theme="dark"]) select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 7'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23a3a9ad' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important; }
/* small boxes in the defect lines' right-hand column: arrow a little tighter so the status fits */
.ln-side .mini-status {
  width: 100%; margin-top: 0; min-height: 28px; height: 28px; padding: 0 6px; font-size: 0.85em; border-radius: 6px;
  padding-right: 1.7em !important; background-position: right 0.6em center !important;
  background-size: 0.75em auto !important;
}
.toolbar .select {
  flex: 1; min-width: 0; min-height: 38px; padding: 6px 38px 6px 12px; border-radius: 8px; font-size: 0.92em;
  background: var(--card); appearance: none; -webkit-appearance: none; cursor: pointer;
  background-size: 12px auto !important; background-position: right 14px center !important;
  padding-right: 38px !important;
}
/* locked (ticked) items: no arrow - they can't be changed */
.locked select:disabled { background-image: none !important; padding-right: 6px !important; cursor: default; }

/* ---------- home screen: compact, with a thin orange trim in the logo colour ---------- */
.home .topbar { border-bottom: 2px solid var(--brand); }
.home-content { max-width: 720px; padding-top: 16px; }
.home-card {
  background: var(--card); border: 1px solid color-mix(in srgb, var(--brand) 55%, var(--line)); border-radius: 12px;
  padding: 12px 14px; margin: 0 0 12px; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}
/* each card has its own colour and header strip (v188, user 2026-11-15): orange = start, blue = continue / merge,
   teal = reports on this tablet */
.home-sec { --c: var(--brand); padding: 0; overflow: hidden; margin-bottom: 16px; border-color: color-mix(in srgb, var(--c) 55%, var(--line)); }
.home-sec-cont { --c: var(--merge); }
.home-sec-saved { --c: var(--saved); }
.home-head-wrap { margin: 0; font-size: 1rem; }
/* the header is a button: tap to fold the card away (arrow on the right turns) */
.home-head {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 52px; margin: 0; padding: 9px 14px; font-size: 1rem; color: var(--c);
  text-align: left; font-family: var(--ui-font); cursor: pointer; border: none; border-radius: 0;
  background: color-mix(in srgb, var(--c) 12%, var(--card)); border-bottom: 1px solid color-mix(in srgb, var(--c) 35%, var(--line));
}
.home-head-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.home-head[aria-expanded="false"] { border-bottom-color: transparent; }
.home-fold { margin-left: auto; display: inline-flex; color: var(--c); transition: transform 0.15s; }
.home-head .home-count + .home-fold { margin-left: 4px; }
.home-head[aria-expanded="false"] .home-fold { transform: rotate(-90deg); }
.home-head b { font-size: 0.95em; text-transform: uppercase; letter-spacing: 0.06em; }
.home-head small { font-size: 0.78em; color: var(--muted); font-weight: 500; }
.home-head .home-count { margin-left: auto; color: var(--c); background: color-mix(in srgb, var(--c) 16%, transparent); }
.home-body { padding: 4px 14px 12px; }
.home-body-list { padding-bottom: 4px; }
.home-option { display: flex; align-items: center; gap: 10px; padding: 10px 0 6px; }
.home-opt-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; line-height: 1.35; }
.home-opt-text strong { font-size: 0.95em; }
.home-opt-text .muted { font-size: 0.82em; }
.home-merge-title { display: inline-flex; align-items: center; gap: 6px; color: var(--merge); }
.home-or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 0.78em; text-transform: uppercase; letter-spacing: 0.1em; }
.home-or::before, .home-or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.home-sec-cont .home-step { color: var(--merge); border-color: var(--merge); }
.home-sec-cont .home-pick, .home-sec-cont .home-select { color: var(--merge); border-color: var(--merge); }
.home-sec-cont .home-pick:hover:not(:disabled) { background: color-mix(in srgb, var(--merge) 10%, transparent); }
.home-merge-flow {
  display: flex; align-items: flex-start; gap: 8px; padding: 8px; border-radius: 10px;
  border: 1px dashed color-mix(in srgb, var(--merge) 45%, var(--line)); background: color-mix(in srgb, var(--merge) 5%, transparent);
}
.home-merge-pick { flex: 1.2; display: flex; gap: 8px; align-items: flex-start; min-width: 0; }
.home-merge-others { flex: 1.5; }
.home-merge-pick > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.home-merge-pick strong { font-size: 0.85em; }
.home-merge-pick .home-select { width: 100%; min-width: 0; max-width: none; }
.home-merge-plus, .home-merge-arrow { margin-top: 26px; color: var(--merge); font-weight: 800; font-size: 1.2em; }
.home-merge-result {
  margin-top: 14px; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 8px; border-radius: 8px;
  font-size: 0.74em; font-weight: 700; text-align: center; color: var(--merge); background: color-mix(in srgb, var(--merge) 12%, transparent);
}
.home-merge-chip {
  display: flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 4px 0 8px; border-radius: 8px; font-size: 0.78em; font-weight: 600;
  color: var(--merge); background: color-mix(in srgb, var(--merge) 12%, var(--card)); border: 1px solid color-mix(in srgb, var(--merge) 40%, transparent);
}
.home-merge-chip > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-merge-chip button { width: 30px; height: 30px; border: none; border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer; }
.home-merge-add { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.home-merge-pick .home-optional { white-space: nowrap; display: inline-block; }
.home-merge-result span { max-width: 64px; }
.home-start.home-merge-btn { display: flex; align-items: center; justify-content: center; gap: 8px; }
.home-merge-btn:not(:disabled) { background: var(--merge-strong); }
.home-merge-btn small { font-weight: 500; }
.home-merge-tip { margin: 8px 2px 0; font-size: 0.8em; color: var(--muted); text-align: center; }
.home-merge-tip .icon { display: inline-block; vertical-align: -2px; margin-right: 4px; color: var(--merge); }
/* a report with every item ticked: soft green row with "Complete" */
.home-row-complete { background: var(--green-soft); box-shadow: inset 4px 0 0 var(--green); margin: 0 -14px; padding: 0 14px 0 18px; }
.home-row-complete .home-row-done { color: var(--green); }
.home-row-complete .progress-bar { background: var(--green) !important; }
.home-done-pill {
  display: inline-flex; align-items: center; gap: 3px; padding: 1px 8px; border-radius: 10px; font-size: 0.74em; font-weight: 700;
  color: var(--green); background: color-mix(in srgb, var(--green) 15%, transparent);
}
@media (max-width: 600px) {
  .home-merge-flow { flex-direction: column; align-items: stretch; }
  .home-merge-plus, .home-merge-arrow { margin: 0; text-align: center; }
  .home-merge-arrow .icon { margin: 0 auto; transform: rotate(90deg); }
  .home-merge-result { margin: 0; flex-direction: row; justify-content: center; }
  .home-merge-result span { max-width: none; }
  .home-start.home-merge-btn { flex-wrap: wrap; column-gap: 8px; row-gap: 0; padding: 8px 12px; }
  .home-merge-btn small { flex-basis: 100%; }
  .home-option { flex-wrap: wrap; }
}
.home-count { margin-left: 2px; padding: 0 7px; border-radius: 9px; font-size: 0.8em; letter-spacing: 0; color: var(--brand);
  background: color-mix(in srgb, var(--brand) 14%, transparent); }
.home-slot { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.home-step {
  flex-shrink: 0; width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.8em; font-weight: 700; color: var(--brand); border: 1.5px solid var(--brand);
}
.home-slot-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; line-height: 1.3; }
.home-slot-text strong { font-size: 0.95em; }
.home-slot-text .muted { font-size: 0.82em; }
.home-optional { font-weight: 500; font-size: 0.8em !important; margin-left: 4px; padding: 0 6px; border: 1px solid var(--line-strong); border-radius: 8px; }
.home .file-chosen { display: inline-flex; align-items: center; gap: 4px; font-size: 0.84em; }
.home-pick {
  flex-shrink: 0; min-height: 34px; padding: 0 14px; border-radius: 8px; cursor: pointer; font-weight: 600; font-size: 0.86em;
  color: var(--brand); background: transparent; border: 1.5px solid var(--brand);
}
.home-pick:hover:not(:disabled) { background: color-mix(in srgb, var(--brand) 10%, transparent); }
.home-pick-done { color: var(--muted); border-color: var(--line-strong); }
.home-start {
  display: block; width: 100%; min-height: 44px; margin-top: 12px; border: none; border-radius: 10px; cursor: pointer;
  background: var(--brand); color: #fff; font-weight: 700; font-size: 0.98em; letter-spacing: 0.01em;
}
.home-start:hover:not(:disabled) { filter: brightness(1.06); }
.home-start:disabled { background: var(--line); color: var(--muted); cursor: default; }
.home-bcmi-only {
  display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; min-height: 40px; margin-top: 8px; padding: 0 12px;
  border-radius: 10px; cursor: pointer; font-weight: 700; font-size: 0.92em; color: var(--brand); background: transparent; border: 1.5px solid var(--brand);
}
.home-bcmi-only .muted { font-weight: 500; font-size: 0.9em; }
.home-bcmi-only:hover:not(:disabled) { background: color-mix(in srgb, var(--brand) 10%, transparent); }
.home-bcmi-only:disabled { color: var(--muted); border-color: var(--line-strong); cursor: default; }
.home-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.home-foot .muted { font-size: 0.8em; }
.home-restore {
  display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 12px; border-radius: 8px; cursor: pointer;
  font-size: 0.84em; font-weight: 600; color: var(--text); background: transparent; border: 1px solid var(--line-strong);
}
.home-restore:hover:not(:disabled) { border-color: var(--brand); color: var(--brand); }
.home-empty { margin: 6px 0 2px; font-size: 0.9em; }
.home-row { gap: 6px; }
.home-row:first-of-type { border-top: none; }
.home-row .project-open { min-height: 0; padding: 9px 0; gap: 1px; color: var(--text); }
.home-row-top { display: flex; align-items: baseline; gap: 8px; }
.home-row-top strong { font-size: 1em; }
.home-row-done { margin-left: auto; font-size: 0.8em; font-weight: 600; color: var(--muted); }
.home-row .muted { font-size: 0.82em; }
.home-row .progress.small { height: 3px; margin-top: 5px; }
.home-row .progress-bar { background: var(--brand); }
.home-bin {
  flex-shrink: 0; width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px;
  border: 1px solid transparent; background: transparent; color: var(--danger); cursor: pointer;
}
.home-bin:hover { border-color: var(--line-strong); background: var(--soft); }
.home-meta { font-size: 0.78em; margin: 4px 0 0; }

/* ---------- tools under a tapped defect: one family of compact "chip" buttons, each with an icon + label ---------- */
.ln-tools-chips { gap: 6px; padding: 10px 0 4px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.ln-tools-chips::-webkit-scrollbar { display: none; }
.chip-group { display: inline-flex; gap: 6px; flex-shrink: 0; }
.chip-btn {
  display: inline-flex; align-items: center; gap: 5px; height: 36px; padding: 0 12px; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--line-strong); background: var(--card); color: var(--text);
  font-family: var(--ui-font); font-size: 0.82em; font-weight: 600; white-space: nowrap; flex-shrink: 0;
}
.chip-btn .icon { color: var(--muted); }
.chip-btn:hover:not(:disabled) { border-color: var(--ink-2); background: var(--soft); }
.chip-btn:disabled { opacity: 0.35; cursor: default; }
/* toggles that are switched on, and Edit while editing */
.chip-on { border-color: var(--link); color: var(--link); background: color-mix(in srgb, var(--link) 10%, var(--card)); }
.chip-on .icon { color: var(--link); }
.chip-edit { border-color: color-mix(in srgb, var(--link) 60%, var(--line-strong)); color: var(--link); }
.chip-edit .icon { color: var(--link); }
.chip-icon { width: 38px; padding: 0; justify-content: center; font-size: 0.95em; }
.chip-danger, .chip-danger .icon { color: var(--danger); }
/* "Line type" drop-down: same size and look as the chip buttons */
.chip-select {
  position: relative; flex-shrink: 0; display: inline-flex; align-items: center; height: 36px; border-radius: 8px;
  border: 1px solid var(--line-strong); background: var(--card); font-family: var(--ui-font); font-size: 0.82em; font-weight: 600;
}
.chip-select .icon { position: absolute; left: 8px; color: var(--muted); pointer-events: none; }
.chip-select select {
  height: 34px; border: none; background-color: transparent; color: var(--text); font: inherit; padding: 0 0 0 30px; border-radius: 8px; outline: none;
}
.chip-select:hover { border-color: var(--ink-2); background: var(--soft); }
.chip-select:focus-within { border-color: var(--focus); }
@media (max-width: 700px) { .ln-tools-chips { flex-wrap: wrap; overflow: visible; } }

/* ---------- General photographs: "Previous report" (grey, for reference) vs "This report" (goes in the report) ---------- */
.gp-panel { margin: 6px 0 10px; padding: 6px 10px 8px; border-radius: 10px; font-family: var(--ui-font); }
.gp-panel-head { display: flex; align-items: center; gap: 7px; padding: 2px 0 6px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.gp-panel-head strong { font-size: 0.8em; text-transform: uppercase; letter-spacing: 0.05em; }
.gp-panel-note { font-size: 0.78em; color: var(--muted); }
.gp-count { margin-left: auto; padding: 0 8px; border-radius: 9px; font-size: 0.75em; font-weight: 700; color: var(--green); background: var(--green-soft); }
.gp-panel-prev { background: var(--soft); border: 1px dashed var(--line-strong); }
.gp-panel-prev .gp-panel-head, .gp-panel-prev .gp-panel-head strong { color: var(--muted); }
.gp-panel-prev .gp-line { color: var(--muted); font-family: var(--doc-font); }
.gp-panel-prev .gp-n { font-weight: 500; }
.gp-panel-now { background: var(--card); border: 1px solid var(--line-strong); border-left: 4px solid var(--green); }
.gp-panel-now .gp-panel-head { color: var(--green); }
.gp-panel-now .gp-panel-head strong { color: var(--text); }
.gp-panel-now .gp-line { font-family: var(--doc-font); }
.gp-panel-now .gp-line:last-of-type { border-bottom: none; }
.gp-empty { padding: 6px 0; font-size: 0.86em; color: var(--muted); }
.gp-panel-now .gp-add { margin-top: 8px; border-radius: 8px; gap: 6px; flex-wrap: nowrap; }
.gp-panel-now .gp-add .gp-btn { min-height: 36px; padding: 0 10px; font-size: 0.88em; gap: 5px; }
@media (max-width: 600px) { .gp-panel-now .gp-add { flex-wrap: wrap; } }

.grp-foot .add-defect { flex: 1; width: auto; margin: 0; }

/* Yes | No switch on comment questions - both sides tappable, the chosen one filled */
.yn { display: inline-flex; flex-shrink: 0; border: 1px solid var(--line-strong); border-radius: 8px; overflow: hidden; background: var(--card); }
.yn-opt {
  min-width: 50px; height: 30px; padding: 0 10px; border: none; background: transparent; cursor: pointer;
  font-family: var(--ui-font); font-size: 0.82em; font-weight: 700; color: var(--muted);
}
.yn-opt + .yn-opt { border-left: 1px solid var(--line-strong); }
.yn-opt:hover:not(.yn-yes):not(.yn-no) { background: var(--soft); color: var(--text); }
.yn-yes { background: var(--green); color: #fff; }
.yn-no { background: var(--todo); color: #000; }
:where([data-theme="dark"]) .yn-yes { color: #0f1a11; }
.fmt-row.fmt-qa { align-items: center; margin: 4px 0 6px; padding: 2px 6px; border-left: 3px solid var(--line-strong); background: var(--bg); gap: 8px; }

/* "Area observed" and "Notes" under "viewed under load?": side by side, bold title above each text box */
.load-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 2px 0 8px 9px; }
.load-field { min-width: 0; }
.load-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 3px; }
.load-head strong { font-family: var(--ui-font); font-size: 0.86em; font-weight: 700; color: var(--text); }
.load-head .fmt-x { margin-top: 0; }
.load-field:hover .fmt-x, .load-field:focus-within .fmt-x { opacity: 1; }
.fmt-in.load-box { display: block; width: 100%; min-height: 56px; border: 1px solid var(--line-strong); border-radius: 6px; padding: 6px 9px; background: var(--card); }
.fmt-in.load-box:focus { border-color: var(--focus); box-shadow: 0 0 0 2px color-mix(in srgb, var(--focus) 25%, transparent); }
@media (max-width: 560px) { .load-fields { grid-template-columns: 1fr; } }

/* Each Yes/No question and its lines sit in their own panel, so the two questions read as separate sections */
.qa-block { margin: 10px 0; padding: 4px 8px 8px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--card); }
.qa-block .fmt-row.fmt-qa { margin: 0 0 6px; padding: 4px 2px 8px; border-left: none; background: transparent; border-bottom: 1px solid var(--line); border-radius: 0; }
.qa-block .fmt-q { font-weight: 600; }
.qa-block .load-fields { margin-left: 0; }
.qa-add { margin-top: 4px; }
.qa-block .fmt-row.fmt-qa:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 4px; }
.qa-block:has(> .fmt-qa:last-child) { padding-bottom: 4px; }

/* ---------- condensed defect lines, sub-headings and descriptions (still tablet-sized touch targets) ---------- */
/* ---------- defect lines: one fine rule between each ---------- */
.ln { position: relative; margin: 0; border-radius: 0; border-bottom: 1px solid var(--line); scroll-margin-top: 110px; padding: 5px 0 5px 10px; }

.ln-text { flex: 1; cursor: pointer; padding: 2px 0 0; line-height: 1.4; padding-top: 3px; }

.ln-side .mini-status, .ln-side .ln-note-tag, .ln-side .ln-new-tag, .ln-side .ln-add-btn { height: 34px; min-height: 34px; }
.ln-side .ln-note-tag, .ln-side .ln-new-tag { display: flex; align-items: center; justify-content: center; padding: 0; }
.ln-side-row .ln-photo-btns { flex: 1.25; min-width: 0; }

.ln-side-row .ln-pbtn, .ln-side-row .ln-tick { height: 34px; border-color: var(--line-strong); border-radius: 7px; background: var(--card); }
.ln-side-row .ln-pbtn { color: var(--text); }
.ln-side-row .ln-tick-on { background: var(--green); border-color: var(--green); }
.ln-side-row .photo-no-quiet { height: 34px; }
.ln-side-row .tick-lock { width: 18px; }
/* right-hand column of each line: status on top, then camera | # | ✓ 🔒 on one row */
.ln-side { width: 148px; flex-shrink: 0; display: flex; flex-direction: column; margin-top: 1px; gap: 5px; position: relative; }
/* "Please update status" sits just left of the tick, in the space at the end of the line's text - covers nothing */
/* "Please add a photo and a comment": on its own line UNDER camera | # | ✓ (never over the defect text) */
.ln-side-row { display: flex; gap: 5px; align-items: center; flex-wrap: wrap; }
.ln-side-row .tick-wrap { display: contents; position: static; }
.ln-side-row .tick-row { flex: 1; min-width: 0; }
.ln-side-row .tick-warn { position: static; flex-basis: 100%; margin: 1px 0 0; white-space: normal; text-align: right; }
/* typing a photo number: the box gets the whole row (the tick steps aside until it's done) */
.ln-side-row:has(.photo-no-input) .tick-wrap { display: none; }
/* sub-headings and the Add buttons: a little tighter */
/* ---------- sub-headings ---------- */
.grp { margin-top: 6px; padding-bottom: 3px; }
.grp + .grp { margin-top: 10px; }
.grp-head { display: flex; align-items: center; gap: 6px; margin: 0; border-radius: 0; border-bottom: 1px solid var(--line-strong); padding: 3px 0; }
/* Foot of a sub-heading: "+ Add defect" (wide, the main action) with "+ Add sub-heading" beside it on the element's last one */
.grp-foot { display: flex; align-items: stretch; gap: 8px; margin: 4px 0 2px 10px; }
.add-defect {
  display: flex; align-items: center; justify-content: center; gap: 6px; width: calc(100% - 10px); margin: 6px 0 4px 10px;
  border: 1.5px dashed var(--link); border-radius: 8px; background: transparent; color: var(--link); font-weight: 700;
  font-size: 0.9em; cursor: pointer; font-family: var(--ui-font); min-height: 32px;
}
.grp-foot .add-sub-btn { flex-shrink: 0; min-height: 32px; }

/* the one-line "when to use it" note on export choices */
.exp-note { font-size: 0.8em; color: var(--muted); line-height: 1.3; padding: 0 2px; }

/* ---------- Export page: header, a "before you export" check, then tiles (icon + name + when to use it) ---------- */
.exp-head { display: flex; flex-direction: column; gap: 2px; margin: 0 52px 12px 0; }
.exp-head h2 { margin: 0; font-size: 1.25em; }
.exp-head .muted { font-size: 0.86em; }
.exp-card { margin: 0 0 12px; padding: 10px 12px 12px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--card); font-family: var(--ui-font); }
.exp-card-title { margin: 0 0 8px; font-size: 0.78em; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.exp-ok { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; font-weight: 600; font-size: 0.92em; color: var(--green); background: var(--green-soft); }
.exp-issues { display: flex; flex-direction: column; gap: 6px; }
.exp-issue { border: 1px solid var(--todo); border-radius: 8px; background: var(--todo-soft); }
.exp-issue summary { display: flex; align-items: center; gap: 8px; padding: 8px 10px; cursor: pointer; font-weight: 700; font-size: 0.9em; color: var(--todo-strong); list-style: none; }
.exp-issue summary::-webkit-details-marker { display: none; }
.exp-issue summary::after { content: "▸"; margin-left: auto; color: var(--todo-strong); }
.exp-issue[open] summary::after { content: "▾"; }
.exp-issue summary::before, .exp-issue[open] summary::before { content: none; }
.exp-issue ul { margin: 0 0 8px; padding: 0 12px 0 32px; font-size: 0.86em; line-height: 1.45; }
.exp-issue .muted { margin: 0 12px 8px; font-size: 0.82em; }
.exp-hint { margin: 2px 2px 0; font-size: 0.8em; }
.exp-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px; }
.exp-tile {
  display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; text-align: left; cursor: pointer;
  border: 1px solid var(--line-strong); border-radius: 10px; background: var(--card); color: var(--text); font-family: var(--ui-font);
}
.exp-tile:hover:not(:disabled) { border-color: var(--ink-2); background: var(--soft); }
.exp-tile:disabled { opacity: 0.5; cursor: default; }
.exp-tile-icon { flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 8px; background: var(--soft); color: var(--text); }
.exp-tile-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.exp-tile-text strong { font-size: 0.95em; }
.exp-type { font-weight: 500; font-size: 0.82em; color: var(--muted); margin-left: 4px; }
.exp-tile .exp-note { font-size: 0.8em; color: var(--muted); line-height: 1.35; padding: 0; }
.exp-tile-primary { background: #1e1e1e; border-color: #1e1e1e; color: #fff; }
.exp-tile-primary:hover:not(:disabled) { background: #333; border-color: #333; }
.exp-tile-primary .exp-tile-icon { background: rgba(255, 255, 255, 0.15); color: #fff; }
.exp-tile-primary .exp-note, .exp-tile-primary .exp-type { color: rgba(255, 255, 255, 0.75); }
:where([data-theme="dark"]) .exp-tile-primary { background: #ececec; border-color: #ececec; color: #111; }
:where([data-theme="dark"]) .exp-tile-primary:hover:not(:disabled) { background: #fff; }
:where([data-theme="dark"]) .exp-tile-primary .exp-tile-icon { background: rgba(0, 0, 0, 0.08); color: #111; }
:where([data-theme="dark"]) .exp-tile-primary .exp-note, :where([data-theme="dark"]) .exp-tile-primary .exp-type { color: rgba(0, 0, 0, 0.6); }
.exp-busy { margin: 0 0 12px; padding: 8px 12px; border-radius: 8px; background: var(--soft); font-weight: 600; font-size: 0.9em; }
.exp-preview { margin: 0 0 6px; }
.exp-preview summary { cursor: pointer; font-weight: 600; font-size: 0.9em; padding: 6px 2px; font-family: var(--ui-font); }
.exp-foot { font-size: 0.8em; margin: 6px 2px 0; }

/* Camera photos: "Photo 5 · camera 57" on photo rows, and the list on the Export page */
.cam-no { display: inline-flex; align-items: center; gap: 4px; font-size: 0.86em; color: var(--muted); white-space: nowrap; font-family: var(--ui-font); }
.cam-no::before { content: "·"; margin-right: 2px; }
.cam-list { display: flex; flex-direction: column; margin: 6px 0 10px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.cam-row { display: grid; grid-template-columns: 74px 90px 1fr auto; gap: 8px; align-items: center; padding: 6px 10px; font-size: 0.86em; border-top: 1px solid var(--line); }
.cam-row:first-child { border-top: none; }
.cam-n { font-weight: 700; }
.cam-from { color: var(--muted); }
.cam-file { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cam-state { display: inline-flex; align-items: center; gap: 3px; font-weight: 600; color: var(--todo-strong); }
.cam-added .cam-state { color: var(--green); }
@media (max-width: 560px) { .cam-row { grid-template-columns: 64px 1fr auto; } .cam-file { grid-column: 1 / -1; } }
/* "Choose photo title" prompt in the Add general photo box: a quiet grey prompt, not the yellow "needs doing" colour */
.gp-add .gp-select.select-empty { color: var(--muted); font-style: italic; }
.gp-select option { color: var(--text); font-style: normal; }

/* "Download report + photos": yellow edge + badge while sections aren't complete, green when everything is */
.exp-state { display: inline-flex; align-items: center; gap: 4px; align-self: flex-start; margin-top: 4px; padding: 1px 8px; border-radius: 9px; font-size: 0.75em; font-weight: 700; }
.exp-state-todo { background: var(--todo); color: #000; }
.exp-state-done { background: var(--green); color: #fff; }
:where([data-theme="dark"]) .exp-state-done { color: #0f1a11; }

/* Export page (v188, user 2026-11-15): "What do you want to do?" - I've finished / Save my work so far */
.exp-q { margin: 4px 2px 0; font-size: 1.02em; font-family: var(--ui-font); }
.exp-choose { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 10px 0 14px; }
.exp-choice {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px 10px; border-radius: 12px; cursor: pointer; text-align: center;
  border: 2px solid var(--line-strong); background: var(--card); color: var(--text); font-family: var(--ui-font);
}
.exp-choice b { font-size: 1.05em; }
.exp-choice small { color: var(--muted); font-size: 0.82em; }
.exp-choice .icon { color: var(--muted); }
.exp-choice-on { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 10%, var(--card)); }
.exp-choice-on .icon { color: var(--brand); }
.exp-choice-save.exp-choice-on { border-color: var(--merge); background: color-mix(in srgb, var(--merge) 10%, var(--card)); }
.exp-choice-save.exp-choice-on .icon { color: var(--merge); }
.exp-big {
  display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 16px; margin: 0 0 8px; border: none; border-radius: 12px; cursor: pointer;
  text-align: left; color: #fff; background: var(--brand); font-family: var(--ui-font);
}
.exp-big:disabled { opacity: 0.6; cursor: default; }
.exp-big > span { display: flex; flex-direction: column; gap: 2px; }
.exp-big b { font-size: 1.08em; }
.exp-big small { font-size: 0.84em; opacity: 0.92; }
.exp-big .exp-type { color: inherit; opacity: 0.85; }
.exp-big-save { background: var(--merge-strong); margin-top: 10px; }
.exp-small { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 12px; }
.exp-small button {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 8px; cursor: pointer;
  font: 600 0.86em var(--ui-font); color: var(--text); background: var(--card); border: 1px solid var(--line-strong);
}
.exp-small button:hover:not(:disabled) { border-color: var(--ink-2); background: var(--soft); }
.exp-small button:disabled { opacity: 0.5; cursor: default; }
.exp-p { margin: 2px 0 4px; font-size: 0.9em; line-height: 1.45; }
.exp-uses { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.exp-uses li { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; background: var(--soft); }
.exp-uses li .icon { color: var(--merge); margin-top: 1px; }
.exp-uses li span { display: flex; flex-direction: column; gap: 2px; font-size: 0.92em; }
.exp-uses li small { color: var(--muted); font-size: 0.88em; line-height: 1.4; }

/* "Delete element": small and quiet at the bottom-right of an open element; red only on hover */
.el-delete {
  display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 8px; border: none; border-radius: 6px; background: transparent;
  color: var(--muted); font-family: var(--ui-font); font-size: 0.78em; font-weight: 600; cursor: pointer; opacity: 0.75;
}
.el-delete:hover, .el-delete:focus-visible { opacity: 1; color: var(--danger); background: color-mix(in srgb, var(--danger) 10%, transparent); }
.el-foot { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 6px; padding-top: 8px; border-top: 1px solid var(--line); align-items: center; }

/* Home list: "Exported 12 days ago · 240 MB" under each report; amber once it's been exported over two weeks */
.home-row-age { font-size: 0.78em; color: var(--muted); margin-top: 1px; }
.home-row-old { color: var(--todo-strong); font-weight: 600; }

/* A short message along the bottom of the screen that fades by itself (tap to close) */
.toast {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 70; max-width: min(560px, calc(100% - 32px));
  padding: 10px 16px; border-radius: 10px; background: #1e1e1e; color: #fff; font-family: var(--ui-font); font-size: 0.9em;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3); cursor: pointer;
}
:where([data-theme="dark"]) .toast { background: #ececec; color: #111; }

/* ---------- just-added photo: soft green glow + "✓ Added" that fade out over a few seconds ---------- */
@keyframes photo-ring { 0%, 55% { box-shadow: 0 0 0 2px var(--green); } 100% { box-shadow: 0 0 0 2px transparent; } }
@keyframes photo-row { 0%, 55% { background-color: var(--green-soft); border-color: color-mix(in srgb, var(--green) 55%, transparent); } }
@keyframes photo-tag { 0%, 70% { opacity: 1; } 100% { opacity: 0; } }
.thumb-new { animation: photo-ring 6s ease-out forwards; }
.pu-new { animation: photo-row 6s ease-out; }
.see-photo-new, .gp-row-new { border-radius: 6px; animation: photo-row 6s ease-out; }
.added-tag {
  display: inline-flex; align-items: center; gap: 3px; flex-shrink: 0; white-space: nowrap;
  font-family: var(--ui-font); font-size: 0.78em; font-weight: 700; color: var(--green);
  animation: photo-tag 6s ease-out forwards;
}

/* photo / comment still needed for the chosen status (defect lines + significant defects): red note, yellow comment box */
.need-note { color: var(--danger); font-family: var(--ui-font); font-size: 0.8em; font-weight: 600; }
.sig-need .inline-area { border: 1px solid var(--todo); background: var(--todo-soft); }
.ln-need-photo { margin: 4px 0 2px; }

/* typing a new (or edited) sub-heading: one clear panel with Cancel / ✓ Add sub-heading */
.grp-edit {
  margin: 10px 0 6px; padding: 10px 12px 12px; border: 1px solid color-mix(in srgb, var(--link) 45%, var(--line-strong)); border-radius: 10px;
  background: color-mix(in srgb, var(--link) 6%, var(--card)); font-family: var(--ui-font);
}
.grp-edit-label { display: block; margin-bottom: 6px; font-size: 0.78em; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--link); }
.grp-edit-input { width: 100%; box-sizing: border-box; min-height: 42px; font-weight: 700; }
.grp-edit-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.grp-edit-actions .btn { min-height: 42px; padding: 0 16px; font-weight: 700; }
.grp-edit-add { display: inline-flex; align-items: center; gap: 6px; background: var(--link); border-color: var(--link); color: #fff; }
:where([data-theme="dark"]) .grp-edit-add { color: #0b1020; }

/* "- See Photo 3": each number opens a preview of that photo */
.see-link { padding: 0 1px; border: none; background: none; color: inherit; font: inherit; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.see-link:hover, .see-link:active { color: var(--ink-2); text-decoration-thickness: 2px; }

/* sub-heading row: ✎ edit, 📷 camera and # camera number always shown at the right (v142) */
.grp-actions { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; margin-left: 4px; }
/* title, then ✎ 📷 #, then "See Photo" / prev P5 links filling the rest of the row */
.grp-head .grp-title { flex: 0 1 auto; }
.grp-refs { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; cursor: pointer; align-self: stretch; }
.grp-actions .ln-pbtn { flex: none; width: 40px; height: 32px; border-color: var(--line-strong); border-radius: 7px; background: var(--card); color: var(--text); }
.grp-actions .photo-no-input { width: 96px; height: 32px; }
.ln-see-tap { cursor: pointer; }

/* "+ Add element": choose from the list (already-there ones greyed) or type your own (v143) */
.el-pick-cell { display: flex; align-items: center; gap: 8px; }
.el-pick { flex: 1; min-width: 0; min-height: 38px; font-weight: 600; }
.el-pick option:disabled { color: var(--muted); }
.el-pick-cancel { flex-shrink: 0; min-height: 38px; }

/* ---------- sign-in screen (login.js): same look as the home screen ---------- */
.login-content { max-width: 420px; padding-top: 28px; }
.login-brand { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-bottom: 18px; text-align: center; }
.login-brand .seat-logo { border-radius: 18px; margin-bottom: 6px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18); }
.login-brand strong { color: var(--brand); font-family: var(--brand-font); font-weight: 800; font-size: 1.9em; letter-spacing: 0.08em; line-height: 1.1; }
.login-brand .muted { font-family: var(--brand-font); font-size: 0.9em; letter-spacing: 0.02em; }
.login-card { padding: 16px 18px 14px; }
.login-card .home-title { margin-bottom: 10px; }
.login-field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.login-field > span:first-child { font-size: 0.86em; font-weight: 600; }
.login-field .input { min-height: 46px; font-size: 1rem; }
.login-field .input:focus { outline-color: var(--brand); }
.login-pass { position: relative; display: block; }
.login-pass .input { padding-right: 70px; }
.login-show {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%); min-height: 34px; padding: 0 10px; border-radius: 7px;
  border: none; background: transparent; color: var(--brand); font-weight: 600; font-size: 0.85em; cursor: pointer;
}
.login-show:hover { background: color-mix(in srgb, var(--brand) 10%, transparent); }
.login-error {
  display: flex; align-items: center; gap: 7px; padding: 8px 10px; border-radius: 8px; font-size: 0.88em; font-weight: 600;
  color: var(--danger); background: color-mix(in srgb, var(--danger) 9%, transparent); border: 1px solid color-mix(in srgb, var(--danger) 35%, transparent);
}
.login-submit { min-height: 48px; margin-top: 14px; }
.login-note { font-size: 0.8em; text-align: center; margin: 10px 0 0; }
.login .notice { margin: 0 0 12px; }
.home-signout { font-size: 0.8em; margin: 6px 0 0; }
.home-signout strong { color: var(--text); }

/* ---------- "Pick from report": a significant defect using a photo already taken (photos.js PhotoPicker) ---------- */
.pick-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--line-strong); background: var(--card); color: var(--text); font-weight: 600; font-size: 0.86rem;
}
.pick-btn:hover:not(:disabled) { border-color: var(--ink-2); }
.pick-btn:disabled { opacity: 0.35; cursor: default; }
.shared-caption { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shared-from {
  flex-shrink: 0; font-size: 0.78em; padding: 1px 7px; border-radius: 9px; white-space: nowrap; color: var(--muted);
  border: 1px solid var(--line-strong); font-family: var(--ui-font);
}
.pick-head { margin: 2px 52px 12px 2px; font-family: var(--ui-font); }
.pick-title { display: flex; align-items: center; gap: 8px; font-family: var(--brand-font); font-weight: 700; font-size: 1.15em; }
.pick-sub { font-size: 0.86em; margin-top: 3px; }
.pick-empty { font-family: var(--ui-font); }
.pick-group { margin: 0 0 14px; font-family: var(--ui-font); }
.pick-group-title {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 8px; padding: 5px 8px; border-radius: 6px;
  font-size: 0.86em; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; background: var(--band); color: #000;
}
:where([data-theme="dark"]) .pick-group-title { color: var(--text); }
.pick-match { text-transform: none; letter-spacing: 0; font-weight: 600; font-size: 0.92em; padding: 0 8px; border-radius: 9px; background: var(--green-soft); color: var(--green); }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.pick-tile {
  display: flex; flex-direction: column; gap: 3px; padding: 0 0 7px; text-align: left; cursor: pointer; overflow: hidden;
  border: 1px solid var(--line-strong); border-radius: 9px; background: var(--card); color: var(--text); font-family: var(--ui-font);
}
.pick-tile:hover:not(:disabled), .pick-tile:focus-visible { border-color: var(--link); box-shadow: 0 0 0 2px color-mix(in srgb, var(--link) 35%, transparent); }
.pick-tile-used { cursor: default; opacity: 0.65; }
.pick-img { position: relative; display: block; aspect-ratio: 4 / 3; background: var(--soft); }
.pick-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pick-cam { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--muted); font-size: 0.82em; font-weight: 600; }
.pick-used { position: absolute; left: 6px; top: 6px; display: inline-flex; align-items: center; gap: 3px; padding: 2px 7px; border-radius: 9px; font-size: 0.75em; font-weight: 700; background: var(--green); color: #fff; }
.pick-n { padding: 0 8px; font-weight: 700; font-size: 0.86em; }
.pick-cap { padding: 0 8px; font-size: 0.8em; color: var(--muted); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* "+ Add defect above" / "+ Add defect below" in a defect's tools row (Wing and Retaining Walls only, sheet.js
   canInsertDefects): one joined, slightly smaller pair (still 36px tall for fingers). The row may wrap; on phones and
   narrow tablets the pair gets its own full-width row under the other tools, split 50/50. */
.ln-tools-insert { flex-wrap: wrap; overflow: visible; row-gap: 8px; }
.chip-insert { gap: 0; }
.chip-insert .chip-btn { padding: 0 10px; gap: 4px; font-size: 0.76em; font-weight: 600; }
.chip-insert .chip-btn:first-child { border-radius: 8px 0 0 8px; }
.chip-insert .chip-btn:last-child { border-radius: 0 8px 8px 0; margin-left: -1px; }
.chip-insert .chip-btn:hover:not(:disabled) { position: relative; z-index: 1; }
.chip-plus { font-size: 1.35em; font-weight: 500; line-height: 1; color: var(--link); margin-top: -1px; }
@media (max-width: 820px) {
  .chip-insert { order: 10; flex: 1 0 100%; }
  .chip-insert .chip-btn { flex: 1; justify-content: center; }
}

/* ---------- merged reports: items two examiners reported differently (merge.js, ConflictChooser in sheet.js) ---------- */
/* red like the green of a ticked line */
.ln-conflict, .ln-conflict.ln-sel, .sig-conflict { background: color-mix(in srgb, var(--danger) 9%, transparent); }
.ln-conflict::before, .sig-conflict::before { background: var(--danger) !important; }
.conflict-badge {
  display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 6px; margin-left: 6px;
  border-radius: 11px; background: var(--danger); color: #fff; font-family: var(--ui-font); font-size: 0.78em; font-weight: 700;
}
:where([data-theme="dark"]) .conflict-badge { color: #1b1e20; }
.conflict-box {
  margin: 8px 0 4px; padding: 10px; border-radius: 10px; font-family: var(--ui-font);
  border: 1.5px solid color-mix(in srgb, var(--danger) 55%, transparent); background: var(--card);
}
.conflict-title { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 0.88em; color: var(--danger); margin-bottom: 8px; }
.conflict-versions { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px; }
.conflict-ver { display: flex; flex-direction: column; gap: 6px; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--bg); }
.conflict-label { font-size: 0.78em; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; word-break: break-word; }
.conflict-ticked { display: inline-flex; align-items: center; gap: 2px; text-transform: none; letter-spacing: 0; color: var(--green); }
.conflict-text { font-size: 0.92em; line-height: 1.4; }
.conflict-photos { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 0.8em; }
.conflict-shared { font-size: 0.8em; }
.conflict-keep {
  margin-top: auto; align-self: flex-start; display: inline-flex; align-items: center; gap: 5px; min-height: 36px; padding: 0 14px;
  border-radius: 8px; border: 1px solid var(--line-strong); background: var(--card); color: var(--text); font-weight: 600; font-size: 0.86em; cursor: pointer;
}
.conflict-keep:hover { border-color: var(--green); color: var(--green); }
.home-row-merge { font-size: 0.78em; color: var(--muted); margin-top: 1px; }
.home-conflicts { color: var(--danger); font-weight: 600; }
/* "Continue a report": the report picker sits where the "Choose PDF" button is in the card above */
.home-select {
  flex-shrink: 0; max-width: 46%; min-height: 34px; padding: 0 10px; border-radius: 8px; cursor: pointer; font-weight: 600; font-size: 0.86em;
  color: var(--brand); background: transparent; border: 1.5px solid var(--brand);
}
.home-select-done { color: var(--text); border-color: var(--line-strong); }
.home-select option { color: var(--text); background: var(--card); }

/* ---------- PHONES (user 2026-11-02): only screens up to 600px wide - the tablet (800px+) is never affected ---------- */
@media (max-width: 600px) {
  /* report top bar: title on one line, Light/Dark as two small icons, so the bar stays short */
  .theme-opt { font-size: 0; gap: 0; padding: 6px 8px; }
  .topbar-report .topbar-title strong, .topbar-report .topbar-title .muted { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .topbar-report .tb-right { gap: 6px; }

  /* defect lines: the text gets the full width; status, camera, # and ✓ sit in one row underneath */
  .ln-row { flex-direction: column; gap: 6px; }
  .ln-side { width: 100%; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 0; }
  .ln-side .mini-status, .ln-side .ln-new-tag, .ln-side .ln-note-tag, .ln-side .ln-add-btn { flex: 1 1 130px; width: auto; }
  .ln-side-row { flex: 1 1 180px; }

  /* element table: name across the top, Status and Condition side by side underneath (no cut-off "Examir…") */
  .el-row { grid-template-columns: 1fr 1fr; }
  .el-row > .el-cell:first-child { grid-column: 1 / -1; border-bottom: 1px solid var(--sheet-line); }
  .el-row > .el-cell:nth-child(2) { border-left: none; }

  /* measurements: label above its value, so long names and values aren't cut off */
  .fmt-row.fmt-kv { grid-template-columns: 1fr auto; gap: 0 8px; padding: 3px 0; }
  .fmt-row.fmt-kv .fmt-k { grid-column: 1; font-size: 0.86em; min-height: 0; }
  .fmt-row.fmt-kv .fmt-v { grid-column: 1; }
  .fmt-row.fmt-kv .fmt-x { grid-column: 2; grid-row: 1 / span 2; align-self: center; }

  /* bigger fingers: easier remove ×, previous-photo links and the exam date */
  .fmt-x { width: 34px; height: 34px; margin-top: 0; opacity: 0.6; }
  .prev-ref { padding: 7px 4px; margin: -7px 0; }
  .inline-date { min-height: 36px; }
  .link-btn-sm { padding: 6px 4px; }

  /* sub-heading rows: "See Photo" / "prev P11" links drop to their own line instead of running off the screen */
  .grp-head { flex-wrap: wrap; }
  .grp-refs { flex: 1 1 auto; }

  /* toolbar on one row: Jump to | Undo Redo | Unfinished */
  .toolbar { flex-wrap: nowrap; gap: 6px; }
  .tb-jump { min-width: 0; }
  .tb-filter { padding: 0 10px; flex-shrink: 0; }
  .tb-filter-long { display: none; }
  .tb-filter-short { display: inline; }
}

/* Export page: photo caption style (reporting system "Photo 12^caption^19-10-26" or the report's own style) */
.cap-formats { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 8px; }
.cap-format {
  display: flex; flex-direction: column; align-items: flex-start; gap: 5px; padding: 10px 12px; min-height: 44px; text-align: left; cursor: pointer;
  border: 1px solid var(--line-strong); border-radius: 10px; background: var(--card); color: var(--text); font-family: var(--ui-font);
}
.cap-format-on { border-color: var(--green); box-shadow: 0 0 0 1px var(--green); background: var(--green-soft); }
.cap-format-name { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; font-size: 0.9em; }
.cap-format-on .cap-format-name { color: var(--green); }
.cap-format-example { font: 12px/1.35 ui-monospace, Menlo, Consolas, monospace; color: var(--muted); word-break: break-word; }

/* Reports written span by span: a quiet "SPAN 2" divider where the next span starts within an element (withSpanDividers) */
.span-divider {
  display: flex; align-items: center; gap: 10px; margin: 16px 0 4px; font-family: var(--ui-font);
  font-size: 0.72em; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
}
.span-divider::before, .span-divider::after { content: ''; flex: 1; height: 1px; background: var(--line-strong); }
.span-divider::before { flex: 0 0 14px; }
.span-divider span { padding: 2px 9px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--soft); }
.el-body > .span-divider:first-child { margin-top: 6px; }

/* Additional examinations (reportType 'additional'): the Remit note and the EXAMINATION section (bare element, no element row) */
.remit-note { margin: 0 0 6px; font-size: 0.82em; font-family: var(--ui-font); }
.el-bare > .el-body { border-bottom: none; padding-top: 6px; }

/* ---------- retaining walls: DIMENSION SHEET (v177) - like the reports' sheet: length / height / side, A-K table, diagram ---------- */
.dim-top { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 14px; margin: 4px 0 10px; }
.dim-field { display: flex; flex-direction: column; gap: 4px; font-family: var(--doc-font); }
.dim-label { font-weight: 700; font-size: 14px; }
.dim-box { display: flex; align-items: center; gap: 3px; }
.dim-input {
  width: 100%; min-width: 0; min-height: 40px; padding: 4px 8px; font: inherit; font-size: 16px; color: var(--text);
  background: var(--input-bg); border: 1px solid var(--line-strong); border-radius: 6px; text-align: right;
}
.dim-side { text-align: left; }
.dim-input:focus { outline: 2px solid var(--focus); outline-offset: 0; }
.dim-unit { color: var(--muted); font-size: 14px; }
.dim-caption { font-family: var(--doc-font); font-weight: 700; margin: 2px 0 6px; }
.dim-table-wrap { overflow-x: auto; }
.dim-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-family: var(--doc-font); }
.dim-table th, .dim-table td { border: 1px solid var(--sheet-line); padding: 3px; text-align: center; }
.dim-table thead th { background: var(--band); font-size: 15px; }
.dim-table thead th:first-child, .dim-tol th { background: none; }
.dim-table th:first-child { width: 86px; }
.dim-tol td { font-size: 11.5px; color: var(--muted); line-height: 1.2; }
.dim-row-name { text-align: left !important; font-weight: 700; font-size: 14px; }
.dim-short { display: none; }
.dim-table .dim-input { padding: 4px 3px; font-size: 15px; text-align: center; }
.dim-table .dim-unit { font-size: 12px; }
/* the diagram keeps its white paper in dark mode too (it is a drawing from the PDF) */
.dim-diagram { margin-top: 12px; background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 8px; text-align: center; }
.dim-diagram img { max-width: 100%; height: auto; display: inline-block; }
.dim-none { margin-top: 10px; }
@media (max-width: 600px) {
  .dim-top { grid-template-columns: 1fr 1fr; }
  .dim-top .dim-field:last-child { grid-column: 1 / -1; }
  .dim-table { min-width: 560px; }
  .dim-table th:first-child { width: 46px; }
  .dim-long { display: none; }
  .dim-short { display: inline; }
  .dim-table .dim-unit { display: none; }
}

/* report read by text recognition (v178): a quiet reminder to check the wording against the PDF */
.notice-ocr { margin: 10px 10px 0; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--todo); background: var(--todo-soft); color: var(--text); font-size: 14px; line-height: 1.4; }
:root:where([data-theme="dark"]) .notice-ocr { background: rgba(232, 197, 71, 0.12); }

/* ---------- additional exams: MEASUREMENT TABLES (v179) - readings kept from exam to exam, this exam's column highlighted ---------- */
.mt-intro { margin: 2px 0 8px; font-size: 14px; }
.mt-block { margin: 0 0 18px; }
.mt-title {
  width: 100%; min-height: 40px; padding: 4px 8px; margin-bottom: 6px; font: inherit; font-family: var(--doc-font); font-weight: 700; font-size: 17px;
  color: var(--text); background: transparent; border: 1px solid transparent; border-radius: 6px;
}
.mt-title:hover, .mt-title:focus { border-color: var(--line-strong); background: var(--input-bg); outline: none; }
.mt-wrap { overflow-x: auto; }
.mt-table { border-collapse: collapse; font-family: var(--doc-font); min-width: 100%; }
.mt-table th, .mt-table td { border: 1px solid var(--sheet-line); padding: 2px; text-align: center; }
.mt-table thead th { background: var(--band); }
.mt-table tbody th { background: var(--soft); width: 120px; }
.mt-table input {
  width: 100%; min-width: 64px; min-height: 36px; padding: 3px 4px; font: inherit; font-size: 15px; text-align: center; color: var(--text);
  background: transparent; border: 1px solid transparent; border-radius: 4px;
}
.mt-table input:focus { outline: 2px solid var(--focus); outline-offset: -1px; background: var(--input-bg); }
.mt-table tbody td input { background: var(--input-bg); border-color: var(--line); }
.mt-table .mt-head-input, .mt-label { font-weight: 700; }
.mt-label-head { min-width: 130px; }
.mt-date { font-weight: 700; min-width: 96px !important; }
/* this exam's column */
.mt-table .mt-now { background: var(--todo-soft); }
.mt-table thead th.mt-now { background: var(--todo); }
:root:where([data-theme="dark"]) .mt-table .mt-now { background: rgba(232, 197, 71, 0.14); }
:root:where([data-theme="dark"]) .mt-table thead th.mt-now { background: rgba(232, 197, 71, 0.35); }
.mt-foot { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 6px; }
.mt-pic-btn { margin-left: auto; }
.mt-note { font-size: 13.5px; margin: 6px 0 0; }
.mt-picture { margin-top: 8px; background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 8px; text-align: center; }
.mt-picture img { max-width: 100%; height: auto; }
@media (max-width: 600px) {
  .mt-table tbody th { width: 84px; }
  .mt-table input { min-width: 56px; font-size: 14px; }
  .mt-pic-btn { margin-left: 0; }
}
.mt-head-area {
  width: 100%; min-width: 110px; padding: 3px 4px; font: inherit; font-weight: 700; font-size: 15px; text-align: center; color: var(--text);
  background: transparent; border: 1px solid transparent; border-radius: 4px; resize: none; overflow: hidden;
}
.mt-head-area:focus { outline: 2px solid var(--focus); outline-offset: -1px; background: var(--input-bg); }
