/* The look, "One Direction" (1.16, the owner's choice, made calmer the same day: "minimal colour, not rainbow colours"): a light ground,
   white cards with a hairline and no shadow, greys and ink for almost everything, ONE accent (Voltmech orange) only for the single next
   action or the thing to decide, ONE alarm colour (a muted red) only for late, overdue or at risk, a dark band for the vital signs,
   Inter, gentle movement (Calm and the device's "reduce motion" stop it), and a matching dark mode. Status is a word on a neutral chip,
   never a hue: the old blue, green and amber tokens are neutral here on purpose, so every older screen follows without a change.
   Tokens only differ by theme; the markup is the same. docs/DESIGN.md, "The look now". Prepared by Team ScalAct. */

/* ---- Light ----------------------------------------------------------------------------------------------------------------- */
html[data-theme] {
  --bg: #F4F5F7; --card: #FFFFFF; --line: #E2E5E9; --line-strong: #CBD0D6; --ink: #16212C; --ink-2: #545F6B;
  --accent: #F39A1E; --accent-hi: #F7AC45; --on-accent: #16212C; --orange: #F39A1E; --orange-ink: #8A5000; --dark: #16212C;
  /* The one alarm colour. */
  --red-bg: #F7EAE8; --red: #9A3B30;
  /* Status words sit on a neutral chip: these are greys, not hues. */
  --amber-bg: #ECEEF1; --amber: #2E3945; --blue-bg: #ECEEF1; --blue: #2E3945;
  --green-bg: #ECEEF1; --green: #2E3945; --green-bar: #545F6B; --grey-bg: #ECEEF1; --grey: #454F5B;
  --next-bg: #F6F7F9; --next-line: #F39A1E; --chart: #5A6573; --chart-track: #ECEEF1;
  --band: #16212C; --band-ink: #F1F4F7; --band-2: #B4BEC9; --band-line: rgba(255, 255, 255, .12); --band-bad: #F3B0A7;
  --sd-bg: #FFFFFF; --sd-ink: var(--ink); --sd-acc: var(--ink); --sd-soft: #EEF0F3;
  --raise: none; --raise-s: none; --pop: 0 10px 30px -12px rgba(16, 24, 40, .28);
  --press: inset 0 0 0 1px var(--line); --lip: none; --shadow: none;
  --r-card: 16px; --r-ctl: 12px; --serif: var(--font); --ease: cubic-bezier(.2, .8, .2, 1);
  /* Shades of the one ink, for the tank's people, a chart's slices and series: neighbours alternate dark and light so they part without
     a hue; names are written beside them, the colour never says it alone. --key is the one series that matters (the accent, darkened
     enough for a 2 px line on white). */
  --c1: #2F3A46; --c2: #9AA4AF; --c3: #5C6875; --c4: #BCC3CB; --c5: #45515E; --c6: #7E8995; --c-other: #D3D8DE; --key: #C26F05;
}
html[data-theme] body { background: var(--bg); color: var(--ink); }

/* ---- Dark ------------------------------------------------------------------------------------------------------------------ */
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0E151D; --card: #161F29; --line: #26313D; --line-strong: #364350; --ink: #E9EDF2; --ink-2: #A9B3BE;
  --accent: #F39A1E; --accent-hi: #F7AC45; --on-accent: #16212C; --orange-ink: #F6B356; --dark: #E9EDF2;
  --red-bg: #3A2120; --red: #EFA79E;
  --amber-bg: #222C37; --amber: #DCE2E8; --blue-bg: #222C37; --blue: #DCE2E8;
  --green-bg: #222C37; --green: #DCE2E8; --green-bar: #A9B3BE; --grey-bg: #222C37; --grey: #C3CBD3;
  --next-bg: #1C2631; --chart: #AEB8C3; --chart-track: #26313D;
  --band: #0A1016; --band-line: rgba(255, 255, 255, .08);
  --sd-bg: #121A23; --sd-acc: #E9EDF2; --sd-soft: #202A35;
  --raise: none; --raise-s: none; --pop: 0 12px 32px -12px rgba(0, 0, 0, .7);
  --c1: #DCE2E8; --c2: #6F7B88; --c3: #B3BCC6; --c4: #4E5A67; --c5: #C9D0D8; --c6: #8C97A3; --c-other: #3A4652; --key: #F39A1E;
}

/* The earlier drifting blobs, grain, pipework and flow strokes are not part of this look. */
body::before, body::after, .grain, .shell::before { display: none !important; }
html[data-theme] :is(.page-head h1, .dash-title h1, .tool-head h2)::after { content: none; }
html[data-theme] .goal-fill:not(.done):not(.behind) { background: var(--chart); }

/* ---- Type: Inter, firm headings ---------------------------------------------------------------------------------------------- */
html[data-theme] :is(h1, .dash-title h1, .page-head h1) { font-family: var(--font); font-weight: 700; font-size: 28px; letter-spacing: -.015em; }
html[data-theme] :is(h2, .dash-title h2) { font-family: var(--font); font-weight: 600; font-size: 18px; letter-spacing: 0; }
.eyebrow, html[data-theme] h2.eyebrow { font-size: 12.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); margin: 0; }
.wave { display: none; }

/* ---- Panels: white cards, soft shadow -------------------------------------------------------------------------------------- */
html[data-theme] :is(.card, .tool-group, .hero, .tile, .tool-card, .dcard, .note, .insight, .rev, .more-box) {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--raise);
}
html[data-theme] :is(.tile, .tool-card, .dcard, .note, .insight, .rev) { border-radius: 14px; box-shadow: var(--raise-s); }
html[data-theme] .card > :is(h2, .section-head):first-child { margin: 0 0 12px; }
html[data-theme] .col { background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: none; }

/* ---- Buttons and fields: orange is the next action only ------------------------------------------------------------------ */
html[data-theme] :is(button, .btn) { border-radius: var(--r-ctl); border: 1px solid var(--line-strong); background: var(--card); box-shadow: none; color: var(--ink); transition: background .15s, border-color .15s, transform .12s; }
html[data-theme] :is(button, .btn):hover:not(:disabled) { background: var(--sd-soft); }
html[data-theme] :is(button, .btn):active:not(:disabled) { transform: translateY(1px); }
html[data-theme] :is(.primary, .dark-btn, .approve) { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
html[data-theme] :is(.primary, .dark-btn, .approve):hover:not(:disabled) { background: var(--accent-hi); border-color: var(--accent-hi); }
html[data-theme] a.btn:is(.primary, .dark-btn, .approve), html[data-theme="dark"] a.btn:is(.primary, .approve) { color: var(--on-accent); }
html[data-theme] .danger { background: var(--red-bg); border-color: transparent; color: var(--red); }
html[data-theme] .ghost { background: transparent; }
html[data-theme] .link-btn { background: none; border: 0; box-shadow: none; color: var(--blue); }
html[data-theme] :is(input, select, textarea, .search-field) { border-radius: var(--r-ctl); border: 1px solid var(--line-strong); background: var(--card); box-shadow: none; color: var(--ink); }
html[data-theme="dark"] :is(input, select, textarea, .search-field) { background: #0F1B28; }
html[data-theme="dark"] select option { background: var(--card); color: var(--ink); }
html[data-theme] :is(input, select, textarea, button, a, summary):focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 65%, transparent); outline-offset: 2px; }

/* Segmented choices and page tabs: a quiet tray, the chosen one in ink (white on the ink). */
html[data-theme] :is(.seg, .pagetabs, .look-seg) { background: var(--card); border: 1px solid var(--line); border-radius: 999px; box-shadow: var(--raise-s); padding: 4px; gap: 2px; }
html[data-theme] :is(.seg button, .look-seg button) { background: transparent; border: 0; box-shadow: none; border-radius: 999px; }
html[data-theme] .pagetabs a { border-radius: 999px; color: var(--ink); }
html[data-theme] :is(.seg button.on, .pagetabs a.on, .look-seg button[aria-pressed="true"]) { background: var(--ink); color: var(--card); font-weight: 600; }
html[data-theme] .pagetabs a.on .count { background: rgba(255, 255, 255, .22); color: inherit; }
html[data-theme] .pagetabs.sub { background: transparent; box-shadow: none; border: 0; }
html[data-theme] .pill { border-radius: 999px; }
html[data-theme] .tabs button { background: transparent; border: 0; border-bottom: 3px solid transparent; border-radius: 0; box-shadow: none; color: var(--ink-2); }
html[data-theme] .tabs button.on { color: var(--ink); border-bottom-color: var(--accent); }

/* ---- Side panel: white, the chosen page in ink ------------------------------------------------------------------------------ */
html[data-theme] .side { margin: 0; top: 0; height: 100vh; height: 100dvh; width: 244px; flex-basis: 244px; padding: 14px 10px 12px; gap: 0; border-radius: 0; background: var(--sd-bg); color: var(--sd-ink); border: 0; border-right: 1px solid var(--line); box-shadow: none; }
html[data-theme] .side { overflow-x: hidden; overflow-y: auto; }
html[data-theme] .side > * { flex-shrink: 0; }
html[data-theme] .side .brand-row { padding: 0 4px; }
html[data-theme] .side a.brand-sub { padding: 0 10px 8px; }
html[data-theme] .side a.me-chip { gap: 10px; margin: 4px 0 10px; padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); box-shadow: none; }
html[data-theme] .side .me-chip strong { display: block; font-weight: 600; font-size: 15px; color: var(--sd-ink); }
html[data-theme] .side .me-chip small { display: block; color: var(--ink-2); }
html[data-theme] .side :is(a, .ng-h) { color: var(--sd-ink); }
html[data-theme] .side .ng-b { margin: 0; }
html[data-theme] .side :is(.ng-b a, .tools-link) { margin: 1px 0; padding: 9px 12px; border: 0; border-radius: 12px; }
html[data-theme] .side .ng-h { padding: 14px 12px 6px; font-size: 11.5px; text-transform: uppercase; letter-spacing: .09em; color: var(--ink-2); background: transparent; border: 0; box-shadow: none; }
html[data-theme] .side a:not(.brand, .brand-sub, .active):hover { background: var(--sd-soft); }
html[data-theme] .side a.active { background: var(--ink); color: var(--card); font-weight: 600; box-shadow: none; }
html[data-theme="dark"] .side a.active { background: var(--sd-soft); color: var(--ink); box-shadow: inset 3px 0 0 var(--sd-acc); }
html[data-theme] .side a.active::before { display: none; }
html[data-theme] .side .count { background: var(--accent); color: var(--on-accent); }
html[data-theme] .side .side-foot, html[data-theme] .side .va-open { margin-inline: 4px; }
html[data-theme][data-rail] .side { width: 76px; flex-basis: 76px; }
html[data-theme][data-rail] .side a.me-chip { padding: 8px 0; justify-content: center; border: 0; background: transparent; }
html[data-theme][data-rail] .side .me-chip .av, html[data-theme][data-rail] .side .me-chip .avatar { width: 36px !important; height: 36px !important; }
html[data-theme][data-rail] .side :is(.ng-b a, .tools-link) { justify-content: center; padding-inline: 0; }

/* ---- Top bar and phone bar --------------------------------------------------------------------------------------------------- */
html[data-theme] .topbar { background: transparent; border: 0; border-radius: 0; }
@media (max-width: 900px) {
  html[data-theme] .topbar { background: var(--bg); border-bottom: 1px solid var(--line); }
  html[data-theme] .bottom { background: var(--card); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
  html[data-theme] .bottom :is(a, button) { border: 0; background: transparent; box-shadow: none; border-radius: 0; color: var(--ink-2); }
  html[data-theme] .bottom a.active { color: var(--ink); box-shadow: inset 0 3px 0 var(--accent); }
}

/* ---- Figures: a plain card, its name above the number ---------------------------------------------------------------------- */
html[data-theme] .tile .k { color: var(--ink-2); font-size: 13px; }
html[data-theme] .tile .v { font-size: 26px; font-weight: 700; letter-spacing: -.01em; color: var(--ink); -webkit-text-fill-color: currentColor; background: none; }
/* The logo. */
.brand-logo { display: flex; justify-content: center; margin: 4px 0 8px; } .brand-logo img { width: min(230px, 64vw); height: auto; }
:is(.brand-logo, .brand-full) .on-dark { display: none; } html[data-theme="dark"] :is(.brand-logo, .brand-full) .on-light { display: none; } html[data-theme="dark"] :is(.brand-logo, .brand-full) .on-dark { display: block; }
.brand-full img { width: 100%; height: auto; }
.side .brand .brand-full { display: block; width: 154px; flex: none; }
.brand-mark { width: 30px; height: 24px; flex: none; object-fit: contain; vertical-align: middle; }
.side .brand .brand-mark { display: none; } html[data-rail] .side .brand .brand-mark { display: block; }
html[data-rail] .side .brand .brand-full { display: none; }
.side .brand { align-items: center; }
.brand-logo + .sub { text-align: center; margin-bottom: 12px; }
html[data-theme] .top-actions .btn { white-space: nowrap; }
@media (max-width: 900px) { a.brand-mobile .brand-full { display: block; width: 76px; } a.brand-mobile { margin-right: 6px; flex: none; } }

/* The stage bar's parts are buttons that must still look like one pipe. */
html[data-theme] .progress button.pstep, html[data-theme] .progress button.pstep:is(:hover, :active):not(:disabled) { background: transparent; border: 0; box-shadow: none; padding: 0; border-radius: 0; transform: none; cursor: pointer; }
html[data-theme] .progress button.pstep:is(:hover, :focus-visible) .s { filter: brightness(.88); height: 16px; }
html[data-theme] .hero-num { font-weight: 700; }
html[data-theme] .goal-fill { background: var(--chart); }
html[data-theme] .dash-bar { background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }

/* ---- Pop-ups stay solid so they can be read ----------------------------------------------------------------------------------- */
html[data-theme] :is(dialog.dlg, .look-pop, .volt-pop, .sheet, .chart-tip, .pp-pop) { background: var(--card); color: var(--ink); border-radius: var(--r-card); border: 1px solid var(--line); }
html[data-theme] .volt-fab { background: var(--accent); color: var(--on-accent); border: 0; border-radius: 50%; box-shadow: var(--raise); }
html[data-theme] :is(tbody tr:hover td, tr.click:hover td) { background: var(--sd-soft); }
html[data-theme="dark"] a:not([class]) { color: var(--blue); }
html[data-theme="dark"] .side a, html[data-theme="dark"] a.btn { color: var(--ink); }
html[data-theme] .banner { border-radius: 14px; }
@media print { html[data-theme] body { background: #fff; } }

/* ---- Stage names: the lead's stage bar shows every stage by name, on as many rows as the screen needs. --------------------- */
html[data-theme] .progress.named { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px 4px; }
html[data-theme] .progress.named .pstep { display: flex; flex-direction: column; justify-content: flex-start; align-items: stretch; gap: 4px; min-height: 44px; min-width: 0; text-align: left; }
html[data-theme] .progress.named .pstep .s { height: 8px; border-radius: 999px; }
html[data-theme] .progress.named .pstep .s.now::after { content: none; }
html[data-theme] .progress.named .pname { font-size: 12px; line-height: 1.25; color: var(--ink-2); overflow-wrap: anywhere; white-space: normal; font-weight: 400; }
html[data-theme] .progress.named .pname.now { color: var(--ink); font-weight: 700; }
@media (max-width: 900px) { html[data-theme] .progress.named { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.stage-cell { white-space: normal; }

/* ---- Business lines: the line tabs of a sales or service page, the count on a tab. ----------------------------------------- */
.pagetabs .tab-n { font-size: 12px; opacity: .75; margin-left: 5px; }
.pagetabs .tab-n:empty { margin: 0; }
/* On a phone all four lines are on screen at once: equal shares, the count under the name. */
@media (max-width: 600px) {
  html[data-theme] .pagetabs.lines { display: flex; width: 100%; }
  html[data-theme] .pagetabs.lines a { flex: 1 1 auto; flex-direction: column; justify-content: center; gap: 0; padding: 4px 6px; line-height: 1.2; text-align: center; white-space: normal; }
  html[data-theme] .pagetabs.lines .tab-n { margin: 0; }
}
.customer [hidden] { display: none !important; }
.cu-tabs { margin: 0; }
.cu-tabs a { white-space: nowrap; min-height: 44px; }
.cu-actions { margin-top: 10px; }

/* ---- Top figures of a work screen (public/js/strip.js). -------------------------------------------------------------------- */
.strip { display: flex; flex-direction: column; gap: 8px; }
.strip-figs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
html[data-theme] .strip-figs button.strip-fig { display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 2px; min-height: 64px; padding: 9px 14px; border-radius: 14px; text-align: left; white-space: normal; }
.strip-fig .k { font-size: 12.5px; color: var(--ink-2); line-height: 1.25; }
.strip-fig .v { font-size: 22px; font-weight: 600; }
.strip-fig:disabled { opacity: .7; cursor: default; }
html[data-theme] .strip-figs button.strip-fig[aria-expanded="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 2px var(--accent); }
.strip-list { max-height: 340px; overflow: auto; }
.strip-list[hidden] { display: none; }
@media (max-width: 700px) { .strip-figs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } .strip-fig .v { font-size: 19px; } }

/* ---- Quotation pipeline: columns side by side; on a phone one under the other. ---------------------------------------------- */
.qboard { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 10px; align-items: start; }
.qcol { border-radius: 18px; padding: 12px; background: var(--card); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.qcol h2 { margin: 0; font-size: 15px; display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.qcol ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.qcol .dcard { display: block; padding: 10px; text-decoration: none; color: inherit; }
@media (max-width: 700px) { .qboard { display: flex; flex-direction: column; overflow: visible; } .qcol.empty .muted { display: none; } }

/* ---- Charts (public/js/charts.js). The hues are tokens (--c1 to --c6, --c-other) at the top of this file. ---------------------- */
.ch-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 16px; align-items: start; }
.ch-grid > * { min-width: 0; }
.ch-grid .card h3 { margin-bottom: 2px; }
.donut { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: center; }
.donut svg { flex: none; }
.donut path[data-pick] { cursor: pointer; }
.donut ul { list-style: none; margin: 0; padding: 0; flex: 1 1 220px; min-width: 0; }
html[data-theme] .donut li button { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 44px; padding: 4px 8px; border: 0; border-radius: 10px; background: transparent; box-shadow: none; color: var(--ink); text-align: left; font: inherit; }
html[data-theme] .donut li button:hover { background: var(--chart-track); transform: none; }
.donut i { flex: none; width: 12px; height: 12px; border-radius: 3px; }
.donut .dn-name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.donut .dn-val { text-align: right; white-space: nowrap; }
.donut .dn-val small { display: block; color: var(--ink-2); font-size: 12px; }
.hm-wrap { overflow-x: auto; }
table.hm { width: 100%; border-collapse: separate; border-spacing: 2px; font-size: 13px; }
.hm th, .hm td { padding: 0; border: 0; background: transparent; }
.hm thead th { font-weight: 500; color: var(--ink-2); text-align: center; vertical-align: bottom; padding: 0 1px 4px; font-size: 11px; line-height: 1.2; text-transform: none; letter-spacing: 0; white-space: normal; }
.hm th:first-child { position: sticky; left: 0; z-index: 1; background: var(--card); text-align: left; padding-right: 4px; width: 1%; }
.hm tbody th { font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--ink); font-size: 13px; line-height: 1.25; }
.hm .hm-head { display: block; width: 170px; white-space: normal; overflow-wrap: anywhere; }
.hm tbody th a { color: inherit; }
.hm td { min-width: 31px; height: 44px; }
@media (max-width: 700px) { .hm .hm-head { width: 92px; font-size: 12px; } }
html[data-theme] .hm-cell { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; height: 100%; min-height: 44px; min-width: 0; padding: 2px; margin: 0; border: 1px solid transparent; border-radius: 6px; box-shadow: none; background: transparent; color: var(--ink); font: inherit; line-height: 1.15; font-variant-numeric: tabular-nums; }
html[data-theme] button.hm-cell.hm-0 { border-color: var(--line-strong); }
html[data-theme] button.hm-cell:hover { border-color: var(--ink-2); transform: none; }
.hm-cell small { font-size: 11px; color: var(--ink); }
html[data-theme] .hm-cell.hm-empty { border: 1px dashed var(--line-strong); color: var(--ink-2); }
html[data-theme] .hm-cell.hm-1 { background: color-mix(in srgb, var(--c1) 14%, transparent); }
html[data-theme] .hm-cell.hm-2 { background: color-mix(in srgb, var(--c1) 28%, transparent); }
html[data-theme] .hm-cell.hm-3 { background: color-mix(in srgb, var(--c1) 44%, transparent); }
html[data-theme] .hm-cell.hm-4 { background: color-mix(in srgb, var(--c1) 60%, transparent); }
html[data-theme="dark"] .hm-cell.hm-1 { background: color-mix(in srgb, var(--c1) 24%, transparent); }
html[data-theme="dark"] .hm-cell.hm-2 { background: color-mix(in srgb, var(--c1) 42%, transparent); }
html[data-theme="dark"] .hm-cell.hm-3 { background: color-mix(in srgb, var(--c1) 60%, transparent); }
html[data-theme="dark"] .hm-cell.hm-4 { background: color-mix(in srgb, var(--c1) 78%, transparent); }
.ch-dlg .list li { align-items: flex-start; }
html[data-theme] .chart-table button.ch-num { min-height: 44px; padding: 2px 8px; border: 0; background: transparent; box-shadow: none; color: var(--ink); text-decoration: underline; font: inherit; }

/* The salesperson's phone: the lead's next step and Call on the first screen, My day's late work folded, what was not sent. */
.said-last { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-line; overflow-wrap: anywhere; margin-bottom: 8px; }
.lead-quick, .all-stages { display: none; }
.lead-fact { margin: 6px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
html[data-theme] .ag-pick { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; vertical-align: middle; margin: -10px 0 -10px -10px; padding: 0; border: 0; background: transparent; box-shadow: none; }
.ag-pick input { width: 20px; height: 20px; }
.bulk-move { margin-bottom: 8px; }
.not-sent .said { white-space: pre-line; overflow-wrap: anywhere; margin: 4px 0 8px; }
.not-sent .ns-main { width: 100%; }
@media (max-width: 900px) {
  .lead-quick { display: flex; flex-wrap: wrap; margin-bottom: 8px; }
  .lead-quick > * { min-height: 44px; flex: 1 1 130px; justify-content: center; text-align: center; display: inline-flex; align-items: center; }
  html[data-theme] .lead-head h1 { font-size: 21px; line-height: 1.2; margin-bottom: 0; }
  html[data-theme] .lead-head .deal-value { display: flex; align-items: baseline; gap: 8px; }
  html[data-theme] .lead-head .deal-value .v { font-size: 20px; }
  .lead-head .lead-next { margin: 8px 0 10px; padding: 12px; }
  .lead-head .lead-next .na { font-size: 18px; }
  .progress-labels { align-items: center; }
  .all-stages { display: inline-flex; align-items: center; min-height: 44px; }
  html[data-theme] .progress.named.fold { grid-template-columns: minmax(0, 1fr); }
  html[data-theme] .progress.named.fold .pstep:not([data-here]) { display: none; }
  .nl-actions { position: sticky; bottom: calc(64px + env(safe-area-inset-bottom)); z-index: 5; background: var(--card); padding: 8px 0; }
}
/* A table read as cards on a phone (People, Targets, Attendance, the import preview): one card per row, each figure named. */
@media (max-width: 700px) {
  .rows-phone thead { display: none; }
  html[data-theme] .rows-phone, html[data-theme] .rows-phone tbody, html[data-theme] .rows-phone tr, html[data-theme] .rows-phone td, html[data-theme] .rows-phone th { display: block; width: auto; min-width: 0; }
  html[data-theme] .rows-phone tr { border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; margin-bottom: 8px; }
  html[data-theme] .rows-phone td, html[data-theme] .rows-phone th { border: 0; padding: 3px 0; text-align: left; white-space: normal; }
  html[data-theme] .rows-phone tr[hidden] { display: none; }
  .rows-phone td[data-label]::before { content: attr(data-label) ": "; color: var(--ink-2); font-size: 12px; }
  html[data-theme] .rows-phone input, html[data-theme] .rows-phone select { min-width: 0 !important; width: 100%; }
  .rows-phone .row.nowrap { flex-wrap: wrap; }
  .im-table { max-height: none; }
  /* Day by day: a person per card, each day a small box with its date. */
  .grid-phone thead { display: none; }
  html[data-theme] .grid-phone, html[data-theme] .grid-phone tbody { display: block; width: auto; }
  html[data-theme] .grid-phone tr { display: flex; flex-wrap: wrap; gap: 2px; border: 1px solid var(--line); border-radius: 12px; padding: 8px; margin-bottom: 8px; }
  html[data-theme] .grid-phone th { display: block; width: 100%; border: 0; }
  html[data-theme] .grid-phone td.c { display: flex; flex-direction: column; align-items: center; min-width: 36px; border: 0; padding: 1px; }
  .grid-phone td::before { content: attr(data-day); font-size: 10px; color: var(--ink-2); }
}
/* Heatmaps: the leads nobody has spoken to are the ones to see; a small badge says how many in the cell. */
.hm-quiet { display: inline-block; border-radius: 8px; padding: 0 4px; background: var(--red-bg); color: var(--red); font-weight: 600; }
html[data-theme] .hm tbody tr.hm-neglected th, html[data-theme] .hm tbody tr.hm-neglected td.hm-days { background: var(--red-bg); }
.hm-days { text-align: center; font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; padding: 0 4px; border-radius: 6px; }
.tg-month { white-space: nowrap; }

/* Service calls and pump jobs: a short card (the rest under "More"); on a phone the figures sit in one row and the help line goes. */
.sc-more > summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; color: var(--ink-2); font-size: 14px; }
.sc-more[open] > * + * { margin-top: 6px; }
.sc-card:not(:has(.sc-more[open])) .sc-desc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
dialog.st-look { width: min(560px, calc(100vw - 24px)); }
@media (max-width: 700px) {
  html[data-theme] .sv-page .sc-card { padding: 12px 14px; gap: 4px; }
  .sc-card > .sc-actions { flex-wrap: nowrap; }
  .sc-card > .sc-actions .btn, .sc-card > .sc-actions button { flex: 1 1 0; min-width: 0; padding-left: 6px; padding-right: 6px; }
  .sv-page .page-head .sub { display: none; }
  .sv-page .strip-figs { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  html[data-theme] .sv-page .strip-figs button.strip-fig { padding: 8px 6px; min-height: 60px; }
  .sv-page .strip-fig .k { font-size: 11px; overflow-wrap: anywhere; }
}

/* ---- Field phone: My day rows, one line of buttons, the main one first; identical tasks as one line ---- */
.ag-more { position: relative; }
.ag-more > summary { list-style: none; cursor: pointer; min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
.ag-more > summary::-webkit-details-marker { display: none; }
.ag-menu { position: absolute; right: 0; top: 100%; z-index: 20; display: flex; flex-direction: column; gap: 6px; padding: 8px; min-width: 150px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.18); }
.ag-menu .btn, .ag-menu button { min-height: 44px; justify-content: center; }
.ag-group { grid-template-columns: 6px 1fr; }
.ag-group summary { cursor: pointer; font-weight: 600; min-height: 44px; display: flex; align-items: center; }
.ag-group .ag { padding-left: 0; padding-right: 0; }
.offline-view .ag-list { list-style: none; margin: 0; padding: 0; background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
@media (max-width: 900px) {
  .today-page .page-head { gap: 6px; }
  html[data-theme] .today-page .page-head h1 { font-size: 21px; margin: 0; }
  .today-page .page-head .sub { margin: 0; font-size: 13px; }
  .today-page .ph-actions { flex-wrap: nowrap; overflow-x: auto; width: 100%; }
  .today-page .ph-actions > * { flex: none; white-space: nowrap; }
  .today-page .att-clock { padding: 8px 12px; gap: 4px; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; }
  .today-page .att-clock .rail-link { display: none; }
  .today-page .att-clock-times { font-size: 14px; }
  .today-page .ag { padding: 10px 12px; row-gap: 6px; column-gap: 10px; }
  .today-page .ag-title { font-size: 15px; }
  .today-page .ag .meta { font-size: 13px; }
  .today-page .ag-actions { flex-wrap: nowrap; }
  .ag-menu { right: auto; left: 0; }
}
.decide-more summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; }
.decide-facts .pill { white-space: normal; }
.decide-facts dd { min-width: 0; }
/* Five people fit across a phone: narrow heatmap columns, a long name wraps. */
@media (max-width: 600px) { table.hm { border-spacing: 1px; } .hm thead th { font-size: 10px; padding: 0; overflow-wrap: anywhere; } .hm .hm-head { width: 80px; font-size: 11px; } .hm td { min-width: 28px; } .hm-cell small { font-size: 10px; } .hm-quiet { padding: 0 2px; } }

/* Two customers to compare, side by side also on a phone. */
.nk-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; margin: 8px 0; }
.nk-side h3 { margin: 0; font-size: 16px; overflow-wrap: anywhere; }
.nk-side .decide-facts > div { grid-template-columns: minmax(0, 1fr); }

/* ==== 1.16 "One Direction" screens ========================================================================================== */
/* Gentle movement: cards rise in once. Calm (data-calm) and the device's "reduce motion" stop every movement. */
@keyframes od-rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
html:not([data-calm]) :is(.owner-home, .day-top, .deck, .board-page) > * { animation: od-rise .35s var(--ease) both; }
html:not([data-calm]) :is(.owner-home, .board-page) > :nth-child(2) { animation-delay: .05s; }
html:not([data-calm]) :is(.owner-home, .board-page) > :nth-child(3) { animation-delay: .1s; }
html[data-calm] *, html[data-calm] *::before, html[data-calm] *::after { animation: none !important; transition: none !important; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* ---- Vital signs: the one dark band --------------------------------------------------------------------------------------- */
.vband { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; padding: 12px; border-radius: var(--r-card); background: var(--band); color: var(--band-ink); }
html[data-theme="dark"] .vband { border: 1px solid var(--line); }
.vband .vs { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "k k" "v line" "s s"; align-items: end; gap: 2px 8px; min-height: 92px; padding: 12px 14px;
  border-radius: 14px; background: rgba(255, 255, 255, .05); border: 1px solid var(--band-line); color: var(--band-ink); text-decoration: none; }
.vband .vs:hover { background: rgba(255, 255, 255, .09); }
.vband .vs-k { grid-area: k; font-size: 12.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--band-2); }
.vband .vs-v { grid-area: v; font-size: 26px; font-weight: 700; letter-spacing: -.01em; }
.vband .vs-s { grid-area: s; font-size: 13px; color: var(--band-2); }
.vband .fig-spark { grid-area: line; }
.fig-spark polyline { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.fig-spark circle { fill: var(--accent); }
.card .fig-spark polyline { stroke: var(--chart); } .card .fig-spark circle { fill: var(--chart); }

/* ---- The owner's home ------------------------------------------------------------------------------------------------------ */
.owner-home { gap: 16px; }
.home-top { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.home-top > * { min-width: 0; }
.tank-card .pagetabs.lines { display: inline-flex; margin-bottom: 14px; }
.tank-body { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 18px; align-items: start; }
.fig-tank { display: block; width: 130px; height: auto; }
.fig-tank .tk-glass { fill: var(--chart-track); stroke: var(--line-strong); stroke-width: 2; }
.fig-tank .tk-pace { stroke: var(--accent); stroke-width: 2.5; stroke-dasharray: 6 4; }
:is(.fig-tank rect, .tk-dot).tk-l0 { fill: var(--c1); background: var(--c1); } :is(.fig-tank rect, .tk-dot).tk-l1 { fill: var(--c2); background: var(--c2); }
:is(.fig-tank rect, .tk-dot).tk-l2 { fill: var(--c3); background: var(--c3); } :is(.fig-tank rect, .tk-dot).tk-l3 { fill: var(--c4); background: var(--c4); }
:is(.fig-tank rect, .tk-dot).tk-l4 { fill: var(--c5); background: var(--c5); } :is(.fig-tank rect, .tk-dot).tk-l5 { fill: var(--c6); background: var(--c6); }
.tank-figs { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.tank-num { font-size: 40px; font-weight: 700; letter-spacing: -.02em; color: var(--ink); text-decoration: none; line-height: 1.1; }
.tank-state { gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.who-list { list-style: none; margin: 0; padding: 0; }
.who-list a { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto 44px; gap: 10px; align-items: center; min-height: 44px; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); }
.who-list li:last-child a { border-bottom: 0; }
.who-list .sub { text-align: right; }
.tk-dot { display: inline-block; width: 12px; height: 12px; border-radius: 4px; }
.who-n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* The flow line: twelve stages under their phase, overdue in red, the order column in green. */
.flow { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 3fr) minmax(0, 4fr) minmax(76px, 1fr); gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.fl-phase { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.fl-ph { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
.fl-cols { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; }
.fl-col { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.fl-st { display: flex; flex-direction: column; gap: 4px; padding: 8px 6px; overflow: hidden; min-height: 132px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.fl-st.late { background: color-mix(in srgb, var(--amber-bg) 70%, var(--card)); }
.fl-bar { display: block; height: 52px; position: relative; }
.fl-bar::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: max(3px, var(--h)); border-radius: 6px; background: var(--chart); opacity: .85; }
.ph-quotation .fl-bar::after { opacity: 1; }
.ph-lead .fl-bar::after { opacity: .55; }
.fl-n { font-size: 20px; font-weight: 700; }
.fl-name { font-size: 12px; line-height: 1.25; color: var(--ink-2); hyphens: auto; -webkit-hyphens: auto; }
.fl-late { font-size: 12.5px; font-weight: 600; color: var(--red); min-height: 24px; }
.fl-ok { min-height: 24px; }
.fl-won { display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; min-height: 132px; padding: 10px; border-radius: 12px; background: var(--green-bg); color: var(--green); text-decoration: none; }
.fl-won .fl-n { font-size: 28px; } .fl-won .fl-name { color: var(--green); }
.flow-card .section-head .row { gap: 14px; }
.late-link { color: var(--red); font-weight: 600; }

/* The team today and the last fourteen days. */
.tt-list { list-style: none; margin: 0; padding: 0; }
.tt-list a { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 12px; align-items: center; min-height: 52px; color: var(--ink); text-decoration: none; }
.av-s { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--blue-bg); color: var(--blue); font-size: 13px; font-weight: 700; }
.tt-main { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.tt-main > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tt-bar { display: block; height: 6px; border-radius: 6px; background: var(--chart-track); overflow: hidden; }
.tt-bar i { display: block; height: 100%; border-radius: 6px; background: var(--chart); }
.tt-n { font-weight: 700; }
table.rh { border-collapse: separate; border-spacing: 3px; width: 100%; }
.rh th { font-size: 11.5px; font-weight: 500; color: var(--ink-2); text-align: center; padding: 0; background: none; border: 0; text-transform: none; letter-spacing: 0; }
.rh th.off { opacity: .55; }
.rh tbody th { text-align: left; color: var(--ink); font-size: 13px; padding-right: 6px; white-space: nowrap; }
.rh td { padding: 0; border: 0; }
.rh-c { display: block; min-width: 18px; height: 26px; border-radius: 6px; background: var(--chart-track); }
.rh-c.off { background: repeating-linear-gradient(45deg, var(--chart-track) 0 4px, transparent 4px 8px); }
.rh-c.rh-1 { background: color-mix(in srgb, var(--c1) 25%, var(--card)); } .rh-c.rh-2 { background: color-mix(in srgb, var(--c1) 45%, var(--card)); }
.rh-c.rh-3 { background: color-mix(in srgb, var(--c1) 70%, var(--card)); } .rh-c.rh-4 { background: var(--c1); }

/* What slips quietly, what is owed, what happened. */
.slip-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.slip { display: grid; grid-template-columns: auto 1fr; grid-template-areas: "n v" "k k" "go go"; gap: 2px 8px; padding: 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); text-decoration: none; }
.slip-n { grid-area: n; font-size: 24px; font-weight: 700; color: var(--red); }
.slip-v { grid-area: v; justify-self: end; font-weight: 600; }
.slip-k { grid-area: k; font-size: 14px; }
.slip-go { grid-area: go; font-size: 13px; font-weight: 600; color: var(--blue); text-decoration: underline; }
.owed-total { font-size: 32px; font-weight: 700; color: var(--ink); text-decoration: none; }
.owed-rows { list-style: none; margin: 8px 0 0; padding: 0; }
.owed-rows a { display: grid; grid-template-columns: 110px minmax(0, 1fr) auto; gap: 10px; align-items: center; min-height: 44px; color: var(--ink); text-decoration: none; }
.ow-bar { height: 10px; border-radius: 6px; background: var(--chart-track); overflow: hidden; }
.ow-bar i { display: block; height: 100%; border-radius: 6px; }
.ow-bar .ow-0 { background: var(--chart); } .ow-bar .ow-1 { background: color-mix(in srgb, var(--amber) 55%, var(--card)); } .ow-bar .ow-2 { background: color-mix(in srgb, var(--red) 70%, var(--card)); }
.feed-list { list-style: none; margin: 0; padding: 0; }
.feed-list li { padding: 8px 0 8px 14px; border-bottom: 1px solid var(--line); position: relative; }
.feed-list li::before { content: ''; position: absolute; left: 0; top: 15px; width: 7px; height: 7px; border-radius: 50%; background: var(--chart); }
.feed-list li:last-child { border-bottom: 0; }
.feed-list a { color: var(--ink); text-decoration: none; }

/* ---- The decision card (Approvals and the owner's home) -------------------------------------------------------------------- */
.decide-card { display: flex; flex-direction: column; gap: 10px; padding: 18px 20px; border-radius: var(--r-card); background: var(--card); border: 1px solid var(--line); box-shadow: var(--raise); }
.decide-card[hidden] { display: none; }
.dc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.dc-main { min-width: 0; }
.dc-kind { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--amber-bg); color: var(--amber); font-size: 12.5px; font-weight: 600; letter-spacing: .03em; }
html[data-theme] .dc-title { margin: 6px 0 2px; font-size: 20px; font-weight: 700; overflow-wrap: anywhere; }
.dc-title a { color: var(--ink); }
.dc-title .sub { font-weight: 400; }
.dc-who { font-size: 14px; color: var(--ink-2); }
.dc-amt { font-size: 26px; font-weight: 700; white-space: nowrap; }
.dc-facts .decide-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; margin: 8px 0 0; }
.dc-facts .decide-facts > div { display: block; padding: 8px 10px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); }
.dc-facts .decide-facts dt { font-size: 12.5px; color: var(--ink-2); margin: 0 0 2px; }
.dc-facts .decide-facts dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.dc-why { display: grid; grid-template-columns: minmax(160px, 240px) minmax(0, 1fr); gap: 12px; align-items: center; }
.dc-why:has(> :only-child) { grid-template-columns: minmax(0, 1fr); }
.dc-tip { grid-column: -2; margin: 0; padding: 10px 12px; border-radius: 12px; background: var(--next-bg); border-left: 3px solid var(--next-line); }
.dc-hist { grid-row: 1; }
.fig-bars .br { fill: color-mix(in srgb, var(--chart) 40%, var(--card)); } .fig-bars .br-now { fill: var(--accent); }
.dc-months { display: flex; justify-content: space-between; font-size: 11px; color: var(--ink-2); }
.dc-more > summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; color: var(--blue); text-decoration: underline; font-size: 14px; }
.dc-acts { flex-wrap: wrap; gap: 8px; }
.dc-acts button { min-height: 48px; padding-inline: 18px; }
.decide-card .dc-note input { min-height: 44px; }
.deck { display: flex; flex-direction: column; gap: 12px; max-width: 980px; }
.deck-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.deck-dots { display: flex; gap: 5px; } .deck-dots i { width: 18px; height: 4px; border-radius: 4px; background: var(--line-strong); } .deck-dots i.on { background: var(--accent); }
.deck-nav { justify-content: flex-end; }
.deck-nav button { min-height: 48px; }
.deck-all summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; }
.deck-all li { justify-content: space-between; gap: 10px; }
.deck-all .link-btn { min-height: 44px; text-align: left; }
.deck-top3 .deck-list { display: flex; flex-direction: column; gap: 12px; }
.deck-top3 .decide-card { padding: 14px 16px; }
.deck-top3 .dc-why { grid-template-columns: minmax(0, 1fr); }
.deck-top3 .dc-hist { display: none; }
.deck-top3 .dc-tip { grid-column: auto; }
.deck-top3 .dc-note { display: none; }
.decide-card .err:empty { display: none; }
.deck-top3 .decide-card:focus-within .dc-note { display: block; }

/* ---- My day in the field ------------------------------------------------------------------------------------------------------ */
.day-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 16px; align-items: start; }
.day-top > :empty { display: none; }
.day-top > #tech-job:not(:empty) { grid-column: 1 / -1; }
.me-ring { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; align-items: center; }
.ring-wrap { position: relative; width: 120px; height: 120px; }
.ring-pct { position: absolute; inset: 0; display: grid; place-items: center; font-size: 24px; font-weight: 700; }
.fig-ring .rg-track { fill: none; stroke: var(--chart-track); stroke-width: 12; }
.fig-ring .rg-done { fill: none; stroke: var(--chart); stroke-width: 12; stroke-linecap: round; }
.fig-ring .rg-pace { stroke: var(--accent); stroke-width: 4; stroke-linecap: round; }
.me-figs { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; min-width: 0; }
.moves .section-head { margin-bottom: 8px; }
.move-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.move { padding: 14px; border-radius: var(--r-card); background: var(--card); border: 1px solid var(--line); box-shadow: var(--raise-s); }
.move.first { border: 2px solid var(--accent); }
.mv-head { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.mv-who { font-size: 18px; font-weight: 700; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.mv-v { font-size: 18px; font-weight: 700; white-space: nowrap; }
.mv-acts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.mv-acts > * { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; text-align: center; }
.tech-job { display: flex; flex-direction: column; gap: 10px; border: 2px solid var(--accent); }
.tj-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
html[data-theme] .tj-title { margin: 2px 0; font-size: 20px; }
.tj-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.tj-steps li { display: flex; justify-content: space-between; gap: 10px; min-height: 36px; align-items: center; padding-left: 26px; position: relative; border-bottom: 1px solid var(--line); }
.tj-steps li::before { content: ''; position: absolute; left: 2px; top: 50%; width: 14px; height: 14px; margin-top: -7px; border-radius: 50%; border: 2px solid var(--line-strong); }
.tj-steps li.done::before { background: var(--green-bar); border-color: var(--green-bar); }
.tj-steps li.now { font-weight: 700; }
.tj-steps li.now::before { background: var(--accent); border-color: var(--accent); }
.tj-steps .num { color: var(--ink-2); font-size: 14px; }
.tj-promise { margin: 0; padding: 10px 12px; border-radius: 12px; background: var(--next-bg); }
.tj-promise.late { background: var(--red-bg); color: var(--red); }
.tj-go { min-height: 52px; font-size: 17px; justify-content: center; }

/* ---- The Team Board (office TV) ----------------------------------------------------------------------------------------------- */
.board-page { gap: 16px; }
.board-page:fullscreen { overflow: auto; padding: 28px 36px; background: var(--bg); font-size: 18px; }
.board-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
html[data-theme] .board-head h1 { font-size: 34px; margin: 2px 0 0; }
.road-card .section-head { flex-wrap: wrap; }
.road-figs { font-size: 18px; }
.road-figs strong { font-size: 26px; }
.road-stones { position: relative; height: 22px; margin: 10px 20px 0; font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.road-stones span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.road-stones span:last-child { transform: translateX(-100%); }
.road-stones span.on { color: var(--ink); }
.fig-road { display: block; width: 100%; height: 70px; }
.fig-road .rd-way { stroke: var(--chart-track); stroke-width: 18; stroke-linecap: round; }
.fig-road .rd-done { stroke: var(--accent); stroke-width: 18; stroke-linecap: round; }
.fig-road .rd-stone { fill: var(--card); stroke: var(--line-strong); stroke-width: 3; }
.fig-road .rd-stone.on { fill: var(--ink); stroke: var(--ink); }
.fig-road .rd-pace { stroke: var(--ink); stroke-width: 3; stroke-dasharray: 4 4; }
.board-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 16px; align-items: start; }
.board-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.board-grid > * { min-width: 0; }
.wins { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.wins li { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: 12px; background: var(--green-bg); }
.wins li .sub { color: var(--ink-2); }
table.effort td, table.effort th { padding: 8px 6px; }
.ef-bar { display: inline-block; vertical-align: middle; width: 90px; height: 8px; border-radius: 6px; background: var(--chart-track); overflow: hidden; }
.ef-bar i { display: block; height: 100%; border-radius: 6px; background: var(--chart); }
html[data-theme] .card.needs { background: var(--band); color: var(--band-ink); border-color: var(--band); }
.needs .eyebrow { color: var(--band-2); }
.needs-list { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.needs-list li { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.nd-n { font-size: 30px; font-weight: 700; color: var(--accent); }
.nd-v { font-weight: 600; }
.said { display: flex; align-items: baseline; gap: 10px; }
.said-v { font-size: 44px; font-weight: 700; }
.board-page blockquote { margin: 10px 0 0; padding: 10px 12px; border-left: 3px solid var(--chart); background: var(--bg); border-radius: 0 12px 12px 0; }

/* ---- Phones: one column, big targets ------------------------------------------------------------------------------------------ */
@media (max-width: 900px) {
  .home-top, .day-top, .board-grid, .board-grid.three { grid-template-columns: minmax(0, 1fr); }
  .vband { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* The flow line keeps its stages readable and scrolls sideways inside its card. */
  .flow { grid-template-columns: 5fr 3fr 4fr 1.2fr; min-width: 1120px; }
  .flow-card { overflow-x: auto; }
}
@media (max-width: 600px) {
  .vband { gap: 8px; padding: 8px; }
  .vband .vs { min-height: 84px; padding: 10px; }
  .vband .vs-v { font-size: 20px; }
  .vband .fig-spark { width: 44px; }
  .tank-body { grid-template-columns: 72px minmax(0, 1fr); gap: 12px; }
  .fig-tank { width: 72px; }
  .who-list a { grid-template-columns: 12px minmax(0, 1fr) auto; gap: 8px; }
  .who-list .sub { display: none; }
  .tank-num { font-size: 30px; }
  .tank-card .pagetabs.lines { display: flex; }
  .slip-grid { grid-template-columns: minmax(0, 1fr); }
  .decide-card { padding: 14px; }
  html[data-theme] .dc-title { font-size: 18px; }
  .dc-amt { font-size: 20px; }
  .dc-why { grid-template-columns: minmax(0, 1fr); }
  .dc-tip { grid-column: auto; }
  .dc-hist { display: none; }
  .dc-acts { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
  .deck-dots { display: none; }
  .me-ring { grid-template-columns: 96px minmax(0, 1fr); }
  .ring-wrap { width: 96px; height: 96px; } .ring-wrap .fig-ring { width: 96px; height: 96px; }
  .ring-pct { font-size: 20px; }
  .owed-rows a { grid-template-columns: 90px minmax(0, 1fr) auto; }
}

/* ==== Minimal colour (1.16, the owner's words: "minimal colour, not rainbow colours") ========================================= */
/* Earlier screens set hues of their own; here they become ink and greys. The accent stays on .primary / .approve (the next action), the
   alarm red on late, overdue and at risk. A chosen thing is ink, never orange. */
html[data-theme] :is(input, select, textarea, button, a, summary):focus-visible { outline-color: color-mix(in srgb, var(--ink) 55%, transparent); }
html[data-theme] .side .count, html[data-theme] :is(.bell, .bottom, .sheet-grid, .pagetabs, .side .ng-b a) .count { background: var(--ink); color: var(--card); }
html[data-theme] .pagetabs a.on .count { background: var(--card); color: var(--ink); }
html[data-theme] .tabs button.on { border-bottom-color: var(--ink); }
html[data-theme] button.primary[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--card); } /* a chosen filter chip */
html[data-theme] .danger { background: var(--card); border-color: var(--line-strong); color: var(--red); }
@media (max-width: 900px) { html[data-theme] .bottom a.active { box-shadow: inset 0 3px 0 var(--ink); } }
html[data-theme] .strip-figs button.strip-fig[aria-expanded="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
html[data-theme] .volt-fab { background: var(--ink); color: var(--card); box-shadow: var(--pop); }
html[data-theme] :is(dialog.dlg, .look-pop, .volt-pop, .chart-tip, .pp-pop, .ag-menu) { box-shadow: var(--pop); }
html[data-theme] :is(.tile-link, .dcard, .tool-card):hover { box-shadow: none; transform: none; }
html[data-theme] .me-chip { box-shadow: none; }
/* Business lines and tool groups are named, not coloured. */
html[data-theme] :is(.vl-fire, .vl-pump, .vl-water, .vl-other) { background: var(--grey-bg); color: var(--grey); }
html[data-theme] .tool-group { --g: var(--ink-2); --gt: var(--grey-bg); }
html[data-theme] .tool-card:hover { border-color: var(--line-strong); }
html[data-theme="dark"] .tool-card .count { background: var(--grey-bg); }
/* Avatars: initials in ink on the card, no colour fill. */
html[data-theme] .av-i, .av-s { background: var(--card); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line-strong); }
/* Status: the stage bar, My day's rows, insights, meters, timesheet progress, field legends. */
html[data-theme] .progress .s.done { background: var(--ink-2); }
html[data-theme] .progress .s.now { background: var(--ink); }
html[data-theme] .lead-history button.chip.on { background: var(--ink); border-color: var(--ink); color: var(--card); }
html[data-theme] .ag-kind, html[data-theme] .ag-kind.task { background: var(--line-strong); }
html[data-theme] .ag.is-late .ag-kind { background: var(--red); }
html[data-theme] .list.notif li.unread .dot, html[data-theme] .pp-dot { background: var(--ink); }
html[data-theme] .pp-chip[aria-expanded="true"] { border-color: var(--ink); }
html[data-theme] :is(.insight.amber, .insight.green, .insight.info) .bar { background: var(--ink-2); }
html[data-theme] .meter { background: var(--chart-track); }
html[data-theme] :is(.ts-progress.good, .ts-progress.mid) .bar span { background: var(--ink-2); }
html[data-theme] .ts-progress.good .state { color: var(--ink); }
html[data-theme] .ts-progress.low .bar span { background: var(--red); }
html[data-theme] .goal-fill.done { background: var(--ink); } html[data-theme] .goal-fill.behind { background: var(--red); }
html[data-theme] .or-bar i { background: var(--ink-2); }
html[data-theme] .sc-res { background: var(--grey-bg); color: var(--ink); }
html[data-theme] .sc-card.is-urgent:not(.is-late) { border-left-color: var(--ink); }
html[data-theme] .trip-card.on { border-left-color: var(--ink); background: var(--card); }
html[data-theme] .live-dot { background: var(--ink); }
html[data-theme] .wm-legend .lg.start { background: var(--ink); } html[data-theme] .wm-legend .lg.visit { background: #5C6875; }
html[data-theme] .tl-stop.visit .tl-dot { background: #5C6875; }
html[data-theme] .check input { accent-color: var(--ink); }
html[data-theme] .dropzone:is(:hover, .over, :focus-visible) { border-color: var(--ink-2); background: var(--bg); }
/* No gradients. */
html[data-theme] .ts-entries li.fix { background: var(--red-bg); }
html[data-theme] :is(.muted.loading, #page > p.muted) { background: none; }
html[data-theme] .rh-c.off { background: transparent; box-shadow: inset 0 0 0 1px var(--line); }

/* The 1.16 pieces in the same few colours. */
.vband .fig-spark polyline { stroke: var(--band-ink); } .vband .fig-spark circle { fill: var(--band-ink); }
.vband .vs-s.bad { color: var(--band-bad, #F3B0A7); font-weight: 600; }
html[data-theme="dark"] .vband { --band-bad: #EFA79E; }
.fig-tank .tk-pace, .fig-ring .rg-pace, .fig-road .rd-pace { stroke: var(--ink); }
.fig-ring .rg-done { stroke: var(--chart); }
.fig-road .rd-done { stroke: var(--ink-2); }
/* The hovered or chosen person's layer stays, the others step back (named beside the tank, never by hue alone). */
.fig-tank rect { transition: opacity .15s; }
.fig-tank.focus rect:not(.hi):not(.tk-glass) { opacity: .25; }
.who-list a.hi { background: var(--sd-soft); }
.tk-dot { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 20%, transparent); }
.fl-st.late { background: var(--bg); }
/* The day's list below the cards: its buttons are plain (the accent belongs to the first card above). */
html[data-theme] :is(.agenda-now, .cover-now, .agenda-later) :is(.primary, .approve) { background: var(--card); border-color: var(--line-strong); color: var(--ink); }
.fl-won { background: var(--bg); color: var(--ink); border: 1px solid var(--line); }
.fl-won .fl-name { color: var(--ink-2); }
.fl-bar::after { opacity: 1; } .ph-lead .fl-bar::after { opacity: .55; } .ph-inquiry .fl-bar::after { opacity: .75; }
.slip-n { color: var(--ink); }
.slip-go, .dc-more > summary { color: var(--ink); }
.ow-bar .ow-1 { background: var(--ink-2); }
.feed-list li::before { background: var(--line-strong); }
.dc-kind { background: var(--grey-bg); color: var(--grey); }
.dc-tip { border-left-color: var(--ink-2); }
.fig-bars .br { fill: var(--line-strong); } .fig-bars .br-now { fill: var(--ink); }
.deck-dots i.on { background: var(--ink); }
.tech-job { border: 1px solid var(--line); }
.tj-steps li.done::before { content: '✓'; display: grid; place-items: center; background: transparent; border-color: var(--ink-2); color: var(--ink); font-size: 10px; font-weight: 700; line-height: 1; }
.tj-steps li.now::before { background: var(--card); border: 3px solid var(--ink); }
.wins li { background: var(--bg); border: 1px solid var(--line); }
.nd-n { color: var(--band-ink); }
.rh-c.rh-1 { background: color-mix(in srgb, var(--ink) 16%, var(--card)); } .rh-c.rh-2 { background: color-mix(in srgb, var(--ink) 34%, var(--card)); }
.rh-c.rh-3 { background: color-mix(in srgb, var(--ink) 56%, var(--card)); } .rh-c.rh-4 { background: color-mix(in srgb, var(--ink) 80%, var(--card)); }
/* Heatmaps: one ink ramp; the figure in the cell is written and stays readable (light text on the two darkest steps). */
html[data-theme] .hm-cell.hm-1 { background: color-mix(in srgb, var(--ink) 9%, var(--card)); }
html[data-theme] .hm-cell.hm-2 { background: color-mix(in srgb, var(--ink) 20%, var(--card)); }
html[data-theme] .hm-cell.hm-3 { background: color-mix(in srgb, var(--ink) 62%, var(--card)); color: var(--card); }
html[data-theme] .hm-cell.hm-4 { background: color-mix(in srgb, var(--ink) 82%, var(--card)); color: var(--card); }
html[data-theme] :is(.hm-cell.hm-3, .hm-cell.hm-4) small { color: var(--card); }
html[data-theme="dark"] .hm-cell.hm-1 { background: color-mix(in srgb, var(--ink) 9%, var(--card)); }
html[data-theme="dark"] .hm-cell.hm-2 { background: color-mix(in srgb, var(--ink) 20%, var(--card)); }
html[data-theme="dark"] .hm-cell.hm-3 { background: color-mix(in srgb, var(--ink) 62%, var(--card)); }
html[data-theme="dark"] .hm-cell.hm-4 { background: color-mix(in srgb, var(--ink) 82%, var(--card)); }

/* ---- Decide or do next: the top of every My day (public/js/views/nextup.js) ------------------------------------------------- */
/* At most three cards. Only the first carries the accent (its main button and a 2 px edge); the others are plain, so one orange thing
   is on screen at a time. */
.nx { display: flex; flex-direction: column; gap: 10px; }
.nx-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.nx-list > li > :is(.decide-card, .move, .tech-job, .nx-card) { margin: 0; }
html[data-theme] .nx-list > li:first-child > :is(.decide-card, .move, .tech-job, .nx-card) { border: 2px solid var(--accent); }
html[data-theme] .nx-list > li:not(:first-child) :is(.primary, .approve) { background: var(--card); border-color: var(--line-strong); color: var(--ink); font-weight: 600; }
html[data-theme] .nx-list > li:not(:first-child) :is(.primary, .approve):hover:not(:disabled) { background: var(--sd-soft); border-color: var(--line-strong); }
/* A decision card in the list is the short form: the note opens when the card is in use, the history chart stays on Approvals. */
.nx-list .decide-card { padding: 14px 16px; }
.nx-list .dc-why { grid-template-columns: minmax(0, 1fr); }
.nx-list .dc-hist { display: none; }
.nx-list .dc-tip { grid-column: auto; }
.nx-list .dc-note { display: none; }
.nx-list .decide-card:focus-within .dc-note { display: block; }
/* The lead page (the owner's decision, 30 Nov 2026): one orange thing, the true next step. "Record quotation" is a plain button
   (views/lead-actions.js); the bar's Log is the next step, unless the next-step card holds an approved quotation to send: then that is.
   Everything else in the left column (PO received, Call, the folds' Save and E-mail) is plain. */
html[data-theme] body:has(.lead-next .send-now .primary) :is(.lead-actions, .lead-quick) .primary,
html[data-theme] .lead-left :is(.primary, .dark-btn, .approve):not(.send-now .primary) { background: var(--card); border-color: var(--line-strong); color: var(--ink); }
/* The fixed buttons at the bottom right (the assistant, "View as mobile") never cover a side panel's last card: a sticky rail ends above
   them and scrolls inside itself when it is taller (the page itself ends with 96 px to spare, app.css). */
@media screen and (min-width: 1201px) { .rail { max-height: calc(100dvh - 76px - 96px); overflow-y: auto; overscroll-behavior: contain; } }
/* The top bar's "+ New lead" is always there, so it is ink, not the accent: orange is kept for this moment's next action. */
html[data-theme] .top-actions .btn.primary { background: var(--ink); border-color: var(--ink); color: var(--card); }
.nx-card { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border-radius: var(--r-card); background: var(--card); border: 1px solid var(--line); }
.nx-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.nx-head > div { min-width: 0; }
html[data-theme] .nx-title { margin: 4px 0 0; font-size: 18px; font-weight: 700; overflow-wrap: anywhere; }
.nx-title a { color: var(--ink); text-decoration: none; }
.nx-amt { font-size: 20px; font-weight: 700; white-space: nowrap; }
.nx-why { margin: 0; color: var(--ink); }
.nx-why.bad, .verdict.bad { color: var(--red); font-weight: 600; }
.nx-meta { font-size: 14px; color: var(--ink-2); }
.nx-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.nx-acts > * { min-height: 48px; padding-inline: 18px; }
.nx-month { list-style: none; margin: 0; padding: 0; }
.nx-month a { display: flex; justify-content: space-between; gap: 10px; min-height: 44px; align-items: center; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.nx-month li:last-child a { border-bottom: 0; }
.nx-empty { padding: 14px 16px; border-radius: var(--r-card); border: 1px dashed var(--line-strong); color: var(--ink-2); margin: 0; }
.nx-rest > summary, .nx-waiting > summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; color: var(--ink); }
.nx-rest ul, .nx-waiting ul { list-style: none; margin: 0; padding: 0; }
.nx-rest li a, .nx-waiting li a { display: flex; justify-content: space-between; gap: 10px; min-height: 44px; align-items: center; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.nx-rest li .sub, .nx-waiting li .sub { text-align: right; }
.send-now { margin: 4px 0 10px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--card); }
.send-now .sub { margin: 2px 0 8px; }
.verdict { margin: 0; font-size: 14px; color: var(--ink-2); overflow-wrap: anywhere; }
.figs-head { margin: 6px 0 -6px; }
html[data-theme] .day-jump { min-height: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; text-underline-offset: 3px; }

/* ---- Fits at every width (the 1.16 audit, docs/ux/predeploy-workflow.md L1-L12) ------------------------------------------------ */
/* Money never breaks inside itself; a long name wraps instead of pushing the page wider than the phone. */
.vs-v, .tank-num, .nx-amt, .mv-v, .dc-amt, .owed-total, .slip-v, .who-list .num { white-space: nowrap; }
.me-figs, .tank-figs, .nx-card, .move { min-width: 0; overflow-wrap: anywhere; }
.me-figs .pill, .tank-figs .pill, .nx .pill { white-space: normal; }
html[data-theme] .mv-acts > * { overflow-wrap: normal; padding-inline: 6px; }
/* "Who filled it" runs the width of the card under the tank, so names are never squeezed. */
.tank-card .who-list { margin-top: 4px; }
.who-list a { grid-template-columns: 14px minmax(0, 1fr) auto 52px; }
/* Team Board: each milestone's words under its dot (--at, the place figsvg.js roadAt gives the dot), the date below the amount; the team's
   own mark ("Today 114%") at the end of the road once the target is passed. On a narrow screen they become a row of words. */
.road-card ol.road-stones { position: relative; height: 44px; list-style: none; margin: 4px 0 0; padding: 0; }
.road-card ol.road-stones li { position: absolute; left: var(--at); transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; color: var(--ink-2); white-space: nowrap; line-height: 1.3; }
.road-card ol.road-stones li.now { transform: translateX(-100%); align-items: flex-end; top: -78px; }
.road-card ol.road-stones span, .road-card ol.road-stones span:last-child { position: static; transform: none; }
.road-card ol.road-stones li.on { color: var(--ink); }
.fig-road .rd-now { stroke: var(--ink); stroke-width: 4; }
@media (max-width: 900px) {
  .road-card ol.road-stones { height: auto; display: flex; flex-wrap: wrap; gap: 6px 18px; }
  .road-card ol.road-stones li, .road-card ol.road-stones li.now { position: static; transform: none; align-items: flex-start; flex-direction: row; gap: 6px; }
}
.board-head .verdict { font-size: 18px; }
/* Every board figure opens its list. */
.road-card a.road-figs { color: var(--ink); text-decoration: none; }
.needs-list li { display: block; }
.needs-list li a { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 10px; align-items: center; min-height: 44px; color: inherit; text-decoration: none; }
.wins a { color: var(--ink); text-decoration: none; }
table.effort { width: 100%; }
@media (max-width: 1100px) { table.effort .ef-bar { display: none; } table.effort td, table.effort th { padding: 8px 4px; } }
/* A name beside a figure in a short list gives way to the figure (the dashboard's side lists at about 800 px). */
.card .list li > :first-child { min-width: 0; overflow-wrap: anywhere; }
.card .list li > .num { flex: none; white-space: nowrap; }
/* Two figures side by side only where both have room; a lone card spans the row. */
.home-pair > :only-child, .home-pair > :empty + *, .home-pair > :has(+ :empty) { grid-column: 1 / -1; }
.home-pair > :empty { display: none; }
/* The flow line: every stage name whole, broken only at spaces (a column is at least as wide as its longest word), and the "overdue"
   links of all three phases on one line under their columns (each phase fills the row's height, its columns fill the phase). */
.fl-col { display: grid; grid-template-rows: 1fr auto; }
.fl-st { overflow: visible; }
.fl-name { overflow-wrap: normal; word-break: normal; hyphens: manual; -webkit-hyphens: manual; }
.flow { grid-template-columns: minmax(min-content, 5fr) minmax(min-content, 3fr) minmax(min-content, 4fr) minmax(76px, 1fr); }
.fl-cols { grid-auto-columns: minmax(min-content, 1fr); grid-auto-rows: 1fr; flex: 1; }
@media (max-width: 1200px) {
  .flow { grid-template-columns: minmax(0, 1fr); min-width: 0; }
  .flow-card { overflow: visible; }
  .fl-cols { grid-auto-flow: row; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
  .fl-st { min-height: 112px; }
  .fl-won { min-height: 0; flex-direction: row; align-items: baseline; justify-content: flex-start; gap: 10px; }
}
@media (max-width: 600px) {
  .nx-card { padding: 12px 14px; }
  .nx-acts { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
  html[data-theme] .nx-title { font-size: 17px; }
  .nx-amt { font-size: 18px; }
}
/* 1.17: an order held until this customer pays, under its amount on Collections */
.cl-held { margin-top: 4px; font-size: 13px; font-variant-numeric: normal; text-align: inherit; }
.cl-held a { color: var(--ink); }

/* 1.18: My shortcuts (public/js/quickjump.js). Pins and shortcuts are ink and greys, never the accent: the orange stays for the one
   next action. The Quick jump button in the top bar, the sheet (a dialog), the side panel's group (drawn like the menu) and the pin on
   each card of All tools. */
html[data-theme] .top-actions .qj-open { display: inline-flex; align-items: center; gap: 6px; min-width: 44px; min-height: 44px; justify-content: center; }
.tool-item { position: relative; display: grid; }
.tool-item .tool-card { padding-right: 60px; }
.tool-item .tool-card .count { right: 60px; }
html[data-theme] button.pin-btn { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; min-height: 44px; padding: 0;
  display: grid; place-items: center; border: 1px solid transparent; border-radius: var(--r-ctl); background: transparent; color: var(--ink-2); box-shadow: none; }
html[data-theme] button.pin-btn:hover { background: var(--bg); color: var(--ink); }
html[data-theme] button.pin-btn[aria-pressed="true"] { background: var(--bg); border-color: var(--line-strong); color: var(--ink); }
html[data-theme] button.pin-btn[aria-pressed="true"] svg { fill: currentColor; }
dialog.qj { max-width: min(440px, calc(100vw - 32px)); }
.qj-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.qj-top h2 { margin: 0; }
html[data-theme] button.qj-b { min-width: 44px; min-height: 44px; padding: 0; display: inline-grid; place-items: center; background: transparent; border: 1px solid var(--line); border-radius: var(--r-ctl); color: var(--ink); box-shadow: none; font-size: 18px; }
html[data-theme] button.qj-b:disabled { opacity: .35; }
.qj-top button.qj-b { border-color: transparent; }
.qj-list { display: grid; }
.qj-list a { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 6px 4px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.qj-list a:last-child { border-bottom: 0; }
.qj-list a:hover { background: var(--bg); }
.qj-list .ni { display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink-2); flex: 0 0 auto; }
.qj-edit { list-style: none; margin: 0; padding: 0; display: grid; }
.qj-edit li { display: flex; align-items: center; gap: 6px; min-height: 52px; border-bottom: 1px solid var(--line); }
.qj-edit li:last-child { border-bottom: 0; }
.qj-name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.qj-acts { margin-top: 12px; flex-wrap: wrap; gap: 8px; }
.qj-acts > * { min-height: 44px; }
