/* Shared styling: colours, type, buttons, forms, dialogs, and the pieces both
   layouts use. Layout-specific rules live in desktop.css and mobile.css.
   Rules prefixed html[data-ui="phone"] apply to the phone layout only. */

/* ---- colours ------------------------------------------------------------------ */

:root {
  color-scheme: light;
  --page: #f3f2ee;
  --surface: #fcfcfb;
  --surface-2: #f4f3ef;
  --hover: rgba(11, 11, 11, 0.05);
  --border: rgba(11, 11, 11, 0.10);
  --border-strong: rgba(11, 11, 11, 0.20);
  --text: #0b0b0b;
  --text-2: #52514e;
  --text-3: #6f6e69;

  --accent: #256abf;        /* primary buttons */
  --accent-hover: #1c5cab;
  --accent-ink: #1c5cab;    /* links and accent-coloured text */
  --accent-soft: #e4eefb;

  --go: #008300;            /* start the clock */
  --go-hover: #006f00;
  --go-ink: #006300;
  --go-soft: #e2f3e2;
  --stop: #d03b3b;          /* stop the clock, delete */
  --stop-hover: #b93030;
  --stop-ink: #b02a2a;
  --stop-soft: #fbe9e9;
  --warn: #fab219;
  --warn-ink: #7a5200;
  --warn-soft: #fdf1d3;
  --good: #0ca30c;
  --quiet: #898781;

  /* charts: one hue for every bar, hairline grid one step off the surface */
  --series-1: #2a78d6;
  --grid: #e1e0d9;
  --axis: #c3c2b7;
  --chart-muted: #898781;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow-1: 0 1px 2px rgba(11, 11, 11, 0.06);
  --shadow-2: 0 12px 40px rgba(11, 11, 11, 0.18);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --fs: 1;                  /* text size: every font-size is multiplied by this (Settings, This device) */
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #0d0d0d;
  --surface: #1a1a19;
  --surface-2: #242422;
  --hover: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.10);
  --border-strong: rgba(255, 255, 255, 0.22);
  --text: #f0efec;
  --text-2: #c3c2b7;
  --text-3: #a3a29a;

  --accent: #256abf;
  --accent-hover: #2a78d6;
  --accent-ink: #86b6ef;
  --accent-soft: rgba(57, 135, 229, 0.18);

  --go: #008300;
  --go-hover: #0a930a;
  --go-ink: #0ca30c;
  --go-soft: rgba(12, 163, 12, 0.16);
  --stop: #d03b3b;
  --stop-hover: #dc4a4a;
  --stop-ink: #e66767;
  --stop-soft: rgba(208, 59, 59, 0.18);
  --warn: #fab219;
  --warn-ink: #fab219;
  --warn-soft: rgba(250, 178, 25, 0.14);

  --series-1: #3987e5;
  --grid: #2c2c2a;
  --axis: #383835;

  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-2: 0 12px 40px rgba(0, 0, 0, 0.6);
}

/* Bigger text, chosen per device. */
:root[data-text="large"] { --fs: 1.15; }
:root[data-text="larger"] { --fs: 1.3; }

/* Job status. Colour is never the only signal: every use also carries a label or icon. */
.st-scheduled { --st: var(--series-1); --st-ink: var(--accent-ink); --st-soft: var(--accent-soft); }
.st-in_progress { --st: var(--warn); --st-ink: var(--warn-ink); --st-soft: var(--warn-soft); }
.st-done { --st: var(--good); --st-ink: var(--go-ink); --st-soft: var(--go-soft); }
.st-cancelled { --st: var(--quiet); --st-ink: var(--text-2); --st-soft: var(--surface-2); }

/* ---- basics ------------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  overflow: hidden;
  font: calc(14px * var(--fs))/1.45 var(--font);
  color: var(--text);
  background: var(--page);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

html[data-ui="phone"] body { font-size: calc(16px * var(--fs)); }

#app { height: 100%; }

h1, h2, h3, p, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 2px; }

.icon { display: block; flex: none; }
.muted { color: var(--text-2); }
.prewrap { white-space: pre-wrap; overflow-wrap: anywhere; }
.spacer { flex: 1; }
.timer { font-variant-numeric: tabular-nums; }
.boot { display: grid; place-items: center; height: 100%; color: var(--text-2); }

@keyframes fade-in { from { opacity: 0; } }
@keyframes pop-in { from { opacity: 0; transform: translateY(8px) scale(0.98); } }
@keyframes sheet-in { from { opacity: 0; transform: translateY(28px); } }
@keyframes pulse { 50% { opacity: 0.35; } }
@keyframes live {
  0% { box-shadow: 0 0 0 0 rgba(12, 163, 12, 0.5); }
  70%, 100% { box-shadow: 0 0 0 7px rgba(12, 163, 12, 0); }
}

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

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-size: calc(13.5px * var(--fs));
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
  user-select: none;
  -webkit-user-select: none;
  transition: background-color 0.12s, border-color 0.12s;
}
.btn:hover { background: var(--surface-2); }
.btn:disabled { opacity: 0.55; cursor: default; }

.btn-primary { border-color: transparent; background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-go { border-color: transparent; background: var(--go); color: #fff; }
.btn-go:hover { background: var(--go-hover); }
.btn-stop { border-color: transparent; background: var(--stop); color: #fff; }
.btn-stop:hover { background: var(--stop-hover); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: var(--hover); }
.btn-danger { border-color: transparent; background: transparent; color: var(--stop-ink); }
.btn-danger:hover { background: var(--stop-soft); }

.btn-icon { width: 34px; padding: 0; }
.btn-sm { height: 28px; padding: 0 9px; border-radius: 7px; font-size: calc(13px * var(--fs)); }
.btn-lg { height: 48px; padding: 0 20px; border-radius: 12px; font-size: calc(16px * var(--fs)); }

.btn-pair { display: inline-flex; }
.btn-pair .btn:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.btn-pair .btn:last-child { margin-left: -1px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }

/* Fingers need bigger targets than a mouse pointer. */
html[data-ui="phone"] .btn { height: 44px; padding: 0 16px; font-size: calc(15px * var(--fs)); }
html[data-ui="phone"] .btn-icon { width: 44px; padding: 0; }
html[data-ui="phone"] .btn-sm { height: 36px; padding: 0 12px; font-size: calc(14px * var(--fs)); }
html[data-ui="phone"] .btn-lg { height: 56px; font-size: calc(17px * var(--fs)); }

.link { padding: 0; border: 0; background: none; color: var(--accent-ink); font-weight: 600; text-align: left; }
.link:hover { text-decoration: underline; }

.seg {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface-2);
}
.seg-btn {
  height: 28px;
  padding: 0 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-2);
  font-size: calc(13px * var(--fs));
  font-weight: 600;
  white-space: nowrap;
}
.seg-btn:hover { color: var(--text); }
.seg-btn.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-1), 0 0 0 1px var(--border); }
html[data-ui="phone"] .seg { display: flex; }
html[data-ui="phone"] .seg-btn { flex: 1; height: 38px; padding: 0 8px; font-size: calc(14px * var(--fs)); }

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

.input {
  display: block;
  width: 100%;
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
}
.input::placeholder { color: var(--text-3); opacity: 1; }
.input:hover { border-color: var(--text-3); }
.input:focus { outline: 2px solid var(--accent-ink); outline-offset: -1px; border-color: transparent; }
textarea.input { min-height: 76px; line-height: 1.4; resize: vertical; }
.input-auto { width: auto; }
.search { width: 300px; }

/* 16px text stops iPhones zooming the page when a field is tapped. */
html[data-ui="phone"] .input { min-height: 46px; padding: 10px 12px; border-radius: 10px; font-size: calc(16px * var(--fs)); }
html[data-ui="phone"] input[type="date"].input,
html[data-ui="phone"] input[type="time"].input,
html[data-ui="phone"] input[type="datetime-local"].input { -webkit-appearance: none; appearance: none; text-align: left; }
html[data-ui="phone"] .input::-webkit-date-and-time-value { text-align: left; }

.form { display: grid; gap: 14px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
/* Two date-and-time boxes do not fit side by side on a phone, so they go one under the other. */
html[data-ui="phone"] .form-row-stack { grid-template-columns: 1fr; }

.field { display: grid; align-content: start; gap: 5px; min-width: 0; }
/* A box stays inside its column. (A date box would otherwise grow to fit its text and push under the box next to it.) */
.field > .input { min-width: 0; }
.field-label { font-size: calc(13px * var(--fs)); font-weight: 600; }
.field-hint { font-size: calc(12.5px * var(--fs)); line-height: 1.35; color: var(--text-2); }
.form > .field-hint { margin-top: -8px; }
.form > .field-hint:empty { display: none; }
html[data-ui="phone"] .field-label { font-size: calc(14px * var(--fs)); }
html[data-ui="phone"] .field-hint { font-size: calc(13.5px * var(--fs)); }

.form-error {
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  background: var(--stop-soft);
  color: var(--stop-ink);
  font-size: calc(13.5px * var(--fs));
  font-weight: 600;
}
.form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }

/* Choices that drop down under a box while it is typed in (customers from earlier jobs). */
.suggest-at { position: relative; }
.suggest {
  position: absolute;
  z-index: 5;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  padding: 4px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow: var(--shadow-2);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.suggest-head { padding: 6px 8px 4px; font-size: calc(12px * var(--fs)); font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-3); }
.suggest-row { display: grid; gap: 1px; padding: 7px 8px; border-radius: 6px; cursor: pointer; }
.suggest-row:hover { background: var(--hover); }
.suggest-row.on { background: var(--accent-soft); }
.suggest-title { font-weight: 600; overflow-wrap: anywhere; }
.suggest-sub { font-size: calc(12.5px * var(--fs)); color: var(--text-2); overflow-wrap: anywhere; }
html[data-ui="phone"] .suggest { border-radius: 10px; }
html[data-ui="phone"] .suggest-row { padding: 10px; }
html[data-ui="phone"] .suggest-sub { font-size: calc(13.5px * var(--fs)); }

.check { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 2px 10px; font-weight: 600; }
.check input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }
.check .field-hint { grid-column: 2; font-weight: 400; }

/* ---- small pieces ------------------------------------------------------------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 22px;
  padding: 0 9px 0 8px;
  border-radius: 999px;
  background: var(--st-soft);
  color: var(--st-ink);
  font-size: calc(12px * var(--fs));
  font-weight: 650;
  white-space: nowrap;
}
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--st); }

.tag {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--text-2);
  font-size: calc(12px * var(--fs));
  font-weight: 600;
  white-space: nowrap;
}
.tag-quiet { height: 18px; padding: 0 6px; font-size: calc(11px * var(--fs)); }

.avatar {
  display: inline-grid;
  flex: none;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: calc(12px * var(--fs));
  font-weight: 700;
}

.sync { display: inline-flex; align-items: center; gap: 7px; font-size: calc(12.5px * var(--fs)); color: var(--text-2); }
.sync-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--quiet); }
.sync-ok .sync-dot { background: var(--good); }
.sync-busy .sync-dot { background: var(--warn); animation: pulse 1.2s ease-in-out infinite; }
.sync-off { color: var(--stop-ink); font-weight: 600; }
.sync-off .sync-dot { background: var(--stop); }

.live-dot {
  display: inline-block;
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--good);
  animation: live 1.8s ease-out infinite;
}

.empty { display: grid; justify-items: center; gap: 6px; padding: 48px 20px; text-align: center; color: var(--text-2); }
.empty-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 6px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--text-3);
}
.empty-title { font-size: calc(16px * var(--fs)); font-weight: 650; color: var(--text); }
.empty-text { max-width: 440px; }

.card { padding: 18px 20px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.card-title { margin-bottom: 12px; font-size: calc(15px * var(--fs)); font-weight: 680; }
.card-lead { max-width: 72ch; margin: -6px 0 16px; }
.card-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
html[data-ui="phone"] .card { padding: 16px; }

/* ---- figures ------------------------------------------------------------------ */

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.tile { padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.tile-label { font-size: calc(12.5px * var(--fs)); font-weight: 600; color: var(--text-2); }
.tile-value { margin-top: 2px; font-size: calc(26px * var(--fs)); font-weight: 680; line-height: 1.2; letter-spacing: -0.02em; }
.tile-value .timer { font-variant-numeric: normal; }   /* big standalone numbers read better unspaced */
.tile-note { margin-top: 2px; font-size: calc(12.5px * var(--fs)); color: var(--text-3); }
html[data-ui="phone"] .tiles { grid-template-columns: 1fr 1fr; }
html[data-ui="phone"] .tiles > :nth-child(3):last-child { grid-column: 1 / -1; }
html[data-ui="phone"] .tile-value { font-size: calc(23px * var(--fs)); }

.tip {
  position: fixed;
  z-index: 90;
  display: grid;
  gap: 1px;
  max-width: 260px;
  padding: 8px 10px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-2);
  color: var(--text-2);
  font-size: calc(12.5px * var(--fs));
  pointer-events: none;
}
.tip strong { font-size: calc(14px * var(--fs)); color: var(--text); }
.tip-sub { color: var(--text-3); }

/* ---- dialogs and toasts ------------------------------------------------------- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  /* One fixed-size cell, so a tall dialog is held to the screen and scrolls inside itself. */
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  place-items: center;
  padding: 24px;
  background: rgba(11, 11, 11, 0.45);
  animation: fade-in 0.12s ease-out;
}
.modal {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-height: 100%;
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-2);
  outline: none;
  animation: pop-in 0.14s ease-out;
}
.modal-sm { max-width: 420px; }
.modal-md { max-width: 520px; }
.modal-lg { max-width: 640px; }
.modal-head { display: flex; align-items: center; gap: 8px; padding: 12px 12px 12px 20px; border-bottom: 1px solid var(--border); }
.modal-head h2 { flex: 1; font-size: calc(16px * var(--fs)); font-weight: 680; }
.modal-body { padding: 18px 20px 20px; overflow-y: auto; overscroll-behavior: contain; }
.modal-foot { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--border); }
.modal-text { line-height: 1.5; color: var(--text-2); }
.modal-lead { margin-bottom: 6px; font-size: calc(18px * var(--fs)); font-weight: 680; }

/* A short list of answers to press, one under the other (when to come back). */
.choices { display: grid; gap: 8px; }
.choices .modal-lead { margin-bottom: -2px; overflow-wrap: anywhere; }
.choices .modal-text { margin-bottom: 4px; }
.choice {
  display: grid;
  gap: 1px;
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  text-align: left;
}
.choice:hover { background: var(--surface-2); }
.choice-title { font-weight: 650; }
.choice-sub { font-size: calc(12.5px * var(--fs)); color: var(--text-2); }
html[data-ui="phone"] .choice { padding: 12px 14px; border-radius: 10px; }
html[data-ui="phone"] .choice-sub { font-size: calc(13.5px * var(--fs)); }

/* On a phone a dialog is a sheet that rises from the bottom; forms take the whole screen. */
html[data-ui="phone"] .modal-backdrop { place-items: end stretch; padding: 0; }
html[data-ui="phone"] .modal {
  max-width: none;
  max-height: 92vh;
  max-height: 92dvh;
  padding-bottom: env(safe-area-inset-bottom);
  border-radius: 18px 18px 0 0;
  animation: sheet-in 0.2s ease-out;
}
html[data-ui="phone"] .modal-full {
  height: 100vh;
  height: 100dvh;
  max-height: none;
  padding-top: env(safe-area-inset-top);
  border-radius: 0;
}
html[data-ui="phone"] .modal-full .modal-body { flex: 1; }
html[data-ui="phone"] .modal-foot { padding: 10px 16px; }
html[data-ui="phone"] .modal-foot .btn:not(.btn-danger) { flex: 1; }
html[data-ui="phone"] .modal-foot .spacer { display: none; }

.toasts {
  position: fixed;
  z-index: 80;
  left: 50%;
  bottom: 24px;
  display: grid;
  justify-items: center;
  gap: 8px;
  width: max-content;
  max-width: calc(100vw - 32px);
  transform: translateX(-50%);
  pointer-events: none;
}
html[data-ui="phone"] .toasts { bottom: calc(env(safe-area-inset-bottom) + 84px); }
/* Above the running-clock bar too, when it is showing (mobile/app.js sets the class). */
html[data-ui="phone"].clock-bar .toasts { bottom: calc(env(safe-area-inset-bottom) + 142px); }
.toast {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  border-radius: 10px;
  background: #242422;
  color: #f0efec;
  box-shadow: var(--shadow-2);
  font-weight: 550;
  pointer-events: auto;
  animation: pop-in 0.16s ease-out;
}
.toast-action { padding: 0; border: 0; background: none; color: #86b6ef; font-weight: 700; }
:root[data-theme="dark"] .toast { background: #f0efec; color: #0b0b0b; }
:root[data-theme="dark"] .toast-action { color: #1c5cab; }
.toast.toast-error { background: var(--stop); color: #fff; }
:root .toast.toast-error .toast-action { color: #fff; text-decoration: underline; }   /* blue would not show on red */

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

.auth { display: grid; place-items: center; height: 100%; padding: 24px 16px; overflow-y: auto; }
.auth-card {
  display: grid;
  gap: 14px;
  width: 100%;
  max-width: 400px;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-1);
}
.auth-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; font-size: calc(16px * var(--fs)); font-weight: 700; }
.auth-brand img { border-radius: 10px; }
.auth-card h1 { font-size: calc(22px * var(--fs)); font-weight: 700; letter-spacing: -0.01em; }
.auth-lead { margin-top: -8px; color: var(--text-2); }
.auth-icon { color: var(--text-3); }

/* ---- one job in full (side panel on desktop, a screen on the phone) -------------- */

.job-detail { display: grid; gap: 18px; }
.detail-title { font-size: calc(20px * var(--fs)); font-weight: 700; line-height: 1.25; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.detail-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

.clock {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 14px 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
}
.clock.running { border-color: transparent; background: var(--go-soft); }
.clock-read { display: grid; flex: 1; min-width: 0; }
.clock-label { font-size: calc(12.5px * var(--fs)); font-weight: 600; color: var(--text-2); }
.clock.running .clock-label { color: var(--go-ink); }
.clock-time { font-size: calc(28px * var(--fs)); font-weight: 700; line-height: 1.15; letter-spacing: -0.01em; }
.clock-facts { display: grid; gap: 4px; margin-top: -8px; font-size: calc(13px * var(--fs)); color: var(--text-2); }
.clock-facts strong { font-weight: 650; color: var(--text); }
.on-clock { display: inline-flex; align-items: center; gap: 7px; }

html[data-ui="phone"] .detail-title { font-size: calc(23px * var(--fs)); }
html[data-ui="phone"] .clock { flex-direction: column; align-items: stretch; gap: 12px; padding: 16px; }
html[data-ui="phone"] .clock-time { font-size: calc(40px * var(--fs)); }
html[data-ui="phone"] .clock .btn { width: 100%; }
html[data-ui="phone"] .clock-facts { font-size: calc(14px * var(--fs)); }

.info { display: grid; gap: 10px; }
.info-row { display: flex; align-items: flex-start; gap: 10px; }
.info-icon { padding-top: 1px; color: var(--text-3); }
.info-text { min-width: 0; overflow-wrap: anywhere; }

.detail-section { display: grid; gap: 6px; }
.detail-section h3 { font-size: calc(12px * var(--fs)); font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-3); }
.section-head { display: flex; align-items: center; justify-content: space-between; min-height: 28px; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 4px; }
html[data-ui="phone"] .detail-actions .btn { flex: 1; }

/* A customer's other jobs, on a job: each row opens that job. */
.past { display: grid; }
.past li { border-top: 1px solid var(--border); }
.past li:first-child { border-top: 0; }
.past-row { display: flex; align-items: center; gap: 10px; min-height: 44px; margin: 0 -8px; padding: 6px 8px; border-radius: var(--radius-sm); color: var(--text); }
a.past-row:hover { background: var(--hover); text-decoration: none; }
.past-main { display: grid; flex: 1; min-width: 0; }
.past-title { font-weight: 600; overflow-wrap: anywhere; }
.past-sub { font-size: calc(12.5px * var(--fs)); color: var(--text-2); overflow-wrap: anywhere; }
.past-row .badge { flex: none; }
.past-count { font-size: calc(12.5px * var(--fs)); color: var(--text-2); }
.past-more { justify-self: start; min-height: 28px; }
html[data-ui="phone"] .past-row { min-height: 52px; }
html[data-ui="phone"] .past-sub, html[data-ui="phone"] .past-count { font-size: calc(13.5px * var(--fs)); }
html[data-ui="phone"] .past-more { min-height: 44px; }

/* A list of time entries (in a job, and in Hours). */
.log { display: grid; }
.log-row { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 6px 0; border-top: 1px solid var(--border); }
.log-row:first-child { border-top: 0; }
.log-main { display: grid; flex: 1; min-width: 0; }
.log-when { font-variant-numeric: tabular-nums; }
.log-time { flex: none; width: 152px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.log-job { font-weight: 600; overflow-wrap: anywhere; }
.log-sub { font-size: calc(12.5px * var(--fs)); color: var(--text-2); overflow-wrap: anywhere; }
.log-len { flex: none; font-weight: 650; font-variant-numeric: tabular-nums; }
.log-spacer { flex: none; width: 34px; }
html[data-ui="phone"] .log-spacer { width: 44px; }
html[data-ui="phone"] .log-sub { font-size: calc(13.5px * var(--fs)); }

/* ---- hours -------------------------------------------------------------------- */

.hours { display: grid; gap: 16px; align-content: start; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.toolbar-title { display: flex; align-items: baseline; gap: 8px; }
.toolbar-title strong { font-size: calc(15px * var(--fs)); }
.hours-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 400px); gap: 12px; }
.hours-top .tiles { align-content: start; }
html[data-ui="phone"] .hours-top { grid-template-columns: minmax(0, 1fr); }

.chart { padding: 14px 16px 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.chart-title { margin-bottom: 16px; font-size: calc(12.5px * var(--fs)); font-weight: 600; color: var(--text-2); }
.cols { position: relative; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); padding-left: 30px; }
.cols-grid { position: absolute; top: 0; right: 0; left: 30px; height: 110px; }
.cols-line { position: absolute; right: 0; left: 0; border-top: 1px solid var(--grid); }
.cols-line:first-child { border-top-color: var(--axis); }
.cols-tick {
  position: absolute;
  right: 100%;
  margin-right: 6px;
  transform: translateY(-50%);
  font-size: calc(11px * var(--fs));
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: var(--chart-muted);
}
.col { position: relative; display: grid; justify-items: center; gap: 6px; border-radius: 6px; }
.col-plot { display: flex; align-items: flex-end; justify-content: center; width: 100%; height: 110px; }
.col-bar { width: min(20px, 60%); min-height: 2px; border-radius: 4px 4px 0 0; background: var(--series-1); }
.col:hover .col-bar, .col:focus-visible .col-bar { filter: brightness(1.15); }
.col-label { padding-bottom: 2px; font-size: calc(11.5px * var(--fs)); color: var(--chart-muted); }
.col-label.today { font-weight: 700; color: var(--text); }

.day-block { padding: 6px 16px 4px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.day-block-head { display: flex; align-items: baseline; justify-content: space-between; padding: 8px 0 6px; border-bottom: 1px solid var(--border); }
.day-block h3 { font-size: calc(14px * var(--fs)); font-weight: 680; }
.day-block-total { font-weight: 680; font-variant-numeric: tabular-nums; }

html[data-ui="phone"] .hours .log-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 0 10px; padding: 10px 0; }
html[data-ui="phone"] .hours .log-time { grid-column: 1 / -1; width: auto; font-size: calc(13.5px * var(--fs)); }
html[data-ui="phone"] .toolbar .spacer { display: none; }
html[data-ui="phone"] .toolbar-title { flex: 1; flex-direction: column; align-items: flex-start; gap: 0; }

/* ---- insights ----------------------------------------------------------------- */

.insights { display: grid; gap: 16px; align-content: start; max-width: 1040px; }
.types { display: grid; }
.type-row {
  display: grid;
  grid-template-columns: minmax(160px, 1.3fr) 56px minmax(180px, 2fr) 84px 84px;
  align-items: center;
  gap: 14px;
  min-height: 44px;
  padding: 6px 0;
  border-top: 1px solid var(--border);
}
.type-head {
  min-height: 0;
  padding: 0 0 8px;
  border-top: 0;
  font-size: calc(12px * var(--fs));
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-3);
}
.type-name { display: flex; align-items: center; gap: 8px; min-width: 0; }
.type-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  margin-left: -4px;
  padding: 5px 8px 5px 4px;
  border: 0;
  border-radius: 6px;
  background: none;
  font-weight: 650;
  text-align: left;
}
.type-toggle:hover { background: var(--hover); }
.type-toggle .icon { color: var(--text-3); transition: transform 0.12s; }
.type-row.open .type-toggle .icon { transform: rotate(90deg); }
.type-n, .type-range { text-align: right; font-variant-numeric: tabular-nums; }
.type-range { color: var(--text-2); }
.type-head .type-range { color: var(--text-3); }
.cell-label { display: none; }

/* One bar per type, all the same hue: length is the only thing being compared. */
.type-bar { display: flex; align-items: center; gap: 8px; height: 28px; border-radius: 6px; }
.bar { flex: none; min-width: 2px; height: 14px; border-radius: 0 4px 4px 0; background: var(--series-1); }
.type-bar:hover .bar, .type-bar:focus-visible .bar { filter: brightness(1.15); }
.bar-value { font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }

.type-jobs { display: grid; margin: 0 0 10px 6px; padding: 2px 0 2px 8px; border-left: 2px solid var(--border); }
.type-job {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 12px;
  width: 100%;
  padding: 6px 10px;
  border: 0;
  border-radius: 6px;
  background: none;
  text-align: left;
}
.type-job:hover { background: var(--hover); }
.type-job-date { color: var(--text-2); }
.type-job-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.type-job-len { font-weight: 600; font-variant-numeric: tabular-nums; }

/* Narrow screens: the bar drops under the name, the numbers line up beneath it. */
html[data-ui="phone"] .type-head { display: none; }
html[data-ui="phone"] .type-row { grid-template-columns: auto auto 1fr; gap: 4px 16px; padding: 12px 0; }
html[data-ui="phone"] .types > .type-row:nth-child(2) { border-top: 0; padding-top: 0; }
html[data-ui="phone"] .type-name, html[data-ui="phone"] .type-bar { grid-column: 1 / -1; }
html[data-ui="phone"] .type-bar { order: 1; }
html[data-ui="phone"] .type-n { order: 2; }
html[data-ui="phone"] .type-range { order: 3; }
html[data-ui="phone"] .type-n, html[data-ui="phone"] .type-range { text-align: left; font-size: calc(13.5px * var(--fs)); color: var(--text-2); }
html[data-ui="phone"] .cell-label { display: inline; }
html[data-ui="phone"] .type-job { padding: 10px 8px; }

/* ---- settings ----------------------------------------------------------------- */

.settings { display: grid; gap: 16px; align-content: start; max-width: 720px; }
.people { display: grid; }
.person { display: flex; align-items: center; gap: 12px; padding: 8px 0; }
.people .person + .person { border-top: 1px solid var(--border); }
.person-text { flex: 1; min-width: 0; }
.person-name { font-weight: 650; }
.person.inactive { opacity: 0.6; }
.setting { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 12px 0; border-top: 1px solid var(--border); }
.card-title + .setting { padding-top: 0; border-top: 0; }
.setting-text { flex: 1; min-width: 180px; }
.setting-label { font-weight: 650; }
.setting-sync { display: flex; align-items: center; gap: 12px; }
html[data-ui="phone"] .setting > .seg { width: 100%; }

/* Small notes on job cards (both layouts). */
.job-card-live, .job-card-done, .job-card-note {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: calc(12px * var(--fs));
  font-weight: 650;
  white-space: nowrap;
}
.job-card-live, .job-card-done { color: var(--go-ink); }
.job-card-note { color: var(--st-ink); }

/* ---- the parts list, and a job's old list with boxes to check off -------------------- */

/* The parts list keeps its height while the list inside it scrolls. */
.modal-tall { height: min(900px, 100%); }
.modal-tall .modal-body { display: flex; flex: 1; flex-direction: column; min-height: 0; padding: 0; overflow: hidden; }
.picker { display: flex; flex: 1; flex-direction: column; min-height: 0; }
.picker-top { padding: 14px 20px 12px; border-bottom: 1px solid var(--border); }
.picker-list {
  flex: 1;
  min-height: 0;
  padding: 2px 20px calc(20px + var(--keyboard, 0px));
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.picker-tally { min-width: 0; font-size: calc(13px * var(--fs)); color: var(--text-2); }

.pick-head {
  margin: 16px 0 6px;
  font-size: calc(12px * var(--fs));
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-3);
}
.pick-row { display: flex; align-items: center; gap: 6px; min-height: 42px; border-top: 1px solid var(--border); }
.pick-row:first-child, .pick-head + .pick-row, .pick-note + .pick-row, .pick-crumb + .pick-row, .pick-own-add + .pick-row { border-top: 0; }
.pick-name {
  display: grid;
  flex: 1;
  gap: 1px;
  min-width: 0;
  margin-left: -8px;
  padding: 8px;
  border: 0;
  border-radius: var(--radius-sm);
  background: none;
  text-align: left;
}
.pick-name:hover { background: var(--hover); }
.pick-title { overflow-wrap: anywhere; }
.pick-row.on .pick-title { font-weight: 650; }
.pick-sub { font-size: calc(12.5px * var(--fs)); font-weight: 400; color: var(--text-2); }
.pick-tools { display: flex; flex: none; align-items: center; gap: 6px; margin-left: auto; }
.pick-count { display: flex; flex: none; align-items: center; gap: 2px; }
.pick-qty { min-width: 28px; font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; }
.pick-step {
  display: grid;
  flex: none;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
}
.pick-step:hover { background: var(--surface-2); }
.pick-row.on .pick-add { border-color: transparent; background: var(--accent); color: #fff; }
.pick-row.on .pick-add:hover { background: var(--accent-hover); }

.pick-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 6px; }
.pick-cat {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 6px 8px 6px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  text-align: left;
}
.pick-cat:hover { border-color: var(--border-strong); background: var(--surface-2); }
.pick-cat-name { flex: 1; min-width: 0; font-weight: 600; }
.pick-cat-n { flex: none; font-size: calc(12.5px * var(--fs)); color: var(--text-2); font-variant-numeric: tabular-nums; }
.pick-cat .icon { color: var(--text-3); }

.pick-crumb { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin: 12px 0 6px; }
.pick-back { display: inline-flex; align-items: center; gap: 2px; min-height: 32px; }
.pick-crumb-title { font-size: calc(16px * var(--fs)); font-weight: 680; }
.pick-note { margin: 0 0 8px; font-size: calc(13px * var(--fs)); color: var(--text-2); }
.pick-tip { margin: 18px 0 0; font-size: calc(13px * var(--fs)); color: var(--text-2); }
.pick-empty { display: grid; justify-items: start; gap: 10px; margin: 0; padding: 18px 0 6px; color: var(--text-2); }
.pick-own-add { display: grid; justify-items: end; gap: 8px; margin-bottom: 10px; }
.pick-own-box { min-height: 62px; }
.pick-offer {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin-top: 14px;
  padding: 10px 12px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  background: none;
  color: var(--text);
  text-align: left;
}
.pick-offer:hover { background: var(--hover); }
.pick-offer-icon { display: grid; flex: none; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); }
.pick-offer-text { display: grid; gap: 1px; min-width: 0; overflow-wrap: anywhere; }

html[data-ui="phone"] .picker-top { padding: 12px 14px 10px; }
html[data-ui="phone"] .picker-list { padding: 2px 14px calc(20px + var(--keyboard, 0px)); }
html[data-ui="phone"] .picker-tally { flex: 1; font-size: calc(14px * var(--fs)); }
html[data-ui="phone"] .modal-foot .picker-tally + .spacer + .btn { flex: none; }
html[data-ui="phone"] .pick-row { flex-wrap: wrap; min-height: 52px; }
html[data-ui="phone"] .pick-name { min-width: 40%; padding: 12px 8px; }
html[data-ui="phone"] .pick-tools { padding-bottom: 6px; }
html[data-ui="phone"] .pick-name + .pick-tools { padding-top: 6px; }
html[data-ui="phone"] .pick-sub { font-size: calc(13.5px * var(--fs)); }
html[data-ui="phone"] .pick-step { width: 40px; height: 40px; }
html[data-ui="phone"] .pick-qty { min-width: 30px; }
html[data-ui="phone"] .pick-cats { grid-template-columns: 1fr; }
html[data-ui="phone"] .pick-cat { min-height: 48px; }
html[data-ui="phone"] .pick-back { min-height: 44px; }
html[data-ui="phone"] .pick-note, html[data-ui="phone"] .pick-tip { font-size: calc(14px * var(--fs)); }
html[data-ui="phone"] .pick-own-add { justify-items: stretch; }

/* For a quote: All parts / In stock, under the search box. In the inventory: a count that is a
   button, which opens a box to type the number in. */
.picker-top { display: grid; gap: 10px; }
.pick-ours-note { margin-top: 12px; }
.pick-qty-btn {
  min-width: 42px;
  height: 30px;
  padding: 0 6px;
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  background: var(--surface);
  color: var(--text);
}
.pick-qty-btn:hover { background: var(--surface-2); }
.pick-step:disabled { opacity: 0.4; cursor: default; }
.pick-step:disabled:hover { background: var(--surface); }
html[data-ui="phone"] .pick-qty-btn { min-width: 48px; height: 40px; }

/* The list on the job itself. */
.needs-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.needs-count { font-size: calc(12.5px * var(--fs)); color: var(--text-2); white-space: nowrap; }
.needs-count.all { font-weight: 650; color: var(--go-ink); }
.need-list { display: grid; }
.need { display: flex; align-items: flex-start; gap: 10px; padding: 5px 0; cursor: pointer; }
.need-box { flex: none; width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--go); cursor: pointer; }
.need-text { min-width: 0; overflow-wrap: anywhere; }
.need.done .need-text { color: var(--text-3); text-decoration: line-through; }
.need-row { display: flex; align-items: flex-start; gap: 8px; }
.need-row .need { flex: 1; min-width: 0; }
.needs-total {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 10px;
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  font-size: calc(13.5px * var(--fs));
  color: var(--text-2);
}
.needs-total strong { font-size: calc(15px * var(--fs)); color: var(--text); font-variant-numeric: tabular-nums; }
.needs-total-note { margin-left: auto; font-size: calc(12.5px * var(--fs)); }
.needs-total + .needs-total { margin-top: 0; }

/* A price list someone else sets (CPCA's): its price under the name, and its dates. */
.need-sub { display: block; font-size: calc(12.5px * var(--fs)); color: var(--text-2); }
.pick-dates { font-weight: 600; color: var(--text); }
.pick-dates.late {
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  background: var(--warn-soft);
  color: var(--warn-ink);
}
.needs-total-note.late { font-weight: 650; color: var(--warn-ink); }

/* What we pay: the price beside an item in the parts list and on a job. Until
   a price is set it is a quiet $ to tap. */
.pick-price, .need-price {
  display: inline-grid;
  flex: none;
  place-items: center;
  min-width: 32px;
  height: 28px;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: none;
  color: var(--text-3);
  font-size: calc(13px * var(--fs));
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.pick-price:hover, .need-price:hover { background: var(--hover); color: var(--text); }
.pick-price.set, .need-price.set { border-color: var(--border-strong); color: var(--text); font-weight: 600; }
.need-price { margin-top: 1px; }

.price-name { font-size: calc(15px * var(--fs)); font-weight: 650; overflow-wrap: anywhere; }
.price-places, .pick-places { display: flex; flex-wrap: wrap; gap: 6px; }
.pick-places { margin: 5px 0 3px; }
a.btn:hover { text-decoration: none; }
.pick-look { cursor: default; }
.pick-look:hover { background: none; }
.pick-own-hint { justify-self: start; margin: -2px 0 0; font-size: calc(12.5px * var(--fs)); color: var(--text-2); overflow-wrap: anywhere; }

html[data-ui="phone"] .pick-price, html[data-ui="phone"] .need-price { min-width: 40px; height: 36px; font-size: calc(14px * var(--fs)); }
html[data-ui="phone"] .need-price { margin-top: 4px; }
html[data-ui="phone"] .needs-total { font-size: calc(14.5px * var(--fs)); }
html[data-ui="phone"] .needs-total strong { font-size: calc(16px * var(--fs)); }
html[data-ui="phone"] .needs-total-note, html[data-ui="phone"] .pick-own-hint { font-size: calc(13.5px * var(--fs)); }
html[data-ui="phone"] .need { gap: 12px; padding: 10px 0; }
html[data-ui="phone"] .need-sub { font-size: calc(13.5px * var(--fs)); }
html[data-ui="phone"] .need-box { width: 24px; height: 24px; margin-top: 0; }
html[data-ui="phone"] .needs-count { font-size: calc(13.5px * var(--fs)); }

/* A job's old list (from before quotes held the parts), and its way into a quote. */
.needs-old { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: calc(13px * var(--fs)); color: var(--text-2); }
html[data-ui="phone"] .needs-old { font-size: calc(14px * var(--fs)); }

/* ---- quotes (both layouts) ------------------------------------------------------ */

/* The Quote button on a job, and which quote the customer chose. */
.quote-sec {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
}
.quote-btn { flex: none; }
/* The Quote button, and Scan beside it (scan parts straight onto this job's quote). */
.quote-sec-btns { display: flex; flex: none; gap: 8px; }
html[data-ui="phone"] .quote-sec-btns > * { flex: 1; justify-content: center; }
.quote-sec-text { min-width: 0; color: var(--text-2); overflow-wrap: anywhere; }
.quote-sec-text.chosen { color: var(--text); }
.quote-sec-text strong { font-weight: 650; }
html[data-ui="phone"] .quote-sec { flex-direction: column; flex-wrap: nowrap; align-items: stretch; padding: 14px; }

/* One job's quotes: side by side on a computer, so the options can be compared. */
.quotes-job { display: grid; gap: 16px; align-content: start; }
.quotes-job-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 16px; }
.quotes-job-who { display: grid; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.quotes-job-who .nowrap { white-space: nowrap; }   /* a phone number stays on one line */
.quotes-job-title { font-size: calc(18px * var(--fs)); font-weight: 700; line-height: 1.25; }
.quotes-job-link { justify-self: start; margin-top: 2px; font-weight: 600; }
.quotes-job-tools { display: flex; flex-wrap: wrap; gap: 8px; }
.quotes-tip { font-size: calc(13px * var(--fs)); color: var(--text-2); }
.empty-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 8px; }
.quote-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); align-items: start; gap: 14px; }
html[data-ui="phone"] .quotes-job-title { font-size: calc(21px * var(--fs)); }
html[data-ui="phone"] .quotes-job-tools { width: 100%; }
html[data-ui="phone"] .quotes-job-tools .btn { flex: 1; }
html[data-ui="phone"] .quote-cards { grid-template-columns: minmax(0, 1fr); }
html[data-ui="phone"] .quotes-tip { font-size: calc(14px * var(--fs)); }

.quote-card {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}
.quote-card.chosen { border-color: var(--go); box-shadow: 0 0 0 1px var(--go); }
.qc-chosen {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: -16px -18px 0;
  padding: 8px 18px;
  background: var(--go-soft);
  color: var(--go-ink);
  font-size: calc(13.5px * var(--fs));
  font-weight: 700;
}
.qc-undo { margin-left: auto; font-size: inherit; }
.qc-title { font-size: calc(17px * var(--fs)); font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.qc-lines { display: grid; }
.qc-line { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 10px; padding: 6px 0; border-top: 1px solid var(--border); }
.qc-line:first-child { border-top: 0; }
.qc-qty { color: var(--text-2); text-align: right; font-variant-numeric: tabular-nums; }
.qc-name { min-width: 0; overflow-wrap: anywhere; }
.qc-each { display: block; font-size: calc(12.5px * var(--fs)); color: var(--text-2); }
.qc-sum { font-weight: 600; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.qc-sum.none { color: var(--warn-ink); }
.qc-total { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-top: 10px; border-top: 2px solid var(--border-strong); font-weight: 650; }
.qc-total strong { font-size: calc(21px * var(--fs)); font-variant-numeric: tabular-nums; }
.qc-warn { margin-top: -4px; font-size: calc(13px * var(--fs)); font-weight: 600; color: var(--warn-ink); }
.qc-notes { color: var(--text-2); }
.qc-cost { display: grid; gap: 2px; padding: 8px 10px; border-radius: var(--radius-sm); background: var(--surface-2); font-size: calc(13px * var(--fs)); color: var(--text-2); }
.qc-actions { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 4px; }
html[data-ui="phone"] .quote-card { padding: 14px 16px; }
html[data-ui="phone"] .qc-chosen { margin: -14px -16px 0; padding: 10px 16px; font-size: calc(14.5px * var(--fs)); }
html[data-ui="phone"] .qc-title { font-size: calc(19px * var(--fs)); }
html[data-ui="phone"] .qc-line { grid-template-columns: 40px minmax(0, 1fr) auto; padding: 8px 0; }
html[data-ui="phone"] .qc-each, html[data-ui="phone"] .qc-cost, html[data-ui="phone"] .qc-warn { font-size: calc(14px * var(--fs)); }
html[data-ui="phone"] .qc-actions .btn:not(.btn-icon) { flex: 1; }
html[data-ui="phone"] .qc-actions .btn-go:not(.btn-icon) { flex: 1 1 100%; }   /* a row of its own */

/* Every quote (the Quotes tab). On a computer it is a table. Where the screen is narrower than
   the table (the computer layout on a phone), the table slides sideways on its own, and the
   buttons above it stay on the screen. */
.quotes { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-content: start; }
html[data-ui="desktop"] .quotes-body { overflow-x: auto; }   /* the phone's cards always fit */
.quotes-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.cell-chosen { font-weight: 650; color: var(--go-ink); }
.quote-chosen-ink, .m-card-when.quote-chosen-ink { color: var(--go-ink); }
.m-card-money { font-weight: 650; font-variant-numeric: tabular-nums; }
html[data-ui="phone"] .quotes-tools > .seg, html[data-ui="phone"] .quotes-tools > .btn { flex: 1 1 100%; }
html[data-ui="phone"] .quotes-tools > .spacer, html[data-ui="phone"] .quotes-tools > .muted { display: none; }

/* The quote form: one row per line, with its count, its price for one, and what it comes to.
   Where the list is too narrow for that, each line takes two rows (see "Not enough room" below). */
.modal-quote { max-width: 820px; }
.quote-form-for { color: var(--text-2); overflow-wrap: anywhere; }
.quote-form-for strong { font-weight: 650; color: var(--text); }
.ql-list { display: grid; container: quote-lines / inline-size; }
.ql-head, .ql-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 76px 112px 100px 34px;
  grid-template-areas: "what qty each total remove";
  align-items: center;
  gap: 6px 10px;
}
.ql-head {
  padding-bottom: 6px;
  font-size: calc(12px * var(--fs));
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-3);
}
.ql-head > :nth-child(n+2) { text-align: right; }
.ql-row { padding: 8px 0; border-top: 1px solid var(--border); }
.ql-what { display: grid; grid-area: what; gap: 1px; min-width: 0; }
.ql-name { font-weight: 600; overflow-wrap: anywhere; }
.ql-note { font-size: calc(12.5px * var(--fs)); color: var(--text-2); overflow-wrap: anywhere; }
.ql-use { font-size: inherit; }
.ql-cell { display: grid; gap: 3px; min-width: 0; }
.ql-qty { grid-area: qty; }
.ql-each { grid-area: each; }
.ql-total { grid-area: total; }
.ql-remove { grid-area: remove; }
.ql-cap { display: none; font-size: calc(12.5px * var(--fs)); font-weight: 600; color: var(--text-2); }
.ql-box { text-align: right; font-variant-numeric: tabular-nums; }
.input.ql-box.bad { outline: 2px solid var(--stop); outline-offset: -1px; border-color: transparent; }
.ql-sum { font-weight: 650; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ql-sum.none { font-weight: 400; color: var(--text-3); }
.ql-empty { padding: 14px 16px; border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); color: var(--text-2); }
.ql-add { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.ql-sums { display: grid; gap: 4px; padding: 12px 14px; border-radius: var(--radius); background: var(--surface-2); }
.ql-grand { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; font-weight: 650; }
.ql-grand strong { font-size: calc(22px * var(--fs)); font-variant-numeric: tabular-nums; }
.ql-warn { font-size: calc(13px * var(--fs)); font-weight: 600; color: var(--warn-ink); }
.ql-cost { font-size: calc(13px * var(--fs)); color: var(--text-2); }
.ql-changed {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--warn-soft);
  color: var(--warn-ink);
  font-size: calc(13px * var(--fs));
  font-weight: 600;
}
/* Not enough room for one row per line: the computer layout on a phone, or a narrow window.
   (Without this the name got squeezed to one letter wide.) Each line then takes two rows, as in
   the phone layout: its name, then its boxes, each with a small heading of its own. Above this
   width the boxes take 362px and the name keeps at least about 200px. */
@container quote-lines (max-width: 560px) {
  .ql-head { display: none; }
  .ql-row {
    grid-template-columns: 76px minmax(0, 1fr) minmax(84px, auto);
    grid-template-areas: "what what remove" "qty each total";
    align-items: end;
    gap: 6px 10px;
    padding: 10px 0;
  }
  .ql-remove { align-self: start; justify-self: end; margin: -4px -4px 0 0; }
  .ql-cap { display: block; }
  .ql-total { text-align: right; }
  .ql-sum { padding: 8px 0; }   /* as tall as the boxes beside it, so the amounts line up */
}
html[data-ui="phone"] .ql-head { display: none; }
html[data-ui="phone"] .ql-row {
  grid-template-columns: 84px minmax(0, 1fr) minmax(84px, auto);
  grid-template-areas: "what what remove" "qty each total";
  align-items: end;
  gap: 8px 10px;
  padding: 12px 0;
}
html[data-ui="phone"] .ql-remove { align-self: start; justify-self: end; margin: -6px -8px 0 0; }
html[data-ui="phone"] .ql-cap { display: block; }
html[data-ui="phone"] .ql-total { text-align: right; }
html[data-ui="phone"] .ql-sum { padding: 11px 0; }
html[data-ui="phone"] .ql-note, html[data-ui="phone"] .ql-warn, html[data-ui="phone"] .ql-cost,
html[data-ui="phone"] .ql-changed, html[data-ui="phone"] .ql-cap { font-size: calc(14px * var(--fs)); }
html[data-ui="phone"] .ql-add .btn { flex: 1 1 auto; }

/* Under a line's name on the quote form, for something that is in the inventory: a box to tick
   (From our stock), how many of the line that is, and how many there are. */
.ql-stock {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  margin-top: 3px;
  font-size: calc(12.5px * var(--fs));
  color: var(--text-2);
}
.ql-stock-tick { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--text); cursor: pointer; }
.ql-stock-box { flex: none; width: 16px; height: 16px; margin: 0; accent-color: var(--accent); cursor: pointer; }
.input.ql-stock-n {
  width: 58px;
  min-height: 28px;
  padding: 2px 6px;
  font-size: calc(13px * var(--fs));
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.input.ql-stock-n.bad { outline: 2px solid var(--stop); outline-offset: -1px; border-color: transparent; }
.ql-stock-part { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.ql-stock-have.short { font-weight: 650; color: var(--warn-ink); }
html[data-ui="phone"] .ql-stock { gap: 6px 10px; margin-top: 4px; font-size: calc(14px * var(--fs)); }
html[data-ui="phone"] .ql-stock-tick { min-height: 36px; }
html[data-ui="phone"] .ql-stock-box { width: 22px; height: 22px; }
html[data-ui="phone"] .input.ql-stock-n { width: 76px; min-height: 40px; padding: 6px 8px; font-size: calc(16px * var(--fs)); }
/* On a quote's card: which of its parts come off our own shelves. */
.qc-ours { font-weight: 600; }

/* Labor from the clock on the quote form: a row like the others, with the hourly rate to pick
   when there is more than one. And the link that shows or hides what we pay. */
.input.ql-rate { max-width: 320px; margin-top: 4px; min-height: 30px; padding: 3px 8px; font-size: calc(13px * var(--fs)); }
html[data-ui="phone"] .input.ql-rate { min-height: 44px; padding: 8px 10px; font-size: calc(16px * var(--fs)); }
.ql-costs { justify-self: start; font-size: calc(13px * var(--fs)); }
html[data-ui="phone"] .ql-costs { min-height: 36px; font-size: calc(14px * var(--fs)); }
/* On a job: which hourly rate the clock is charged at, under the Quote button. */
.quote-sec-rate { flex-basis: 100%; font-size: calc(13px * var(--fs)); color: var(--text-2); overflow-wrap: anywhere; }
html[data-ui="phone"] .quote-sec-rate { flex-basis: auto; font-size: calc(14px * var(--fs)); }
.choice.on { border-color: var(--accent-ink); box-shadow: 0 0 0 1px var(--accent-ink); }

/* ---- the markup and the hourly rates: one place, on the Inventory screen ------------- */

.rates-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
}
.rates-text { display: flex; flex-wrap: wrap; gap: 4px 22px; min-width: 0; color: var(--text-2); overflow-wrap: anywhere; }
.rates-text strong { font-weight: 650; color: var(--text); }
.rates-list { display: grid; gap: 8px; }
.rates-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 8px; }
.rates-money { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); white-space: nowrap; }
.input.rates-amount { width: 96px; text-align: right; font-variant-numeric: tabular-nums; }
html[data-ui="phone"] .rates-row { grid-template-columns: minmax(0, 1fr) auto; }
html[data-ui="phone"] .rates-row > .input { grid-column: 1 / -1; }
/* What the customer pays, under what we pay, where a price is typed. */
.price-sells { margin-top: -8px; font-size: calc(13px * var(--fs)); font-weight: 600; }
html[data-ui="phone"] .price-sells { font-size: calc(14px * var(--fs)); }

/* ---- the inventory (both layouts) ------------------------------------------------ */

/* One row for each thing in stock, the same rows as the parts list: its name, what we pay, and
   its count between a minus and a plus. */
.inv { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-content: start; max-width: 900px; }
.inv-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.inv-list {
  padding: 2px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  container: inventory / inline-size;
}
.inv-row .pick-title { font-weight: 600; }
.inv-row .pick-qty-btn { min-width: 60px; }   /* wide enough for most counts, so the minus buttons line up */
.inv-row .pick-tools { flex-wrap: wrap; justify-content: flex-end; }
/* What we pay for one, and under it what the customer pays. A tap changes what we pay. */
.inv-prices {
  display: grid;
  flex: none;
  gap: 1px;
  min-width: 176px;
  padding: 4px 8px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: none;
  color: var(--text);
  font-size: calc(12.5px * var(--fs));
  text-align: left;
}
.inv-prices:hover { border-color: var(--border-strong); background: var(--hover); }
.inv-price { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.inv-price-label { color: var(--text-2); }
.inv-price-amount { font-weight: 650; white-space: nowrap; font-variant-numeric: tabular-nums; }
.inv-price-amount.unset { font-weight: 600; color: var(--accent-ink); }
/* "for one foot": what the two prices are for, when it is not one item. */
.inv-price-unit { color: var(--text-2); text-align: right; }
.inv-price-unit[hidden] { display: none; }
/* In a thing's dialog: what we pay, with what that is for one of beside it. */
.stock-pay { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 8px; align-items: start; }
.stock-form .price-sells { margin-top: 6px; }
/* A thing's name at the top of its window, with "Change the name" after it (under it when the name is long). */
.stock-name { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 14px; }
.stock-name .price-name { margin: 0; min-width: 0; }
.stock-name .link { padding: 6px 0; font-size: calc(13.5px * var(--fs)); }
.stock-name > .field { flex: 1 1 100%; }
/* In the price dialog: what the price is for, and the box to type another word. */
.price-unit { display: grid; gap: 8px; }
.price-unit [hidden] { display: none; }
html[data-ui="phone"] .inv-prices { padding: 6px 8px; font-size: calc(13.5px * var(--fs)); }
.stock-prices { color: var(--text-2); overflow-wrap: anywhere; }
.inv-row.none .pick-qty-btn { color: var(--text-3); }
.inv-row.short .pick-qty-btn { border-color: var(--warn); color: var(--warn-ink); }
.inv-short { font-weight: 650; color: var(--warn-ink); }
.inv-worth { font-size: calc(13px * var(--fs)); color: var(--text-2); }
/* Not much room (a phone, in either layout): the name gets the whole width, and its count goes
   underneath. Side by side, a long name was squeezed into a column a few letters wide. */
@container inventory (max-width: 460px) {
  .inv-row { flex-wrap: wrap; }
  html .inv-list .inv-row .pick-name { flex-basis: 100%; min-width: 0; padding-bottom: 4px; }
  html .inv-list .inv-row .pick-name + .pick-tools { flex: 1 1 100%; justify-content: space-between; padding: 0 0 8px; }
  .inv-prices { min-width: 0; margin-left: -8px; }
}
html[data-ui="phone"] .inv-tools > .input, html[data-ui="phone"] .inv-tools > .btn { flex: 1 1 100%; }
html[data-ui="phone"] .inv-tools > .spacer, html[data-ui="phone"] .inv-tools > .muted { display: none; }
html[data-ui="phone"] .inv-list { padding: 2px 14px; }
html[data-ui="phone"] .inv-worth { font-size: calc(14px * var(--fs)); }

/* One thing in stock: the jobs it is set aside for, and a warning when quotes take more than there are. */
.stock-uses { display: grid; gap: 4px; }
.stock-uses li { overflow-wrap: anywhere; }
.stock-short {
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: var(--warn-soft);
  color: var(--warn-ink);
  font-size: calc(13px * var(--fs));
  font-weight: 600;
}
html[data-ui="phone"] .stock-short { font-size: calc(14px * var(--fs)); }

/* ---- scanning barcodes with the camera (both layouts) ------------------------------- */

.scan { display: grid; gap: 12px; align-content: start; }
/* The camera's picture, with a box to hold the barcode in. What is outside the box is dimmed. */
.scan-view {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  max-height: 46vh;
  border-radius: var(--radius);
  background: #111;
  overflow: hidden;
  isolation: isolate;   /* Safari: keeps the picture inside the rounded corners */
}
/* The middle of the camera's picture, enlarged: scanner.js sets --zoom (1 is the whole picture). */
.scan-video {
  position: absolute;
  top: calc(50% - 50% * var(--zoom, 1));
  left: calc(50% - 50% * var(--zoom, 1));
  display: block;
  width: calc(100% * var(--zoom, 1));
  height: calc(100% * var(--zoom, 1));
  object-fit: cover;
}
.scan-guide {
  position: absolute;
  top: 24%;
  right: 5%;
  bottom: 24%;
  left: 5%;
  border: 2px solid rgba(255, 255, 255, 0.92);
  border-radius: 10px;
  box-shadow: 0 0 0 999px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}
/* A barcode is being read again and again to make sure of it: the box goes amber, and says so. */
.scan-view.reading .scan-guide { border-color: #ffc94a; }
.scan-busy {
  position: absolute;
  right: 0;
  bottom: 8px;
  left: 0;
  width: max-content;
  max-width: 90%;
  margin: 0 auto;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  font-size: calc(13px * var(--fs));
  font-weight: 600;
  text-align: center;
  pointer-events: none;
}
.scan-busy[hidden] { display: none; }
/* A barcode was read: the box flashes green. */
.scan-view.read .scan-guide { animation: scan-read 0.5s ease-out; }
@keyframes scan-read { from { border-color: #3ddc5a; box-shadow: 0 0 0 999px rgba(20, 140, 40, 0.5); } }
.scan-msg {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  line-height: 1.45;
  text-align: center;
}
.scan-light { position: absolute; top: 8px; right: 8px; }
.scan-light.on { border-color: transparent; background: var(--warn); color: #0b0b0b; }
/* What the last scan did. */
.scan-result { min-height: 3em; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--surface-2); color: var(--text-2); overflow-wrap: anywhere; }
.scan-added { display: grid; justify-items: start; gap: 2px; color: var(--text); }
.scan-added strong { font-weight: 650; }
.scan-total { font-weight: 650; font-variant-numeric: tabular-nums; }
.scan-type { display: flex; gap: 8px; }
.scan-type .input { flex: 1; min-width: 0; }
html[data-ui="phone"] .scan-type .btn { flex: none; }
/* The other way round the camera (a photo), and what to try when it will not read. */
.scan-more { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
/* Which copy of the app this is: small, for whoever is sent a screenshot. */
.scan-copy { font-size: calc(11px * var(--fs)); color: var(--text-3); font-variant-numeric: tabular-nums; }
.scan-photo-file { display: none; }
.scan-help { font-size: calc(13px * var(--fs)); color: var(--text-2); }
.scan-help summary { min-height: 28px; font-weight: 600; color: var(--accent-ink); cursor: pointer; }
.scan-help ul { display: grid; gap: 4px; margin: 6px 0 8px; padding-left: 20px; list-style: disc; }
.scan-facts-head { margin-top: 6px; font-weight: 600; }
.scan-facts { font-size: calc(12px * var(--fs)); overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
html[data-ui="phone"] .scan-help { font-size: calc(14px * var(--fs)); }
html[data-ui="phone"] .scan-help summary { min-height: 40px; }
html[data-ui="phone"] .scan-facts { font-size: calc(13px * var(--fs)); }

/* A barcode nobody has named yet: which part is it on? And a thing's barcodes, where it is counted. */
.modal-tall-ish { height: min(640px, 100%); }
.code-ask { display: grid; gap: 12px; align-content: start; }
.code-list { display: grid; gap: 8px; }
.code-head { font-size: calc(12px * var(--fs)); font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-3); }
.code-digits { font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.code-new { border-style: dashed; }
.stock-codes { display: grid; gap: 4px; }

/* ---- deleted jobs (both layouts) ---------------------------------------------- */

.deleted { display: grid; gap: 12px; align-content: start; max-width: 760px; }
.deleted-lead { color: var(--text-2); max-width: 72ch; }
.deleted-wait { padding: 24px 0; }
.deleted-list { display: grid; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.deleted-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.deleted-row + .deleted-row { border-top: 1px solid var(--border); }
.deleted-main { display: grid; flex: 1; gap: 1px; min-width: 0; }
.deleted-title { font-weight: 650; overflow-wrap: anywhere; }
.deleted-sub { color: var(--text-2); overflow-wrap: anywhere; }
.deleted-when { font-size: calc(12.5px * var(--fs)); color: var(--text-3); }
.deleted-row .btn { flex: none; }
html[data-ui="phone"] .deleted-row { flex-wrap: wrap; }
html[data-ui="phone"] .deleted-row .btn { width: 100%; justify-content: center; }
html[data-ui="phone"] .deleted-when { font-size: calc(13.5px * var(--fs)); }

/* ---- a clock left running ------------------------------------------------------- */

.log-long {
  justify-self: start;
  margin-top: 3px;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--warn-soft);
  color: var(--warn-ink);
  font-size: calc(12px * var(--fs));
  font-weight: 650;
}
html[data-ui="phone"] .log-long { font-size: calc(13px * var(--fs)); }
.clock-check .modal-lead { overflow-wrap: anywhere; }

/* ---- passwords: a Show button inside the box ------------------------------------ */

.pw-box { position: relative; }
.pw-box .input { padding-right: 70px; }
.pw-toggle {
  position: absolute;
  top: 50%;
  right: 5px;
  height: 28px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--accent-ink);
  font-size: calc(13px * var(--fs));
  font-weight: 650;
  transform: translateY(-50%);
}
.pw-toggle:hover { background: var(--hover); }
html[data-ui="phone"] .pw-toggle { height: 36px; font-size: calc(15px * var(--fs)); }
.auth-help { color: var(--text-2); font-size: calc(13px * var(--fs)); line-height: 1.45; }
html[data-ui="phone"] .auth-help { font-size: calc(14px * var(--fs)); }

/* ---- How do I…? (both layouts) -------------------------------------------------- */

.help { display: grid; gap: 12px; align-content: start; max-width: 760px; }
.help-lead, .help-foot { color: var(--text-2); }
.help-list { display: grid; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.help-item + .help-item { border-top: 1px solid var(--border); }
.help-q {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 10px 16px;
  font-weight: 650;
  cursor: pointer;
  list-style: none;
}
.help-q::-webkit-details-marker { display: none; }
.help-q::after {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  margin-left: auto;
  border-right: 2px solid var(--text-3);
  border-bottom: 2px solid var(--text-3);
  transform: translateY(-2px) rotate(45deg);
}
.help-item[open] > .help-q::after { transform: translateY(2px) rotate(225deg); }
.help-q:hover { background: var(--hover); }
.help-a { display: grid; gap: 12px; padding: 0 16px 16px; }
.help-steps { display: grid; gap: 8px; margin: 0; padding-left: 22px; line-height: 1.5; }
.help-note { color: var(--text-2); }
.help-a .btn { justify-self: start; }
html[data-ui="phone"] .help-q { min-height: 56px; font-size: calc(16px * var(--fs)); }
