/* =====================================================================
 * app.css - one stylesheet, phone first.
 *
 * Light is the default. Dark is opted into by data-theme="dark" on the
 * <html> element, which index.html sets from localStorage before the
 * first paint.
 * ===================================================================== */

:root {
  /* The look approved 18 Oct 2026: navy and cyan from the logo. */
  --bg:        #f3f6fa;
  --surface:   #ffffff;
  --surface-2: #eaf0f7;
  --ink:       #10203a;
  --ink-soft:  #4a5b75;
  --line:      #dce4ef;
  --brand:     #071b3d;          /* main buttons, the current tab */
  --brand-ink: #ffffff;
  --accent:    #3fd3f0;          /* New booking, focus rings */
  --accent-ink:#071b3d;
  --link:      #0b5fa5;
  --nav:       #071b3d;          /* the bars */
  --nav-ink:   #ffffff;
  --nav-soft:  #a9c3e6;
  --nav-current: #12305f;
  --danger:    #b42318;  --danger-bg: #fde2e2;
  --ok:        #1b5e35;  --ok-bg:     #ddf3e5;
  --warn:      #7a4a00;  --warn-bg:   #fff1d6;
  --info:      #0b4f8a;  --info-bg:   #dcebfb;
  --radius:    14px;
  --shadow:    0 1px 2px rgba(7, 27, 61, .08), 0 2px 8px rgba(7, 27, 61, .05);
}

:root[data-theme="dark"] {
  --bg:        #0a1324;
  --surface:   #111d33;
  --surface-2: #18263f;
  --ink:       #e6edf7;
  --ink-soft:  #9fb0c8;
  --line:      #24344f;
  --brand:     #3fd3f0;
  --brand-ink: #071b3d;
  --accent:    #3fd3f0;
  --accent-ink:#071b3d;
  --link:      #6cc7f5;
  --nav:       #050f22;
  --nav-ink:   #e6edf7;
  --nav-soft:  #9fb0c8;
  --nav-current: #18304f;
  --danger:    #ff8a80;  --danger-bg: #3a1618;
  --ok:        #6fd99c;  --ok-bg:     #12301f;
  --warn:      #f2c46b;  --warn-bg:   #34260b;
  --info:      #8cc4ff;  --info-bg:   #10294a;
  --shadow:    0 1px 2px rgba(0, 0, 0, .4), 0 4px 12px rgba(0, 0, 0, .3);
}

* { box-sizing: border-box; }

/* The hidden attribute must always win. Without this, any rule below
 * that sets display (the top bar's flex, a badge's inline-block) quietly
 * overrides it and an element meant to be invisible shows up empty. */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-text-size-adjust: 100%;
}

/* ---------------------------------------------------------------- bars */

/* The top bar. On a phone: a slim navy band with the company's name (the
 * tabs live in #bottom-nav). On a wide screen it becomes the side menu
 * (see "The side menu" at the end of this file). */
#topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  padding-top: max(12px, env(safe-area-inset-top));
  background: var(--nav);
  color: var(--nav-ink);
  position: sticky;
  top: 0;
  z-index: 10;
}

.topbar-left   { display: flex; align-items: center; gap: 8px; min-width: 0; }
.topbar-left strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 17px; font-weight: 800; }
.topbar-left .badge { background: transparent; color: var(--nav-soft); border-color: var(--nav-soft); }
.topbar-right  { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.topbar-right .text-btn, .topbar-right .icon-btn { color: var(--nav-soft); border-color: transparent; display: inline-flex; align-items: center; gap: 6px; }

#topbar-nav { display: flex; gap: 4px; }

#topbar-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--nav-soft);
  font-weight: 600;
  font-size: 15px;
}
#topbar-nav a.current { background: var(--nav-current); color: var(--nav-ink); }

#footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  padding-bottom: max(14px, env(safe-area-inset-bottom));
  color: var(--ink-soft);
  font-size: 13px;
}

/* --------------------------------------------------------------- layout */

#app { padding: 14px; max-width: 900px; margin: 0 auto; }

h1 { font-size: 22px; font-weight: 800; margin: 4px 0 14px; }
h2 { font-size: 17px; font-weight: 800; margin: 22px 0 10px; }
a  { color: var(--link); }

.muted   { color: var(--ink-soft); }
.centred { text-align: center; }
.stack > * + * { margin-top: 14px; }

/* ---------------------------------------------------------------- cards */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
}
:root:not([data-theme="dark"]) .card, :root:not([data-theme="dark"]) .job { border-color: transparent; }

.job {
  display: block;
  width: 100%;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 12px 14px;
  margin-bottom: 10px;
  color: inherit;
  font: inherit;
}

.job-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.job-number { font-weight: 700; font-variant-numeric: tabular-nums; }
.job-customer { color: var(--ink-soft); }
.job-device { margin-top: 4px; font-weight: 600; }
.job-fault  { margin-top: 2px; color: var(--ink-soft); }
.job-meta   { margin-top: 8px; display: flex; gap: 6px; flex-wrap: wrap; }

/* --------------------------------------------------------------- badges */

.badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-soft);
  white-space: nowrap;
}
/* One meaning per colour, everywhere: green done, amber waiting, red
 * late or owed, blue in progress. */
.badge.stage   { background: var(--info-bg);   color: var(--info);   border-color: transparent; }
.badge.warn    { background: var(--warn-bg);   color: var(--warn);   border-color: transparent; }
.badge.ok      { background: var(--ok-bg);     color: var(--ok);     border-color: transparent; }
.badge.danger  { background: var(--danger-bg); color: var(--danger); border-color: transparent; }

/* ---------------------------------------------------------------- forms */

label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.field + .field { margin-top: 12px; }
.req::after { content: " *"; color: var(--danger); }

input, select, textarea {
  width: 100%;
  min-height: 48px;
  padding: 11px 12px;
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}
textarea { min-height: 84px; resize: vertical; }

.row { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 620px) { .row.two { grid-template-columns: 1fr 1fr; } }

/* -------------------------------------------------------------- buttons */

button { font: inherit; cursor: pointer; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 18px;
  border: 1px solid transparent;
  border-radius: 12px;
  text-decoration: none;
  background: var(--brand);
  color: var(--brand-ink);
  font-weight: 700;
}
.btn.wide      { width: 100%; }
.btn.secondary { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn[disabled] { opacity: .55; cursor: default; }

.text-btn {
  background: none;
  border: none;
  color: var(--link);
  font-weight: 700;
  padding: 6px 8px;
  min-height: 40px;
}
.icon-btn {
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink-soft);
  padding: 5px 9px;
  line-height: 1;
}

.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }

/* --------------------------------------------------------------- notices */

.notice {
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface-2);
}
.notice.error { border-color: transparent; color: var(--danger); background: var(--danger-bg); }
.notice.ok    { border-color: transparent; color: var(--ok);     background: var(--ok-bg); }
.notice.warn  { border-color: transparent; color: var(--warn);   background: var(--warn-bg); }

#toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  max-width: 90vw;
  padding: 12px 18px;
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--bg);
  box-shadow: var(--shadow);
  z-index: 50;
}

/* ---------------------------------------------------------------- sign in */

.signin-wrap {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.signin { width: 100%; max-width: 380px; }
.signin h1 { text-align: center; }

/* ------------------------------------------------------------ job detail */

a.job { text-decoration: none; cursor: pointer; }
a.job:active { transform: scale(.995); }
a.job:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.tracks {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
@media (min-width: 620px) { .tracks { grid-template-columns: repeat(3, 1fr); } }

.track {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
}
.track-k { font-size: 12px; font-weight: 700; text-transform: uppercase;
           letter-spacing: .04em; color: var(--ink-soft); }
.track-v { margin-top: 4px; font-weight: 700; }
.track-s { margin-top: 2px; font-size: 12px; color: var(--ink-soft); }

.kv {
  display: grid;
  grid-template-columns: minmax(110px, 34%) 1fr;
  gap: 6px 12px;
}
.kv-k { color: var(--ink-soft); font-size: 14px; }
.kv-v { overflow-wrap: anywhere; }
.kv-v a { color: var(--brand); font-weight: 600; }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { padding: 10px 0; border-top: 1px solid var(--line); }
.timeline li:first-child { border-top: none; padding-top: 0; }
.tl-when { font-size: 12px; color: var(--ink-soft); }
.tl-what { font-weight: 600; }
.tl-why  { color: var(--ink-soft); }
.tl-by   { font-size: 12px; color: var(--ink-soft); }

/* ------------------------------------------------- top bar on a phone */

.text-btn { white-space: nowrap; }

/* Phones and tablets: tabs at the bottom; language, theme and sign-out
 * under More. (Until 18 Oct 2026 the tabs wrapped in the top bar; in Tamil
 * and Malayalam they took three lines.) */
@media (max-width: 899px) {
  #topbar-nav, .topbar-right { display: none; }
}

/* ------------------------------------------------------- language picker */

.lang-select {
  width: auto;
  padding: 5px 8px;
  font-size: 14px;
  border-radius: var(--radius);
}

/* --------------------------------------------------------- collection */

.choice { display: grid; gap: 8px; margin-bottom: 12px; }
.choice label, label.inline {
  display: flex; align-items: center; gap: 10px;
  font-weight: 500; font-size: 15px; margin: 0;
}
.choice input, label.inline input { width: 20px; height: 20px; flex: none; }

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}
.photo { position: relative; aspect-ratio: 1; border-radius: var(--radius);
         overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-wait { display: grid; place-items: center; height: 100%; color: var(--ink-soft); }
.photo-x {
  position: absolute; top: 4px; right: 4px; width: 28px; height: 28px;
  border-radius: 50%; border: none; background: rgba(0,0,0,.6); color: #fff;
  font-size: 18px; line-height: 28px; padding: 0;
}
.file-btn { cursor: pointer; }

.sig-pad {
  display: block; width: 100%; height: 180px;
  border: 1px dashed var(--ink-soft); border-radius: var(--radius);
  background: #fff;                /* white in dark mode too: it is paper */
}

.doc-list { margin: 0; padding-left: 18px; }
.doc-list li + li { margin-top: 6px; }
.doc-list a { color: var(--brand); font-weight: 600; }

/* ------------------------------------------------ an issued document */

.doc-actions { display: flex; justify-content: space-between; align-items: center;
               gap: 10px; margin-bottom: 12px; }

.doc {
  background: #fff; color: #111;        /* a document is paper, whatever the theme */
  border: 1px solid #d8dce3; border-radius: var(--radius);
  padding: 20px; font-size: 14px; line-height: 1.45;
}
.doc h3 { font-size: 14px; text-transform: uppercase; letter-spacing: .04em;
          margin: 18px 0 6px; color: #333; border-bottom: 1px solid #ddd; padding-bottom: 4px; }
.doc-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
            border-bottom: 2px solid #111; padding-bottom: 12px; margin-bottom: 12px; }
.doc-company { font-size: 18px; font-weight: 800; }
.doc-muted { color: #555; font-size: 13px; }
.doc-title { text-align: right; }
.doc-kind { font-size: 16px; font-weight: 800; text-transform: uppercase; }
.doc-no { font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
.doc-table { width: 100%; border-collapse: collapse; }
.doc-table th { text-align: left; font-weight: 600; color: #444; width: 38%;
                padding: 4px 8px 4px 0; vertical-align: top; }
.doc-table td { padding: 4px 0; vertical-align: top; overflow-wrap: anywhere; }
.doc-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 6px; }
.doc-photos img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border: 1px solid #ddd; }
.doc-sig img { max-width: 280px; max-height: 110px; display: block; }
.doc-sig-line { border-top: 1px solid #111; width: 280px; max-width: 100%; margin-top: 2px;
                font-size: 12px; color: #444; padding-top: 2px; }
.doc-terms { font-size: 12px; color: #333; }
.doc-warn { border: 2px solid #b3261e; color: #b3261e; padding: 8px; font-weight: 700; }
.doc-foot { margin-top: 18px; font-size: 11px; color: #666; border-top: 1px solid #ddd; padding-top: 6px; }

@media print {
  #topbar, #footer, #toast, #bottom-nav, .no-print { display: none !important; }
  body.signed-in { display: block !important; }
  html, body { background: #fff !important; }
  #app { padding: 0; max-width: none; }
  .doc { border: none; padding: 0; }
  .doc-photos img, .doc-sig img { break-inside: avoid; }
}
@media (max-width: 560px) { .doc-title { text-align: left; } }
.doc-keep { break-inside: avoid; page-break-inside: avoid; }

/* invoice lines (023) */
.row.three { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.lines-table, .doc-lines { width: 100%; border-collapse: collapse; font-size: 0.9em; }
.lines-table th, .lines-table td, .doc-lines th, .doc-lines td { padding: 4px 6px; border-bottom: 1px solid #ddd; text-align: left; vertical-align: top; }
.doc-lines th.num, .doc-lines td.num { text-align: right; white-space: nowrap; }
.doc-lines-wrap { overflow-x: auto; margin: 12px 0; }
.doc-totals { max-width: 360px; margin-left: auto; }

/* customer tracking page and requests (029) */
.track-bar { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 16px;
  border-bottom: 1px solid var(--line, #ddd); }
.trk-message { white-space: pre-wrap; font-size: 1.05em; }
details summary { cursor: pointer; padding: 6px 0; color: var(--brand); }

/* dashboard (031) */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; margin: 8px 0; }
.tile { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; background: var(--surface); }
.tile-v { font-size: 1.5em; font-weight: 700; color: var(--ink); }
.tile-k { color: var(--ink-soft); font-size: .85em; }
.tile.danger .tile-v { color: var(--danger); }
.tile.warn .tile-v { color: var(--warn); }
.wo-list details.wo { border-bottom: 1px solid var(--line); }
.wo-list details.wo summary { display: flex; justify-content: space-between; color: var(--ink); }
.badge.wo { color: var(--brand); }
.score-table td.num, .score-table th.num { text-align: right; white-space: nowrap; }
.score-table tr.median td { color: var(--ink-soft); font-style: italic; }
.charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin: 8px 0; }
.chart h3 { margin: 4px 0 8px; font-size: 1em; }
.bars { display: flex; align-items: flex-end; gap: 2px; height: 140px; border-bottom: 1px solid var(--line); }
.bar-col { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; min-width: 0; }
.bar { width: 100%; max-width: 28px; background: var(--brand); border-radius: 4px 4px 0 0; }
.bar-col:hover .bar { opacity: .75; }
.bar-x { font-size: .7em; color: var(--ink-soft); margin-top: 2px; white-space: nowrap; overflow: hidden; }
.hbar-row { display: grid; grid-template-columns: 38% 1fr auto; align-items: center; gap: 8px; margin: 4px 0; font-size: .9em; }
.hbar-k { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar-track { background: var(--surface-2); border-radius: 4px; height: 10px; }
.hbar { display: block; height: 10px; background: var(--brand); border-radius: 0 4px 4px 0; }
.hbar-v { color: var(--ink-soft); }

/* ---- 033: customer notice, owner delete / erase ---- */
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.danger-text { color: var(--danger); }
.legal-notice h3, .legal-notice h4 { margin: 12px 0 4px; font-size: 1rem; }
.legal-notice p { margin: 0 0 6px; line-height: 1.45; }
.legal-card summary, .trk-privacy summary { cursor: pointer; }
.doc-notice { font-size: 0.82rem; }
.doc-notice h4 { font-size: 0.9rem; }
.doc-notice #notice-second:not(:empty) { margin-top: 10px; padding-top: 6px; border-top: 1px dashed currentColor; }
.doc-lang { display: inline-flex; gap: 6px; align-items: center; margin-right: 8px; }
.rm-option { display: block; cursor: pointer; }
.rm-option .rm-head { display: flex; gap: 8px; align-items: center; }
.rm-option.disabled { opacity: 0.75; cursor: default; }
.doc-actions { flex-wrap: wrap; gap: 8px; }
.doc-lang select { min-width: 9em; width: auto; }

/* ---- 035: reward score ---- */
.weights { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0 12px; }
.weights input { max-width: 90px; }
.reward-breakdown { margin-top: 10px; }
.reward-breakdown summary { cursor: pointer; font-weight: 600; }

/* ---- 037: Settings ---- */
.set-jump { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: -4px 0 12px; }
.staff-row { border-top: 1px solid var(--line); padding: 10px 0; }
.staff-row.inactive .staff-main { opacity: .7; }
.staff-edit, .staff-add { margin-top: 6px; }
.staff-edit summary, .staff-add summary { cursor: pointer; }
.type-row, .num-row { border-top: 1px solid var(--line); padding-top: 8px; margin-top: 8px; }
.num-row h3 { font-size: 1rem; margin: 4px 0; }
.logo-preview { max-height: 80px; max-width: 240px; background: #fff; padding: 4px; border: 1px solid var(--line); }
.doc-logo { max-height: 56px; max-width: 200px; display: block; margin-bottom: 6px; }
/* h121: the company's logo beside its name on the customer's page */
.trk-logo { height: 28px; max-width: 120px; object-fit: contain; vertical-align: middle; margin-right: 8px; }
.extra-row { border-left: 3px solid var(--line); padding-left: 10px; margin: 6px 0; }
.extra-row .choice { display: flex; justify-content: space-between; align-items: center; }

/* ---- correcting an issued document (054) ---------------------------- */

/* A superseded document stays in the list, quietly: still readable, still
   numbered, but plainly no longer the current one. */
.doc-list li.doc-old a { text-decoration: line-through; }
.doc-list li.doc-old   { opacity: .72; }

/* One correction waiting for approval. */
.amend-row + .amend-row {
  margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line);
}

/* Picking a photograph to remove. Big enough to recognise which is
   which on a phone, and the whole tile is the label so the tick box is
   never a small target. */
.photo-pick {
  display: block; border: 1px solid var(--line); border-radius: 8px;
  padding: 6px; font-size: .9rem;
}
.photo-pick img {
  display: block; width: 100%; height: 110px; object-fit: cover;
  border-radius: 5px; margin-bottom: 6px;
}
.photo-pick span { display: block; }
.photo-pick input { margin-right: 6px; }

/* =====================================================================
 * The new look's own pieces (release 2a, 18 Oct 2026)
 * ===================================================================== */

.ic { flex: none; vertical-align: middle; }

/* ---- the bottom bar (phones and tablets) */
#bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr);
  background: var(--surface); border-top: 1px solid var(--line);
  padding: 6px 4px max(8px, env(safe-area-inset-bottom));
}
#bottom-nav a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: 54px; text-decoration: none; color: var(--ink-soft);
  font-size: 12px; font-weight: 600; text-align: center;
}
#bottom-nav a.current { color: var(--ink); font-weight: 800; }
#bottom-nav a.current .bn-ic { background: var(--surface-2); }
#bottom-nav .bn-ic { display: flex; align-items: center; justify-content: center; width: 52px; height: 30px; border-radius: 15px; }
#bottom-nav a.nav-new .bn-ic { background: var(--accent); color: var(--accent-ink); }
#bottom-nav .bn-label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 2px; }
@media (max-width: 899px) {
  body.signed-in { padding-bottom: 78px; }      /* room above the bottom bar */
  #toast { bottom: 92px; }
}

/* ---- More */
.more-list { padding: 4px 16px; }
.more-row {
  display: flex; align-items: center; gap: 14px; width: 100%; min-height: 56px;
  padding: 0; border: 0; border-bottom: 1px solid var(--line); background: none;
  color: var(--ink); text-decoration: none; font: inherit; font-weight: 700; text-align: left;
}
.more-row:last-child { border-bottom: 0; }
.more-row > span { flex: 1; }
.more-row .ic:last-child { color: var(--ink-soft); }
.more-row .lang-select { width: auto; }
.more-row label { font-size: 16px; font-weight: 700; color: var(--ink); }

/* ---- the side menu (wide screens) */
@media (min-width: 900px) {
  body.signed-in {
    display: grid;
    grid-template-columns: 236px minmax(0, 1fr);
    grid-template-rows: 1fr auto;
    min-height: 100vh;
  }
  body.signed-in #topbar {
    grid-column: 1; grid-row: 1 / span 2;
    position: sticky; top: 0; height: 100vh;
    flex-direction: column; align-items: stretch; gap: 6px;
    padding: 20px 14px;
    overflow-y: auto;            /* a short window: the menu scrolls, so Sign out can always be reached (2 Nov 2026) */
  }
  body.signed-in .topbar-left { padding: 0 8px 16px; flex-wrap: wrap; }
  body.signed-in #topbar-nav { flex-direction: column; gap: 4px; }
  body.signed-in #topbar-nav a { min-height: 44px; }
  body.signed-in #topbar-nav a.nav-new {
    order: -1; justify-content: center; margin-bottom: 12px; min-height: 46px;
    background: var(--accent); color: var(--accent-ink); font-weight: 800; border-radius: 12px;
  }
  body.signed-in .topbar-right {
    margin-left: 0; margin-top: auto; flex-direction: column; align-items: stretch; gap: 6px;
    padding-top: 12px; border-top: 1px solid var(--nav-current);
  }
  body.signed-in .topbar-right .lang-select { width: 100%; background: var(--nav-current); color: var(--nav-ink); border-color: transparent; }
  body.signed-in #app { grid-column: 2; max-width: 1100px; width: 100%; padding: 24px 28px; }
  body.signed-in #footer { grid-column: 2; }
  #bottom-nav { display: none !important; }
}

/* ---- New booking (release 2a) */
.bk-step { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.bk-step h2 { margin: 0; }
.bk-num {
  width: 28px; height: 28px; border-radius: 14px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--brand); color: var(--brand-ink); font-weight: 800; font-size: 14px;
}
.bk-sub { margin: 14px 0 6px; font-size: 13px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-soft); }
.bk-pick {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; margin-top: 8px;
  padding: 10px 12px; text-align: left; font: inherit; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
}
.bk-pick .ic:first-child { color: var(--link); }
.bk-pick.on { border: 2px solid var(--accent); background: var(--surface-2); }
.bk-pick.on .ic:last-child { color: var(--ok); }
.bk-pick-t { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.bk-pick-t span { font-size: 14px; color: var(--ink-soft); }
.bk-add {
  width: 100%; min-height: 46px; margin-top: 8px; font: inherit; font-weight: 700; color: var(--link);
  background: var(--surface); border: 1px dashed var(--ink-soft); border-radius: 12px;
}
.bk-add.on { border-style: solid; border-color: var(--accent); }
.bk-form { margin-top: 10px; padding: 12px; background: var(--surface-2); border-radius: 12px; }
.bk-form > * + * { margin-top: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 42px; padding: 0 14px; border-radius: 21px; font: inherit; font-size: 15px; font-weight: 600;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line);
}
.chip.on { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.seg { display: flex; gap: 8px; flex-wrap: wrap; }
.seg > button, .seg > input {
  flex: 1 1 0; min-width: 96px; min-height: 46px; border-radius: 12px; font: inherit; font-size: 15px; font-weight: 700;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line);
}
.seg > button.on, .seg > input.on { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.field.missing input, .field.missing select, .field.missing textarea { border: 2px solid var(--danger); }
.field.missing > label { color: var(--danger); }
.field-note { margin-top: 4px; font-size: 13px; font-weight: 700; color: var(--danger); }
.bk-bar {
  position: sticky; bottom: 0; z-index: 5; margin: 0 -14px; padding: 12px 14px;
  background: var(--bg); border-top: 1px solid var(--line);
}
@media (max-width: 899px) { .bk-bar { bottom: 78px; } }
.bk-bar .btn { min-height: 54px; font-size: 17px; background: var(--accent); color: var(--accent-ink); }

/* ---- the job screen's "Where and what" and the steps left (2a) */
.ww-row { display: flex; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.ww-row:first-of-type { border-top: 0; padding-top: 0; }
.ww-row > .ic { color: var(--link); margin-top: 2px; }
.ww-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ww-t span { font-size: 14px; color: var(--ink-soft); overflow-wrap: anywhere; }
.steps-left { margin: 0 0 10px; padding: 10px 12px; border-radius: 10px; background: var(--info-bg); color: var(--info); font-weight: 700; }

.bk-later { opacity: .75; }

/* ---- the job list (2a, 19 Oct 2026) */
.jcard { display: flex; gap: 12px; }
.jcard-ic { flex: 0 0 44px; height: 44px; border-radius: 12px; background: var(--surface-2); color: var(--link);
  display: flex; align-items: center; justify-content: center; }
.jcard-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.jcard-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.jcard-head strong { font-size: 16px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jcard-head .muted { font-size: 12px; flex: none; font-variant-numeric: tabular-nums; }
.jcard-phone { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.jcard-what { font-size: 14px; color: var(--ink-soft); }
.jcard-fault { font-size: 13px; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jcard-next { margin-top: 4px; font-weight: 800; color: var(--link); font-size: 14px; }
.jcard-next.tech { color: var(--ink-soft); font-weight: 600; }      /* the technician's move (2 Nov 2026) */
.jcard.current { outline: 2px solid var(--accent); outline-offset: 0; }
.jl-tools { display: flex; flex-direction: column; gap: 10px; margin-bottom: 4px; }
.jl-search { display: flex; align-items: center; gap: 8px; padding: 0 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; color: var(--ink-soft); }
.jl-search input { border: 0; min-height: 44px; padding: 0; background: transparent; }
.jl-search input:focus { outline: none; }
.jl-filters { display: flex; flex-wrap: wrap; gap: 10px; }
.jl-filters .jl-search { flex: 1 1 200px; }
.jl-search select { border: 0; min-height: 44px; padding: 0; background: transparent; width: 100%; }
.jl-search select:focus { outline: none; }
.jl-search:focus-within { border-color: var(--accent); }
/* Wrapped onto a second line (30 Oct 2026): scrolled sideways with no bar, the
 * last filters ("Waiting", "Closed") were off the edge and nobody found them. */
.jl-groups { flex-wrap: wrap; padding-bottom: 2px; }
.jl-groups .chip { flex: none; min-height: 36px; font-size: 14px; }
.jl-h { font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); margin: 16px 2px 8px; }

/* ---- two panes on wide screens */
@media (min-width: 1180px) {
  body.signed-in.two-pane { grid-template-columns: 236px 390px minmax(0, 1fr); }
  body.two-pane #list-pane {
    grid-column: 2; grid-row: 1 / span 2; position: sticky; top: 0; height: 100vh; overflow-y: auto;
    padding: 20px 16px; border-right: 1px solid var(--line); background: var(--bg);
  }
  body.two-pane #app, body.two-pane #footer { grid-column: 3; }
}

/* ---- the job screen's top, Next step and progress (19 Oct 2026) */
.jhead h1 { margin-bottom: 2px; }
.jhead p { margin: 2px 0; }
.jhead-fault { font-size: 16px; }
.jhead-phone { font-size: 16px; font-weight: 600; }
.upi-qr { display: block; width: 220px; max-width: 100%; height: auto; }
.upi-box { margin-top: 12px; text-align: center; }
.upi-box .upi-qr { margin: 0 auto 8px; }
.doc-upi { display: flex; align-items: center; gap: 12px; margin: 10px 0; }
.doc-upi img { width: 110px; height: auto; }
.doc-upi p { margin: 0; }
.jhead .badge { margin-top: 6px; }
.nextstep { border: 2px solid var(--accent) !important; }
.nextstep-k { font-size: 13px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-soft); }
.nextstep p { margin: 6px 0 12px; font-size: 16px; }
.nextstep .btn { min-height: 52px; font-size: 16px; }
.progress { padding: 14px 16px; }
.pg-bar { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
.pg-seg { height: 6px; border-radius: 3px; background: var(--line); }
.pg-seg.done { background: var(--ok); }
.pg-seg.now  { background: var(--accent); }
.pg-seg.wait { background: var(--warn); }
.pg-labels { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; margin-top: 6px; font-size: 11px; color: var(--ink-soft); }
.pg-labels span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pg-labels .pg-here { color: var(--ink); font-weight: 800; }
.pg-labels.pg-wrap span { white-space: normal; overflow: visible; line-height: 1.2; }  /* six steps (X19) */
details.jsec > summary { font-weight: 800; font-size: 16px; padding: 4px 0; color: var(--ink); }
details.jsec[open] > summary { margin-bottom: 8px; }
details.jsec h2 { font-size: 15px; margin: 14px 0 8px; }

/* ---- release 2b: site visits and the customer's acceptance (h071) */
.acc-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.acc-tile { min-height: 84px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface);
  color: var(--ink); font: inherit; text-align: left; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; cursor: pointer; }
.acc-tile strong { font-size: 15px; }
.acc-tile span { font-size: 13px; color: var(--ink-soft); }
.acc-tile.on { border: 2px solid var(--brand); background: var(--brand); color: var(--brand-ink); }
.acc-tile.on span { color: inherit; opacity: .85; }
.acc-big { font-size: 19px; line-height: 1.5; display: flex; flex-direction: column; gap: 8px; }
.check { display: flex; gap: 10px; align-items: flex-start; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; }
ul.plain { list-style: none; margin: 0; padding: 0; }
ul.plain > li { padding: 6px 0; }
.visit-list > li.visit-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 12px;
  padding: 10px 0; border-bottom: 1px solid var(--line); }
.visit-list > li.visit-row:last-child { border-bottom: 0; }
.visit-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.visit-acts { display: flex; flex-wrap: wrap; gap: 6px; align-items: flex-start; }
.visit-acts .field { flex-basis: 100%; }
#save-state .err { color: var(--danger); }
.doc-against { border: 2px solid #071b3d; border-radius: 6px; padding: 6px 12px; margin: 10px 0; }
.doc-against h3 { margin: 4px 0; }
.doc-against ul { margin: 4px 0 6px; padding-left: 18px; }
.doc-pagebreak { break-before: page; page-break-before: always; height: 0; margin: 24px 0; border-top: 1px dashed var(--line); }
@media print { .doc-pagebreak { border: 0; margin: 0; } }
/* ---- dashboard tiles that open their jobs (19 Oct 2026) */
.tile-btn { font: inherit; text-align: left; cursor: pointer; color: inherit; text-decoration: none; display: block; }
.tile-btn:hover, .tile-btn:focus-visible { border-color: var(--brand); }
.tile-btn.on { border: 2px solid var(--brand); padding: 9px 11px; }
.tile-btn .tile-k::after { content: " ›"; }
.dash-list { border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 12px; margin: 0 0 8px; background: var(--surface); }

/* ---- Help: the flow and "if you are stuck" (21 Oct 2026) */
ol.hf { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.hf-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; position: relative; }
@media (min-width: 760px) { .hf-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: center; } }
.hf-step { display: flex; gap: 10px; align-items: flex-start; border: 1.5px solid var(--line); border-radius: var(--radius);
  padding: 10px 12px; background: var(--surface-2, var(--surface)); }
.hf-n { flex: none; width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--brand); color: var(--brand);
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; }
.hf-where { color: var(--ink-soft); font-size: 13px; margin-top: 2px; }
.hf-note { border: 1.5px dashed var(--line); border-radius: var(--radius); padding: 8px 10px; font-size: 13px; color: var(--ink-soft); }
.hf-note.gate { border: 1.5px solid var(--warn); background: var(--warn-bg); color: var(--ink); }
.hf-row:has(.hf-note.gate) .hf-step { border-color: var(--warn); }
.hs-wrap { overflow-x: auto; }
table.hs { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 620px; }
table.hs th { text-align: left; font-size: 12px; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-soft);
  padding: 8px; border-bottom: 1px solid var(--line); }
table.hs td { padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: top; width: 33%; }

/* ---- wide screens: expand a panel, or full screen (22 Oct 2026) */
.pane-ctl { display: none; }
@media (min-width: 1180px) {
  body.two-pane .pane-ctl { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
  body.two-pane #list-ctl { position: sticky; top: -20px; z-index: 5; background: var(--bg); padding: 4px 0 8px; margin-top: -8px; }
  body.two-pane #job-ctl { position: absolute; top: 10px; right: 18px; z-index: 30; }   /* scrolls away with the page, so it never covers the job */
  body.two-pane #job-ctl[hidden] { display: none; }
  .pane-btn { font: inherit; font-size: 13px; font-weight: 700; min-height: 32px; padding: 0 12px; border-radius: 999px;
    border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; }
  .pane-btn:hover, .pane-btn:focus-visible { border-color: var(--brand); }
  .pane-btn[data-pane="normal"] { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }

  /* the job list over the whole width; its cards in columns */
  body.signed-in.two-pane.pane-list { grid-template-columns: 236px minmax(0, 1fr) 0; }
  body.two-pane.pane-list #app, body.two-pane.pane-list #footer { display: none; }
  body.two-pane.pane-list #list-pane { border-right: 0; padding: 20px 28px; }
  body.two-pane.pane-list .jl-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 10px; }
  body.two-pane.pane-list .jl-tools { max-width: 900px; }

  /* the open job over the whole width */
  body.signed-in.two-pane.pane-job { grid-template-columns: 236px 0 minmax(0, 1fr); }
  body.two-pane.pane-job #list-pane { display: none; }
  body.two-pane.pane-job #app { max-width: none; padding-top: 52px; }

  /* full screen: the menu goes too */
  body.signed-in.two-pane.pane-full.pane-list { grid-template-columns: 0 minmax(0, 1fr) 0; }
  body.signed-in.two-pane.pane-full.pane-job { grid-template-columns: 0 0 minmax(0, 1fr); }
  body.two-pane.pane-full #topbar { display: none; }
}

/* Insights, owner only (h075, 22 Oct 2026) */
.ins-tabs { display: flex; gap: 24px; border-bottom: 1px solid var(--line); margin: 4px 0; }
.ins-tabs [role=tab] { padding: 0 0 8px; border-bottom: 3px solid var(--brand); font-weight: 700; }
.ins-tiles { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.ins-tile { padding: 14px 16px; }
.ins-tile .tile-k { text-transform: uppercase; letter-spacing: .06em; font-size: .75em; }
.ins-tile .tile-v { font-size: 1.8em; margin: 2px 0; }
.ins-ch { font-size: .85em; font-weight: 700; color: var(--ink-soft); }
.ins-ch.up { color: var(--ok); }
.ins-ch.down { color: var(--danger); }
.ins-sub { color: var(--ink-soft); font-size: .85em; margin-top: 4px; }
.ins-bad { color: var(--danger); }
.ins-bar { display: block; height: 6px; border-radius: 3px; background: var(--surface-2); margin: 4px 0; overflow: hidden; }
.ins-bar span { display: block; height: 6px; background: var(--ok); }
.ins-split { display: flex; height: 28px; border-radius: 8px; overflow: hidden; font-size: .8em; font-weight: 700; }
.ins-split span { display: flex; align-items: center; padding: 0 8px; white-space: nowrap; overflow: hidden; }
.ins-split .a { background: var(--brand); color: var(--brand-ink); }
.ins-split .b { background: var(--info-bg); color: var(--info); }
.ins-age .a, .ins-key.a { background: var(--ok); }
.ins-age .b, .ins-key.b { background: var(--warn); }
.ins-age .c, .ins-key.c { background: var(--danger); }
.ins-key { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; }
.ins-heat { display: grid; grid-template-rows: repeat(7, 14px); grid-auto-flow: column; grid-auto-columns: 14px; gap: 3px; overflow-x: auto; }
.ins-day { display: inline-block; width: 14px; height: 14px; border-radius: 3px; background: var(--brand); vertical-align: middle; }
.ins-day.none { background: transparent; }
.ins-day.l0 { background: var(--surface-2); }
.ins-day.l1 { opacity: .3; }
.ins-day.l2 { opacity: .5; }
.ins-day.l3 { opacity: .75; }
.ins-dates { align-items: end; }

/* Warranties on a unit (h079, 25 Oct 2026) */
.war-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.war-row:first-of-type { border-top: 0; }

/* The trial's Feedback button (h095): bottom right, above the phone's tab bar */
#trial-fb { position: fixed; right: 12px; bottom: 76px; z-index: 40; max-width: min(360px, calc(100vw - 24px)); }
#trial-fb .btn { box-shadow: 0 2px 8px rgba(0,0,0,.18); }
#trial-fb textarea { width: 100%; box-sizing: border-box; }
body.trial-co #app { padding-bottom: 72px; }
body.trial-co #footer { padding-bottom: 72px; }      /* the build number stays clear of the button */
@media (min-width: 900px) { #trial-fb { bottom: 16px; } }
@media print { #trial-fb { display: none; } }

/* "A new version of the app is ready" (new-version.js, 29 Oct 2026) */
.new-version { position: fixed; left: 12px; right: 12px; top: 12px; z-index: 50; margin: 0 auto; max-width: 640px; background: var(--surface);
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .25); }

/* What gets you to another section or back stays on screen while the page scrolls (7 Nov 2026, UltraCool):
 * a screen's Back line, a document's actions, Settings' section links, the search on a list.
 * --stick is the height of the top bar on a phone; on a wide screen the menu is at the side. */
:root { --stick: 0px; }
@media (max-width: 899px) { body.signed-in { --stick: calc(max(12px, env(safe-area-inset-top)) + 37px); } }
#app > p:first-child:has(> a.text-btn), #app > p:first-child:has(> a[href^="#/"]), #app > .stack > p:first-child:has(> a.text-btn),
#app > .doc-actions, #app > .set-jump, .field:has(> #cus-search) {
  position: sticky; top: var(--stick); z-index: 6; background: var(--bg); padding-top: 6px; padding-bottom: 6px;
}
#app > .set-jump { margin: -4px 0 12px; border-bottom: 1px solid var(--line); }
.stack > .card[id^="set-"] { scroll-margin-top: calc(var(--stick) + 150px); }
@media (max-width: 899px) {
  /* one line that slides sideways, or twenty links would fill a phone's screen */
  #app > .set-jump { flex-wrap: nowrap; overflow-x: auto; white-space: nowrap; }
  .stack > .card[id^="set-"] { scroll-margin-top: calc(var(--stick) + 56px); }
}
/* The job list's search and filters: on a computer. On a phone they would take a third of the screen; its bottom bar is always there. */
@media (min-width: 900px) {
  .jl-tools { position: sticky; top: 0; z-index: 6; background: var(--bg); padding: 6px 0; }
  body.two-pane .jl-tools { top: 30px; }
}
@media print {
  #app > p:first-child, #app > .stack > p:first-child, #app > .doc-actions, #app > .set-jump { position: static; }
}

/* h143: reversing a payment, folded away on the job's money card */
.rev-box { margin-top: 10px; }
.rev-box > summary { cursor: pointer; color: var(--muted, #666); }

/* 8 Nov 2026: booking from WhatsApp screenshots */
.wa-item, .wa-booking { display: flex; gap: 12px; align-items: flex-start; }
.wa-thumb { flex: 0 0 auto; display: block; }
.wa-thumb img { width: 96px; max-height: 200px; object-fit: cover; object-position: top; border-radius: 8px; border: 1px solid var(--line, #d0d7e2); }
.wa-booking .wa-thumb img { width: 140px; max-height: 300px; }
.wa-body { flex: 1 1 auto; min-width: 0; }
.wa-raw { white-space: pre-wrap; font-size: 12px; max-height: 220px; overflow: auto; }
.wa-shots { display: flex; flex-wrap: wrap; gap: 8px; }

/* h149: the office's Requests list */
.req-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; }
.req-when { margin-left: auto; }
.wa-lab { display: block; font-weight: 600; margin-bottom: 6px; }

/* 8 Nov 2026: Settings is a menu; each section on its own */
.set-panes > .stack > [hidden], .set-row[hidden], .set-group[hidden] { display: none; }
.set-group { margin-bottom: 14px; }
.set-group h2 { font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted, #5b6b7f); margin: 0 0 6px; }
.set-row { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 8px 12px; background: var(--card, #fff); border: 1px solid var(--line); border-bottom-width: 0; color: inherit; text-decoration: none; }
.set-row:first-of-type { border-radius: 10px 10px 0 0; }
.set-row:last-child { border-bottom-width: 1px; border-radius: 0 0 10px 10px; }
.set-row:first-of-type:last-child { border-radius: 10px; }
.set-row-t { font-weight: 600; flex: 1 1 auto; }
.set-row-s { color: var(--muted, #5b6b7f); font-size: 14px; text-align: right; max-width: 48%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.set-row-s.warn { color: #b3261e; font-weight: 600; }
.set-row-c { color: var(--muted, #5b6b7f); font-size: 20px; line-height: 1; }
.set-row.on { outline: 2px solid var(--accent, #0b5fa5); outline-offset: -2px; }
.set-search { margin: 0 0 12px; }
.set-back { margin: 0 0 8px; position: sticky; top: var(--stick); z-index: 6; background: var(--bg); padding: 6px 0; }
.set-fold { border-top: 1px solid var(--line); padding: 10px 0; }
.set-fold > summary { cursor: pointer; min-height: 28px; }
.set-fold[open] > summary { margin-bottom: 8px; }
@media (max-width: 899px) {
  .set-layout[data-view="menu"] .set-panes, .set-layout[data-view="section"] .set-menu, .set-layout[data-view="all"] .set-menu { display: none; }
  body:has(.set-layout[data-view="section"]) .set-h1 { display: none; }
}
@media (min-width: 900px) {
  .set-layout { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 20px; align-items: start; }
  .set-layout[data-view="all"] { display: block; }
  .set-layout[data-view="all"] .set-menu { display: none; }
  .set-menu { position: sticky; top: 8px; max-height: calc(100vh - 24px); overflow-y: auto; }
  .set-back { display: none; }
}
@media print { .set-menu, .set-back { display: none; } .set-layout { display: block; } }
.req-group { font-size: 1.05rem; margin: 18px 0 8px; }
.wa-cap-stage { position: relative; max-width: 760px; cursor: crosshair; touch-action: none; user-select: none; }
.wa-cap-stage video { display: block; width: 100%; border-radius: 8px; border: 1px solid var(--line); pointer-events: none; }
#wa-crop { position: absolute; border: 2px solid var(--info); background: color-mix(in srgb, var(--info) 15%, transparent); pointer-events: none; }
