/* AutoSteward — control surfaces (buttons, tabs, chips, quiet actions)
 * =====================================================================
 * ONE authority for what a control looks like. Loaded last on purpose.
 *
 * WHY THIS FILE EXISTS — three measured defects, not a matter of taste:
 *
 * 1. Controls were painted for light mode and then patched back for dark with a
 *    slab of `html[data-theme="dark"] … !important` rules. That patch keys on the
 *    APPEARANCE, but `midnight` is a dark design in BOTH of its appearances
 *    (--canvas #071120 at data-theme="light"). So the patch never fires there and
 *    you get a white button with a #9eb1c6 border sitting on a near-black page.
 *
 * 2. Those dark patches hardcode #156fbd / #2d8bd5 / #1768b2. Measured across all
 *    ten designs in dark mode, every primary button came back rgb(21,111,189) —
 *    one blue for nine distinct accents. Picking Ledger (green) or Teal or Onyx
 *    (grey) changed nothing. The design picker was silently dead for controls.
 *
 * 3. `.security-filter-button` was `color:#26445f` on a transparent face with a
 *    transparent border and no dark-mode correction anywhere — 1.72:1 text on
 *    every dark surface. Invisible, 20 of 20 design x appearance combinations.
 *
 * THE FIX — derive from polarity, never from `data-theme`.
 * Every design already declares --ink and --surface as opposite poles. So
 * `color-mix(in srgb, var(--ink) 28%, transparent)` is a dark edge on a light
 * design and a light edge on a dark one, with no branch and nothing to keep in
 * sync. A design that is dark in its light appearance is handled for free.
 * That property is what `tests/test_controls.mjs` pins.
 *
 * BOUNDARY — this file sets colour, edge, shadow, focus and press. It never sets
 * geometry. Sizes, padding, min-height and gap stay in styles.css, because
 * contract tests pin gap:10px, padding:18px and min-height:32px, and a stray
 * declaration here would move them out from under those tests.
 *
 * NO COLOUR TRANSITIONS. Transitioning a property whose value comes from a custom
 * property freezes the old paint when the design axis changes, which is what broke
 * the live preview in the design picker once already. Only `transform` and
 * `box-shadow` animate here; the press state carries the feedback instead.
 */

:root{
  /* Face: the control's own fill. Mixing --ink INTO the surface darkens on a light
     design and lightens on a dark one — the same declaration, both polarities. */
  --ctl-face:            var(--surface-strong, #fff);
  --ctl-face-hover:      color-mix(in srgb, var(--ink) 8%,  var(--surface-strong, #fff));
  --ctl-face-active:     color-mix(in srgb, var(--ink) 15%, var(--surface-strong, #fff));
  --ctl-ink:             var(--ink);

  /* Edge: the thing that was missing. A control must be findable before it is
     readable, so every control gets one and it can never mix to transparent. */
  --ctl-edge:            color-mix(in srgb, var(--ink) 30%, transparent);
  --ctl-edge-hover:      color-mix(in srgb, var(--ink) 52%, transparent);
  --ctl-edge-quiet:      color-mix(in srgb, var(--ink) 26%, transparent);

  --ctl-shadow:          0 1px 2px color-mix(in srgb, var(--ink) 15%, transparent);
  --ctl-shadow-hover:    0 2px 5px color-mix(in srgb, var(--ink) 20%, transparent);

  /* Emphasis rides the design's own accent, which is the whole point of the picker, and it is
     now the accent ITSELF rather than a darkened version of it.

     It used to be deepened to 72%, because the raw swatch is a display colour and white is not
     readable on a bright one — white on Alpine's #0ea5e9 measured 2.7:1. That was the right fix
     for the wrong layer: it darkened the BUTTON so that a hardcoded white would fit, while the
     active nav block went on painting the raw accent with the same hardcoded white and stayed at
     2.6:1. Two surfaces, one colour, one of them quietly unreadable.

     Each palette now states --accent-ink, the text colour that belongs on its accent, so the
     deepening has nothing left to do — and while it was still here it pulled the other way,
     dropping a dark ink onto an already-dark bed (claret's dark primary measured 3.61:1).
     Dropping it also makes the primary button and the active page the same colour, which is what
     anyone would have assumed they were. tests/test_design_palettes.mjs holds the ink contrast. */
  --ctl-accent:          var(--accent, #0369a1);
  --ctl-accent-hover:    color-mix(in srgb, var(--accent, #0369a1) 86%, #000);
  --ctl-accent-ink:      var(--accent-ink, #fff);
  --ctl-ring:            color-mix(in srgb, var(--accent, #1768b2) 60%, transparent);

  /* Quiet actions read as text until touched. They still need a hit-surface. */
  --ctl-quiet-ink:       color-mix(in srgb, var(--accent, #1768b2) 72%, var(--ink));

  /* Tabs and pressed choices ride the design's accent too (owner, 2026-11-22, on the raised tabs: "all these buttons have to
     match with each theme not just these buttons any buttons or tabs that have this style"). They were one fixed blue on
     every design. The unchosen fill is the accent mixed into the control face, so it tints toward the design in light and
     in dark; the edge is pushed toward the ink, so it keeps its contrast with the bar in both polarities; text on the solid
     key is the design's own --accent-ink, which tests/test_design_palettes.mjs holds against the accent. Measured per
     design, light and dark, by tools/dev/walk/themed-tabs-probe.mjs. */
  --tab-key:             var(--ctl-accent);
  --tab-key-ink:         var(--ctl-accent-ink);
  --tab-key-fill:        color-mix(in srgb, var(--tab-key) 22%, var(--ctl-face));
  --tab-key-fill-hover:  color-mix(in srgb, var(--tab-key) 34%, var(--ctl-face));
  --tab-key-edge:        color-mix(in srgb, var(--tab-key) 72%, var(--ink));
  --tab-key-lip:         color-mix(in srgb, var(--tab-key) 60%, #000);
  --tab-key-rim:         color-mix(in srgb, var(--tab-key) 55%, #fff);
  --tab-key-ring:        color-mix(in srgb, var(--tab-key) 24%, transparent);
  --tab-key-glow:        color-mix(in srgb, var(--tab-key) 40%, transparent);
  --tab-key-tint:        color-mix(in srgb, var(--tab-key) 12%, var(--ctl-face));
}

/* ── The default control ────────────────────────────────────────────────────
   :root prefixes lift these to 0-2-0 so they beat the bare single-class rules
   in styles.css without needing !important. */
:root :is(.button, .desktop-action-button, .desktop-menu-button, .desktop-tab,
          .account-menu-button, .header-search-button, .icon-button, .system-close-button){
  color: var(--ctl-ink);
  background: var(--ctl-face);
  background-image: none;              /* kills the inherited #fff→#edf2f7 bevel */
  border: 1px solid var(--ctl-edge);
  box-shadow: var(--ctl-shadow);
  transition: box-shadow .12s ease, transform .06s ease;
}

:root :is(.button, .desktop-action-button, .desktop-menu-button, .desktop-tab,
          .account-menu-button, .header-search-button, .icon-button,
          .system-close-button):hover:not(:disabled):not([aria-disabled="true"]){
  color: var(--ctl-ink);
  background: var(--ctl-face-hover);
  border-color: var(--ctl-edge-hover);
  box-shadow: var(--ctl-shadow-hover);
}

/* Press is the feedback, since colour cannot animate. The control goes down and
   its shadow collapses under it — a physical grip, matching the wheel mark. */
:root :is(.button, .desktop-action-button, .desktop-menu-button, .desktop-tab,
          .account-menu-button, .header-search-button, .icon-button,
          .system-close-button):active:not(:disabled){
  background: var(--ctl-face-active);
  box-shadow: inset 0 1px 2px color-mix(in srgb, var(--ink) 22%, transparent);
  transform: translateY(1px);
}

/* ── Emphasis ─────────────────────────────────────────────────────────────── */
:root .button.primary,
:root .desktop-action-button.primary{
  color: var(--ctl-accent-ink);
  background: var(--ctl-accent);
  border-color: color-mix(in srgb, var(--ctl-accent) 74%, #000);
  box-shadow: var(--ctl-shadow);
}
:root .button.primary:hover:not(:disabled),
:root .desktop-action-button.primary:hover:not(:disabled){
  color: var(--ctl-accent-ink);
  background: var(--ctl-accent-hover);
  border-color: color-mix(in srgb, var(--ctl-accent) 58%, #000);
  box-shadow: var(--ctl-shadow-hover);
}

/* --red-solid, not --red.
 *
 * --red is tuned to be read as TEXT against the appearance's canvas, so the dark palette
 * defines it as a pale #ff8d96. Used here as a FILL under `color:#fff` it measured 2.21:1 in
 * dark across ALL TEN designs — every Delete, Purge and Remove button in the program had a
 * label you could not read, on exactly the buttons that must be understood before they are
 * pressed. --red-solid is the same red in light and a properly dark one in dark, so white
 * carries in both. Keep the two apart: a status colour and a fill colour want opposite
 * lightness, and one token cannot be both. */
:root .button.danger{
  color: #fff;
  background: var(--red-solid, #c9363e);
  /* Saturated fills can sit at the same luminance as a dark canvas, so the edge
     is what separates them — hue alone does not survive a greyscale check. */
  border-color: color-mix(in srgb, var(--red-solid, #c9363e) 58%, var(--ink));
}
:root .button.danger:hover:not(:disabled){
  background: color-mix(in srgb, var(--red-solid, #c9363e) 86%, #000);
  border-color: color-mix(in srgb, var(--red-solid, #c9363e) 40%, var(--ink));
}

/* 58% not 78%: the face is already tinted with the same hue, so the ink has to keep
   enough of --ink in it to stay apart from that face. Measured floor is midnight,
   whose light appearance is a dark surface -- 78% landed there at 3.99:1. */
:root .button.danger-outline{
  color: color-mix(in srgb, var(--red, #c9363e) 58%, var(--ink));
  background: color-mix(in srgb, var(--red, #c9363e) 9%, var(--surface-strong, #fff));
  border-color: color-mix(in srgb, var(--red, #c9363e) 46%, transparent);
}
:root .button.danger-outline:hover:not(:disabled){
  background: color-mix(in srgb, var(--red, #c9363e) 17%, var(--surface-strong, #fff));
  border-color: color-mix(in srgb, var(--red, #c9363e) 66%, transparent);
}

:root .button.warning-action{
  color: color-mix(in srgb, var(--amber, #a8650a) 58%, var(--ink));
  background: color-mix(in srgb, var(--amber, #a8650a) 12%, var(--surface-strong, #fff));
  border-color: color-mix(in srgb, var(--amber, #a8650a) 50%, transparent);
}
:root .button.warning-action:hover:not(:disabled){
  background: color-mix(in srgb, var(--amber, #a8650a) 20%, var(--surface-strong, #fff));
  border-color: color-mix(in srgb, var(--amber, #a8650a) 70%, transparent);
}

/* ── Quiet actions ──────────────────────────────────────────────────────────
   These are meant to read as text, but the owner's complaint is that they vanish.
   So: accent-derived ink that is always mixed against --ink (never a fixed blue
   that goes muddy on a dark canvas), and a real surface the moment you touch
   them. `.link-btn` keeps its inline flow — no border in the resting state. */
:root .link-btn{
  color: var(--ctl-quiet-ink);
  background: none;
  border: 0;
  border-radius:var(--r-control);
  text-decoration-line: underline;
  text-decoration-color: color-mix(in srgb, var(--ctl-quiet-ink) 38%, transparent);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  cursor: pointer;
}
:root .link-btn:hover:not(:disabled){
  color: color-mix(in srgb, var(--accent, #1768b2) 88%, var(--ink));
  text-decoration-color: currentColor;
}

:root :is(.header-help-button, .header-ask-button, .security-filter-button){
  color: var(--ctl-ink);
  background: transparent;
  border: 1px solid var(--ctl-edge-quiet);
  box-shadow: none;
  transition: box-shadow .12s ease, transform .06s ease;
}
:root :is(.header-help-button, .header-ask-button, .security-filter-button):hover:not(:disabled){
  color: var(--ctl-ink);
  background: var(--ctl-face-hover);
  border-color: var(--ctl-edge-hover);
}
:root :is(.header-help-button, .header-ask-button, .security-filter-button):active:not(:disabled){
  transform: translateY(1px);
}

/* The count pill inside a filter button. Was #435971 on #d8e3ed — a light chip
   with dark text, unreadable the moment the surrounding surface went dark. */
:root .security-filter-button strong{
  color: var(--ctl-ink);
  background: color-mix(in srgb, var(--ink) 13%, transparent);
}
:root .security-filter-button.active{
  color: var(--ctl-accent-ink);
  background: var(--ctl-accent);
  border-color: color-mix(in srgb, var(--ctl-accent) 74%, #000);
  box-shadow: var(--ctl-shadow);
}
:root .security-filter-button.active strong{
  color: var(--ctl-accent);
  background: var(--ctl-accent-ink);
}

/* ── Selected tabs ──────────────────────────────────────────────────────────
   Same story as the primary button: the dark patch pinned these to #1768b2 for
   every design. */
:root :is(.vehicle-tabs, .system-tools-tabs, .tools-section-tabs) button:is(.active, [aria-current="page"]),
:root .desktop-tab:is(.active, [aria-current="page"]),
:root .alignment-control-section .button.active{
  color: var(--ctl-accent-ink);
  background: var(--ctl-accent);
  border-color: color-mix(in srgb, var(--ctl-accent) 74%, #000);
}

/* ── Sale Wizard validation / Finance state ───────────────────────────────
   FIX135: controls.css is loaded last, so the state styling belongs here. Keeping
   these rules in styles.css allowed the default .button authority above to repaint
   the Finance control after Sale Wizard state classes had been applied. */
:root .button.sw-detail-button.sw-finance-ready{
  color: var(--ctl-ink);
  background: var(--ctl-face);
  border-color: var(--ctl-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ctl-accent) 62%, transparent), var(--ctl-shadow);
}
:root .button.sw-detail-button.sw-finance-ready:hover:not(:disabled){
  color: var(--ctl-ink);
  background: var(--ctl-face-hover);
  border-color: var(--ctl-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ctl-accent) 72%, transparent), var(--ctl-shadow-hover);
}
:root .button.sw-detail-button.sw-finance-ready b{
  color: var(--ctl-accent-ink);
  background: var(--ctl-accent);
}

:root .button.sw-detail-button.sw-finance-complete{
  color: var(--ctl-ink);
  background: var(--ctl-face);
  border-color: var(--pui-ok, #1c7a4a);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--pui-ok, #1c7a4a) 68%, transparent), var(--ctl-shadow);
}
:root .button.sw-detail-button.sw-finance-complete:hover:not(:disabled){
  color: var(--ctl-ink);
  background: var(--ctl-face-hover);
  border-color: var(--pui-ok, #1c7a4a);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--pui-ok, #1c7a4a) 78%, transparent), var(--ctl-shadow-hover);
}
:root .button.sw-detail-button.sw-finance-complete b{
  color: #fff;
  background: var(--pui-ok, #1c7a4a);
}

/* Stale BHPH deliberately keeps the existing amber/orange badge. It means the
   schedule existed but an upstream amount changed and generation is required. */
:root .button.sw-detail-button.sw-finance-stale b{
  color: #fff;
  background: var(--pui-warn, #9a6700);
}

/* Required data must be visually unmistakable. The prior 16% ring was too faint
   on the dark Sale Wizard. Keep the field face readable while making the edge and
   outer ring explicit. */
:root .sw-field :is(input, select).sw-missing,
:root .sw-detail-button.sw-missing{
  border-color: var(--pui-risk, #b4341f) !important;
  /* The ring, then a soft red glow around it (owner, 2026-10-23: "glow in red"). */
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--pui-risk, #b4341f) 62%, transparent),
              0 0 16px 2px color-mix(in srgb, var(--pui-risk, #b4341f) 45%, transparent) !important;
}
:root .sw-field :is(input, select).sw-missing:focus{
  border-color: var(--pui-risk, #b4341f) !important;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--pui-risk, #b4341f) 76%, transparent),
              0 0 18px 3px color-mix(in srgb, var(--pui-risk, #b4341f) 50%, transparent) !important;
}
/* Colour alone is not enough to say "you must fill this": the label says it too, and stops saying it
   the moment the box is filled, because it keys off the same class. */
:root .sw-field:has(> [data-sw-required].sw-missing) > span::after{
  content: "Required";
  margin-left: 8px;
  color: var(--pui-risk, #b4341f);
  font-size: var(--fs-small);
  font-weight: 600;
}

/* ── Disabled ───────────────────────────────────────────────────────────────
   Muted rather than faded to nothing: opacity alone on a dark canvas dissolves
   the control completely. */
:root :is(.button, .desktop-action-button, .desktop-menu-button, .desktop-tab,
          .link-btn, .security-filter-button):disabled,
:root :is(.button, .desktop-action-button)[aria-disabled="true"]{
  color: color-mix(in srgb, var(--ink) 42%, transparent);
  background: color-mix(in srgb, var(--ink) 5%, var(--surface, #fff));
  border-color: var(--ctl-edge-quiet);
  box-shadow: none;
  transform: none;
  opacity: 1;
  cursor: not-allowed;
  text-decoration: none;
}

/* ── Focus ──────────────────────────────────────────────────────────────────
   One ring everywhere, on the design's accent, offset so it never sits on top of
   the control's own edge. */
:root :is(.button, .desktop-action-button, .desktop-menu-button, .desktop-tab,
          .link-btn, .header-help-button, .header-ask-button, .header-search-button,
          .security-filter-button, .account-menu-button, .icon-button):focus-visible{
  outline: 2px solid var(--ctl-accent);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px var(--ctl-ring);
}

/* Windows high-contrast: system colours must win outright, and translucent
   color-mix edges are dropped there. */
@media (forced-colors: active){
  :root :is(.button, .desktop-action-button, .desktop-menu-button, .desktop-tab,
            .header-help-button, .security-filter-button, .account-menu-button,
            .header-search-button, .icon-button){
    border: 1px solid ButtonBorder;
    box-shadow: none;
  }
}

@media (prefers-reduced-motion: reduce){
  :root :is(.button, .desktop-action-button, .desktop-menu-button, .desktop-tab,
            .header-help-button, .security-filter-button):active{
    transform: none;
  }
}

/* FIX140 — compact page tabs use the same unmistakable selected state as Sales (the design's accent since 2026-11-22).
 * This file loads last, so keep this authority here rather than fighting it in styles.css. */
:root :is(.system-tools-tabs,.titles-tabs,.financial-top-tabs) button:is(.active,[aria-current="page"]),
:root .ws-tabs .ws-tab[aria-current="page"]{
  color:var(--tab-key-ink);
  background:var(--tab-key);
  border-color:var(--tab-key-rim);
  box-shadow:0 0 0 2px var(--tab-key-ring),0 4px 12px var(--tab-key-glow);
}

/* FIX161 — Inventory Insights: one compact page with top tabs, management periods and
 * record-level drill-downs. Financial visibility is enforced by the launcher; these styles are
 * presentation only and must never be treated as a permission boundary. */
:root .insights-tabs{
  display:flex;flex-wrap:wrap;gap:6px;margin:0 0 16px;padding:6px;
  width:max-content;max-width:100%;border:1px solid var(--ctl-edge-quiet);
  border-radius:12px;background:color-mix(in srgb,var(--surface,#fff) 94%,var(--ink) 6%);
}
:root .insights-tab{
  min-height:36px;padding:8px 14px;border:1px solid transparent;border-radius:9px;
  background:transparent;color:var(--ink);font:inherit;font-weight:700;cursor:pointer;
}
:root .insights-tab.is-active{
  color:var(--tab-key-ink);background:var(--tab-key);border-color:var(--tab-key-rim);
  box-shadow:0 0 0 2px var(--tab-key-ring),0 3px 10px var(--tab-key-glow);
}
:root .insights-periods{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0 14px}
:root .insights-custom-dates{display:flex;flex-wrap:wrap;gap:12px;margin:-2px 0 14px}
:root .insights-custom-dates label{display:grid;gap:6px;font-weight:700}
:root .insights-custom-dates input{min-height:38px}
:root .insights-management{margin-top:16px}
:root .insights-kpi{appearance:none;text-align:left;font:inherit;color:inherit;cursor:pointer;width:100%}
:root .insights-kpi.is-active{outline:2px solid var(--ctl-accent);outline-offset:2px}
:root .insights-filterbar{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin:12px 0}
:root .insights-filterbar .search{flex:1 1 280px;min-width:220px}
:root .insights-filterbar select{min-height:40px;max-width:280px}
:root .insights-row-actions{display:flex;flex-wrap:wrap;gap:6px;white-space:nowrap}
:root .insights-negative{color:var(--red,#b4341f);font-weight:700}
:root .insights-drilldown{margin-top:14px}
@media (max-width:700px){
  :root .insights-tabs{width:100%}
  :root .insights-tab{flex:1 1 calc(50% - 6px)}
  :root .insights-filterbar .search,:root .insights-filterbar select{width:100%;max-width:none;flex-basis:100%}
}

/* FIX161 R2 — Inventory Insights owner-test UX correction.
 * Keep the page dense and managerial: compact summary cards, real KPI cards instead of a flat
 * ruled strip, an unmistakable selected KPI, and useful content immediately under the controls. */
:root .insights-shell{max-width:1480px;margin:0 auto;display:grid;gap:14px}
:root .insights-overview-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
:root .insights-summary-card{padding:16px 18px;border:1px solid var(--line);border-radius:12px;background:var(--surface);box-shadow:var(--shadow);min-width:0}
:root .insights-summary-card>strong{display:block;margin:2px 0 9px;color:var(--ink);font-size:var(--fs-h2);line-height:var(--lh-h2);letter-spacing:-.02em}
:root .insights-summary-card>div{display:flex;flex-wrap:wrap;gap:6px 12px;color:var(--muted);font-size:var(--fs-small)}
:root .insights-summary-card .risk{color:var(--red);font-weight:700}
:root .insights-management{margin-top:0;padding:0;overflow:visible}
:root .insights-management-head{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;padding:16px 18px 10px;border-bottom:1px solid var(--line)}
:root .insights-management-head h2{margin:0;color:var(--ink);font-size:var(--fs-h2)}
:root .insights-management-head p:not(.eyebrow){margin:4px 0 0;color:var(--muted);font-size:var(--fs-small)}
:root .insights-management-head .insights-periods{justify-content:flex-end;margin:0}
:root .insights-management-head .insights-custom-dates{margin:8px 0 0}
:root .insights-financial-grid{grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;margin:0;padding:12px 14px;border:0;border-radius:0;background:transparent;overflow:visible}
:root .insights-financial-grid .insights-kpi{position:relative;display:flex;min-height:96px;padding:14px 14px;border:1px solid var(--line);border-radius:11px;background:var(--surface-soft);box-shadow:none;transition:transform .14s ease,border-color .14s ease,box-shadow .14s ease,background .14s ease}
:root .insights-financial-grid .insights-kpi:first-child{border-left:1px solid var(--line)}
:root .insights-financial-grid .insights-kpi:hover{transform:translateY(-2px);border-color:color-mix(in srgb,var(--blue) 45%,var(--line));box-shadow:0 6px 14px color-mix(in srgb,var(--ink) 10%,transparent)}
:root .insights-financial-grid .insights-kpi.is-active{border:2px solid var(--blue);background:color-mix(in srgb,var(--blue) 16%,var(--surface));box-shadow:0 8px 20px color-mix(in srgb,var(--blue) 20%,transparent),inset 0 0 0 1px color-mix(in srgb,var(--blue) 35%,transparent);outline:0;transform:translateY(-2px)}
:root .insights-financial-grid .insights-kpi.is-active .kpi-copy strong{color:var(--ink);font-weight:700}
:root .insights-financial-grid .insights-kpi.is-active .kpi-copy strong::before{background:var(--blue)}
:root .insights-financial-grid .insights-kpi.danger.is-active{border-color:var(--red);background:color-mix(in srgb,var(--red) 12%,var(--surface));box-shadow:0 8px 20px color-mix(in srgb,var(--red) 15%,transparent)}
/* The label keeps clear of the corner badge. At 1180px a KPI card is ~160px wide and "Avg Front Gross" ran
   under "VIEW" (measured by tools/dev/walk); the label now wraps short of the badge: "VIEW" needs
   36px, the active card's "VIEWING" 62px (both measured). */
:root .insights-financial-grid .insights-kpi .kpi-copy>strong{padding-right:36px}
:root .insights-financial-grid .insights-kpi.is-active .kpi-copy>strong{padding-right:62px}
:root .insights-kpi-state{position:absolute;right:10px;top:9px;color:var(--muted);font-size:var(--fs-micro);font-weight:700;text-transform:uppercase;letter-spacing:.06em}
:root .insights-kpi.is-active .insights-kpi-state{color:var(--blue)}
:root .insights-kpi.danger.is-active .insights-kpi-state{color:var(--red)}
:root .insights-detail-link{display:flex;align-items:center;gap:12px;padding:10px 16px;margin:0 14px;border-left:3px solid var(--blue);background:color-mix(in srgb,var(--blue) 7%,transparent)}
:root .insights-detail-link strong{color:var(--ink)}
:root .insights-detail-link span{color:var(--muted);font-size:var(--fs-small)}
:root .insights-management>.insights-filterbar{margin:10px 14px}
:root .insights-management>.insights-drilldown{margin:0 14px 14px}
:root .insights-stat-strip{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:0;border:1px solid var(--line);border-radius:11px;background:var(--surface);overflow:hidden}
:root .insights-stat-strip>div{padding:12px 14px;border-left:1px solid var(--line)}
:root .insights-stat-strip>div:first-child{border-left:0}
:root .insights-stat-strip span{display:block;color:var(--muted);font-size:var(--fs-small)}
:root .insights-stat-strip strong{display:block;margin-top:2px;color:var(--ink);font-size:var(--fs-lead)}
:root .insights-stat-strip .risk strong{color:var(--red)}
:root .insights-highlights{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;padding:0 14px 12px}
:root .insights-highlight{padding:10px 12px;border:1px solid var(--line);border-radius:9px;background:var(--surface-soft);min-width:0}
:root .insights-highlight span,:root .insights-highlight small{display:block;color:var(--muted);font-size:var(--fs-small);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
:root .insights-highlight strong{display:block;margin:2px 0;color:var(--ink);font-size:var(--fs-lead)}
:root .insights-highlight.bad strong{color:var(--red)}
:root .insights-highlight.good strong{color:var(--green)}
:root .insights-attention{margin-top:0}
:root .insights-reasons{display:flex;flex-wrap:wrap;gap:4px}
:root .insights-reason{display:inline-flex;padding:4px 8px;border-radius:999px;background:var(--ambersoft);color:var(--amber);font-size:var(--fs-micro);font-weight:700;white-space:nowrap}
:root .insights-data-warning{background:color-mix(in srgb,var(--red) 7%,transparent)}
:root .insights-inline-warning{display:block;margin-top:2px;color:var(--red);font-weight:700;font-size:var(--fs-micro)}
:root .insights-market-note{display:block;margin-top:3px;color:var(--muted);font-size:var(--fs-micro)}
:root .insights-position-alert{color:var(--amber)}
:root .insights-filterbar{margin:0;gap:8px}
:root .insights-sold .insights-highlights{padding-top:0}
@media (max-width:1100px){
  :root .insights-overview-grid{grid-template-columns:1fr 1fr}
  :root .insights-financial-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  :root .insights-highlights{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media (max-width:760px){
  :root .insights-overview-grid{grid-template-columns:1fr}
  :root .insights-management-head{align-items:stretch;flex-direction:column}
  :root .insights-management-head .insights-periods{justify-content:flex-start}
  :root .insights-financial-grid,:root .insights-highlights{grid-template-columns:1fr 1fr}
  :root .insights-detail-link{align-items:flex-start;flex-direction:column;gap:2px}
}

/* HIDDEN MEANS HIDDEN. The permission layer in app.js (applyPermissionUi) hides a control a role
 * will be refused by setting the `hidden` attribute, and the browser's own `[hidden]{display:none}`
 * loses to ANY author display rule: `.button{display:inline-flex}` alone kept every hidden button
 * on screen. Measured on the running app as Accounting and Read-only, 2026-09-28: Delete, Delete
 * Customer, Archive, Import and Remove selected were all "hidden" and all visible, all enabled,
 * all refused by the launcher when pressed. !important because many rules here are `:root .x`,
 * which outranks a bare attribute selector; nothing in the app shows an element it marked hidden. */
[hidden]{display:none!important}

/* ── Text boxes, selects and text areas (owner, 2026-10-07: "a small pass at text boxes") ────────
   One edge, one hover, one focus ring and one disabled face for every box in the app, in every design
   and both appearances - derived from --ink/--accent like the buttons above, never from data-theme.
   The !important is load-bearing: styles.css carries a dozen per-screen border and focus overrides
   written with it (a 3px #1671c9 outline on everything, dark-only border rules), and those are what
   made the same box look different on every screen. The required-field ring (.sw-missing) and a box
   marked aria-invalid keep their red; this never paints over them. */
:root{
  /* THE EDGE MUST READ AT 3:1 AGAINST THE PAGE (WCAG 1.4.11, non-text contrast), in every design and
     both appearances. At 26% it measured 1.40-1.57:1 in light and 1.99-2.14:1 in dark on the running app
     (2026-10-07, all nine designs: the box all but disappeared on a pale page). These values measured
     3.3:1 or better in light and 3.4:1 or better in dark. Dark needs less ink: its ink is pale and its page
     is near-black, so the same share reads much stronger. tests/test_field_edge_contrast.mjs pins them. */
  --fld-edge:        color-mix(in srgb, var(--ink) 58%, transparent);
  --fld-edge-hover:  color-mix(in srgb, var(--ink) 80%, transparent);
  --fld-ring:        color-mix(in srgb, var(--accent, #1768b2) 26%, transparent);
  --fld-risk:        var(--pui-risk, #b4341f);
}
:root[data-theme="dark"]{
  --fld-edge:        color-mix(in srgb, var(--ink) 44%, transparent);
  --fld-edge-hover:  color-mix(in srgb, var(--ink) 66%, transparent);
}
html:root body #app :is(input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=range]):not([type=color]),select,textarea){
  border-width: 1px;
  border-style: solid;
  box-shadow: none;
  transition: box-shadow .12s ease;
}
/* The neutral edge STEPS ASIDE for a required, invalid or disabled box rather than trying to out-rank
   their rules: :is() takes the specificity of its most specific argument (input + five :not()s), so
   this selector outranked every red rule below and in styles.css, and both sides are !important
   (review of PR #129, measured: the wizard's required edge and aria-invalid rendered grey).
   tests/test_field_edge_keeps_red.mjs. */
html:root body #app :is(input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=range]):not([type=color]),select,textarea):not(.sw-missing):not([aria-invalid="true"]):not(:disabled){
  border-color: var(--fld-edge) !important;
}
html:root body #app :is(input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=range]):not([type=color]),select,textarea):hover:not(:disabled):not(:focus):not(.sw-missing):not([aria-invalid="true"]){
  border-color: var(--fld-edge-hover) !important;
}
html:root body #app :is(input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=range]):not([type=color]),select,textarea):focus:not(.sw-missing):not([aria-invalid="true"]){
  border-color: var(--ctl-accent) !important;
  outline: 1px solid var(--ctl-accent) !important;
  outline-offset: 0 !important;
  box-shadow: 0 0 0 4px var(--fld-ring) !important;
}
html:root body #app :is(input,select,textarea)[aria-invalid="true"]{
  border-color: var(--fld-risk) !important;
}
html:root body #app :is(input,select,textarea)[aria-invalid="true"]:not(.sw-missing):focus{
  outline: 1px solid var(--fld-risk) !important;
  outline-offset: 0 !important;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--fld-risk) 28%, transparent) !important;
}
html:root body #app :is(input,select,textarea)::placeholder{
  color: color-mix(in srgb, var(--ink) 50%, transparent);
  opacity: 1;
}
/* Disabled and read-only: still readable, plainly not for typing. A read-only box (a decoded trim, a
   locked stock number) is quieter than an editable one but keeps its value at full strength. */
html:root body #app :is(input,select,textarea):disabled{
  color: color-mix(in srgb, var(--ink) 55%, transparent) !important;
  background: color-mix(in srgb, var(--ink) 5%, var(--surface-strong, #fff)) !important;
  border-color: color-mix(in srgb, var(--ink) 16%, transparent) !important;
  opacity: 1 !important;
  cursor: not-allowed;
}
html:root body #app :is(input,textarea)[readonly]:not(:disabled){
  background: color-mix(in srgb, var(--ink) 4%, var(--surface-strong, #fff)) !important;
  border-style: dashed !important; /* the base rule sets solid at a higher specificity */
}
html:root body .pw-toggle:hover{ background: color-mix(in srgb, var(--accent) 10%, transparent); }
html:root body .pw-toggle:focus-visible{ outline: 2px solid var(--ctl-accent); outline-offset: 0; }

@media (forced-colors: active){
  html:root body #app :is(input,select,textarea){ border-color: FieldText !important; }
  html:root body #app :is(input,select,textarea):focus{ outline: 2px solid Highlight !important; box-shadow: none !important; }
}

/* ── Contract forms setup (web/contract-forms.js) ─────────────────────────────────────────────────
   The dealer's own licensed contract, set up once. Type from the scale, spacing on the 2px rhythm. */
:root .contract-forms-missing ul,:root .contract-forms-hints{margin:8px 0 12px;padding-left:20px}
:root .contract-forms-missing li,:root .contract-forms-hints li{font-size:var(--fs-body);line-height:var(--lh-body);margin:4px 0}
/* REG 262 and the Buyers Guide are built in: said beside the upload so nobody hunts for them in its list. */
:root .contract-forms-builtin{margin:0 0 12px;padding:10px 12px;border-left:4px solid var(--accent);border-radius:var(--r-control);background:color-mix(in srgb,var(--accent) 6%,var(--surface));font-size:var(--fs-body);line-height:var(--lh-body)}
:root [data-contract-forms-root] small{font-size:var(--fs-small);line-height:var(--lh-small);color:var(--muted,inherit)}
:root [data-contract-forms-root] h3{font-size:var(--fs-h3);line-height:var(--lh-h3);margin:20px 0 8px}
:root [data-contract-forms-root] .lead{font-size:var(--fs-lead);line-height:var(--lh-lead);margin:0 0 16px}
:root .contract-forms-map select{width:100%;min-width:220px}
:root .contract-forms-table .row-actions{display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-end}
:root .contract-forms-extra{margin:12px 0}
:root .contract-forms-add .form-grid,:root .contract-forms-editor .form-grid{margin:12px 0 8px}
:root .contract-forms-editor .data-table{margin:8px 0 12px}
:root .contract-forms-extra summary{cursor:pointer;font-size:var(--fs-body);line-height:var(--lh-body);font-weight:600}
:root .contract-forms-checks{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:4px 16px;margin-top:8px}
:root .contract-forms-checks label{display:flex;align-items:baseline;gap:8px;font-size:var(--fs-body);line-height:var(--lh-body)}
@media (max-width:760px){:root .contract-forms-table .row-actions{justify-content:flex-start}:root .contract-forms-map select{min-width:0}}

/* ---- Sign-in, redesigned (owner, 2026-10-08: "cleaner and more slick") --------------------------
   One column of content, generous air, the brand mark on top, a single short security line at the
   bottom instead of two paragraphs. The photograph column, the dealership sign and every branding
   setting are untouched; only the panel changes. Sizes come from the type scale (render rules). */
html:root body .security-gate-card{gap:18px;padding-top:56px;padding-bottom:40px}
html:root body .security-gate-card>*{width:100%;max-width:380px}
html:root body .security-brand::before{content:none;display:none}
html:root body .security-gate-mark{display:flex;align-items:center;gap:10px;margin:0 0 28px;font-family:var(--font-head);font-weight:700;font-size:var(--fs-lead);line-height:var(--lh-lead);color:var(--ink)}
html:root body .security-gate-mark img{width:36px;height:36px;border-radius:var(--r-surface);flex:0 0 auto}
html:root body .security-gate-card h1{margin:0;font-size:var(--fs-h1);line-height:var(--lh-h1);font-weight:700;letter-spacing:-.02em}
html:root body .security-brand .security-gate-sub{margin:6px 0 0;font-size:var(--fs-body);line-height:var(--lh-body);color:var(--muted)}
html:root body .security-gate-card>label{gap:6px}
html:root body .security-gate-card>label input{min-height:48px}
html:root body .security-gate-card .modal-actions{gap:14px;margin-top:6px}
html:root body .security-gate-card .modal-actions .button.primary{min-height:48px;font-weight:600}
html:root body .security-gate-card .security-gate-forgot{justify-self:center;font-weight:500;color:var(--accent,var(--blue))}
html:root body .security-gate-footnote{display:flex;align-items:flex-start;gap:8px;margin-top:20px;padding-top:0;border-top:0;color:var(--muted);font-size:var(--fs-small);line-height:var(--lh-small)}
html:root body .security-gate-footnote::before{content:"";flex:0 0 auto;width:14px;height:14px;margin-top:2px;background:currentColor;
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a5 5 0 0 0-5 5v3H6a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8a2 2 0 0 0-2-2h-1V7a5 5 0 0 0-5-5zm-3 8V7a3 3 0 1 1 6 0v3z'/%3E%3C/svg%3E") center/contain no-repeat;
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a5 5 0 0 0-5 5v3H6a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8a2 2 0 0 0-2-2h-1V7a5 5 0 0 0-5-5zm-3 8V7a3 3 0 1 1 6 0v3z'/%3E%3C/svg%3E") center/contain no-repeat}

/* Contract forms setup, "Add a form" row (owner screenshot, 2026-10-08): "Name it" sat beside its box
   while every other label sat above, and its example text was cut off. Every field is now a stacked
   label/box pair in equal columns, and the file picker's button looks like the app's buttons. */
:root .contract-forms-add .form-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:16px 20px;align-items:start}
:root .contract-forms-add .form-grid>label{display:grid;grid-template-columns:1fr;gap:6px;align-content:start;font-size:var(--fs-small);line-height:var(--lh-small);font-weight:600}
:root .contract-forms-add .form-grid>label>:is(input,select){width:100%;min-width:0}
:root .contract-forms-add input[type="file"]{padding:6px;font-size:var(--fs-small);line-height:var(--lh-small)}
:root .contract-forms-add input[type="file"]::file-selector-button{margin-right:10px;padding:6px 12px;border:1px solid var(--line);border-radius:var(--r-surface);background:var(--surface);color:var(--ink);font-weight:600;cursor:pointer}

/* The optional checkbox under a prompt (steward-dialog.js), e.g. "Remember this browser for 30 days". */
:root .steward-dialog-check{display:flex;align-items:center;gap:8px;margin-top:12px;font-size:var(--fs-body);line-height:var(--lh-body);font-weight:500}
:root .steward-dialog-check input{width:18px;height:18px;margin:0}

/* Sign-in backdrop (owner, 2026-10-11): the navy brand artwork replaces the dealership photo in the
   picture column; the billboard sign that sat on the photo has nothing to stand on, so the built-in
   sign is retired (the dealer's name is in the panel heading instead). A custom upload keeps its sign. */
/* The built-in pictures live in the page's own picture cell (identity.css: the column beside the form, or the
   34vh strip above it below 900px). styles.css switches that cell off with content:none!important, which is why
   the picture used to be painted across the whole window and cropped to the window instead of to what shows,
   cutting the car off on narrow screens (owner screenshot, 2026-10-13). Switched back on for the built-in art
   only (app.js leaves the page behind the form plain); a dealer's upload and "blank" keep the whole-page
   background they had.
   Five original drawings take turns (owner, 2026-10-13: "include them all and make them rotate"): dusk showroom,
   blueprint, city light trails, golden-hour road, abstract brand. Each holds ~10s and Chromium cross-fades
   between them. Every drawing keeps its subject right of centre and low (x~66%, y~64%), so one anchor keeps it
   in view in a tall column and a short strip alike. Reduced motion keeps the first picture still. */
html:root body .security-gate[data-login-art="built-in"]::before{content:""!important;background-color:#0b1a30;background-image:url("assets/signin-brand.svg");background-size:cover;background-position:70% 70%;background-repeat:no-repeat;animation:steward-signin-rotate 60s linear infinite}
@keyframes steward-signin-rotate{0%,17%{background-image:url("assets/signin-brand.svg")}20%,37%{background-image:url("assets/signin-blueprint.svg")}40%,57%{background-image:url("assets/signin-city.svg")}60%,77%{background-image:url("assets/signin-road.svg")}80%,97%{background-image:url("assets/signin-abstract.svg")}100%{background-image:url("assets/signin-brand.svg")}}
@media (prefers-reduced-motion: reduce){html:root body .security-gate[data-login-art="built-in"]::before{animation:none}}
/* The dealer's own lot photo (setup's "Your lot's picture" step, or Login & Branding) goes in the same cell
   for the same reason: cropped to what shows, at the focal point the dealer set, rather than to the whole
   window behind the form. No scrim — no text sits on it any more. */
html:root body .security-gate[data-login-art="custom"]::before{content:""!important;background-color:var(--login-background-color,#102b4e);background-image:var(--login-background-image);background-size:cover;background-position:var(--login-background-position,50% 50%);background-repeat:no-repeat}
/* Setup: the lot-picture step. The file input stays in the tab order (visually hidden, not display:none)
   so the keyboard reaches it through its label button. */
:root .wz-lot{display:grid;justify-items:start;gap:10px;margin:14px 0 4px}
:root .wz-lot-preview{width:min(100%,480px);aspect-ratio:16/9;object-fit:cover;border-radius:var(--r-surface);border:1px solid var(--line)}
:root .wz-lot-file{position:absolute;width:1px;height:1px;opacity:0;overflow:hidden}
:root .wz-lot-file:focus-visible+label{outline:2px solid var(--accent);outline-offset:2px}
:root .wz-lot small{font-size:var(--fs-small);line-height:var(--lh-small);color:var(--muted)}
html:root body .login-brand-sign[data-brand-sign-mode="built-in"]{display:none}
/* The dealer's nameplate on the built-in pictures (app.js securityLoginPage). A grid item in the picture cell
   itself, so it is cropped and placed with the picture at every width rather than positioned against the window.
   Frosted glass with a hairline and a soft lift, so it reads on all five drawings, dark sky or bright road. */
html:root body .security-gate .login-dealer-plate{grid-column:2;grid-row:1;align-self:start;justify-self:start;position:relative;z-index:2;
  margin:clamp(28px,7vh,72px) 0 0 clamp(28px,5vw,72px);max-width:min(560px,calc(100% - 56px));display:grid;gap:8px;padding:20px 28px 22px 30px;
  color:#fff;background:linear-gradient(135deg,rgba(255,255,255,.16),rgba(255,255,255,.05) 60%,rgba(255,255,255,.02));
  border:1px solid rgba(255,255,255,.26);border-radius:var(--L-radius,2px);
  -webkit-backdrop-filter:blur(12px) saturate(1.25);backdrop-filter:blur(12px) saturate(1.25);
  box-shadow:0 22px 48px rgba(3,10,24,.38),inset 0 1px 0 rgba(255,255,255,.28);pointer-events:none}
html:root body .security-gate .login-dealer-plate::before{content:"";position:absolute;left:0;top:16px;bottom:16px;width:3px;
  background:linear-gradient(180deg,#fff,rgba(255,255,255,.15))}
html:root body .security-gate .login-dealer-plate strong{font-family:var(--font-display);font-size:var(--fs-display);line-height:var(--lh-display);
  font-weight:700;letter-spacing:-.01em;overflow-wrap:anywhere;text-shadow:0 2px 18px rgba(0,0,0,.32)}
html:root body .security-gate .login-dealer-plate span{padding-top:10px;border-top:1px solid rgba(255,255,255,.28);font-size:var(--fs-small);
  line-height:var(--lh-small);font-weight:600;letter-spacing:.16em;text-transform:uppercase;color:rgba(255,255,255,.86)}
@media (max-width:900px){
  html:root body .security-gate .login-dealer-plate{grid-column:1;margin:18px 0 0 18px;padding:14px 20px 16px 22px;max-width:calc(100% - 36px)}
  html:root body .security-gate .login-dealer-plate strong{font-size:var(--fs-h2);line-height:var(--lh-h2)}
}
/* Nothing to ask the AI before anyone has signed in. */
body.security-locked .st-launcher,body.security-locked .st-panel,body.security-locked .st-intro{display:none!important}
:root{--login-background-image:url("assets/signin-brand.svg")}

/* The account menu (web/account-menu.js; owner, 2026-10-13: "change this god awful menu"). Scoped under
   .acct-panel at a specificity above the older account-menu rules in styles.css, which still own the
   panel's position; colours come from the theme tokens so all ten designs and dark mode carry it. */
html:root body .account-dropdown-panel.acct-panel{width:296px;min-width:0;max-width:calc(100vw - 24px);padding:8px;border:1px solid var(--line);border-radius:14px;background:var(--surface-strong);color:var(--ink);box-shadow:0 12px 32px rgba(8,22,40,.18),0 2px 6px rgba(8,22,40,.08)}
html:root body .acct-panel .acct-head{display:flex;align-items:center;gap:12px;padding:8px 8px 12px;margin:0 0 4px;border-bottom:1px solid var(--line)}
html:root body .acct-panel .acct-avatar{display:grid;place-items:center;flex:0 0 36px;width:36px;height:36px;border-radius:50%;background:var(--accent);color:#fff;font-size:var(--fs-body);line-height:var(--lh-body);font-weight:700}
html:root body .acct-panel .acct-id{display:grid;min-width:0}
html:root body .acct-panel .acct-id strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--fs-body);line-height:var(--lh-body);font-weight:600;color:var(--ink)}
html:root body .acct-panel .acct-id span{font-size:var(--fs-small);line-height:var(--lh-small);color:var(--muted)}
html:root body .acct-panel .acct-section{display:grid;gap:6px;padding:8px}
html:root body .acct-panel .acct-label{font-size:var(--fs-micro);line-height:var(--lh-micro);font-weight:600;letter-spacing:.04em;text-transform:uppercase;color:var(--muted)}
html:root body .acct-panel .acct-seg{display:flex;gap:2px;padding:2px;border-radius:10px;background:var(--surface-soft);border:1px solid var(--line)}
html:root body .acct-panel .acct-seg-opt{position:relative;flex:1 1 0;display:block;margin:0;cursor:pointer}
html:root body .acct-panel .acct-seg-opt input{position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:pointer}
html:root body .acct-panel .acct-seg-opt span{display:block;padding:6px 4px;border-radius:8px;text-align:center;white-space:nowrap;font-size:var(--fs-small);line-height:var(--lh-small);font-weight:500;color:var(--muted);transition:background-color .12s,color .12s}
html:root body .acct-panel .acct-seg-opt:hover span{color:var(--ink)}
html:root body .acct-panel .acct-seg-opt input:checked+span{background:var(--surface-strong);color:var(--ink);font-weight:600;box-shadow:0 1px 2px rgba(8,22,40,.14),0 0 0 1px var(--line)}
html:root body .acct-panel .acct-seg-opt input:focus-visible+span{outline:2px solid var(--accent);outline-offset:1px}
html:root body .acct-panel .acct-row{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px;margin:0;font-size:var(--fs-small);line-height:var(--lh-small);font-weight:500;color:var(--muted)}
html:root body .acct-panel .acct-row span{white-space:nowrap}
html:root body .acct-panel .acct-row select{flex:0 1 128px;width:128px;min-width:0;min-height:30px;padding:4px 8px;border:1px solid var(--line);border-radius:8px;background:var(--surface);color:var(--ink);font-size:var(--fs-small);line-height:var(--lh-small)}
html:root body .acct-panel .acct-sep{height:1px;margin:6px 0;background:var(--line)}
html:root body .acct-panel .acct-item{display:flex;align-items:center;gap:10px;width:100%;min-height:36px;margin:0;padding:8px;border:0;border-radius:8px;background:transparent;color:var(--ink);font-size:var(--fs-body);line-height:var(--lh-body);font-weight:500;text-align:left;text-decoration:none;cursor:pointer}
html:root body .acct-panel .acct-item .acct-icon{flex:0 0 16px;color:var(--muted)}
html:root body .acct-panel .acct-item:hover,html:root body .acct-panel .acct-item:focus-visible{background:var(--surface-soft);color:var(--ink);outline:none}
html:root body .acct-panel .acct-item:hover .acct-icon,html:root body .acct-panel .acct-item:focus-visible .acct-icon{color:var(--ink)}
html:root body .acct-panel .acct-item.acct-danger:hover,html:root body .acct-panel .acct-item.acct-danger:focus-visible,html:root body .acct-panel .acct-item.acct-danger:hover .acct-icon,html:root body .acct-panel .acct-item.acct-danger:focus-visible .acct-icon{color:var(--danger)}
html:root body .acct-panel .acct-swatches{display:flex;flex-wrap:wrap;gap:4px}
html:root body .acct-panel .acct-swatch{position:relative;display:block;margin:0;cursor:pointer}
html:root body .acct-panel .acct-swatch input{position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:pointer}
html:root body .acct-panel .acct-swatch span{position:relative;display:block;width:24px;height:24px;border:1px solid;border-radius:50%;overflow:hidden;box-shadow:0 0 0 2px transparent;transition:box-shadow .12s}
/* Sidebar colour down the left half, page colour on the right, accent as a dot: a tiny Themes card. */
html:root body .acct-panel .acct-swatch span b{position:absolute;inset:0 50% 0 0;display:block}
html:root body .acct-panel .acct-swatch span i{position:absolute;right:3px;top:50%;display:block;width:8px;height:8px;margin-top:-4px;border-radius:50%}
html:root body .acct-panel .acct-swatch-foot{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:8px}
html:root body .acct-panel .acct-swatch-name{font-size:var(--fs-small);line-height:var(--lh-small);font-weight:600;color:var(--ink)}
html:root body .acct-panel .acct-swatch-all{font-size:var(--fs-small);line-height:var(--lh-small);font-weight:600;color:var(--accent);cursor:pointer;white-space:nowrap}
html:root body .acct-panel .acct-swatch-all:hover{text-decoration:underline}
html:root body .acct-panel .acct-swatch:hover span{box-shadow:0 0 0 2px var(--line)}
html:root body .acct-panel .acct-swatch input:checked+span{box-shadow:0 0 0 2px var(--surface-strong),0 0 0 4px var(--accent)}
html:root body .acct-panel .acct-swatch input:focus-visible+span{outline:2px solid var(--accent);outline-offset:3px}
/* Email addresses wrap only at the break points emailBreakHtml() adds (after @, before dots), never mid-word. */
:root .detail-list dd.detail-email{overflow-wrap:normal;word-break:normal}
/* Find a Vendor: search by name, beside the ZIP box (wraps under it on a narrow screen). */
:root .vs-name-search{display:inline-flex;align-items:center;gap:8px;margin:0;font-size:var(--fs-small);line-height:var(--lh-small)}
:root .vs-name-search input{width:240px;max-width:60vw;padding:4px 8px}
@media (max-width: 640px){:root .vs-name-search{display:flex;margin:10px 0 0}}
/* Hosted AI: "Use your own AI key" as logo cards and numbered steps (ai-hosted.js ownKeyHtml). */
:root .aih-providers{display:grid;grid-template-columns:1fr;gap:8px;margin:4px 0 14px}
:root .aih-market-title{margin:16px 0 4px;font-size:var(--fs-body);line-height:var(--lh-body);font-weight:700}
:root .aih-market-own{margin-top:12px}
:root .aih-provider{position:relative;display:flex;align-items:center;gap:10px;margin:0;padding:12px;border:1px solid var(--line);border-radius:12px;background:var(--surface);cursor:pointer;transition:border-color .12s,box-shadow .12s}
:root .aih-provider input{position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:pointer}
:root .aih-provider:hover{border-color:var(--accent)}
:root .aih-provider.on{border-color:var(--accent);box-shadow:0 0 0 2px var(--accent)}
:root .aih-provider:has(input:focus-visible){outline:2px solid var(--accent);outline-offset:2px}
:root .aih-provider-logo{display:grid;place-items:center;flex:0 0 36px;height:36px}
:root .aih-provider-logo img,:root .aih-provider-logo svg{max-width:36px;max-height:36px;object-fit:contain}
:root .aih-provider-name{display:grid;min-width:0}
:root .aih-provider-name strong{font-size:var(--fs-body);line-height:var(--lh-body);font-weight:600;color:var(--ink)}
:root .aih-provider-name small{font-size:var(--fs-small);line-height:var(--lh-small);color:var(--muted)}
:root .aih-steps{display:grid;gap:10px;margin:0 0 12px;padding:0;list-style:none}
:root .aih-steps li{display:flex;align-items:flex-start;gap:10px}
:root .aih-steps li>div{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px}
:root .aih-steps strong{font-size:var(--fs-body);line-height:var(--lh-body);font-weight:600}
:root .aih-steps small{flex-basis:100%;font-size:var(--fs-small);line-height:var(--lh-small);color:var(--muted)}
:root .aih-step-n{display:grid;place-items:center;flex:0 0 24px;width:24px;height:24px;border-radius:50%;background:var(--accent);color:#fff;font-size:var(--fs-small);line-height:var(--lh-small);font-weight:700}
/* System Health in plain words (app.js systemHealthWorkspaceHtml). */
:root .health-plain.is-ok .system-health-heading h2{color:var(--green)}
:root .health-plain.needs-attention .system-health-heading h2{color:var(--danger)}
:root .health-problems{display:grid;gap:10px;margin:8px 0 16px;padding:0;list-style:none}
:root .health-problems li{display:grid;gap:2px;padding:10px 12px;border-left:3px solid var(--danger);border-radius:8px;background:var(--surface-soft)}
:root .health-problems strong{font-size:var(--fs-body);line-height:var(--lh-body);font-weight:600}
:root .health-problems span{font-size:var(--fs-small);line-height:var(--lh-small);color:var(--muted)}
/* Leads, Appointments: the scheduling tools AutoSteward recognises (app.js calendlyPanelHtml). */
:root .booking-providers{display:flex;flex-wrap:wrap;gap:6px;margin:10px 0 6px}
:root .booking-provider{padding:6px 12px;border:1px solid var(--line);border-radius:999px;background:var(--surface);color:var(--ink);font-size:var(--fs-small);line-height:var(--lh-small);font-weight:500;cursor:pointer}
:root .booking-provider:hover{border-color:var(--accent)}
:root .booking-provider.on{border-color:var(--accent);background:var(--accent);color:#fff}
:root .booking-where{margin:4px 0 8px}
/* The provider's own warning under the own-key steps (ai-setup-links.js gotcha). */
:root .aim-note.aih-gotcha{padding:8px 12px;border-left:3px solid var(--accent);border-radius:8px;background:var(--surface-soft)}
/* Subscription: the "Copy details for support" box (subscription.js supportHtml). */
:root .sub-support-copy{display:flex;flex-wrap:wrap;align-items:center;gap:8px 14px;margin:14px 0 4px;padding:10px 12px;border:1px solid var(--line);border-radius:10px;background:var(--surface-soft)}
:root .sub-support-copy p{margin:0;font-size:var(--fs-small);line-height:var(--lh-small);color:var(--muted)}
/* Parts: the trademark line under the supplier cards. */
:root .parts-trademarks{margin:8px 0 0;font-size:var(--fs-micro);line-height:var(--lh-micro);color:var(--muted)}
/* Market page, Safety & recalls (owner, 2026-10-13: "advanced market doesnt scale right"): the recall grid
   never pushes past the panel — as many columns as fit, each at least 320px or the full width — and a long
   recall title wraps onto a second line instead of running off the card. */
html:root body .nhtsa-panel .nh-recall-grid{grid-template-columns:repeat(auto-fill,minmax(min(100%,320px),1fr))}
html:root body .nhtsa-panel .nh-recall{min-width:0}
html:root body .nhtsa-panel .nh-recall-top{align-items:flex-start}
html:root body .nhtsa-panel .nh-recall-comp{min-width:0;white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
html:root body .nhtsa-panel .nh-dot{margin-top:6px}
/* "Stability control: Standard" was dark green on dark green in dark mode. */
html[data-theme="dark"] body .nhtsa-panel .nh-chip-std{background:rgba(46,160,96,.16);border-color:rgba(74,190,120,.45);color:#8fe0ad}
/* Room for the sticky bars when anything is scrolled into view (keyboard focus, scrollIntoView, links):
   the 60px app header at the top, and the PDF alignment page's action bar at the bottom. Without it the
   walk's real clicks landed on the header (Permissions "Roles" tab) and on the action bar (the lowest form
   fields), i.e. a control scrolled "into view" was still under a bar. (Production walk, 2026-10-13.) */
html{scroll-padding-top:72px}
html:has(.alignment-sticky-actions){scroll-padding-bottom:132px}
/* Sale screen, free credit-check cards: a long address ("annualcreditreport.com") ran into the "Start here"
   tag at phone width. The header wraps, so the tag drops to its own line instead (production walk, 375px). */
:root .fc-card-head{flex-wrap:wrap}
/* Basis 0, so a long name ("Manheim Used Vehicle Value Index") wraps inside its column beside the logo
   instead of dropping to a row of its own under it (owner screenshot, 2026-10-15). */
:root .fc-card-title{flex:1 1 0;min-width:0}
:root .fc-card-flag{flex:none}
/* Help screenshots: the marks are positioned in percent of the link box, so that box must BE the picture.
   With width:100% plus a max-height and object-fit:contain, a capped picture was letterboxed inside a wider
   box and every mark drifted sideways off what it pointed at (found with the production walk, 2026-10-13).
   The link now shrinks to the picture, centred, and the picture keeps its own proportions under the cap. */
html:root body .help-step-figure .help-screenshot-link{display:block;width:fit-content;max-width:100%;margin:0 auto}
html:root body .help-step-figure img{width:auto;max-width:100%;height:auto;object-fit:fill}
/* Help: the "Warning" label of an inline warning shrank to one letter wide on a phone and read W-A-R-N-I-N-G
   down the side (the flex row let it wrap anywhere). The label keeps its width; the text beside it wraps. */
:root .help-inline-warning > strong{flex:0 0 auto;white-space:nowrap;overflow-wrap:normal}
:root .help-inline-warning > span{min-width:0}

/* Off-site copies card on Backup & Restore (hosted only; web/backup-offsite.js). */
html:root body .offsite-card .offsite-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px}
/* A problem is an error, in red (owner, 2026-11-15: "the cant reach message should be [red] if it ever happens"); light and
   dark each get a red that reads on their own background. */
html:root body .offsite-card .offsite-problem{color:#b42318;font-weight:600}
html:root[data-theme="dark"] body .offsite-card .offsite-problem{color:#ff8a80}
html:root body .offsite-card .offsite-row-actions{display:flex;flex-wrap:wrap;gap:8px}
html:root body .offsite-card .offsite-copies{list-style:none;margin:12px 0 0;padding:0;display:grid;gap:6px}
html:root body .offsite-card .offsite-copies li{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 12px;border:1px solid var(--line);border-radius:var(--r-control)}
html:root body .offsite-card .offsite-empty{color:var(--muted)}
html:root body .offsite-card .offsite-last{margin:0}
html:root body .offsite-card .offsite-list:empty{display:none}
html:root body .offsite-card .offsite-kind{margin:16px 0 0;font-weight:600}

/* Panels that scroll on their own keep the wheel to themselves: reaching the end of the sidebar or of the
 * alignment editor's panes no longer starts scrolling the page behind them (measured 2026-10-14). */
html:root body #topNav,html:root body .alignment-field-list,html:root body #alignmentPageViewport,html:root body .activity-table-wrap{overscroll-behavior:contain}

/* MANAGER ATTENTION, redesigned. The dropdown was a dark slab of uppercase badges whose rows ran
 * together on one 951px line inside a 520px panel (".desktop-dropdown-panel [role=menuitem]" set
 * display:block and the header's no-wrap rule reached inside), and it hung 34px off the window.
 * Measured on amkauto, 2026-10-15. Now: the app's own surface, one follow-up per row (customer and
 * amount, the date, a quiet status chip), opening from the right edge so it stays on screen.
 * The old dark theme used !important throughout, so this has to as well. */
html:root body .manager-attention-panel{left:auto!important;right:0;width:min(400px,calc(100vw - 24px));min-width:0!important;max-width:none!important;
  padding:0!important;overflow:hidden auto;background:var(--surface)!important;color:var(--ink)!important;
  border:1px solid var(--line)!important;border-radius:var(--L-radius,2px);box-shadow:0 18px 48px rgba(16,32,56,.18),0 2px 6px rgba(16,32,56,.08)!important}
html:root body .manager-attention-panel .manager-attention-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding:16px 18px 14px;background:var(--surface)!important;color:var(--ink)!important;border-bottom:1px solid var(--line)}
html:root body .manager-attention-panel .manager-attention-heading>div{display:grid;gap:2px}
html:root body .manager-attention-panel .manager-attention-heading strong{color:var(--ink)!important;font-size:var(--fs-body);line-height:var(--lh-body);font-weight:600}
html:root body .manager-attention-panel .manager-attention-heading span{color:var(--muted)!important;font-size:var(--fs-small);line-height:var(--lh-small)}
html:root body .manager-attention-panel .ma-count{min-width:26px;height:26px;padding:0 8px;border-radius:var(--L-radius,2px);display:grid;place-items:center;
  color:#fff;background:var(--red-solid,#c9363e);font-size:var(--fs-micro);line-height:var(--lh-micro);font-weight:700}
html:root body .manager-attention-panel .manager-attention-item{display:grid!important;grid-template-columns:minmax(0,1fr) auto;align-items:center;column-gap:12px;
  width:100%;white-space:normal;height:auto;min-height:0;padding:14px 18px 14px 16px!important;border:0!important;border-radius:0;
  border-left:3px solid var(--red-solid,#c9363e)!important;background:var(--surface)!important;color:var(--ink)!important;text-align:left;cursor:pointer}
html:root body .manager-attention-panel .manager-attention-item+.manager-attention-item{border-top:1px solid var(--line)!important}
html:root body .manager-attention-panel .manager-attention-item:hover,html:root body .manager-attention-panel .manager-attention-item:focus-visible{background:var(--surface-soft,#f5f7fa)!important}
html:root body .manager-attention-panel .manager-attention-item.sale-cancelled{border-left-color:#e07a37!important}
html:root body .manager-attention-panel .ma-body{display:grid;gap:4px;min-width:0}
html:root body .manager-attention-panel .ma-top{display:flex;align-items:baseline;justify-content:space-between;gap:12px;min-width:0}
html:root body .manager-attention-panel .ma-top strong{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--ink)!important;
  font-size:var(--fs-body);line-height:var(--lh-body);font-weight:600}
html:root body .manager-attention-panel .ma-amount{flex:none;color:var(--ink);font-size:var(--fs-body);line-height:var(--lh-body);font-weight:600;font-variant-numeric:tabular-nums}
html:root body .manager-attention-panel .ma-meta{color:var(--muted)!important;font-size:var(--fs-small);line-height:var(--lh-small)}
html:root body .manager-attention-panel .ma-tags{display:flex;flex-wrap:wrap;align-items:center;gap:6px 8px;margin-top:2px}
html:root body .manager-attention-panel .ma-chip{display:inline-flex;align-items:center;height:22px;padding:0 8px;border-radius:var(--L-radius,2px);
  color:var(--pui-risk,#9b1c24);background:color-mix(in srgb,var(--pui-risk,#c9363e) 14%,transparent);font-size:var(--fs-micro);line-height:var(--lh-micro);font-weight:600}
html:root body .manager-attention-panel .ma-tags small{color:var(--muted)!important;font-size:var(--fs-micro);line-height:var(--lh-micro)}
html:root body .manager-attention-panel .ma-chev{color:var(--muted);font-size:var(--fs-lead);line-height:var(--lh-lead)}
html:root body .manager-attention-panel .ma-foot{margin:0;padding:10px 18px;border-top:1px solid var(--line);color:var(--muted);background:var(--surface-soft,#f8f9fb);
  font-size:var(--fs-micro);line-height:var(--lh-micro)}

/* MARKETING DESTINATIONS, redesigned (owner, 2026-10-15: "looks ridiculous, make it premium"). The
 * cards had brand-coloured counts in heavy type, an icon floating above a block of text indented to
 * line up with it, a glyph tile in the heading and a boxed note beside it. Now: one mark tile, the
 * name with a muted purpose under it, a status chip, the facts in two quiet lines, and one footer
 * action that reads like the rest of the app. Brand colour appears only on the mark. */
html:root body .mk-platform-grid{grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:16px}
html:root body .mk-platform-card{display:flex;flex-direction:column;gap:14px;padding:18px;text-align:left;background:var(--surface);
  border:1px solid var(--line);box-shadow:none;transform:none}
html:root body .mk-platform-card:hover{border-color:var(--ink-3,var(--muted));box-shadow:0 6px 18px rgba(16,32,56,.08);transform:none}
html:root body .mk-platform-card.active{border-color:var(--mk-brand);box-shadow:inset 0 0 0 1px var(--mk-brand)}
html:root body .mkc-head{display:grid;grid-template-columns:40px minmax(0,1fr) auto;align-items:center;column-gap:12px}
html:root body .mkc-mark{display:grid;place-items:center;width:40px;height:40px;border-radius:var(--L-radius,2px);color:#fff;background:var(--mk-brand);
  font-size:var(--fs-body);line-height:var(--lh-body);font-weight:700;letter-spacing:-.01em}
html:root body .mk-platform-facebook{--mk-brand:#1877f2}html:root body .mk-platform-craigslist{--mk-brand:#5f2b8c}html:root body .mk-platform-cargurus{--mk-brand:#0763c2}html:root body .mk-platform-carfax{--mk-brand:#1f5ea8}html:root body .mk-platform-kbb{--mk-brand:#0b5aa6}
html:root body .mkc-name{display:grid;gap:2px;min-width:0}
html:root body .mkc-name strong{color:var(--ink);font-size:var(--fs-body);line-height:var(--lh-body);font-weight:600}
html:root body .mkc-name small{color:var(--muted);font-size:var(--fs-small);line-height:var(--lh-small)}
html:root body .mkc-facts{display:grid;gap:2px;padding-top:12px;border-top:1px solid var(--line)}
html:root body .mkc-count{color:var(--ink);font-size:var(--fs-small);line-height:var(--lh-small);font-weight:600}
html:root body .mkc-count.missing{color:var(--red)}
html:root body .mkc-mode{color:var(--muted);font-size:var(--fs-small);line-height:var(--lh-small)}
html:root body .mkc-action{display:flex;align-items:center;justify-content:space-between;margin-top:auto;min-height:38px;padding:0 14px;
  border:1px solid var(--line);border-radius:var(--L-radius,2px);color:var(--ink);background:var(--surface-soft,#f5f7fa);
  font-size:var(--fs-small);line-height:var(--lh-small);font-weight:600}
html:root body .mk-platform-card:hover .mkc-action{border-color:var(--ink-3,var(--muted))}

/* MEASURED LAYOUT FIXES, 2026-10-15 (tools/dev/harness/visual-audit.mjs over 57 screens, four widths, both
 * appearances; owner: "a lot of texts are out of place ... I thought we fixed this before").
 *
 * WHY IT KEPT COMING BACK. Cards here have no padding of their own; their children are inset by an
 * allow-list (".editor-section>p", ">a", ">dl", ">span" ... in styles.css), so every new KIND of child
 * (a <details> box, a footnote, a record count, a list) was born flush against the card edge, and each
 * earlier fix added one more entry. This widens the allow-list to every ordinary content element at once. */
html:root body :is(.panel,.editor-section,.vendor-editor-card)>:is(details,ul,ol,form,h3,h4,.field-help,.inline-warning,.system-pagination-summary){padding-inline:14px}
html:root body :is(.panel,.editor-section,.vendor-editor-card)>:is(details,ul,ol,form,.field-help,.system-pagination-summary):last-child{padding-bottom:12px}
html:root body :is(.panel:not(.market-intel),.editor-section,.vendor-editor-card)>.panel-footnote.panel-footnote{padding:10px 14px 12px}
/* Market Intelligence: every section sits straight inside the panel, so the title, the eyebrow and the
 * summary ran against its left edge (owner screenshot: "squished all the way to the side"). */
html:root body .panel.market-intel{padding:20px 22px}
/* Dealers (market-dealers.js): the same inner spacing, for the same reason. */
html:root body .panel.md-panel{padding:20px 22px;margin:0 0 14px}
/* "Example photo of a similar vehicle" sat BELOW the photo inside a box that clips, so it was cut off:
 * it now sits on the photo as a caption. */
html:root body .vehicle-photo-hero .stock-hero-tag{position:absolute;left:10px;bottom:10px;max-width:calc(100% - 20px);padding:4px 8px;
  border-radius:var(--L-radius,2px);color:#fff;background:rgba(16,24,40,.72);font-size:var(--fs-micro);line-height:var(--lh-micro)}
/* Wide tables scroll inside their panel instead of running out of it (Customers, Financials at laptop width;
 * the report sheet at every width, where three money columns hung up to 324px past the paper). */
html:root body .panel:has(>table),html:root body .panel:has(>.data-table){overflow-x:auto}
html:root body .formal-report-sheet{overflow-x:auto}
/* The backup folder box demanded 320px inside a narrower column and pushed 222px past it. */
html:root body .backup-folder-input-row{grid-template-columns:minmax(0,1fr) auto}
/* A long service name ("AnnualCreditReport.com") wraps inside its card instead of spilling past it. */
html:root body .fc-card-title :is(strong,.fc-card-host){overflow-wrap:anywhere}
/* The breadcrumb takes the free space in the header row. Sized to its contents, the wider Manrope face cut
 * the current page's name ("Customers" lost 17px, a stock number shrank to nothing; measured 2026-10-15). */
html:root body .desktop-app-header .breadcrumb-bar{flex:1 1 auto}
html:root body .desktop-app-header .breadcrumb-bar :is(a,b){flex:none;white-space:nowrap}
html:root body .desktop-app-header .breadcrumb-bar span{min-width:3ch}

/* The marketplaces' own logos on a white chip, so they read correctly in light and dark: Facebook's round mark
 * square, the Craigslist and CarGurus wordmarks in a wider chip, cropped to the word (their files carry wide
 * margins). */
html:root body .mkc-head.wide{grid-template-columns:104px minmax(0,1fr) auto}
html:root body .mkc-logo{display:block;width:40px;height:40px;overflow:hidden;border:1px solid var(--line);border-radius:var(--L-radius,2px);background-color:#fff;background-repeat:no-repeat;background-position:center;background-size:30px 30px}
html:root body .mkc-logo.wide{width:104px}
html:root body .mkc-logo[data-logo="craigslist"]{background-size:90px auto}
html:root body .mkc-logo[data-logo="carfax"]{background-size:92px auto}
html:root body .mkc-logo[data-logo="cargurus"]{background-size:96px auto}
html:root body .mkc-logo[data-logo="kbb"]{background-size:auto 38px}

/* Sign-in in progress (app.js setSigningIn). The button keeps its colour and says what it is doing, with a small
   spinner, and a status line under it reads the same to a screen reader. Reduced motion keeps the spinner still. */
html:root body .security-gate #securityLoginSubmit[aria-busy="true"]{display:inline-flex;align-items:center;justify-content:center;gap:10px;opacity:1;cursor:progress}
html:root body .security-gate .signin-spinner{width:14px;height:14px;flex:0 0 14px;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:steward-signin-spin .8s linear infinite}
@keyframes steward-signin-spin{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion: reduce){html:root body .security-gate .signin-spinner{animation:none;border-right-color:currentColor;opacity:.6}}
html:root body .security-gate .security-gate-status{margin:0;min-height:var(--lh-small);font-size:var(--fs-small);line-height:var(--lh-small);color:var(--muted)}
html:root body .security-gate .security-gate-status:empty{display:none}

/* A paid-off BHPH account says so above its figures (bhph-servicing-ui.js). */
html:root body .bhph-paid-off{margin:0 0 14px;padding:12px 16px;border:1px solid color-mix(in srgb,var(--ok,#1f8a4c) 40%,transparent);border-left-width:4px;border-radius:var(--L-radius,2px);background:color-mix(in srgb,var(--ok,#1f8a4c) 9%,var(--surface,#fff));color:var(--ink);font-size:var(--fs-body);line-height:var(--lh-body)}

/* Phone fixes from the 2026-10-16 phone sweep (seven widths, 360 to 440, touch emulation). */
/* The sign-in page is not inside #app, so the Show button's room in layout.css never reached it: typed text ran under "Show". */
html:root body .pw-field>input{padding-right:72px}
/* Contract forms: a four-column table on a phone scrolls sideways inside its card instead of pushing the page. */
html:root body .info-card:has(>.contract-forms-table){overflow-x:auto}
@media (max-width:600px){
  /* Activity filters: two columns left the dropdowns running past the panel and touching each other. */
  html:root body .activity-filter-grid{grid-template-columns:minmax(0,1fr)}
  html:root body .activity-filter-grid select,html:root body .activity-filter-grid input{min-width:0;width:100%}
  /* Marketplace cards: the status tag squeezed the name into a narrow column; it moves under the name. */
  html:root body .mkc-head.wide{grid-template-columns:88px minmax(0,1fr);row-gap:10px}
  html:root body .mkc-head.wide>:last-child{grid-column:1/-1;justify-self:start}
}
/* Tab rows (sales-view-tabs) were width:fit-content and pushed a phone page sideways (Display & Branding at 360px).
   They now scroll inside themselves; the System tabs already did (styles.css .system-subtabs). */
html:root body .sales-view-tabs{max-width:100%;overflow-x:auto;overflow-y:hidden;scrollbar-width:thin}
html:root body .sales-view-tabs .sales-view-tab{flex:0 0 auto;white-space:nowrap}
@media (max-width:600px){
  /* Tab rows wrap onto a second line on a phone rather than hiding the last tab off the edge. */
  html:root body .sales-view-tabs{flex-wrap:wrap;overflow-x:visible;width:auto}
  /* A long button label ("Save Company Defaults and Apply to My Account") wraps instead of pushing the page sideways. */
  html:root body main .button{white-space:normal;height:auto;max-width:100%}
  /* An empty table's message was centred across a table wider than the phone, so it started mid-screen and was cut off. */
  html:root body td.empty{text-align:left}
}
/* Single-character alignment markers (REG 262's date and odometer digit boxes) sit closer together on the form than
   a padded marker is wide, so digit 2 covered digit 1 and it could not be clicked (walk, 2026-10-16). One character
   gets no side padding; the printed digit is unchanged, only the marker around it is tighter. */
html:root body .alignment-overlay[data-one-char]{padding-left:0;padding-right:0;border-left-width:0;border-right-width:0}
/* System screens have a second sticky layer, the System Tools tab row (104px under the 60px top bar). Anything
   scrolled to the top (a jump, keyboard focus, find in page) landed under it, and the Roles & Permissions rail stuck
   behind it, so its first control ("Roles") could not be clicked (walk, 2026-10-16). Clear both layers there. */
html:root:has(.system-tools-sticky-row){scroll-padding-top:176px}
html:root body .pui-rail{top:176px}

/* Booking tools (app.js calendlyPanelHtml): a mark on every chip, and the one in use set apart from the one being
   looked at. Official artwork only for Cal.com and Square (each publishes it); the rest get a drawn calendar on the
   tool's own colour. */
html:root body .booking-provider{display:inline-flex;align-items:center;gap:8px}
html:root body .booking-mark{width:20px;height:20px;flex:0 0 20px;display:inline-grid;place-items:center;border-radius:5px;background:#5b6472 center/cover no-repeat;box-shadow:0 0 0 1px rgba(255,255,255,.45)}
html:root body .booking-mark[data-booking-mark="calcom"]{background-image:url("img/sources/booking/calcom.png")}
html:root body .booking-mark[data-booking-mark="square"]{background:#fff url("assets/payment/square.svg") center/70% auto no-repeat;box-shadow:inset 0 0 0 1px #d6dbe1}
html:root body .booking-mark[data-booking-mark="calendly"]{background-color:#006bff}
html:root body .booking-mark[data-booking-mark="google"]{background-color:#1a73e8}
html:root body .booking-mark[data-booking-mark="microsoft"]{background-color:#0f7b6c}
html:root body .booking-mark[data-booking-mark="acuity"]{background-color:#2d2d2d}
html:root body .booking-mark[data-booking-mark="hubspot"]{background-color:#ff5c35}
html:root body .booking-mark[data-booking-mark="zoho"]{background-color:#e42527}
html:root body .booking-mark[data-booking-mark="setmore"]{background-color:#1f8ef1}
html:root body .booking-provider.saved{border-color:var(--ok,#1f8a4c);box-shadow:inset 0 0 0 1px var(--ok,#1f8a4c)}
html:root body .booking-saved-pill{padding:2px 6px;border-radius:var(--L-radius,2px);font-size:var(--fs-micro);line-height:var(--lh-micro);font-weight:600;background:color-mix(in srgb,var(--ok,#1f8a4c) 16%,transparent);color:var(--ok,#1f8a4c)}

/* A customer row opens the customer from anywhere on it (app.js). */
html:root body tr.customer-row{cursor:pointer}
html:root body tr.customer-row:hover td{background:color-mix(in srgb,var(--accent,#2b7de9) 6%,transparent)}

/* Subscription: "Change plan or cancel" (subscription.js billingHtml). Sits with the support box, same
   surface, so it reads as one of the screen's two things to do rather than a warning. */
:root .sub-billing{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px 14px;margin:10px 0 4px;padding:12px 14px;border:1px solid var(--line);border-radius:10px;background:var(--surface-soft)}
:root .sub-billing-copy strong{display:block;font-size:var(--fs-body);line-height:var(--lh-body);font-weight:600;color:var(--ink)}
:root .sub-billing-copy p{margin:2px 0 0;font-size:var(--fs-small);line-height:var(--lh-small);color:var(--muted);max-width:68ch}
:root .sub-billing-result{grid-column:1/-1;margin:0;font-size:var(--fs-small);line-height:var(--lh-small);color:var(--ink)}
:root .sub-billing-result:empty{display:none}
@media (max-width:640px){:root .sub-billing{grid-template-columns:minmax(0,1fr)}:root .sub-billing>.button{justify-self:start}}
/* The plan picker (subscription.js planChangeHtml): the same box as the billing link, one row per plan. */
/* Payments on a completed sale (sale-payments.js, partner P04). */
:root .pi-link{display:grid;gap:6px;margin:10px 0}
:root .pi-link label{font-size:var(--fs-small);line-height:var(--lh-small);font-weight:600}
:root .pi-link-row{display:flex;gap:8px;flex-wrap:wrap}
:root .pi-look{margin:14px 0 4px;border-top:1px solid var(--line);padding-top:12px}
:root .pi-look summary{cursor:pointer;font-weight:600;font-size:var(--fs-body);line-height:var(--lh-body);min-height:32px}
:root .pi-look p{margin:8px 0}
:root .pi-look-row{display:flex;gap:14px;align-items:flex-start;padding:12px 0;border-bottom:1px solid var(--line)}
:root .pi-look-thumb{flex:none;display:flex;align-items:center;justify-content:center;border:1px solid var(--line);border-radius:12px;background:var(--surface);overflow:hidden;color:var(--muted);font-size:var(--fs-small);line-height:var(--lh-small)}
:root .pi-look-logo{width:120px;height:72px;padding:6px}
:root .pi-look-logo img{max-width:100%;max-height:100%;object-fit:contain}
:root .pi-look-banner{width:120px;height:72px}
:root .pi-look-banner img{width:100%;height:100%;object-fit:cover}
:root .pi-look-copy{display:grid;gap:4px;min-width:0;flex:1}
:root .pi-look-copy span{color:var(--muted);font-size:var(--fs-small);line-height:var(--lh-small)}
:root .pi-look-file-input{position:absolute;width:1px;height:1px;opacity:0;overflow:hidden}
:root .pi-look-file-input:focus-visible+label{outline:2px solid var(--accent);outline-offset:2px}
:root .pi-look-color{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-top:6px}
:root .pi-look-color input[type="color"]{width:56px;height:40px;padding:2px;border:1px solid var(--line);border-radius:10px;background:var(--surface);cursor:pointer}
:root .pi-look-sample{display:inline-flex;align-items:center;min-height:40px;padding:0 18px;border-radius:12px;font-weight:600;font-size:var(--fs-body);line-height:var(--lh-body)}
/* The page's colours, beside a small picture of the page that repaints as they move (2026-11-03). */
:root .pi-look-colours{display:grid;grid-template-columns:minmax(0,1fr) minmax(240px,320px);gap:20px;align-items:start}
:root .pi-look-colour-list{min-width:0}
:root .pi-look-preview .pv-words{padding:0 2px}
:root .pi-look-colour-row{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-top:12px}
:root .pi-look-colour-row input[type="color"]{width:56px;height:40px;padding:2px;border:1px solid var(--line);border-radius:10px;background:var(--surface);cursor:pointer;flex:none}
:root .pi-look-colour-copy{display:grid;flex:1 1 180px;min-width:0}
:root .pi-look-colour-copy strong{font-weight:600;font-size:var(--fs-small);line-height:var(--lh-small)}
:root .pi-look-colour-copy span{color:var(--muted);font-size:var(--fs-micro);line-height:var(--lh-micro)}
:root .pi-look-preview{border:1px solid var(--line);border-radius:12px;overflow:hidden;font-size:var(--fs-micro);line-height:var(--lh-micro);position:sticky;top:12px}
:root .pi-look-preview [data-pv]{display:flex;align-items:center;gap:8px;padding:8px 12px}
:root .pi-look-preview [data-pv="announce"]{justify-content:center;font-weight:600}
:root .pi-look-preview [data-pv="header"] strong{flex:1;font-weight:600}
:root .pi-look-preview .pv-logo{width:20px;height:20px;border-radius:6px;background:currentColor;opacity:.5}
:root .pi-look-preview .pv-button{padding:4px 10px;border-radius:8px;font-weight:600}
:root .pi-look-preview [data-pv="page"]{flex-direction:column;align-items:stretch;gap:8px;padding:14px 12px}
:root .pi-look-preview .pv-card{display:grid;gap:2px;padding:0 0 8px;border-radius:10px;overflow:hidden;background:#FFFFFF;color:#0F172A;box-shadow:0 1px 4px rgba(15,23,42,.12)}
:root .pi-look-preview .pv-card strong,:root .pi-look-preview .pv-card .pv-price{padding:0 10px;font-weight:600}
:root .pi-look-preview .pv-photo{height:56px;background:#E8EDF6;margin-bottom:6px}
:root .pi-look-preview [data-pv="footer"]{padding:10px 12px}
@media (max-width:760px){:root .pi-look-colours{grid-template-columns:minmax(0,1fr)}:root .pi-look-preview{position:static}}
:root .pi-look-group{border:0;border-top:1px solid var(--line);margin:0;padding:14px 0 6px;min-width:0}
:root .pi-look-group legend{padding:0 8px 0 0;font-weight:600;font-size:var(--fs-body);line-height:var(--lh-body)}
:root .pi-look-group .pi-look-row:last-child{border-bottom:0}
:root .pi-look-sub{margin:12px 0 6px;font-weight:600;font-size:var(--fs-small);line-height:var(--lh-small);color:var(--muted)}
:root .pi-look-note{display:block;margin:6px 0;color:var(--muted);font-size:var(--fs-small);line-height:var(--lh-small)}
:root .pi-look-choices{display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:8px}
:root .pi-look-choice{position:relative;display:grid;gap:4px;padding:10px;border:1px solid var(--line);border-radius:12px;background:var(--surface);cursor:pointer}
:root .pi-look-choice input{position:absolute;opacity:0;pointer-events:none}
:root .pi-look-choice:has(input:checked){border-color:var(--accent);box-shadow:0 0 0 2px var(--accent) inset}
:root .pi-look-choice:has(input:focus-visible){outline:3px solid var(--accent);outline-offset:2px}
:root .pi-look-choice strong{font-size:var(--fs-small);line-height:var(--lh-small);font-weight:600}
:root .pi-look-choice span:not(.pi-look-swatch){font-size:var(--fs-micro);line-height:var(--lh-micro);color:var(--muted)}
:root .pi-look-swatch{display:block;height:36px;border-radius:8px;border:1px solid var(--line);background:var(--surface-2,#eef2f7)}
:root .pi-look-style-bold .pi-look-swatch{background:linear-gradient(135deg,#1f3fb4,#0d1c5e)}
:root .pi-look-style-clean .pi-look-swatch{background:linear-gradient(180deg,#eef2fb 70%,#1f3fb4 70%)}
:root .pi-look-style-dark .pi-look-swatch{background:linear-gradient(135deg,#0b1220,#16213a)}
:root .pi-look-corners-rounded .pi-look-swatch{border-radius:14px}
:root .pi-look-corners-soft .pi-look-swatch{border-radius:8px}
:root .pi-look-corners-square .pi-look-swatch{border-radius:2px}
:root [class*="pi-look-font-"] .pi-look-swatch{display:flex;align-items:center;padding:0 10px;font-size:var(--fs-lead);line-height:var(--lh-lead);font-weight:700;background:var(--surface)}
:root [class*="pi-look-font-"] .pi-look-swatch::after{content:"Aa 123"}
:root .pi-look-font-manrope .pi-look-swatch{font-family:"Manrope",system-ui,sans-serif}
:root .pi-look-font-sora .pi-look-swatch{font-family:"Sora",system-ui,sans-serif}
:root .pi-look-font-archivo .pi-look-swatch{font-family:"Archivo",system-ui,sans-serif}
:root .pi-look-font-system .pi-look-swatch{font-family:system-ui,-apple-system,"Segoe UI",Roboto,sans-serif}
:root .pi-look-cards-grid .pi-look-swatch{background:repeating-linear-gradient(90deg,#cbd5e1 0 30%,transparent 30% 35%)}
:root .pi-look-cards-compact .pi-look-swatch{background:repeating-linear-gradient(90deg,#cbd5e1 0 22%,transparent 22% 26%)}
:root .pi-look-cards-list .pi-look-swatch{background:repeating-linear-gradient(180deg,#cbd5e1 0 40%,transparent 40% 60%)}
:root .pi-look-field{display:grid;gap:6px;margin:10px 0}
:root .pi-look-field span{font-size:var(--fs-small);line-height:var(--lh-small);font-weight:600}
:root .pi-look-field em{font-style:normal;font-weight:400;color:var(--muted)}
:root .pi-look-field small{color:var(--muted);font-size:var(--fs-micro);line-height:var(--lh-micro)}
:root .pi-look-field input,:root .pi-look-field select{min-height:44px;padding:0 12px;border:1px solid var(--line);border-radius:10px;font-size:var(--fs-body);line-height:var(--lh-body);background:var(--surface);color:var(--ink)}
:root .pi-look-field textarea{padding:10px 12px;border:1px solid var(--line);border-radius:10px;font-size:var(--fs-body);line-height:var(--lh-body);background:var(--surface);color:var(--ink);resize:vertical}
:root .pi-look-toggles{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:6px 16px}
:root .pi-look-toggles label{display:flex;align-items:center;gap:8px;min-height:32px;font-size:var(--fs-small);line-height:var(--lh-small)}
:root .pi-look-toggles input{width:18px;height:18px;flex:none}
:root .pi-look-actions{margin-top:14px}
:root .pi-look-tagline{display:grid;gap:6px;margin:12px 0}
:root .pi-look-tagline span{font-size:var(--fs-small);line-height:var(--lh-small);font-weight:600}
:root .pi-look-tagline em{font-style:normal;font-weight:400;color:var(--muted)}
:root .pi-look-tagline input{min-height:44px;padding:0 12px;border:1px solid var(--line);border-radius:10px;font-size:var(--fs-body);line-height:var(--lh-body);background:var(--surface);color:var(--ink)}
:root .pi-link-row input{flex:1 1 280px;min-height:44px;padding:0 12px;border:1px solid var(--line);border-radius:10px;font-size:var(--fs-body);line-height:var(--lh-body);background:var(--surface);color:var(--ink)}
:root .print-pack-select{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:0 0 8px;font-size:var(--fs-small);line-height:var(--lh-small)}
:root .sale-pay{display:block}
:root .sale-pay-head{display:flex;align-items:center;justify-content:space-between;gap:8px 14px;flex-wrap:wrap}
:root .sale-pay-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:10px 0 0}
:root .sale-pay-summary div{padding:8px 10px;border:1px solid var(--line);border-radius:8px;background:var(--surface)}
:root .sale-pay-summary dt{font-size:var(--fs-small);line-height:var(--lh-small);color:var(--muted)}
:root .sale-pay-summary dd{margin:2px 0 0;font-size:var(--fs-body);line-height:var(--lh-body);font-weight:600;color:var(--ink)}
:root .sale-pay-note,:root .sale-pay-why,:root .sale-pay-projection{margin:8px 0 0;font-size:var(--fs-small);line-height:var(--lh-small);color:var(--muted)}
:root .sale-pay-list{list-style:none;margin:10px 0 0;padding:0;display:grid;gap:8px}
:root .sale-pay-row{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px 14px;padding:10px 12px;border:1px solid var(--line);border-radius:8px;background:var(--surface)}
:root .sale-pay-what{display:flex;flex-wrap:wrap;align-items:center;gap:4px 10px;font-size:var(--fs-small);line-height:var(--lh-small);color:var(--muted)}
:root .sale-pay-what strong{font-size:var(--fs-body);line-height:var(--lh-body);color:var(--ink)}
:root .sale-pay-actions{display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-end}
:root .sale-pay-dialog{margin:10px 0 0;padding:12px;border:1px solid var(--line);border-radius:10px;background:var(--surface)}
:root .sale-pay-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:8px 0 0}
:root .sale-pay-grid label{display:grid;gap:4px;font-size:var(--fs-small);line-height:var(--lh-small)}
:root .sale-pay-check,:root .sale-pay-paid{display:flex;align-items:center;gap:8px;margin:10px 0 0;font-size:var(--fs-body);line-height:var(--lh-body)}
:root .sale-pay-paid.is-disabled{color:var(--muted)}
:root .sale-pay-message{margin:10px 0 0;font-size:var(--fs-small);line-height:var(--lh-small);color:var(--ink)}
@media (max-width:640px){:root .sale-pay-summary,:root .sale-pay-grid{grid-template-columns:minmax(0,1fr)}:root .sale-pay-row{grid-template-columns:minmax(0,1fr)}:root .sale-pay-actions{justify-content:flex-start}}
:root .sub-plans{margin:10px 0 4px;padding:12px 14px;border:1px solid var(--line);border-radius:10px;background:var(--surface-soft)}
:root .sub-plans>strong{display:block;font-size:var(--fs-body);line-height:var(--lh-body);font-weight:600;color:var(--ink)}
:root .sub-plans>p{margin:2px 0 8px;font-size:var(--fs-small);line-height:var(--lh-small);color:var(--muted);max-width:68ch}
:root .sub-plan-list{list-style:none;margin:0;padding:0;display:grid;gap:8px}
:root .sub-plan{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px 14px;padding:10px 12px;border:1px solid var(--line);border-radius:8px;background:var(--surface)}
:root .sub-plan-current{border-color:var(--accent)}
:root .sub-plan-copy strong{display:block;font-size:var(--fs-body);line-height:var(--lh-body);font-weight:600;color:var(--ink)}
:root .sub-plan-copy span{display:block;font-size:var(--fs-small);line-height:var(--lh-small);color:var(--muted)}
:root .sub-plans>.sub-billing-result{margin:8px 0 0}
@media (max-width:640px){:root .sub-plan{grid-template-columns:minmax(0,1fr)}:root .sub-plan>.button,:root .sub-plan>.status{justify-self:start}}
/* Sale wizard: the rates CDTFA lists for an address on a tax district line, one button each. */
:root .sw-tax-choices{margin:12px 0 0;padding:12px 14px;border:1px solid var(--line);border-left:3px solid var(--accent);border-radius:10px;background:var(--surface-soft)}
:root .sw-tax-choices p{margin:0 0 10px;font-size:var(--fs-small);line-height:var(--lh-small);color:var(--ink);max-width:72ch}
:root .sw-tax-choice-row{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
:root .sw-tax-choice-row .button span{font-weight:400;color:var(--muted)}
/* Sale wizard paperwork: the signing links made for this car, and where each one stands. */
:root .sw-sign-links ul{list-style:none;margin:8px 0;padding:0;display:grid;gap:6px}
:root .sw-sign-links li{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
:root .sw-sign-links li>span{flex:1 1 220px;font-size:var(--fs-small);line-height:var(--lh-small)}
:root .sw-sign-links li small{display:block;color:var(--muted)}
/* Vehicle History: a filed report and its Remove button, kept together as one tile. */
:root .hx-filed-wrap{display:flex;flex-direction:column;gap:6px;align-items:stretch}
:root .hx-filed-wrap .hx-remove{align-self:flex-start}
/* Market pulse: the National / state switch beside the badge, and room for a fourth tile. */
:root .mp-head-side{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
:root .mp-scope{display:inline-flex;gap:4px}
html:root body #app .mp-scope .button[aria-pressed="true"]{border-color:var(--L-cta);background:var(--L-cta);color:var(--L-cta-ink);box-shadow:none}
:root .market-pulse-panel .mp-tiles{grid-template-columns:repeat(auto-fit,minmax(200px,1fr))}
/* Sign-in: the lost-authenticator request and authorization boxes hold one long line of text. */
:root .security-gate-card .lost-auth-code{width:100%;font-family:ui-monospace,Consolas,monospace;font-size:var(--fs-small);line-height:var(--lh-small);word-break:break-all;resize:vertical}

/* A DISABLED BUTTON LOOKS DISABLED, WHATEVER KIND IT IS (QA, 2026-10-19, F9). The skin's
   html:root body .button.primary / .button.danger-outline rules (specificity 0,3,2) outranked the
   muted rule above (0,3,0), so a disabled Continue stayed bright blue and a disabled Remove Co-Buyer
   stayed bright red: both read as clickable and did nothing. Doubling the class lifts this above them. */
html:root body .button.button:disabled,
html:root body .button.button[aria-disabled="true"],
html:root body .desktop-action-button.desktop-action-button:disabled{
  color: color-mix(in srgb, var(--ink) 42%, transparent);
  background: color-mix(in srgb, var(--ink) 5%, var(--surface, #fff));
  border-color: var(--ctl-edge-quiet);
  box-shadow: none;
  transform: none;
  cursor: not-allowed;
}

/* THE PAGE YOU ARE ON IS THE CRUMB THAT MATTERS (QA, 2026-10-19, F9). In a crowded header the earlier
   links kept their full width and the current crumb, the only one that can shrink, was cut to "TS..."
   for TST-002. The links now give up space first; the current crumb keeps its own up to 60% of the bar. */
html:root body .breadcrumb-bar a{flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
html:root body .breadcrumb-bar span{flex:0 0 auto;max-width:60%}
/* Service Bay (web/service-bay.js): repair orders and the reconditioning board. */
:root .sb-tabs{display:flex;align-items:center;gap:4px;flex-wrap:wrap;margin:0 0 14px;border-bottom:1px solid var(--line)}
:root .sb-tab{display:inline-flex;align-items:center;gap:6px;min-height:40px;padding:0 14px;border-bottom:3px solid transparent;color:var(--muted);font-weight:600;font-size:var(--fs-body);line-height:var(--lh-body)}
:root .sb-tab.active{color:var(--ink);border-bottom-color:var(--accent)}
:root .sb-count{padding:0 8px;border-radius:999px;background:var(--bluesoft);color:var(--blue);font-size:var(--fs-micro);line-height:var(--lh-micro)}
:root .sb-new{margin-left:auto}
:root .sb-filters{display:flex;flex-wrap:wrap;gap:10px;align-items:center;justify-content:space-between;margin-bottom:12px}
:root .sb-filters .chips{display:flex;flex-wrap:wrap;gap:6px}
:root .sb-filters .chip{min-height:36px;padding:0 12px;border:1px solid var(--line);border-radius:999px;background:var(--surface);font-weight:600;font-size:var(--fs-small);line-height:var(--lh-small);cursor:pointer}
:root .sb-filters .chip[aria-pressed="true"]{background:var(--accent);border-color:var(--accent);color:var(--accent-ink)}
:root .sb-table tbody tr{cursor:pointer}
:root .sb-table td.num,:root .sb-table th.num,:root .sb-lines .num{text-align:right;white-space:nowrap}
/* The stock number and part number under a row's main line had no size rule and fell to the browser's 0.8333em: 10.83, 11.67 and 13.33px (QA, 2026-10-27). */
:root .sb-table small,:root .sb-lines small{color:var(--muted);font-size:var(--fs-micro);line-height:var(--lh-micro)}
:root .sb-late{color:var(--red);font-weight:600}
:root .sb-status{display:inline-flex;padding:2px 10px;border-radius:999px;font-size:var(--fs-micro);line-height:var(--lh-micro);font-weight:700;white-space:nowrap;background:var(--bluesoft);color:var(--blue)}
:root .sb-status-waiting_parts{background:var(--ambersoft);color:var(--amber)}
:root .sb-status-done{background:var(--greensoft);color:var(--green)}
:root .sb-status-closed,:root .sb-status-void{background:var(--surface-2,#eef2f7);color:var(--muted)}
:root .sb-empty{padding:24px;text-align:center;color:var(--muted)}
:root .sb-form,:root .sb-steps{max-width:880px}
:root .sb-kind{display:flex;gap:16px;margin:4px 0 12px}
:root .sb-kind-choice{display:inline-flex;align-items:center;gap:8px;min-height:32px;font-weight:600}
:root .sb-field{display:grid;gap:6px;margin:0 0 12px}
:root .sb-field>span{font-size:var(--fs-small);line-height:var(--lh-small);font-weight:600}
:root .sb-field em{font-style:normal;font-weight:400;color:var(--muted)}
:root .sb-field input,:root .sb-field select,:root .sb-field textarea{min-height:40px;padding:8px 10px;border:1px solid var(--line);border-radius:var(--r-control,8px);background:var(--surface);color:var(--ink);font-size:var(--fs-body);line-height:var(--lh-body)}
:root .sb-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:0 12px}
:root .sb-grid-line{grid-template-columns:minmax(220px,2fr) repeat(auto-fit,minmax(120px,1fr))}
:root .sb-ro-head{display:flex;flex-wrap:wrap;gap:12px;align-items:flex-start;justify-content:space-between;margin-bottom:14px}
:root .sb-ro-head h2{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
:root .sb-ro-actions{flex-wrap:wrap}
:root .sb-ro-body{display:grid;grid-template-columns:minmax(0,2fr) minmax(280px,1fr);gap:14px;align-items:start}
:root .sb-ro-main,:root .sb-ro-side{display:grid;gap:14px;min-width:0}
:root .sb-line-form{margin-top:12px;padding-top:12px;border-top:1px solid var(--line)}
:root .sb-line-form .chips{display:flex;gap:6px;margin-bottom:10px}
:root .sb-line-form .chip{min-height:32px;padding:0 12px;border:1px solid var(--line);border-radius:999px;background:var(--surface);font-weight:600;font-size:var(--fs-small);line-height:var(--lh-small);cursor:pointer}
:root .sb-line-form .chip[aria-pressed="true"]{background:var(--accent);border-color:var(--accent);color:var(--accent-ink)}
:root .sb-times{list-style:none;margin:0 0 12px;padding:0;display:grid;gap:6px}
:root .sb-times li{display:flex;justify-content:space-between;gap:10px}
:root .sb-running{display:inline-flex;padding:0 8px;border-radius:999px;background:var(--greensoft);color:var(--green);font-size:var(--fs-micro);line-height:var(--lh-micro);font-weight:700}
:root .sb-note-list{list-style:none;margin:0 0 12px;padding:0;display:grid;gap:10px;max-height:320px;overflow:auto}
:root .sb-note-list p{margin:0}
:root .sb-note-list small{color:var(--muted);font-size:var(--fs-micro);line-height:var(--lh-micro)}
:root .sb-summary{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:10px;margin:0 0 14px}
:root .sb-summary p{display:flex;flex-direction:column;gap:2px;margin:0;padding:14px;border:1px solid var(--line);border-radius:var(--r-surface,12px);background:var(--surface)}
:root .sb-summary strong{font-size:var(--fs-h3);line-height:var(--lh-h3);color:var(--ink)}
:root .sb-summary span{color:var(--muted);font-size:var(--fs-small);line-height:var(--lh-small)}
:root .sb-summary .warn strong{color:var(--red)}
:root .sb-recon-start{display:grid;grid-template-columns:minmax(220px,2fr) minmax(160px,1fr) auto;gap:12px;align-items:end}
:root .sb-recon-start .sb-field{margin:0}
:root .sb-board{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(230px,1fr);gap:12px;overflow-x:auto;padding-bottom:8px;margin-top:14px}
:root .sb-col{display:flex;flex-direction:column;gap:8px;min-width:0;padding:10px;border:1px solid var(--line);border-radius:var(--r-surface,12px);background:var(--surface-2,#f5f7fa)}
:root .sb-col header{display:flex;flex-direction:column;gap:2px}
:root .sb-col header span{font-size:var(--fs-micro);line-height:var(--lh-micro)}
:root .sb-col-empty{margin:4px 0;font-size:var(--fs-small);line-height:var(--lh-small)}
:root .sb-card{display:grid;gap:4px;padding:10px;border:1px solid var(--line);border-left:4px solid var(--blue);border-radius:var(--r-control,8px);background:var(--surface)}
:root .sb-card.overdue{border-left-color:var(--red)}
:root .sb-card small{color:var(--muted);font-size:var(--fs-micro);line-height:var(--lh-micro)}
:root .sb-days{font-size:var(--fs-small);line-height:var(--lh-small)}
:root .sb-card.overdue .sb-days{color:var(--red);font-weight:600}
/* The recon board you can work from (owner, 2026-10-28: "move car card like customer card in leads", "give more
   control in this page"): cards lift and drag, carry a days-used bar and their own controls, and finished cars land in
   a green column. */
:root .sb-card{box-shadow:0 1px 2px color-mix(in srgb,var(--ink) 8%,transparent);transition:box-shadow .15s,transform .15s}
:root .sb-card[draggable="true"]{cursor:grab}
:root .sb-card[draggable="true"]:hover{box-shadow:var(--shadow);transform:translateY(-1px)}
:root .sb-card.is-dragging{opacity:.45;cursor:grabbing}
:root .sb-card[hidden]{display:none}
:root .sb-card.ready{border-left-color:var(--green)}
:root .sb-card-title{color:var(--ink);font-weight:600;font-size:var(--fs-body);line-height:var(--lh-body)}
:root .sb-card-title:hover{color:var(--accent);text-decoration:underline}
:root .sb-meter{display:block;width:100%;height:6px;border:0;border-radius:999px;overflow:hidden;background:var(--line);-webkit-appearance:none;appearance:none}
:root .sb-meter::-webkit-progress-bar{background:var(--line);border-radius:999px}
:root .sb-meter::-webkit-progress-value{background:var(--green);border-radius:999px}
:root .sb-meter::-moz-progress-bar{background:var(--green)}
:root .sb-card.overdue .sb-meter::-webkit-progress-value{background:var(--red)}
:root .sb-card.overdue .sb-meter::-moz-progress-bar{background:var(--red)}
:root .sb-card-ro{justify-self:start;padding:2px 8px;border-radius:999px;background:var(--ambersoft);color:var(--amber);font-size:var(--fs-micro);line-height:var(--lh-micro);font-weight:600}
/* Six columns fit a laptop, so Front-line ready is on screen rather than past a sideways scroll. */
:root .sb-board{grid-auto-columns:minmax(180px,1fr)}
:root .sb-who{display:grid;gap:2px;margin-top:2px}
:root .sb-who span{color:var(--muted);font-size:var(--fs-micro);line-height:var(--lh-micro);font-weight:600}
/* A quiet, dashed box: plainly editable without every card shouting a form at the dealer. */
:root .sb-who input{width:100%;min-width:0;min-height:30px;padding:0 6px;border:1px dashed var(--line);border-radius:var(--r-control,8px);background:transparent;color:var(--ink);font-size:var(--fs-small);line-height:var(--lh-small)}
:root .sb-who input:hover,:root .sb-who input:focus{border-style:solid;background:var(--input-bg,var(--surface))}
:root .sb-recon-move{width:100%;min-height:34px;padding:0 8px;border:1px solid var(--line);border-radius:var(--r-control,8px);background:var(--input-bg,var(--surface));color:var(--input-ink,var(--ink));font-size:var(--fs-small);line-height:var(--lh-small)}
:root .sb-card-actions{display:grid;gap:6px;margin-top:4px}
:root .sb-card-actions .button{width:100%;justify-content:center;white-space:normal;text-align:center}
/* The card shrinks to its column: without minmax(0,1fr) a long button or name pushed it past the column edge. */
:root .sb-card{grid-template-columns:minmax(0,1fr);min-width:0}
:root .sb-card-title{overflow-wrap:anywhere}
:root .sb-card-link{justify-self:start;color:var(--accent);font-size:var(--fs-small);line-height:var(--lh-small);font-weight:600}
:root .sb-col-ready{background:color-mix(in srgb,var(--greensoft) 55%,var(--surface-2,#f5f7fa))}
:root .sb-col.is-drop-open{outline:2px dashed color-mix(in srgb,var(--accent) 35%,transparent);outline-offset:-4px}
:root .sb-col.is-drop-target{outline:2px dashed var(--accent);outline-offset:-4px;background:color-mix(in srgb,var(--accent) 8%,var(--surface-2,#f5f7fa))}
:root .sb-recon-tools{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin:14px 0 0}
:root .sb-recon-tools .search{flex:0 1 360px;min-height:38px}
:root .sb-recon-tools .muted{font-size:var(--fs-small);line-height:var(--lh-small)}
:root .sb-recon-none{font-weight:600}
:root .sb-tile{display:flex;flex-direction:column;gap:2px;margin:0;padding:14px;border:1px solid var(--line);border-radius:var(--r-surface,12px);background:var(--surface);color:inherit;text-align:left;cursor:pointer}
:root .sb-tile:hover{border-color:var(--accent)}
:root .sb-tile.warn:hover{border-color:var(--red)}
:root .sb-tile[aria-pressed="true"]{border-color:var(--accent);box-shadow:inset 0 0 0 1px var(--accent)}
:root .sb-tile.warn[aria-pressed="true"]{border-color:var(--red);box-shadow:inset 0 0 0 1px var(--red)}
:root .sb-step-list{list-style:none;margin:0 0 12px;padding:0;display:grid;gap:8px}
:root .sb-step{display:flex;flex-wrap:wrap;gap:10px;align-items:center;padding:8px;border:1px solid var(--line);border-radius:var(--r-control,8px)}
:root .sb-step .sb-step-name{flex:1 1 200px;min-height:36px;padding:0 10px;border:1px solid var(--line);border-radius:var(--r-control,8px);font-size:var(--fs-body);line-height:var(--lh-body)}
:root .sb-step .sb-step-days{width:56px;min-height:36px;padding:0 8px;border:1px solid var(--line);border-radius:var(--r-control,8px);font-size:var(--fs-body);line-height:var(--lh-body)}
@media (max-width:900px){:root .sb-ro-body{grid-template-columns:minmax(0,1fr)}:root .sb-recon-start{grid-template-columns:minmax(0,1fr)}}
/* THE REPAIR ORDERS AS A BOARD (owner, 2026-11-07: "i want it to fit cars because if all cards are big it will be a night
   mare"). Four figures, then four columns of the same width AND the same height: each column scrolls inside itself, so
   thirty cars in the shop are still one screen. A card is two lines; parts and labor appear on hover or focus. */
:root .sb-figs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:0 0 14px}
:root .sb-fig{display:flex;flex-direction:column;gap:2px;margin:0;padding:12px 14px;border:1px solid var(--line);border-radius:var(--r-surface,12px);background:var(--surface)}
:root .sb-fig strong{color:var(--ink);font-size:var(--fs-h3);line-height:var(--lh-h3);font-variant-numeric:tabular-nums}
:root .sb-fig span{color:var(--muted);font-size:var(--fs-small);line-height:var(--lh-small)}
:root .sb-fig.warn strong{color:var(--red)}
:root .sb-ro-board{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-top:12px}
:root .sb-ro-col{display:flex;flex-direction:column;min-width:0;border:1px solid var(--line);border-top:4px solid var(--line);border-radius:var(--r-surface,12px);background:var(--surface-2,#f5f7fa)}
:root .sb-ro-col-in_progress{border-top-color:var(--blue)}
:root .sb-ro-col-waiting_parts{border-top-color:var(--amber)}
:root .sb-ro-col-done{border-top-color:var(--green)}
:root .sb-ro-col header{display:flex;align-items:center;gap:8px;min-height:44px;padding:8px 12px;border-bottom:1px solid var(--line)}
:root .sb-ro-col header strong{font-size:var(--fs-body);line-height:var(--lh-body)}
:root .sb-ro-count{min-width:24px;padding:0 8px;border-radius:999px;background:var(--surface);color:var(--muted);font-size:var(--fs-micro);line-height:var(--lh-micro);font-weight:600;text-align:center;font-variant-numeric:tabular-nums}
:root .sb-ro-col header .link-btn{margin-left:auto;font-size:var(--fs-small);line-height:var(--lh-small)}
:root .sb-ro-cards{display:flex;flex-direction:column;gap:6px;height:max(280px,calc(100vh - 400px));padding:8px;overflow-y:auto;overscroll-behavior:contain}
:root .sb-ro-card{display:grid;gap:2px;padding:8px 10px;border:1px solid var(--line);border-left:4px solid var(--line);border-radius:var(--r-control,8px);background:var(--surface);cursor:pointer;transition:border-color .12s,box-shadow .12s}
:root .sb-ro-card:hover,:root .sb-ro-card:focus-visible{border-color:var(--accent);box-shadow:var(--shadow)}
:root .sb-ro-card[draggable="true"]{cursor:grab}
:root .sb-ro-card.is-dragging{opacity:.45;cursor:grabbing}
:root .sb-ro-card.is-late{border-left-color:var(--red)}
:root .sb-ro-line{display:flex;align-items:baseline;gap:8px;min-width:0}
:root .sb-ro-chip{flex:none;padding:0 6px;border-radius:6px;background:var(--bluesoft,#e8f1fb);color:var(--blue);font-size:var(--fs-micro);line-height:var(--lh-micro);font-weight:600;font-variant-numeric:tabular-nums}
:root .sb-ro-car{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--ink);font-size:var(--fs-small);line-height:var(--lh-small);font-weight:600}
:root .sb-ro-age{flex:none;color:var(--muted);font-size:var(--fs-micro);line-height:var(--lh-micro)}
:root .sb-ro-age.is-late{color:var(--red);font-weight:600}
:root .sb-ro-job{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--muted);font-size:var(--fs-small);line-height:var(--lh-small)}
:root .sb-ro-total{flex:none;color:var(--ink);font-size:var(--fs-small);line-height:var(--lh-small);font-weight:600;font-variant-numeric:tabular-nums}
/* A link button carries a control's height and size elsewhere; on a two-line card it must be one text line, or the
   Finished column's cards grow taller than the other three columns' (measured 2026-11-07). */
:root .sb-ro-card .sb-ro-clear,:root .sb-ro-col header .link-btn{flex:none;min-height:0;height:auto;padding:0;font-size:var(--fs-small);line-height:var(--lh-small);font-weight:600}
:root .sb-ro-total.is-none{color:var(--muted);font-weight:400}
:root .sb-ro-more{display:none;color:var(--muted);font-size:var(--fs-micro);line-height:var(--lh-micro)}
:root .sb-ro-card:hover .sb-ro-more,:root .sb-ro-card:focus-within .sb-ro-more{display:block}
:root .sb-ro-col.is-drop-open{outline:2px dashed color-mix(in srgb,var(--accent) 35%,transparent);outline-offset:-4px}
:root .sb-ro-col.is-drop-target{outline:2px dashed var(--accent);outline-offset:-4px}
:root .sb-ro-hint{margin:8px 0 0;font-size:var(--fs-small);line-height:var(--lh-small)}
/* Two columns of two on a tablet, one on a phone, where the columns stop scrolling inside themselves. */
@media (max-width:1100px){:root .sb-ro-board{grid-template-columns:repeat(2,minmax(0,1fr))}:root .sb-ro-cards{height:360px}}
@media (max-width:640px){:root .sb-ro-board,:root .sb-figs{grid-template-columns:minmax(0,1fr)}:root .sb-ro-cards{height:auto;max-height:420px}}
@media (min-width:641px) and (max-width:900px){:root .sb-figs{grid-template-columns:repeat(2,minmax(0,1fr))}}
/* Deal Desk (web/deal-desk.js). */
/* THE DEAL DESK, MADE TO LOOK LIKE THE DESK (owner, 2026-10-29: "the deal desk page needs more visual work to look more
   visually appealing"). The car the customer is looking at leads with its photo and its price; the inputs sit in the four
   groups a salesperson thinks in; the grid puts each down payment over its own column with the money centred under it,
   so the eye reads down a column, and every payment is a tile that starts the sale. */
:root .dd-head{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:20px;align-items:center;margin-bottom:14px}
/* No car photo (the print page): the text takes the flexible column and the buttons keep their own. */
.dd-head:not(:has(.dd-head-shot)){grid-template-columns:minmax(0,1fr) auto}
:root .dd-head-shot{position:relative;display:block;width:176px;aspect-ratio:4/3;overflow:hidden;border:1px solid var(--line);background:var(--surface-soft,var(--soft))}
:root .dd-head-shot img,:root .dd-car-shot img{display:block;width:100%;height:100%;object-fit:cover}
:root .dd-shot-tag{position:absolute;left:6px;bottom:6px;padding:0 6px;background:color-mix(in srgb,#000 62%,transparent);color:#fff;font-size:var(--fs-micro);line-height:var(--lh-micro);font-weight:600}
:root .dd-head-main{min-width:0}
:root .dd-head-main h2{margin:2px 0 8px;font-size:var(--fs-h2);line-height:var(--lh-h2)}
:root .dd-head-main .muted{margin:0;font-size:var(--fs-small);line-height:var(--lh-small)}
:root .dd-head-facts{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 8px}
:root .dd-head-facts span{padding:2px 8px;border:1px solid var(--line);background:var(--surface-soft,var(--soft));color:var(--ink);font-size:var(--fs-small);line-height:var(--lh-small);overflow-wrap:anywhere}
:root .dd-head-side{display:grid;justify-items:end;gap:6px;text-align:right}
:root .dd-head-label{color:var(--muted);font-size:var(--fs-micro);line-height:var(--lh-micro);font-weight:700;letter-spacing:.08em;text-transform:uppercase}
:root .dd-head-price{color:var(--ink);font-size:var(--fs-display);line-height:var(--lh-display);font-weight:700;font-variant-numeric:tabular-nums}
@media (max-width:760px){:root .dd-head{grid-template-columns:minmax(0,1fr)}:root .dd-head-side{justify-items:start;text-align:left}:root .dd-head-shot{width:100%}}
:root .dd-cars{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:12px}
:root .dd-car{display:grid;grid-template-rows:auto 1fr;overflow:hidden;border:1px solid var(--line);border-radius:var(--r-control,8px);background:var(--surface);color:var(--ink);text-decoration:none;transition:border-color .14s,box-shadow .14s}
:root .dd-car:hover,:root .dd-car:focus-visible{border-color:var(--accent);box-shadow:0 6px 18px color-mix(in srgb,var(--accent) 18%,transparent)}
:root .dd-car-shot{position:relative;display:block;aspect-ratio:16/10;overflow:hidden;background:var(--surface-soft,var(--soft))}
:root .dd-car-body{display:grid;gap:2px;padding:10px 12px 12px}
:root .dd-car-body>span{color:var(--muted);font-size:var(--fs-small);line-height:var(--lh-small)}
:root .dd-car-price{margin-top:4px;color:var(--ink);font-size:var(--fs-lead);line-height:var(--lh-lead);font-weight:700;font-variant-numeric:tabular-nums}
:root .dd-inputs{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:16px 24px;align-items:start}
:root .dd-group{min-width:0;margin:0;padding:0;border:0}
:root .dd-group legend{margin:0 0 8px;padding:0;color:var(--muted);font-size:var(--fs-micro);line-height:var(--lh-micro);font-weight:700;letter-spacing:.08em;text-transform:uppercase}
:root .dd-group-fields{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:10px;align-items:start}
:root .dd-group-fields .sb-field>span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
/* The down-payment list explains its own format, which is longer than the column: let it wrap (QA walk 2026-11-03). */
:root .dd-group-fields .sb-field.dd-downs>span{white-space:normal;overflow:visible}
:root .dd-downs{grid-column:1/-1}
:root .dd-grid-card{margin-top:14px}
:root .dd-grid{border-collapse:collapse;width:100%}
:root .dd-grid th,:root .dd-grid td{white-space:nowrap;text-align:center;vertical-align:middle}
:root .dd-grid thead th{padding:10px 12px;border-bottom:2px solid var(--ink);color:var(--muted)}
:root .dd-grid thead th:first-child,:root .dd-grid tbody th{text-align:left}
:root .dd-col-down{display:block;color:var(--ink);font-size:var(--fs-lead);line-height:var(--lh-lead);font-weight:700;text-transform:none;letter-spacing:0}
:root .dd-grid tbody th{padding:8px 12px;border-bottom:1px solid var(--line);color:var(--ink);font-size:var(--fs-lead);line-height:var(--lh-lead);font-weight:700}
:root .dd-grid tbody th small{color:var(--muted);font-weight:400}
:root .dd-grid tbody td{padding:6px;border-bottom:1px solid var(--line)}
:root .dd-grid tbody tr:nth-child(even){background:color-mix(in srgb,var(--ink) 3%,transparent)}
:root .dd-grid small{display:block;color:var(--muted);font-size:var(--fs-micro);line-height:var(--lh-micro)}
:root .dd-grid tbody th small{display:inline}
:root .dd-disclaimer{margin-top:10px}
:root .dd-print-only{display:none}
:root .dd-sheets{display:flex;flex-wrap:wrap;gap:20px;align-items:flex-start;margin-top:14px}
:root .dd-sticker{width:612px;max-width:100%;padding:32px;border:1px solid var(--line);border-radius:4px;background:#fff;color:#111}
:root .dd-sticker header{display:grid;gap:2px;padding-bottom:12px;border-bottom:3px solid #111;font-size:var(--fs-small);line-height:var(--lh-small)}
:root .dd-sticker header strong{font-size:var(--fs-lead);line-height:var(--lh-lead)}
:root .dd-sticker h1{margin:18px 0 0;font-size:var(--fs-h1);line-height:var(--lh-h1)}
:root .dd-trim{margin:2px 0 0;font-size:var(--fs-lead);line-height:var(--lh-lead)}
:root .dd-price{margin:14px 0;font-size:var(--fs-display);line-height:var(--lh-display);font-weight:700}
:root .dd-sticker dl{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:0}
:root .dd-sticker dt{font-size:var(--fs-micro);line-height:var(--lh-micro);color:#555;text-transform:uppercase;letter-spacing:.06em}
:root .dd-sticker dd{margin:0;font-weight:600;overflow-wrap:anywhere}
:root .dd-qr{display:flex;gap:14px;align-items:center;margin-top:18px}
:root .dd-qr svg{width:140px;height:140px;flex:none}
:root .dd-sticker footer{margin-top:18px;padding-top:10px;border-top:1px solid #999;font-size:var(--fs-micro);line-height:var(--lh-micro)}
:root .dd-hang{position:relative;width:288px;min-height:648px;padding:72px 24px 24px;border:1px dashed #999;border-radius:24px 24px 4px 4px;background:#fff;color:#111;text-align:center}
:root .dd-hole{position:absolute;top:20px;left:50%;width:56px;height:56px;margin-left:-28px;border:2px solid #999;border-radius:50%}
:root .dd-hang-year{margin:0;font-size:var(--fs-h2);line-height:var(--lh-h2);font-weight:700}
:root .dd-hang h2{margin:4px 0;font-size:var(--fs-h1);line-height:var(--lh-h1)}
:root .dd-hang-price{margin:28px 0 8px;font-size:var(--fs-display);line-height:var(--lh-display);font-weight:700}
/* The price with fees and tax (owner, 2026-11-15): the headline says what it includes, and the lines that make it up sit
   under it, the total ruled off. Black on white, as the rest of the sheet, for any printer. */
:root .dd-price-label{margin:14px 0 0;font-size:var(--fs-small);line-height:var(--lh-small);font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:#333}
:root .dd-price-label+.dd-price{margin-top:2px}
:root .dd-sticker dl.dd-fees{display:grid;grid-template-columns:1fr;gap:0;margin:0 0 16px;padding:8px 0;border-top:1px solid #999;border-bottom:1px solid #999}
:root .dd-sticker dl.dd-fees>div{display:flex;justify-content:space-between;gap:16px;padding:2px 0}
:root .dd-sticker dl.dd-fees dt{font-size:var(--fs-small);line-height:var(--lh-small);color:#333;text-transform:none;letter-spacing:0}
:root .dd-sticker dl.dd-fees dd{font-variant-numeric:tabular-nums}
:root .dd-sticker dl.dd-fees .dd-fees-total{margin-top:4px;padding-top:6px;border-top:2px solid #111}
:root .dd-sticker dl.dd-fees .dd-fees-total :is(dt,dd){font-size:var(--fs-body);line-height:var(--lh-body);font-weight:700;color:#111}
:root .dd-hang-label{margin:0;font-size:var(--fs-small);line-height:var(--lh-small);font-weight:600}
:root .dd-hang-base{margin:4px 0 0;font-size:var(--fs-small);line-height:var(--lh-small)}
:root .dd-hang-stock{margin-top:28px;font-size:var(--fs-small);line-height:var(--lh-small);color:#555}
:root .dd-review{display:grid;grid-template-columns:minmax(220px,280px) minmax(0,1fr);gap:24px;align-items:start}
:root .dd-review-code svg{width:100%;height:auto;background:#fff;padding:12px;border-radius:12px}
:root .dd-review-list{list-style:none;margin:0 0 12px;padding:0;display:grid;gap:8px}
:root .dd-review-list li{display:flex;flex-wrap:wrap;gap:10px;align-items:center;justify-content:space-between;padding:10px;border:1px solid var(--line);border-radius:var(--r-control,8px)}
:root .dd-review-list span{display:grid}
:root .dd-review-list small{color:var(--muted);font-size:var(--fs-micro);line-height:var(--lh-micro)}
@media (max-width:760px){:root .dd-review{grid-template-columns:minmax(0,1fr)}}
/* Printing one sheet (app.js printSheet): only the sheet, at the top of the page. */
@media print{
  body.printing-sheet *{visibility:hidden!important}
  body.printing-sheet .print-target,body.printing-sheet .print-target *{visibility:visible!important}
  body.printing-sheet .print-target{position:absolute!important;left:0!important;top:0!important;margin:0!important;box-shadow:none!important;border-color:#999!important}
  /* The sheet is lifted to be a child of <body>, and the reports' print rule (styles.css: body>*{display:none!important})
     hid it: the window sticker and the hang tag printed as a white page (owner, 2026-11-22). This outranks it. */
  body.printing-sheet>.print-target{display:block!important}
  /* The reports' print rules also hide every <header> on the page, which took the dealer's name and address off the top
     of the window sticker. */
  body.printing-sheet .print-target header{display:grid!important}
  body.printing-sheet .print-target .dd-print-only{display:block!important}
  body.printing-sheet .print-target.sw-buyer-copy{display:block!important}
}
/* The buyer's copy of the sale (app.js saleBuyerCopyHtml): printed alone, never shown on screen. */
:root .sw-buyer-copy{display:none;width:612px;max-width:100%;padding:32px;background:#fff;color:#111}
:root .sw-buyer-copy .sw-copy-head{display:grid;gap:2px;padding-bottom:12px;border-bottom:3px solid #111;font-size:var(--fs-small);line-height:var(--lh-small)}
:root .sw-buyer-copy .sw-copy-head strong{font-size:var(--fs-lead);line-height:var(--lh-lead)}
:root .sw-buyer-copy h2{margin:18px 0 2px;font-size:var(--fs-h2);line-height:var(--lh-h2)}
:root .sw-buyer-copy p{margin:0 0 12px}
:root .sw-buyer-copy table{width:100%;margin:0 0 14px;border-collapse:collapse}
:root .sw-buyer-copy th,:root .sw-buyer-copy td{padding:6px 0;border-bottom:1px solid #ddd;font-size:var(--fs-body);line-height:var(--lh-body);text-align:left;font-weight:400}
:root .sw-buyer-copy td{text-align:right}
:root .sw-buyer-copy .sw-copy-total th,:root .sw-buyer-copy .sw-copy-total td{font-weight:700;border-bottom:2px solid #111}
:root .sw-buyer-copy footer{margin-top:12px;font-size:var(--fs-small);line-height:var(--lh-small)}
:root .sw-copy-actions{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin-top:12px}
:root .sw-copy-actions .muted{font-size:var(--fs-small);line-height:var(--lh-small)}
/* Follow-ups (web/follow-ups.js): tasks, the calendar, campaign lists and the rules. The tabs and counts are the
   Workshop's (sb-tabs, sb-count), so the two screens read as one family. */
:root .fu-screen{display:grid;gap:14px}
:root .fu-screen .sb-tabs{margin:0}
:root .fu-bar{display:flex;flex-wrap:wrap;gap:10px;align-items:center;justify-content:space-between}
:root .fu-who{display:flex;flex-wrap:wrap;gap:6px}
:root .fu-range{font-size:var(--fs-body);line-height:var(--lh-body)}
:root .fu-add>summary{cursor:pointer;font-weight:600;font-size:var(--fs-body);line-height:var(--lh-body)}
:root .fu-form{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:12px;margin-top:12px;max-width:960px}
:root .fu-form label{display:grid;gap:6px;font-size:var(--fs-small);line-height:var(--lh-small);font-weight:600}
:root .fu-form label small{font-weight:400;color:var(--muted)}
:root .fu-form input,:root .fu-form select,:root .fu-form textarea{min-height:40px;padding:8px 10px;border:1px solid var(--line);border-radius:var(--r-control,8px);background:var(--surface);color:var(--ink);font-size:var(--fs-body);line-height:var(--lh-body);font-weight:400}
:root .fu-form .fu-wide{grid-column:1/-1}
:root .fu-group h3,:root .fu-day h3{display:flex;align-items:center;gap:8px;margin:0 0 8px;font-size:var(--fs-h3);line-height:var(--lh-h3)}
:root .fu-tasks,:root .fu-appts{list-style:none;margin:0;padding:0;display:grid;gap:8px}
:root .fu-task,:root .fu-appt{display:flex;flex-wrap:wrap;gap:10px;align-items:center;justify-content:space-between;padding:12px 14px;border:1px solid var(--line);border-left:4px solid var(--line);border-radius:var(--r-surface,12px);background:var(--surface)}
:root .fu-task.late{border-left-color:var(--red)}
:root .fu-task.done{opacity:.8}
:root .fu-task.editing,:root .fu-appt.editing{display:block}
:root .fu-task-main{display:grid;gap:2px;min-width:0;flex:1 1 280px}
:root .fu-task-main small{color:var(--muted);font-size:var(--fs-small);line-height:var(--lh-small)}
:root .fu-notes{color:var(--ink);font-size:var(--fs-small);line-height:var(--lh-small);white-space:pre-wrap}
:root .fu-week{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:12px}
:root .fu-day{padding:12px;border:1px solid var(--line);border-radius:var(--r-surface,12px);background:var(--surface-2,#f5f7fa);min-width:0}
:root .fu-day.today{border-color:var(--accent)}
:root .fu-free{margin:0;font-size:var(--fs-small);line-height:var(--lh-small)}
:root .fu-appt{border-left-color:var(--accent)}
:root .fu-appt.fu-done,:root .fu-appt.fu-no_show,:root .fu-appt.fu-cancelled{border-left-color:var(--line);opacity:.8}
:root .fu-appt-time{font-weight:700;font-size:var(--fs-body);line-height:var(--lh-body);min-width:72px}
:root .fu-campaigns{display:grid;gap:12px}
:root .fu-message{margin:8px 0;padding:10px 12px;border-radius:var(--r-surface,12px);background:var(--bluesoft);color:var(--ink);font-size:var(--fs-body);line-height:var(--lh-body);white-space:pre-wrap}
:root .fu-sample{margin:0 0 10px;font-size:var(--fs-small);line-height:var(--lh-small)}
:root .fu-rule-note p{margin:0}
:root .fu-rules{display:grid;gap:12px}
:root .fu-rule{display:grid;gap:4px;padding:10px 0;border-bottom:1px solid var(--line)}
:root .fu-rule small{color:var(--muted);font-size:var(--fs-small);line-height:var(--lh-small);font-weight:400}
:root .fu-check{display:flex;align-items:center;gap:10px;font-weight:600}
:root .fu-check input{width:18px;height:18px}
:root .fu-days{display:flex;flex-wrap:wrap;align-items:center;gap:8px;font-size:var(--fs-small);line-height:var(--lh-small)}
:root .fu-days input{width:76px;min-height:36px;padding:4px 8px;border:1px solid var(--line);border-radius:var(--r-control,8px);background:var(--surface);color:var(--ink);font-size:var(--fs-body);line-height:var(--lh-body)}
:root .fu-days small{flex-basis:100%}
@media (max-width:640px){:root .fu-week{grid-template-columns:1fr}:root .fu-appt-time{min-width:0}}
/* The books (web/accounting-ui.js): the Trial Balance tab and the file choice on the Accountant handoff. */
:root .acct-format{display:grid;gap:4px;font-size:var(--fs-small);line-height:var(--lh-small);font-weight:600}
:root .acct-format select{min-height:40px;padding:8px 10px;border:1px solid var(--line);border-radius:var(--r-control,8px);background:var(--surface);color:var(--ink);font-size:var(--fs-body);line-height:var(--lh-body);font-weight:400}
:root .acct-tb td.num,:root .acct-tb th.num{text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}
:root .acct-tb tfoot th{border-top:2px solid var(--line)}
:root .acct-last{margin:0 0 10px;font-size:var(--fs-small);line-height:var(--lh-small)}
:root .acct-names>summary{cursor:pointer;font-weight:600;font-size:var(--fs-body);line-height:var(--lh-body)}
:root .acct-names p{margin:10px 0}
:root .acct-name{width:100%;min-height:36px;padding:6px 10px;border:1px solid var(--line);border-radius:var(--r-control,8px);background:var(--surface);color:var(--ink);font-size:var(--fs-body);line-height:var(--lh-body)}
/* The Meet Steward card waits while a window is open on top of the page: under a dialog it could be seen but not pressed
   (walk, 2026-10-25: "Try it" sat under the Financials detail window). It comes back when the window closes. */
:root body:has(.modal-backdrop) .st-intro{display:none}
:root .acct-tb-filter{margin-bottom:14px}
:root .acct-names-table td{vertical-align:middle}
:root .notes-card textarea{width:100%;min-height:72px}
/* Hooks the 2026-10-25 screens rendered without a rule of their own (tests/test_markup_has_styles.mjs). */
:root .deal-notes textarea{width:100%}
:root .dd-pick{display:grid;gap:12px}
:root .printable-sheet{break-inside:avoid}
:root .fine{font-size:var(--fs-small);line-height:var(--lh-small);color:var(--muted)}
:root .fu-empty{text-align:center}
:root .fu-campaign h2{margin:0}
:root .fu-dnc{margin-top:12px}
:root .pi-look-featured{display:grid;gap:8px}
:root .sw-sale-notes{margin-top:14px}
:root .sb-list,:root .sb-clock,:root .sb-notes{display:grid;gap:10px}
:root .sb-step-on{font-weight:600}

/* ── READABLE IN EVERY STATE (owner, 2026-10-28, the Workshop's "Open work 1" chip: "dark text on blue", then "make
   sure it doesnt happen anywhere else"). Found by measuring every screen in light and dark with
   tools/dev/walk/contrast-sweep.mjs; each rule is one place it measured under WCAG AA. A stylesheet review cannot find
   these: the grey count was right on a white chip and wrong only once the chip was pressed. ── */
/* A count or note inside a pressed or selected control takes the control's own ink. */
:root :is(.chip, .button, .crm-lead-scope-button)[aria-pressed="true"] :is(.muted, small),
:root .report-category-nav button.active span{color:inherit;opacity:.9}
:root .crm-lead-scope-button[aria-pressed="true"] span{opacity:1}
/* The alignment toolbar's Bold / Left / Center: layout.css repaints every plain .button's background, which outranked the
   selected colour and left the label the same colour as the button (white on white, dark on dark). */
html:root body .alignment-control-section .button.active:not(.primary):not(.danger):not(.danger-outline){color:var(--ctl-accent-ink);background:var(--ctl-accent);border-color:color-mix(in srgb,var(--ctl-accent) 74%,#000)}
/* Dark mode: colours that were chosen for a white page. */
:root .crm-col.closed{opacity:.9}
:root .sw-watch-idle{opacity:1}
html[data-theme="dark"] .security-signin-state.active{color:var(--green)}

html[data-theme="dark"] .alignment-sequence-number{color:var(--accent)}
/* Selected rows and list items: their quiet text sits on a tinted background, so it takes the full ink. */
/* styles.css pins dark list text with !important, so the selected item has to say it the same way. */
html[data-theme="dark"] .alignment-field-list-item.selected small,html[data-theme="dark"] .alignment-field-list-item.selected .alignment-sequence-number{color:var(--ink)!important}
:root .vehicle-list-row.selected .mono{color:var(--ink)}

/* ── MARKET INTELLIGENCE POP-OUT (owner, 2026-10-28: "make the advanced market intel page pop out like that"). The lot
   stays dimmed behind; the card is the scroller so the wheel works anywhere over it (modal-wheel.js) and the header,
   with the car's name and the arrows, stays put while the figures scroll. ── */
body:has(.mi-pop){overflow:hidden}
html:root body .mi-pop{align-items:start;padding:24px}
html:root body .mi-pop-card{width:min(1320px,100%);height:calc(100vh - 48px);max-height:calc(100vh - 48px);padding:0;overflow:auto;color:var(--ink);background:var(--canvas);border:1px solid var(--line);box-shadow:0 24px 64px color-mix(in srgb,#000 35%,transparent)}
:root .mi-pop-head{position:sticky;top:0;z-index:2;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 20px;background:var(--surface-strong,var(--surface));border-bottom:1px solid var(--line)}
:root .mi-pop-name{min-width:0}
:root .mi-pop-name h2{margin:2px 0 0;color:var(--navy);font-size:var(--fs-h2);line-height:var(--lh-h2);font-weight:700;letter-spacing:-.01em;outline:none}
:root .mi-pop-sub{display:block;margin-top:2px;color:var(--muted);font-size:var(--fs-small);line-height:var(--lh-small)}
:root .mi-pop-nav{display:flex;align-items:center;gap:6px;flex:0 0 auto}
:root .mi-pop-count{margin-right:6px;color:var(--muted);font-size:var(--fs-small);line-height:var(--lh-small);font-weight:600;font-variant-numeric:tabular-nums}
:root .mi-pop-step{display:inline-grid;place-items:center;width:40px;height:40px;padding:0;border:1px solid var(--line);border-radius:var(--r-control,8px);background:var(--surface);color:var(--ink);cursor:pointer}
:root .mi-pop-step:hover:not(:disabled){border-color:var(--accent);color:var(--accent)}
:root .mi-pop-step:disabled{opacity:.4;cursor:default}
:root .mi-pop-close{margin-left:6px}
:root .mi-pop-body{padding:16px 20px 24px}
@media (max-width:720px){
  html:root body .mi-pop{padding:0}
  html:root body .mi-pop-card{height:100vh;max-height:100vh;border-radius:0}
  :root .mi-pop-head{padding:10px 12px}
  :root .mi-pop-count{display:none}
  :root .mi-pop-body{padding:12px}
}
/* The car's picture beside its name; the page's own title block would repeat the header, so it goes. */
:root .mi-pop-photo{position:relative;flex:0 0 auto;width:120px;height:72px;overflow:hidden;border-radius:var(--r-control,8px);background:var(--surface-2,var(--line))}
:root .mi-pop-photo img{display:block;width:100%;height:100%;object-fit:cover}
:root .mi-pop-photo .mi-pick-tag{left:4px;bottom:4px}
:root .mi-pop-name{flex:1 1 auto}
:root .mi-pop-sub .mi-help-link{font-size:inherit;line-height:inherit;font-weight:600}
:root .mi-pop .mi-head{display:none}
:root .mi-pop .mi-back:empty{display:none}
@media (max-width:720px){:root .mi-pop-photo{width:72px;height:48px}}

/* ── THE POP-OUT IN FOUR TABS (owner, 2026-11-06: "the advanced market intel page is too long of a scroll redesign it where
   i dont have to scroll all that but i still get all these advanced info"). The tab bar is a row of the fixed header, so it
   never moves (owner, 3 Nov). Only the open tab's panel is drawn; the wide tabs put their reference blocks in a side column
   so each is about one screen at 1440. ── */
:root .mi-pop-head{flex-wrap:wrap}
/* The tabs get a row of the header to themselves; the market's own controls (search radius, refresh) sit in the top row
   beside the car stepper, so neither is repeated above each tab's content. */
:root .mi-pop-tabrow{display:flex;flex:1 0 100%;order:9;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px 16px}
:root .mi-pop-tabs{flex:0 1 auto;margin:0;padding:6px}
:root .mi-pop-tabs .ws-tab{min-height:36px;padding:0 16px}
:root .mi-pop-tools{flex:0 1 auto;min-width:0}
:root .mi-pop-tools .mi-freshness{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:6px 14px}
/* A narrow window: the controls take their own row under the tabs rather than squeezing the car's name. */
@media (max-width:1100px){:root .mi-pop-tools{order:10;flex:1 0 100%}:root .mi-pop-tools .mi-freshness{justify-content:flex-start}}
:root .mi-tabbed .mi-tabpanel{display:none}
:root .mi-pop-card[data-mi-tab="near"] .mi-tabpanel-near,
:root .mi-pop-card[data-mi-tab="price"] .mi-tabpanel-price,
:root .mi-pop-card[data-mi-tab="figures"] .mi-tabpanel-figures,
:root .mi-pop-card[data-mi-tab="strategy"] .mi-tabpanel-strategy,
:root .mi-pop-card[data-mi-tab="car"] .mi-tabpanel-car,
:root .mi-pop-card[data-mi-tab="safety"] .mi-tabpanel-safety,
:root .mi-pop-card[data-mi-tab="checks"] .mi-tabpanel-checks{display:grid;gap:16px;align-items:start;outline:none}
:root .mi-col-main,:root .mi-col-side{display:grid;gap:16px;min-width:0;align-content:start}
:root .mi-col-side:empty,:root .mi-col-main:empty{display:none}
/* The AI read arrives wrapped in a panel of its own; inside a tab column that only drew a second frame around it. */
:root .mi-tabpanel .mi-col-side>section.panel{margin:0;padding:0;border:0;background:none;box-shadow:none}
/* The tabs are already inside the pop-out's card: one more bordered panel around them only cost space. */
:root .mi-pop .market-intel.mi-tabbed{margin:0;padding:0;border:0;background:none;box-shadow:none}
@media (min-width:1100px){
  :root .mi-tabpanel-near{grid-template-columns:minmax(0,2.4fr) minmax(300px,1fr)}
  :root .mi-tabpanel-strategy{grid-template-columns:minmax(0,1.5fr) minmax(340px,1fr)}
  :root .mi-tabpanel:has(>.mi-col-side:empty),:root .mi-tabpanel:has(>.mi-col-main:empty){grid-template-columns:minmax(0,1fr)}
}
:root .mi-col-side .mi-dealers{grid-template-columns:minmax(0,1fr)}
/* The small print: two short sentences, then the Visor credit on its own line (owner: "too wordy and too tight"). */
:root .mi-foot{display:grid;gap:8px;margin-top:16px}
:root .mi-foot .panel-footnote{margin:0;max-width:78ch}
:root .mi-credit{margin:0}
:root .mi-credit .visor-credit{margin:0}

/* ── THE CARD BESIDE ANOTHER COMPANY'S SITE (web/outside-card.js; owner, 2026-10-31: "can we make like how the advanced
   market intel window comes up"). The same dimmed app behind it and the same header as the market pop-out, but docked
   at the left: the site's own window opens to the right of it. On a phone it takes the screen, like the pop-out. ── */
body:has(.oc-pop){overflow:hidden}
html:root body .oc-pop{place-items:start;padding:24px}
html:root body .oc-card{display:flex;flex-direction:column;width:min(440px,100%);max-height:calc(100vh - 48px);padding:0;overflow:hidden;color:var(--ink);background:var(--canvas);border:1px solid var(--line);box-shadow:0 24px 64px color-mix(in srgb,#000 35%,transparent)}
:root .oc-head{display:flex;align-items:center;gap:12px;padding:14px 16px;background:var(--surface-strong,var(--surface));border-bottom:1px solid var(--line)}
:root .oc-head .oc-photo{width:96px;height:58px}
:root .oc-names{flex:1 1 auto;min-width:0}
:root .oc-names h2{margin:2px 0 0;color:var(--navy);font-size:var(--fs-h3);line-height:var(--lh-h3);font-weight:700;outline:none}
:root .oc-sub{display:block;color:var(--muted);font-size:var(--fs-small);line-height:var(--lh-small);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
:root .oc-x{flex:0 0 auto}
:root .oc-body{display:flex;flex-direction:column;gap:16px;padding:18px 16px;overflow:auto}
:root .oc-status{display:flex;align-items:flex-start;gap:10px;padding:12px 14px;border-radius:10px;background:color-mix(in srgb,var(--green) 14%,transparent)}
:root .oc-status.is-blocked{background:color-mix(in srgb,var(--amber) 18%,transparent)}
:root .oc-dot{flex:none;width:10px;height:10px;margin-top:8px;border-radius:999px;background:var(--green)}
:root .oc-status.is-blocked .oc-dot{background:var(--amber)}
:root .oc-status strong{display:block;font-size:var(--fs-body);line-height:var(--lh-body);font-weight:600}
:root .oc-status span{display:block;color:var(--muted);font-size:var(--fs-small);line-height:var(--lh-small)}
:root .oc-copy{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"label label" "value copy";gap:4px 10px;align-items:center;padding:12px 14px;border:1px solid var(--line);border-radius:10px;background:var(--surface)}
:root .oc-copy small{grid-area:label;display:flex;align-items:center;gap:8px;color:var(--muted);font-size:var(--fs-small);line-height:var(--lh-small);font-weight:600}
:root .oc-tag{padding:0 8px;border-radius:999px;background:color-mix(in srgb,var(--green) 20%,transparent);color:var(--ink);font-size:var(--fs-micro);line-height:var(--lh-micro);font-weight:600}
:root .oc-tag.is-not{background:color-mix(in srgb,var(--amber) 22%,transparent)}
:root .oc-value{grid-area:value;min-width:0;font-family:inherit;font-size:var(--fs-lead);line-height:var(--lh-lead);font-weight:600;letter-spacing:.04em;font-variant-numeric:tabular-nums;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
:root .oc-value.is-long{font-size:var(--fs-small);line-height:var(--lh-small);font-weight:400;letter-spacing:0;white-space:normal;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical}
:root .oc-copy .button{grid-area:copy}
:root .oc-steps h3{margin:0;color:var(--muted);font-size:var(--fs-small);line-height:var(--lh-small);font-weight:600;letter-spacing:.06em;text-transform:uppercase}
:root .oc-steps ol{display:flex;flex-direction:column;gap:10px;margin:8px 0 0;padding:0;list-style:none;counter-reset:oc}
:root .oc-steps li{display:grid;grid-template-columns:28px minmax(0,1fr);gap:10px;align-items:start;font-size:var(--fs-body);line-height:var(--lh-body);counter-increment:oc}
:root .oc-steps li::before{content:counter(oc);display:inline-grid;place-items:center;width:28px;height:28px;border-radius:999px;background:#0b568f;color:#fff;font-size:var(--fs-small);line-height:var(--lh-small);font-weight:600}
:root .oc-foot{display:flex;flex-direction:column;gap:8px;padding:14px 16px 16px;border-top:1px solid var(--line);background:var(--surface-strong,var(--surface))}
:root .oc-foot .button{width:100%;min-height:var(--control-height);font-weight:600}
:root .oc-fine{margin:2px 0 0;color:var(--muted);font-size:var(--fs-micro);line-height:var(--lh-micro)}
/* Posting docked beside Facebook or Craigslist, one box at a time (web/post-dock.js), on the outside card's frame. */
:root .pd-box{display:grid;gap:8px;padding:16px;border:1px solid var(--line);border-radius:10px;background:var(--surface)}
:root .pd-count{margin:0;color:var(--muted);font-size:var(--fs-small);line-height:var(--lh-small);font-weight:600;letter-spacing:.06em;text-transform:uppercase}
:root .pd-label{margin:0;color:var(--ink);font-size:var(--fs-h3);line-height:var(--lh-h3);font-weight:700}
:root .pd-answer{display:block;padding:10px 12px;border-radius:8px;background:var(--surface-soft,var(--canvas));color:var(--ink);font-family:inherit;font-size:var(--fs-lead);line-height:var(--lh-lead);font-weight:600;overflow-wrap:anywhere}
:root .pd-answer.is-long{font-size:var(--fs-small);line-height:var(--lh-small);font-weight:400;max-height:140px;overflow:auto;white-space:pre-wrap}
:root .pd-answer-text{margin:0;font-size:var(--fs-lead);line-height:var(--lh-lead);font-weight:600;color:var(--ink)}
:root .pd-answer-text.is-missing{color:var(--amber)}
:root .pd-hint{margin:0;color:var(--muted);font-size:var(--fs-small);line-height:var(--lh-small)}
:root .pd-go{width:100%;min-height:var(--control-height);font-weight:600}
/* The photos box's one-press download (photo-download.js): a full-width secondary button above Done, next box. */
:root .pd-photos{width:100%;min-height:var(--control-height);margin-bottom:8px;font-weight:600}
:root .pd-steps{display:flex;justify-content:space-between;gap:8px}
:root .pd-all summary{cursor:pointer;color:var(--muted);font-size:var(--fs-small);line-height:var(--lh-small);font-weight:600}
:root .pd-all ol{display:grid;gap:2px;margin:8px 0 0;padding:0;list-style:none}
:root .pd-jump{display:flex;justify-content:space-between;gap:12px;width:100%;padding:6px 8px;border:0;border-radius:6px;background:transparent;color:var(--ink);font-family:inherit;font-size:var(--fs-small);line-height:var(--lh-small);text-align:left;cursor:pointer}
:root .pd-jump small{color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:55%}
:root .pd-jump[data-current="1"]{background:color-mix(in srgb,var(--accent) 14%,transparent);font-weight:600}
:root .pd-jump[data-done="1"] span::before{content:"¹3  ";color:var(--green)}
:root .pd-foot-row{display:grid;grid-template-columns:1fr 1fr;gap:8px}
:root .pd-finished .pd-answer-text{font-size:var(--fs-body);line-height:var(--lh-body);font-weight:400}
/* The auction import docked the same way, with the auction's site open at its right (owner, 2026-10-31: "the autosteward
   page launched next to the auction should have the import functionality"). 600px: the fee table needs more than the
   card's 440. outside-window.js opens the auction's window just past it. */
html:root body .auction-modal-backdrop.is-docked{place-items:start;padding:24px}
html:root body .auction-modal-backdrop.is-docked .auction-modal-card{width:min(600px,100%);height:calc(100vh - 48px);max-height:calc(100vh - 48px)}
:root .auction-beside{display:grid;grid-template-columns:10px minmax(0,1fr);gap:8px 10px;margin:0 22px 12px;padding:12px 14px;border-radius:10px;background:color-mix(in srgb,var(--green) 14%,transparent)}
:root .auction-beside.is-blocked{background:color-mix(in srgb,var(--amber) 18%,transparent)}
:root .auction-beside.is-blocked .oc-dot{background:var(--amber)}
:root .auction-beside-text strong{display:block;font-size:var(--fs-body);line-height:var(--lh-body);font-weight:600}
:root .auction-beside-text span{display:block;color:var(--muted);font-size:var(--fs-small);line-height:var(--lh-small)}
:root .auction-beside .button{grid-column:2;justify-self:start}
:root .auction-beside .oc-dot{margin-top:6px}
:root .auction-picked{margin:4px 0 12px;font-size:var(--fs-body);line-height:var(--lh-body)}
:root .auction-docked-name{display:flex;align-items:center;gap:12px;min-width:0}
:root .auction-open-beside{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;margin:12px 0}
:root button.auction-site-link{padding:0;background:none;border:0;border-bottom:1px solid color-mix(in srgb,var(--blue) 40%,transparent);border-radius:0;font-family:inherit;font-size:inherit;line-height:inherit;cursor:pointer}
@media (max-width:720px){
  html:root body .auction-modal-backdrop.is-docked{padding:0}
  html:root body .auction-modal-backdrop.is-docked .auction-modal-card{width:100%;height:100vh;max-height:100vh;border-radius:0}
}
@media (max-width:720px){
  html:root body .oc-pop{padding:0}
  html:root body .oc-card{width:100%;max-height:100vh;height:100vh;border-radius:0}
  :root .oc-head .oc-photo{width:72px;height:48px}
}

/* ── LEADS (owner, 2026-10-28: "look at how the boxes to the right stretched out of the page"). Four columns of at least
   180px need about 790px, more than the editor gets beside the lead list, so Source and Assigned to ran off the page.
   The fields now fill whatever width the editor has. ── */
:root .crm-lead-form-grid{grid-template-columns:repeat(auto-fill,minmax(min(170px,100%),1fr))}
/* Booking an appointment from the lead ("we have to be able to set an appointment for the customer"). */
:root .crm-appt-block{margin-top:16px;padding-top:14px;border-top:1px solid var(--line)}
:root .crm-appt-list{display:grid;gap:8px;margin:8px 0 0;padding:0;list-style:none}
:root .crm-appt{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px 12px;padding:10px 12px;border:1px solid color-mix(in srgb,var(--accent) 35%,var(--line));border-left:4px solid var(--accent);border-radius:var(--r-control,8px);background:color-mix(in srgb,var(--accent) 6%,var(--surface))}
:root .crm-appt-what{display:grid;gap:2px;min-width:0}
:root .crm-appt-what strong{font-size:var(--fs-body);line-height:var(--lh-body)}
:root .crm-appt-what span{color:var(--muted);font-size:var(--fs-small);line-height:var(--lh-small)}
:root .crm-appt-actions{display:flex;flex-wrap:wrap;gap:6px}
:root .crm-appt-none{margin:6px 0 0;color:var(--muted);font-size:var(--fs-small);line-height:var(--lh-small)}
:root .crm-appt-form{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(150px,100%),1fr));gap:10px 14px;align-items:end;margin-top:10px}
:root .crm-appt-form label{display:grid;gap:6px;min-width:0;color:var(--pui-support);font-size:var(--fs-small);line-height:var(--lh-small);font-weight:700}
:root .crm-appt-form input,:root .crm-appt-form select{width:100%;min-width:0;min-height:var(--control-height);padding:0 10px;border:1px solid var(--line);border-radius:var(--r-surface);background:var(--surface-strong);color:var(--ink);font-size:var(--fs-body);line-height:var(--lh-body)}
:root .crm-lead-appt{display:block;color:var(--accent);font-weight:600}

/* ── CUSTOMER RECORD (owner, 2026-10-28: "resize in order to make email not broken like that", "the sizing between both
   sections in the page could use improvment"). The facts were held to 360px in two columns, about 150px a cell, so an
   email broke after its @, while the deal history took everything else and sat mostly empty. Now about 40/60 on a wide
   screen (narrower ones keep the single column styles.css gives them), and the long facts get a whole row. ── */
@media (min-width:1321px){:root .customer-detail-grid{grid-template-columns:minmax(380px,2fr) minmax(0,3fr)}}
:root .customer-contact-detail-list .span-full{grid-column:1/-1}
/* Found by sweeping every design (2026-10-28). Midnight's light appearance left an unpressed Workshop chip white on
   near-white: the chips named a background and inherited their ink, so they now take the control pair every design
   defines for exactly this. */
:root :is(.sb-filters, .sb-line-form) .chip:not([aria-pressed="true"]){background:var(--ctl-face);color:var(--ctl-ink)}
html:root body .vehicle-context-badge>small{color:color-mix(in srgb,var(--muted) 60%,var(--ink))}
:root .vin-suggestion em{color:color-mix(in srgb,var(--amber) 75%,var(--ink))}
html[data-theme="dark"] .help-legacy-notice p.eyebrow{color:var(--amber)!important}

/* ── THE MARKET READ AS CARDS (owner, 2026-10-28: "this is just an ugly big wall of text improve and make it more
   visually appealing"). One card per point, side by side when there is room: a number, the headline to scan, the
   detail under it, the figures picked out, and the bottom line as its own callout (market-agent.js readHtml). ── */
:root .ma-points{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(260px,100%),1fr));gap:10px;margin:4px 0 0;padding:0;list-style:none}
:root .ma-point{display:grid;grid-template-columns:28px minmax(0,1fr);gap:12px;align-content:start;padding:12px 14px;border:1px solid var(--line);border-radius:var(--r-control,8px);background:var(--surface)}
:root .ma-num{display:grid;place-items:center;width:28px;height:28px;border-radius:999px;background:color-mix(in srgb,var(--accent) 14%,transparent);color:var(--accent);font-size:var(--fs-small);line-height:var(--lh-small);font-weight:700}
:root .ma-point-head{margin:2px 0 0;color:var(--ink);font-size:var(--fs-lead);line-height:var(--lh-lead);font-weight:600}
:root .ma-point-body{margin:6px 0 0;color:color-mix(in srgb,var(--muted) 70%,var(--ink));font-size:var(--fs-small);line-height:var(--lh-small)}
:root .ma-fig{color:var(--ink);font-weight:700;font-variant-numeric:tabular-nums}
:root .ma-lead{margin:0 0 10px}
:root .ma-bottom{margin:12px 0 0;padding:12px 14px;border-left:4px solid var(--accent);border-radius:var(--r-control,8px);background:color-mix(in srgb,var(--accent) 8%,var(--surface));font-size:var(--fs-body);line-height:var(--lh-body)}
:root .ma-bottom strong{display:block;margin-bottom:2px;color:var(--accent);font-size:var(--fs-micro);line-height:var(--lh-micro);font-weight:700;letter-spacing:.08em;text-transform:uppercase}

/* ── THE MENU AS A RAIL (owner, 2026-10-28: a side bar that shrinks and expands by itself). On a desk-sized window the sidebar is a 64px strip of icons that opens OVER the page while the pointer
   or the keyboard is in it, so the page never shifts. The open menu ends with a pin to keep it open (web/nav-rail.js).
   Narrow windows and phones keep the slide-out menu, so this is scoped above that breakpoint. The short delay on the way
   out is what stops it flapping when the pointer brushes past. ── */
@media (min-width:1181px){
  html:root body.nav-rail :is(.desktop-app-header,#app,.footer){margin-left:64px!important}
/* A locked page (sign-in gates, a password to change, the export page after a subscription ends) hides the sidebar
 * (styles.css), so it keeps no room for the rail: the 64px pushed those pages sideways off the screen (measured on the
 * export page, 8 Nov 2026: 64px of sideways scroll at 1440). */
html:root body.nav-rail.security-locked :is(.desktop-app-header,#app,.footer){margin-left:0!important}
  /* ONE LAYOUT IN BOTH STATES (owner, 2026-10-29, with a recording: "it has to be smooth"). The strip used to be a
     different layout switched in on :hover while only the width animated: labels came back at full size inside a
     64px panel and wrapped ("Dash / board"), vanished before the panel shrank (an empty dark panel), and icons jumped
     89px sideways and down as headings turned into dividers. Now the open menu's layout is used all the time, with the
     icons padded onto the strip's centre line (32px), and only two things move: the width, and the words fading with
     it. Measured frame by frame with tools/dev/walk/nav-rail-smooth-probe.mjs. Opening waits .08s and closing .22s, so
     a pointer brushing past does not flap it. */
  html:root body.nav-rail .dms-sidebar{width:64px!important;flex-basis:64px!important;overflow-x:hidden;transition:width .18s cubic-bezier(.2,.7,.2,1) .22s,box-shadow .18s ease .22s}
  html:root body.nav-rail .dms-sidebar:is(:hover,:focus-within,.rail-open){width:var(--density-sidebar-width,var(--sidebar-width,244px))!important;box-shadow:0 18px 48px color-mix(in srgb,#000 32%,transparent);transition-delay:.08s}
  html:root body.nav-rail .dms-sidebar .sidebar-link{padding-left:10px;white-space:nowrap}
  html:root body.nav-rail .dms-sidebar .sidebar-brand{padding-left:12px;white-space:nowrap}
  html:root body.nav-rail .dms-sidebar .sidebar-nav-group{position:relative}
  html:root body.nav-rail .dms-sidebar .sidebar-nav-group h2{white-space:nowrap}
  /* The words fade out at the end of the shrink and in once the panel has room; screen readers still read the labels. */
  html:root body.nav-rail .dms-sidebar :is(.sidebar-link>span:not(.sidebar-link-icon):not(.sidebar-badge), .sidebar-group-toggle>span:not(.sidebar-group-caret), .sidebar-group-caret, .sidebar-brand-wordmark, .sidebar-nav-tools, .sidebar-release){white-space:nowrap;transition:opacity .12s linear .3s}
  html:root body.nav-rail .dms-sidebar:not(:hover):not(:focus-within):not(.rail-open) :is(.sidebar-link>span:not(.sidebar-link-icon):not(.sidebar-badge), .sidebar-group-toggle>span:not(.sidebar-group-caret), .sidebar-group-caret, .sidebar-brand-wordmark, .sidebar-nav-tools, .sidebar-release){opacity:0;pointer-events:none}
  html:root body.nav-rail .dms-sidebar:is(:hover,:focus-within,.rail-open) :is(.sidebar-link>span:not(.sidebar-link-icon):not(.sidebar-badge), .sidebar-group-toggle>span:not(.sidebar-group-caret), .sidebar-group-caret, .sidebar-brand-wordmark, .sidebar-nav-tools, .sidebar-release){opacity:1;transition:opacity .12s linear .08s}
  /* A group's heading becomes a thin divider in the strip, drawn over the same space, so no row moves. */
  html:root body.nav-rail .dms-sidebar .sidebar-nav-group h2 .sidebar-group-toggle{transition:opacity .12s linear .3s}
  html:root body.nav-rail .dms-sidebar:not(:hover):not(:focus-within):not(.rail-open) .sidebar-nav-group h2 .sidebar-group-toggle{opacity:0;pointer-events:none}
  html:root body.nav-rail .dms-sidebar:is(:hover,:focus-within,.rail-open) .sidebar-nav-group h2 .sidebar-group-toggle{opacity:1;transition:opacity .12s linear .08s}
  html:root body.nav-rail .dms-sidebar .sidebar-nav-group::before{content:"";position:absolute;top:8px;left:14px;width:36px;height:1px;background:color-mix(in srgb,var(--sidebar-ink) 16%,transparent);opacity:0;transition:opacity .1s linear .08s;pointer-events:none}
  html:root body.nav-rail .dms-sidebar:not(:hover):not(:focus-within):not(.rail-open) .sidebar-nav-group::before{opacity:1;transition-delay:.3s}
  /* In the strip each row is trimmed to a rounded 40px box on its icon, so the current page's highlight is a whole
     tile, not a row cut off square at the edge; the trim opens and closes with the width. A count sits on the icon. */
  html:root body.nav-rail .dms-sidebar .sidebar-link{position:relative;clip-path:inset(0 0 0 0 round var(--r-control,8px));transition:background-color .14s,border-color .14s,box-shadow .14s,clip-path .18s cubic-bezier(.2,.7,.2,1) .22s}
  html:root body.nav-rail .dms-sidebar:not(:hover):not(:focus-within):not(.rail-open) .sidebar-link{clip-path:inset(0 calc(100% - 40px) 0 0 round var(--r-control,8px))}
  html:root body.nav-rail .dms-sidebar:is(:hover,:focus-within,.rail-open) .sidebar-link{transition:background-color .14s,border-color .14s,box-shadow .14s,clip-path .18s cubic-bezier(.2,.7,.2,1) .08s}
  html:root body.nav-rail .dms-sidebar .sidebar-badge{position:absolute;top:2px;left:24px;min-width:16px;padding:0 4px}
  html:root body.nav-rail .dms-sidebar:not(:hover):not(:focus-within):not(.rail-open),html:root body.nav-rail .dms-sidebar:not(:hover):not(:focus-within):not(.rail-open) .sidebar-nav{scrollbar-width:none}
  html:root body.nav-rail .dms-sidebar:not(:hover):not(:focus-within):not(.rail-open)::-webkit-scrollbar,html:root body.nav-rail .dms-sidebar:not(:hover):not(:focus-within):not(.rail-open) .sidebar-nav::-webkit-scrollbar{display:none}
}
@media (min-width:1181px) and (prefers-reduced-motion:reduce){
  html:root body.nav-rail .dms-sidebar,html:root body.nav-rail .dms-sidebar *,html:root body.nav-rail .dms-sidebar *::before{transition-duration:0s!important;transition-delay:0s!important}
}
:root .sidebar-pin{margin-top:6px;padding:6px 8px;border:1px solid color-mix(in srgb,var(--sidebar-ink) 22%,transparent);border-radius:var(--r-control,8px);background:transparent;color:var(--sidebar-ink);font-size:var(--fs-micro);line-height:var(--lh-micro);font-weight:600;cursor:pointer;text-align:left}
:root .sidebar-pin:hover{border-color:var(--accent)}
@media (max-width:1180px){:root .sidebar-pin{display:none}}

/* ── WORKSHOP ELEVATION (owner, 2026-10-28: "whole workshop module could use elevation"; ideas ranked in
   .claude/research/workshop-references-2026-10-28.md). A card's edge and bar go amber as its step's target comes up;
   waiting on parts (from the car's open repair order) is a tile that filters; the holding cost tile; By step / By person. ── */
:root .sb-card.due{border-left-color:var(--amber)}
:root .sb-card.due .sb-meter::-webkit-progress-value{background:var(--amber)}
:root .sb-card.due .sb-meter::-moz-progress-bar{background:var(--amber)}
:root .sb-hold-tile strong{color:var(--ink)}
:root .sb-recon-views{display:flex;gap:6px}
:root .sb-recon-views .chip{min-height:34px;padding:0 12px;border:1px solid var(--line);border-radius:999px;background:var(--ctl-face);color:var(--ctl-ink);font-size:var(--fs-small);line-height:var(--lh-small);font-weight:600;cursor:pointer}
:root .sb-recon-views .chip[aria-pressed="true"]{background:var(--accent);border-color:var(--accent);color:var(--accent-ink)}
:root .sb-col-nobody{background:color-mix(in srgb,var(--ambersoft) 25%,var(--surface-2,#f5f7fa))}
/* Lanes keep a working width however few people there are, instead of two lanes stretched across the page. */
:root .sb-board-people{grid-auto-flow:row;grid-template-columns:repeat(auto-fill,minmax(240px,1fr))}
:root .sb-hold-field{max-width:280px;margin-top:12px}
:root .sb-hold-help{margin:-6px 0 12px;font-size:var(--fs-small);line-height:var(--lh-small)}
:root .sb-ro-summary{grid-template-columns:repeat(auto-fit,minmax(170px,1fr))}
/* Recon steps: a checkbox and its words on one line, and a disabled Up or Down reads as unavailable rather than a dark box. */
:root .sb-step label{display:inline-flex;align-items:center;gap:6px}
:root .sb-step .link-btn:disabled{background:none;opacity:.4;cursor:default}
/* The sale's out-the-door total is an inverted block (ink behind, page colour in front). In dark mode --ink is the light
   colour, so it became a white slab in the middle of a dark page; there it is an accent-tinted panel instead. */
html[data-theme="dark"]:root body .sw-otd-summary{background:color-mix(in srgb,var(--accent) 16%,var(--surface-strong));border:1px solid color-mix(in srgb,var(--accent) 45%,transparent)}
html[data-theme="dark"]:root body .sw-otd-summary :is(dt,dd){color:var(--ink)}
html[data-theme="dark"]:root body .sw-otd-summary dt{color:var(--muted)}
html[data-theme="dark"]:root body .sw-otd-summary .sw-otd-total{border-top-color:var(--line)}
html[data-theme="dark"]:root body .sw-otd-summary .sw-otd-total dt{color:var(--ink)}

/* ── DEAL DESK (review of the Deal Desk, 2026-10-28): each payment is a button that starts the sale,
   each default says where it came from, and the reverse desk works back from a payment. ── */
:root .dd-inputs{align-items:start}
:root .dd-from{display:block;margin-top:2px;color:var(--muted);font-size:var(--fs-micro);line-height:var(--lh-micro);font-weight:400}
:root .dd-cell{display:inline-flex;align-items:baseline;justify-content:center;gap:2px;width:100%;padding:10px 8px;border:1px solid var(--line);background:var(--surface);border-radius:var(--r-control,8px);color:inherit;cursor:pointer}
:root .dd-cell:hover,:root .dd-cell:focus-visible{border-color:var(--accent);background:color-mix(in srgb,var(--accent) 8%,transparent)}
:root .dd-cell strong{font-size:var(--fs-lead);line-height:var(--lh-lead)}
:root .dd-grid-foot{display:flex;flex-wrap:wrap;gap:12px;align-items:center;justify-content:space-between;margin-top:8px}
:root .dd-grid-foot .muted{font-size:var(--fs-small);line-height:var(--lh-small)}
:root .dd-reverse{margin-top:14px}
:root .dd-reverse h3{margin:0 0 8px;font-size:var(--fs-lead);line-height:var(--lh-lead)}
:root .dd-reverse .sb-field{max-width:280px}
:root .dd-reverse-result ul{display:grid;gap:6px;margin:6px 0 0;padding:0;list-style:none}
:root .dd-reverse-result li{display:flex;flex-wrap:wrap;gap:4px 12px;padding:8px 12px;border:1px solid var(--line);border-radius:var(--r-control,8px);background:var(--surface)}
:root .dd-reverse-result li span{color:color-mix(in srgb,var(--muted) 60%,var(--ink))}
:root .dd-reverse-result b{color:var(--ink)}

/* The lead board on one row (review of the lead board, 2026-10-28: at 1440px "Lost" dropped to a second
   row, so the pipeline no longer read left to right). Above tablet width the six stages share the row; a narrow window
   scrolls sideways rather than stacking a stage under the others. */
@media (min-width:900px){
  :root .crm-board{grid-template-columns:none;grid-auto-flow:column;grid-auto-columns:minmax(150px,1fr);overflow-x:auto}
}
:root .crm-col-head .crm-col-title{display:flex;align-items:center;justify-content:space-between;gap:8px;min-width:0}
:root .crm-col-head .crm-col-title strong{min-width:0;overflow-wrap:anywhere}
:root .crm-col-head .crm-col-title .crm-col-count{flex:none;align-self:center}


/* The lead list's rows stack by the LIST's width, not the window's (walk 2026-10-28, 1180px: "Needs attention" sat on
   the Call button). Four facts and the button strip side by side need about 1,000px, and the old 1120px window
   breakpoint never counted the sidebar beside them. Below that the buttons go under the facts. */
:root .crm-lead-directory{container-type:inline-size}
@container (max-width:1040px){
  :root .crm-lead-columns,:root .crm-lead-row{grid-template-columns:minmax(0,1fr)}
  :root .crm-lead-columns>span{display:none}
  :root .crm-lead-row-actions{justify-content:flex-start}
}

/* What each plan includes (web/plan-features.js), on the Subscription screen. */
:root .pf-wrap{display:grid;gap:8px;margin:14px 0 4px;padding:12px 14px;border:1px solid var(--line);border-radius:10px;background:var(--surface-soft)}
:root .pf-wrap>p{margin:0;color:var(--muted);font-size:var(--fs-small);line-height:var(--lh-small)}
:root .pf-table{width:100%;border-collapse:collapse;font-size:var(--fs-small);line-height:var(--lh-small)}
:root .pf-table th,:root .pf-table td{padding:8px 10px;border-bottom:1px solid var(--line);text-align:left;vertical-align:top}
:root .pf-table thead th{color:var(--muted);font-weight:600}
:root .pf-table tbody th{font-weight:500;color:var(--ink)}
:root .pf-table tbody th small{display:block;margin-top:2px;color:var(--muted);font-weight:400}
:root .pf-table .pf-plan,:root .pf-table .pf-cell{text-align:center;width:96px}
:root .pf-table .pf-plan small{display:block;color:var(--pui-accent-text);font-weight:600}
:root .pf-table .pf-mine{background:color-mix(in srgb,var(--accent) 9%,transparent)}
:root .pf-yes{color:var(--pui-ok);font-weight:600}
:root .pf-no{color:var(--muted)}
:root .pf-soon{display:inline-flex;margin-left:6px;padding:1px 8px;border-radius:var(--r-stadium);background:color-mix(in srgb,var(--amber) 16%,var(--surface));color:var(--ink);font-size:var(--fs-micro);line-height:var(--lh-micro);font-weight:600;vertical-align:middle}
:root details.pf-wrap>summary{cursor:pointer;list-style:none;display:flex;align-items:center;gap:8px}
:root details.pf-wrap>summary::-webkit-details-marker{display:none}
:root details.pf-wrap>summary::before{content:"";width:8px;height:8px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:rotate(-45deg);transition:transform .15s}
:root details.pf-wrap[open]>summary::before{transform:rotate(45deg)}
:root .pf-table th.pf-plan,:root .pf-table td.pf-cell{text-align:center}
:root details.pf-wrap:not([open]){gap:0}

/* Room for the Steward launcher (fixed, bottom-right, ~70px with its margin): the page ends far enough below its last
   control that the control can always be scrolled clear of it (QA PR #178 report item 3: Financials' last "View
   Details" buttons sat under it with nowhere left to scroll). */
:root .footer{padding-bottom:88px}
/* The title check's "Run the title check" button (web/title-check.js askHtml): a paid lookup runs only when pressed. */
:root .title-check-panel .tc-actions{display:flex;gap:10px;margin:12px 0 12px}
/* The lot behind the Market Intelligence pop-out (app.js): inert while the pop-out is open, laid out as if unwrapped. */
:root .mi-pop-behind{display:contents}
/* "Connect this computer to your online AutoSteward" / "Use this computer's own AutoSteward" under the sign-in form
   (web/online-server.js): a quiet line, the same weight as "Forgot your password?". */
:root .security-gate-online{margin:12px 0 0;max-width:100%}
:root .security-gate-online .link-btn{font-size:var(--fs-small);line-height:var(--lh-small);white-space:normal;text-align:left;overflow-wrap:anywhere}
/* Each person's own saved signature (web/my-signature.js): the card on My Security and the dealership strip on the
   signing page. The signature sits on white in both themes, like the signing box, so dark ink stays readable. */
:root .my-signature-card .sw-button-row{margin-top:10px}
:root .my-signature-pad{height:180px}
:root .my-signature-image{display:block;width:360px;max-width:100%;height:auto;margin:6px 0 4px;padding:6px;border:1px solid var(--line);border-radius:var(--r-control);background:#fff}
:root .my-signature-image.my-signature-small{width:180px;margin:0}
:root .sign-dealer{padding:18px 20px;margin-bottom:16px}
:root .sign-dealer h3{margin:0 0 6px;font-size:var(--fs-lead);line-height:var(--lh-lead)}
:root .sign-dealer-row{display:flex;gap:14px;align-items:center;flex-wrap:wrap;margin-top:10px}
/* Change plan and cancel on the Subscription screen (web/subscription.js manageHtml, owner 2026-10-28). */
:root .sub-manage{margin:10px 0 4px}
:root .sub-manage>p{margin:0;font-size:var(--fs-small);line-height:var(--lh-small);color:var(--muted)}
:root .sub-manage-note{margin:8px 0 0;font-size:var(--fs-small);line-height:var(--lh-small);color:var(--muted)}
:root .sub-plan-price{display:block;margin:2px 0 0;font-weight:400;color:var(--muted)}
:root .sub-manage-ending{margin:10px 0 0;padding:12px 14px;border:1px solid var(--amber);border-radius:10px;background:color-mix(in srgb,var(--amber) 10%,var(--surface))}
:root .sub-manage-ending strong{display:block;font-size:var(--fs-body);line-height:var(--lh-body);font-weight:600;color:var(--ink)}
:root .sub-manage-ending p{margin:2px 0 10px;font-size:var(--fs-small);line-height:var(--lh-small);color:var(--ink)}
:root .sub-manage-actions{display:flex;flex-wrap:wrap;gap:10px;margin:12px 0 0}

/* Steward: a proposal being applied says so beside its disabled buttons (web/ai-agent.js, owner 2026-10-29). */
:root .sag-prop-busy{align-self:center;color:var(--muted);font-size:var(--fs-small);line-height:var(--lh-small)}
/* The payment grid's month labels: the table's heavy heading rule is for column headings, not for row labels. */
html:root body .data-table.dd-grid tbody th{border-bottom:1px solid var(--line)}
@media (min-width:1100px){:root .dd-inputs{grid-template-columns:minmax(0,2fr) minmax(0,3fr) minmax(0,2fr) minmax(0,2fr)}}
html:root body .data-table.dd-grid thead th:not(:first-child){text-align:center!important}
html:root body #app .data-table.dd-grid tbody th{background:transparent!important}
html:root body .data-table.dd-grid tbody td{border-bottom:1px solid var(--line)}

:root .dd-inputs-card{padding-bottom:6px}

/* The printed hang tag is paper, not page structure: its round top and the round hole it hangs from on the mirror are
 * what the tag is, so it is exempt from layout.css's square corners (which it outranks by selector). Squared, the hole
 * read as a picture that never loaded (owner, 2026-10-29: "where is the picture here"). */
html:root body #app .dd-sheets article.dd-hang[data-dd-sheet]{border-radius:24px 24px 4px 4px}
html:root body #app .dd-sheets article.dd-hang span.dd-hole{border-radius:50%}
/* A CHART KEEPS ITS SHAPE (owner, 2026-11-15: "make it a circle like in the second picture"). The square rule above turned the
 * Spending by Category donut (Vendor reports) into a square with a round hole, in every design: measured radius 0 on all ten.
 * A donut's ring is how the slices are read, so it is a shape that means something, like the hang tag's punched hole
 * (the rule above), not decoration for the square look to take away. */
/* Specificity: the square rule counts as an id and three classes (its :is() takes its strongest member, input:not():not()),
 * so the chart's own rule names the class three times to outrank it, with no !important. */
html:root body #app .vendor-donut.vendor-donut.vendor-donut{border-radius:50%}
/* The complete-backup card is a full-width row on Backup like the cards above and below it (owner, 2026-11-07: no lone card
   beside an empty half). It was capped at 620px when it was a footnote about the records-only file on Restore & Export. */
html:root body .system-workspace-grid>.database-export-card{max-width:none}

/* Inventory: ready to sell, or still being fixed in the Workshop (web/lot-readiness.js, owner 2026-10-29). */
:root .lot-ready{display:inline-block;padding:2px 8px;font-size:var(--fs-micro);line-height:var(--lh-micro);font-weight:700;white-space:nowrap}
:root .lot-ready.is-ready{background:color-mix(in srgb,var(--green,#1f8a4c) 14%,var(--surface,#fff));color:var(--green,#1f8a4c)}
:root .lot-ready.is-fixing{background:color-mix(in srgb,var(--amber,#b26a00) 10%,var(--surface,#fff));color:var(--amber,#b26a00)}
/* The counts above the vehicle list sit in a title row whose spans layout.css colours muted at higher specificity. */
html:root body .vehicle-filter-panel .filter-title-row .lot-ready.is-ready{color:var(--green,#1f8a4c)}
html:root body .vehicle-filter-panel .filter-title-row .lot-ready.is-fixing{color:var(--amber,#b26a00)}
:root .lot-ready-counts{display:inline-flex;gap:6px;margin-left:10px;vertical-align:middle}
:root .inv-tile-flag.inv-tile-fixing{background:var(--amber,#b26a00)}

/* The credit step's lender sign-ins (web/free-checks.js lenderPortalsHtml, owner 2026-10-29): each opens that company's own
   sign-in page in the dealer's browser, on the dealer's own account. */
/* Links to the title-record providers and the DMV (web/deep-links.js), drawn with the credit step's link cards. */
:root .deep-links-panel .fc-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;flex-wrap:wrap}
:root .deep-links-dmv .fc-lede{margin:4px 0 10px}
/* Register it with the DMV (owner, 2026-11-07: "make the layout not crammed", "always make evrything symmetrical").
   Two groups, each a FIXED three-column grid: six licensed vendors are a full 3 x 2, the DMV's three pages one full row.
   auto-fit would leave a lone card at some widths. Every card in a row stretches to the row's height. */
:root .deep-links-dmv{padding:16px 18px}
:root .deep-links-group{margin-top:18px}
:root .deep-links-group h3{margin:0 0 4px;font-size:var(--fs-body);line-height:var(--lh-body);font-weight:700}
:root .deep-links-note{margin:0 0 12px;color:var(--muted);font-size:var(--fs-small);line-height:var(--lh-small)}
:root .deep-links-note a{color:var(--accent);font-weight:600;white-space:nowrap}
:root .deep-links-dmv .fc-lender-links{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;align-items:stretch}
:root .deep-links-dmv .fc-lender{height:100%;padding:12px 14px;align-items:stretch}
:root .deep-links-dmv .fc-lender .fc-mark{align-self:flex-start}
:root .deep-links-dmv .fc-lender-text{display:flex;flex-direction:column;gap:2px}
:root .fc-lender-text .fc-lender-phone{margin-top:auto;padding-top:6px;color:var(--ink);font-variant-numeric:tabular-nums}
@media (max-width:899px){:root .deep-links-dmv .fc-lender-links{grid-template-columns:minmax(0,1fr)}}
:root .fc-lenders{margin-top:14px;padding-top:12px;border-top:1px solid var(--line)}
:root .fc-lenders-head{margin:0 0 10px;font-size:var(--fs-small);line-height:var(--lh-small)}
:root .fc-lender-links{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:10px}
:root .fc-lender{display:flex;gap:10px;align-items:flex-start;padding:10px 12px;border:1px solid var(--line);background:var(--surface);color:var(--ink);text-decoration:none;transition:border-color .14s}
:root .fc-lender:hover,:root .fc-lender:focus-visible{border-color:var(--accent)}
:root .fc-lender-text{display:grid;gap:2px;min-width:0}
:root .fc-lender-text strong{font-size:var(--fs-body);line-height:var(--lh-body)}
:root .fc-lender-text span{color:var(--muted);font-size:var(--fs-small);line-height:var(--lh-small)}
:root .fc-acr{margin-top:6px}
:root .fc-guard{margin:8px 0 0;padding:8px 12px;border-left:4px solid var(--amber,#b26a00);background:color-mix(in srgb,var(--amber,#b26a00) 8%,transparent);font-size:var(--fs-small);line-height:var(--lh-small)}

/* Workspace tabs (web/workspaces.js): one strip across the top of every page in a workspace, the same pill bar as System
 * Tools so every tabbed page in the app reads alike (owner, 2026-11-01: "make it more uniform and organized"). */
:root .ws-tabs{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 16px;padding:8px;border:1px solid var(--line);border-radius:var(--r-surface);background:var(--surface-soft,var(--surface))}
:root .ws-tab{display:inline-flex;align-items:center;gap:8px;min-height:40px;padding:0 18px;border:1px solid transparent;border-radius:var(--r-surface);color:var(--ink);font-size:var(--fs-small);line-height:var(--lh-small);font-weight:600;text-decoration:none;white-space:nowrap}
:root .ws-tab:hover{background:var(--surface);color:var(--accent)}
:root .ws-tab:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
:root .ws-tab-badge{display:inline-grid;place-items:center;min-width:20px;height:20px;padding:0 6px;border-radius:var(--r-stadium);background:var(--red,#c53030);color:#fff;font-size:var(--fs-micro);line-height:var(--lh-micro);font-weight:700}
@media (max-width:640px){:root .ws-tabs{flex-wrap:nowrap;overflow-x:auto}}
/* The step count never wraps to three lines in the 600px dock. */
:root .auction-step-count{white-space:nowrap}

/* Signatures: every signing link in one place (web/signing-links.js; owner, 2026-11-01). One line per customer until it is
   opened (owner, 2026-11-06: "this needs to be streamlined more because this will take a lot of space when more customers do
   esignatures"): who, which car, what is signed and waiting, the last date, and Open the sale; the papers underneath. */
html:root body .sl-summary{margin:0 0 10px;color:var(--muted);font-size:var(--fs-small);line-height:var(--lh-small);font-weight:600}
html:root body .sl-tools{display:flex;flex-wrap:wrap;align-items:center;gap:10px 16px;margin:0 0 12px}
html:root body .sl-search{flex:1 1 280px;max-width:480px;min-height:40px}
html:root body .sl-filter{display:flex;flex-wrap:wrap;gap:6px}
html:root body .sl-filter .button[aria-pressed="true"]{color:var(--tab-key-ink);background:var(--tab-key);border-color:var(--tab-key)}
html:root body .sl-filter-n{font-variant-numeric:tabular-nums;opacity:.8}
html:root body .sl-list{display:grid;border:1px solid var(--line);border-radius:var(--r-surface);background:var(--surface);overflow:hidden}
html:root body .sl-rec{border-top:1px solid var(--line)}
html:root body .sl-list>.sl-rec:first-child{border-top:0}
html:root body .sl-rec-head{position:relative;display:grid;grid-template-columns:minmax(0,1fr) auto 72px auto;align-items:center;gap:8px 16px;padding:10px 16px;cursor:pointer;list-style:none}
html:root body .sl-rec-head::-webkit-details-marker{display:none}
html:root body .sl-rec-head::before{content:"";position:absolute;width:8px;height:8px;border-right:2px solid var(--muted);border-bottom:2px solid var(--muted);transform:rotate(-45deg);transition:transform .15s}
html:root body .sl-rec>.sl-rec-head{padding-left:34px}
html:root body .sl-rec>.sl-rec-head::before{left:14px;top:50%;margin-top:-5px}
html:root body .sl-rec[open]>.sl-rec-head::before{transform:rotate(45deg)}
html:root body .sl-rec-head:hover{background:var(--surface-soft,var(--soft))}
html:root body .sl-record-new>.sl-rec-head{box-shadow:inset 3px 0 0 var(--accent)}
html:root body .sl-who{display:flex;flex-wrap:wrap;align-items:baseline;gap:2px 12px;min-width:0}
html:root body .sl-who strong{color:var(--ink);font-size:var(--fs-body);line-height:var(--lh-body);font-weight:600}
html:root body .sl-who span{color:var(--muted);font-size:var(--fs-small);line-height:var(--lh-small)}
html:root body .sl-chips{display:flex;flex-wrap:wrap;gap:6px}
html:root body .sl-chip{display:inline-flex;align-items:center;height:24px;padding:0 10px;border-radius:var(--r-stadium);background:var(--surface-soft,var(--soft));color:var(--ink);font-size:var(--fs-micro);line-height:var(--lh-micro);font-weight:600;white-space:nowrap}
html:root body .sl-chip-done{background:color-mix(in srgb,var(--pui-ok,#1f7a4d) 14%,var(--surface));color:var(--pui-ok,#1f7a4d)}
html:root body .sl-chip-wait{background:color-mix(in srgb,var(--pui-warn,#b7791f) 16%,var(--surface));color:var(--ink)}
html:root body .sl-latest{color:var(--muted);font-size:var(--fs-small);line-height:var(--lh-small);text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}
html:root body .sl-lines{display:grid;margin:0;padding:0 16px 10px 34px;list-style:none}
html:root body .sl-line{display:grid;grid-template-columns:minmax(0,1fr) 90px 170px auto;align-items:center;gap:8px 16px;min-height:40px;padding:4px 0;border-top:1px dashed var(--line)}
html:root body .sl-doc{min-width:0;color:var(--ink)}
html:root body .sl-when{color:var(--muted);font-size:var(--fs-small);line-height:var(--lh-small);font-variant-numeric:tabular-nums}
html:root body .sl-actions{white-space:nowrap;text-align:right}
html:root body .sl-actions .button+.button{margin-left:8px}
html:root body .sl-new{background:color-mix(in srgb,var(--accent) 10%,transparent)}
html:root body .sl-new-tag{display:inline-block;margin-left:6px;padding:0 8px;border-radius:var(--r-stadium);background:var(--accent);color:var(--accent-ink,#fff);font-size:var(--fs-micro);line-height:var(--lh-micro);font-weight:700}
html:root body .sl-state{font-weight:600;color:var(--muted)}
html:root body .sl-state-done{color:var(--pui-ok,#1f7a4d)}
html:root body .sl-state-wait{color:var(--pui-warn,#b7791f)}
html:root body .sl-off .sl-doc{color:var(--muted)}
html:root body .sl-more{margin:12px 0 0}
html:root body .sl-none{margin:0;padding:14px 16px;color:var(--muted)}
html:root body .sl-note{margin:10px 0 0;color:var(--muted);font-size:var(--fs-small);line-height:var(--lh-small)}
html:root body .sl-closed{margin:16px 0;padding:10px 16px;border:1px solid var(--line);border-radius:var(--r-surface);background:var(--surface)}
html:root body .sl-closed>summary{cursor:pointer;font-weight:600;color:var(--ink)}
html:root body .sl-closed[open]>summary{margin-bottom:8px}
html:root body .sl-closed .sl-rec{border-top:1px solid var(--line)}
@media (max-width:760px){
  html:root body .sl-rec-head{grid-template-columns:minmax(0,1fr) auto}
  html:root body .sl-latest{display:none}
  html:root body .sl-line{grid-template-columns:minmax(0,1fr) auto;padding:8px 0}
  html:root body .sl-when{grid-column:1/-1}
}
html:root body .sl-empty{padding:20px 22px}
html:root body .sl-empty h2{margin:0 0 8px;font-size:var(--fs-lead);line-height:var(--lh-lead)}
html:root body .sl-empty p{margin:0;color:var(--muted)}

/* The always-on-top window beside another company's site (float-window.js; owner, 2026-11-01: "whenever i do something in
   the autosteward helper menu the page next to it disappears"). The card, the posting list or the import fills it. */
html:root body.steward-float{margin:0;min-height:100vh;background:var(--canvas);color:var(--ink)}
html:root body.steward-float .oc-pop,html:root body.steward-float .auction-modal-backdrop.is-docked{padding:0;background:none;overflow:hidden}
html:root:has(body.steward-float),html:root body.steward-float{overflow:hidden}
html:root body.steward-float .oc-card,html:root body.steward-float .auction-modal-backdrop.is-docked .auction-modal-card{width:100%;max-width:none;height:100vh;max-height:100vh;margin:0;border:0;border-radius:0;box-shadow:none}
/* Floating, the site not open yet is the next step, not a warning: blue, not amber. */
:root .oc-status.is-next,:root .auction-beside.is-next{background:color-mix(in srgb,var(--accent) 14%,transparent)}
:root .oc-status.is-next .oc-dot,:root .auction-beside.is-next .oc-dot{background:var(--accent)}
html:root body .steward-float-root{min-height:100vh}
/* The card's own body scrolls, never the card: no space kept for a scrollbar it cannot have (it left a strip down its right edge). */
html:root body .oc-card,html:root body .auction-modal-card{scrollbar-gutter:auto}

/* Workshop: one table of parts and labor, and one row of boxes to add a line (owner, 2026-11-01: "description - price - labor -
   total date", "simplify it"). */
:root .sb-in-for{margin:8px 0 0;color:var(--ink)}
:root .sb-work{display:grid;gap:12px;margin:0 0 14px}
:root .sb-work h3{margin:0}
:root .sb-work-table td{vertical-align:middle}
:root .sb-work-table tfoot td{font-weight:600;border-top:2px solid var(--line)}
:root .sb-work-table tr.sb-editing td{background:color-mix(in srgb,var(--accent) 10%,transparent)}
:root .sb-work-actions{white-space:nowrap;text-align:right}
:root .sb-work-actions .link-btn+.link-btn{margin-left:12px}
:root .sb-work-form{padding-top:12px;border-top:1px solid var(--line)}
:root .sb-work-boxes{display:grid;grid-template-columns:minmax(220px,2.4fr) repeat(3,minmax(110px,1fr)) minmax(150px,1fr) auto;gap:12px;align-items:end}
:root .sb-work-boxes.no-money{grid-template-columns:minmax(220px,3fr) minmax(150px,1fr) auto}
:root .sb-work-total{display:flex;align-items:center;min-height:max(44px,var(--control-height));padding:0 12px;border:1px solid var(--line);border-radius:var(--r-control);background:var(--surface-soft,var(--soft));color:var(--ink);font-weight:600;font-variant-numeric:tabular-nums}
:root .sb-work-go{display:flex;gap:8px}
:root .sb-work-note{margin:0;color:var(--muted);font-size:var(--fs-small);line-height:var(--lh-small)}
:root details.sb-notes>summary{cursor:pointer;font-weight:600}
@media (max-width:900px){:root .sb-work-boxes,:root .sb-work-boxes.no-money{grid-template-columns:repeat(2,minmax(0,1fr))}:root .sb-work-boxes>.sb-field:first-child{grid-column:1/-1}}

/* EVERY BOX IN A ROW ON ONE LINE (owner, 2026-11-01: "all boxes everywhere in the app have to be alligned", "i dont want how add
   is misaligned from other fields to happen any where in the app"). Measured on every screen at 1440px with a walk that lists
   rows whose boxes do not share a top and a bottom. Two causes, fixed where they occur:
   - a compact button (32-36px) beside a 44px box: in these rows a button is as tall as the boxes;
   - a field's own bottom margin inside a row aligned to the bottom, which lifted the boxes above the button beside them. */
:root .sb-work-boxes>.sb-field,:root .sb-recon-start>.sb-field{margin-bottom:0}
:root :is(.dash-car-fix,.inline-tool,.recall-check-actions,.vehicle-action-bar,.sb-recon-start,.sb-work-go,.crm-lead-scope,.vendor-pagination-buttons) :is(.button,a.button){min-height:max(44px,var(--control-height));height:max(44px,var(--control-height))}
:root .dash-car-fixrow{align-items:center}:root .dash-car-fixrow>*{margin-top:0;margin-bottom:0}
:root .vendor-form-grid label{align-content:center}
/* A label and its box side by side: one row. An empty second row (and its gap) pushed one box up by 4px. */
:root .vendor-form-grid label{row-gap:0}

/* A car's file categories are buttons that show their files (owner, 2026-11-01). */
:root .file-summary-show{display:grid;gap:6px;width:100%;padding:0;border:0;background:none;color:inherit;font-family:inherit;font-size:inherit;line-height:inherit;font-weight:inherit;text-align:left;cursor:pointer}
:root .file-summary-show:focus-visible{outline:2px solid var(--accent);outline-offset:4px}
:root .file-summary-card:hover{border-color:var(--accent)}
:root .file-summary-card.is-shown{border-color:var(--accent);box-shadow:inset 0 0 0 1px var(--accent)}
:root .files-view-head{display:flex;align-items:baseline;gap:12px;margin:16px 0 8px}
:root .files-view-head h3{margin:0}

/* Find a Vendor: near a ZIP or a city, within a distance, or by name, all on one line (owner, 2026-11-01). */
:root .vs-where-row{display:flex;flex-wrap:wrap;align-items:center;gap:12px 20px;margin:0 0 14px}
:root .vs-where,:root .vs-within{display:inline-flex;align-items:center;gap:8px;font-size:var(--fs-small);line-height:var(--lh-small)}
:root .vs-where input{width:200px;max-width:60vw}
:root .vs-within select{width:auto}
:root .vs-where-row :is(input,select){min-height:36px;height:36px;padding:4px 8px}

/* Help Home's topic cards (owner, 2026-11-07: "always make evrything symmetrical"). There are seven, which no even grid
   holds: four across left three and a gap, three across left one card alone. So four across and the last row centred,
   and one per line on a phone. Cards in a row share one height (flex stretches them). */
:root .help-category-grid-v2{display:flex;flex-wrap:wrap;justify-content:center;gap:12px}
:root .help-category-grid-v2>*{flex:0 0 calc((100% - 36px) / 4);min-width:0}
@media (max-width:899px){:root .help-category-grid-v2>*{flex-basis:100%}}

/* The sale's Paperwork tabs (web/sale-paperwork-tabs.js). They are buttons, and a button inside the sale took the sale's
   grey button fill, so an unchosen tab read as disabled (measured rgb(107,107,107), 2026-11-07). Same look as every other
   tab bar: quiet until chosen, then the accent of :root .ws-tabs .ws-tab[aria-current="page"]. */
/* The same for the sub-tabs inside a screen (web/in-page-tabs.js). */
:root :is(.sw-paper-tabs,.ipt-tabs) .ws-tab{background:transparent;color:var(--ink);cursor:pointer;box-shadow:none}
:root :is(.sw-paper-tabs,.ipt-tabs) .ws-tab:hover{background:var(--surface);color:var(--accent)}
:root :is(.sw-paper-tabs,.ipt-tabs) .ws-tab[aria-current="page"]{color:var(--tab-key-ink);background:var(--tab-key);border-color:var(--tab-key-rim);box-shadow:0 0 0 2px var(--tab-key-ring),0 4px 12px var(--tab-key-glow)}
:root :is(.sw-paper-panel,.ipt-panel)[hidden]{display:none}

/* Market Intelligence's "Pick a car" (UI sweep, 2026-11-07, owner: "keep pages in all app not long"). Every car on the
   lot is a card here, so a 40-car lot ran three screens at 1440x900. The grid now scrolls inside itself, one screen
   tall, the way the Workshop's columns do; the search box above it stays in place. Phones keep the page scroll. */
@media (min-width:900px){:root .mi-picks{max-height:max(360px,calc(100vh - 340px));overflow-y:auto;overscroll-behavior:contain;padding:2px 6px 2px 2px;align-content:start}}

/* Backup's six facts (folder, location, last backup, how many, rejected, latest size): four then two left a hole under
   the right half. Three across is two full rows; two across on a narrow window is three (UI sweep, 2026-11-07). */
:root .backup-status-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
@media (max-width:900px){:root .backup-status-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Financials: the cars table keeps its header row pinned and scrolls inside itself, about half a window tall, so the
   summary, the filters and the table fit about two screens at 1440x900 (UI sweep, 2026-11-07; it measured 2.1). */
:root .financial-list-panel .table-pin{max-height:max(320px,calc(100vh - 420px))}
@media print{:root .financial-list-panel .table-pin{max-height:none}}

/* THE SALE, SHORTER ON EVERY STEP (UI sweep part 3, 2026-11-07; owner: "keep pages in all app not long", "always make
   evrything symmetrical"). Two things sat above or below every step and measured 2.3 screens at 1440x900:
   - the car's card was a 540px box alone on its own row above the sale, with the rest of that row empty. It now sits
     beside the "Working deal" picker, the two sharing one row of one height (stacked on a narrow window);
   - "what is still missing" was one long column across the full width; it is two columns now.
   Nothing inside the sale moves: its body stays 894px and the step bar the same width on every step. */
@media (min-width:1100px){
  :root main:has(>.deal-context-switcher):has(>.guided-sale-vehicle-summary){display:grid;grid-template-columns:minmax(0,1fr) 540px;column-gap:16px;align-items:stretch}
  :root main:has(>.deal-context-switcher):has(>.guided-sale-vehicle-summary)>*{grid-column:1/-1;min-width:0}
  :root main:has(>.deal-context-switcher):has(>.guided-sale-vehicle-summary)>.deal-context-switcher{grid-column:1;grid-template-columns:minmax(0,1fr);align-content:center;margin:0 0 16px}
  :root main:has(>.deal-context-switcher):has(>.guided-sale-vehicle-summary)>.guided-sale-vehicle-summary{grid-column:2;width:100%;margin:0 0 16px}
}
:root .sw-notices :is(.sw-issues,.sw-warnings){column-count:2;column-gap:32px}
:root .sw-notices :is(.sw-issues,.sw-warnings) li{break-inside:avoid}
@media (max-width:899px){:root .sw-notices :is(.sw-issues,.sw-warnings){column-count:1}}

/* EVEN CARD GRIDS, APP-WIDE (UI sweep part 3, 2026-11-07; owner: "always make evrything symmetrical", "never a lone
   card"). Measured on every route as every role, these ended on one card alone or a short left-hand row:
   - two-column card grids with an odd count (System overview, Security settings, the diagnostics list, the vehicle
     checks): the last card takes the whole row instead of half of it;
   - the nine design themes were five then four: three across, a full 3 x 3;
   - the five marketing platforms were three then two on the left: the last row is centred. */
@media (min-width:901px){
  :root :is(.system-overview-grid,.security-settings-grid,.diagnostic-list,.validation-list)>:last-child:nth-child(odd){grid-column:1/-1}
  :root .design-theme-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  :root .mk-platform-grid{display:flex;flex-wrap:wrap;justify-content:center}
  :root .mk-platform-grid>*{flex:0 0 calc((100% - 32px) / 3);min-width:0}
}
/* All of Help's guides (help/search, "View all 60 guides") measured 11.7 screens: the list scrolls inside itself, one
   screen tall, under the search box, the way Market's lot does. */
@media (min-width:900px){:root .help-search-results{max-height:max(400px,calc(100vh - 320px));overflow-y:auto;overscroll-behavior:contain;padding-right:6px;align-content:start}}

/* THE SALE RECORD TAB ON A CAR, IN TWO COLUMNS (UI sweep part 3, 2026-11-07; owner: "keep pages in all app not long",
   "always make evrything symmetrical"). Its five sections (the car, the buyer, the money, how they are paying, forms)
   were stacked full width with each label at the far left and its value half a page away: 2.4 screens, 3.2 on a sold
   car. Two columns of cards of one height per row, an odd last card across the row. Only on the car's Sale Record; the
   guided sale's own review step is unchanged. */
@media (min-width:1100px){
  :root .sale-record .sw-review{grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch}
  :root .sale-record .sw-review>:last-child:nth-child(odd){grid-column:1/-1}
}
/* Reconditioning's step columns scroll inside themselves, one screen tall and all one height, like the Workshop board
   (it measured 2.3 screens with twelve cars in recon). */
@media (min-width:901px){:root .sb-board .sb-col{height:max(320px,calc(100vh - 360px));overflow-y:auto;overscroll-behavior:contain}}
/* Help Home's six popular guides: three across (two full rows) rather than two (three rows). */
@media (min-width:1200px){:root .help-v2 .help-section-v2 .help-article-grid-v2{grid-template-columns:repeat(3,minmax(0,1fr))}}

/* FILTER FORMS WITHOUT A STRAY BUTTON ROW (UI sweep part 4, 2026-11-07; owner: "always make evrything symmetrical").
   Measured at 1440x900, each of these put its buttons alone on a row of their own:
   - Financials and Sales: the boxes and the buttons fit one line, so they are one line, buttons at the right end;
   - Vehicles: six boxes and the buttons do not fit one line, so the buttons take a full row of their own, at the right;
   - Activity: it ran five boxes, then the buttons alone, then the dates alone, then the checkbox alone. Now two full
     rows: the five boxes; then the dates, the checkbox and the buttons. */
@media (min-width:1280px){
  :root .financial-filter-grid,:root .sales-filter-bar{display:flex;flex-wrap:wrap;align-items:flex-end;gap:12px}
  :root :is(.financial-filter-grid,.sales-filter-bar)>label{flex:1 1 150px;min-width:0}
  :root .sales-filter-bar>label:first-child{flex:2 1 260px}
  :root :is(.financial-filter-grid,.sales-filter-bar)>:is(.financial-filter-actions,.sales-filter-actions){flex:0 0 auto;margin-left:auto}
  :root .vehicle-filter-grid>.filter-buttons{grid-column:1/-1;display:flex;justify-content:flex-end;gap:8px}
  :root .activity-filter-grid{grid-template-columns:minmax(240px,2fr) repeat(4,minmax(120px,1fr));column-gap:12px}
  :root .activity-filter-grid>.activity-date-range{grid-column:1/3;order:1}
  :root .activity-filter-grid>.checkbox-line{grid-column:3;order:2;align-self:center}
  :root .activity-filter-grid>.activity-filter-actions{grid-column:4/6;order:3;justify-content:flex-end;align-self:end}
}

/* Connections > Getting paid (UI sweep part 4, 2026-11-07; owner: "keep pages in all app not long", "always make
   evrything symmetrical"). The five ways to be paid were stacked full width, each box as wide as the page: 2.2 screens at
   1440x900. Two across, cards in a row one height, and the odd last one across the whole row. */
@media (min-width:1100px){
  :root .pay-links .pay-row-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;align-items:stretch}
  :root .pay-links .pay-row-list>.pay-row{margin:0;min-width:0}
  :root .pay-links .pay-row-list>.pay-row:last-child:nth-child(odd){grid-column:1/-1}
}

/* LAST LONE BUTTONS AND CARDS (UI sweep part 5, 2026-11-07; owner: "always make evrything symmetrical").
   - Inventory's action bar, when all ten buttons show (Administrator, Manager), does not fit one row at 1440 (the tenth sat alone on a second row) or at
     1280 (eight and two). Two even rows of five, each button the same width.
   - A car's Photos / Files: Open Vehicle Folder and Open Pictures Folder on a row, then Scan Folder alone at half width.
     Scan Folder, the one that does the work, now takes the whole second row.
   - A report's header cards (generated by, dates, filters) were two and one: the third takes the row, as on the other
     two-column card grids. */
@media (min-width:1100px){
  :root .vehicle-action-bar:has(>button:nth-of-type(10):last-of-type):not(:has(>button[hidden])){display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px}
  :root .vehicle-action-bar:has(>button:nth-of-type(10):last-of-type):not(:has(>button[hidden]))>.action-divider{display:none}
  :root .vehicle-action-bar:has(>button:nth-of-type(10):last-of-type):not(:has(>button[hidden]))>button{width:100%;min-width:0;justify-content:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
}
:root .inline-actions:has(>#scanVehicleFolder:nth-child(3):last-child)>#scanVehicleFolder{flex:1 1 100%;justify-content:center}
@media (min-width:901px){:root .report-identity-grid>:last-child:nth-child(odd){grid-column:1/-1}}

/* WORKSHOP RECON BOARD: SMALL CARDS, THE CAR'S OWN PHOTO, A COLOUR AND AN ICON PER STEP (owner, 2026-11-08: "these cards
 * are too big", then "add some logos and some visual flare here it looks so boring"). A card was about 350px tall; it is
 * now the photo, the car on one line, stock, days and who on the next, any badge on a third, and Next with a ⋯ that opens
 * Who has it and Move to under the card (web/service-bay.js). Each step takes one of five colours by its place in the
 * order, darker in light mode and lighter in dark so both read on the column; Front-line ready keeps its green. Red and
 * amber stay reserved for past target and nearly due, so no step is ever drawn in either. No car maker's logo is drawn:
 * they are trademarks we have no files for. */
:root [data-sb-accent="0"]{--sb-step:#0369a1}
:root [data-sb-accent="1"]{--sb-step:#6d28d9}
:root [data-sb-accent="2"]{--sb-step:#be185d}
:root [data-sb-accent="3"]{--sb-step:#0f766e}
:root [data-sb-accent="4"]{--sb-step:#4338ca}
:root[data-theme="dark"] [data-sb-accent="0"]{--sb-step:#38bdf8}
:root[data-theme="dark"] [data-sb-accent="1"]{--sb-step:#a78bfa}
:root[data-theme="dark"] [data-sb-accent="2"]{--sb-step:#f472b6}
:root[data-theme="dark"] [data-sb-accent="3"]{--sb-step:#2dd4bf}
:root[data-theme="dark"] [data-sb-accent="4"]{--sb-step:#818cf8}
:root .sb-col-ready{--sb-step:var(--green)}
:root .sb-board .sb-col{gap:6px;padding:0 8px 8px;border-top:4px solid var(--sb-step,var(--line));scrollbar-width:thin;scrollbar-color:color-mix(in srgb,var(--muted) 40%,transparent) transparent}
:root .sb-col header.sb-col-head{position:sticky;top:0;z-index:1;display:grid;grid-template-columns:24px minmax(0,1fr) auto;grid-template-areas:"ico name count" "ico sub count";column-gap:6px;row-gap:0;align-items:center;margin:0 -8px;padding:10px 8px 8px;background:inherit}
:root .sb-col-head .sb-col-ico{grid-area:ico;display:grid;place-items:center;width:24px;height:24px;border-radius:6px;background:color-mix(in srgb,var(--sb-step) 15%,transparent);color:var(--sb-step)}
:root .sb-col-head .sb-col-ico svg{width:14px;height:14px}
:root .sb-col-head strong{grid-area:name;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:var(--fs-body);line-height:var(--lh-body)}
:root .sb-col-head .muted{grid-area:sub}
:root .sb-col-head .sb-col-count{grid-area:count;min-width:24px;padding:0 6px;border-radius:999px;background:color-mix(in srgb,var(--sb-step) 15%,transparent);color:var(--sb-step);text-align:center;font-weight:700;font-size:var(--fs-small);line-height:var(--lh-small)}
:root .sb-col .sb-card{position:relative;flex-shrink:0;grid-template-columns:auto minmax(0,1fr);column-gap:8px;row-gap:6px;align-items:start;padding:6px 8px 8px;border-left:4px solid var(--sb-step,var(--blue));overflow:hidden}
:root .sb-col .sb-card.due{border-left-color:var(--amber)}
:root .sb-col .sb-card.overdue{border-left-color:var(--red)}
:root .sb-col .sb-card.ready{border-left-color:var(--green)}
:root .sb-col .sb-card[data-sb-expanded]{box-shadow:0 0 0 2px color-mix(in srgb,var(--sb-step,var(--accent)) 35%,transparent)}
:root .sb-card .sb-thumb{grid-row:1;grid-column:1;display:block;width:48px;height:36px;margin-top:2px;border-radius:6px;object-fit:cover;background:var(--surface-2,#f5f7fa)}
:root .sb-card .sb-thumb:not([src]){display:none}
:root .sb-card .sb-card-head{grid-row:1;grid-column:2;display:grid;min-width:0}
:root .sb-card:has(>.sb-thumb:not([src])) .sb-card-head{grid-column:1/-1}
:root .sb-col .sb-card-title{display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;overflow-wrap:normal;font-size:var(--fs-small);line-height:var(--lh-small)}
:root .sb-col .sb-card-meta{display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:var(--fs-micro);line-height:var(--lh-micro)}
:root .sb-pills{display:flex;flex-wrap:nowrap;gap:4px;min-width:0;overflow:hidden}
:root .sb-pill{display:block;flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;padding:0 6px;border-radius:999px;white-space:nowrap;text-decoration:none;font-weight:600;font-size:var(--fs-micro);line-height:var(--lh-micro)}
:root .sb-pill-late{background:var(--redsoft);color:var(--red)}
:root .sb-pill-parts{background:var(--ambersoft);color:var(--amber)}
:root .sb-pill-ro{background:color-mix(in srgb,var(--sb-step,var(--blue)) 13%,transparent);color:var(--sb-step,var(--blue))}
:root a.sb-pill:hover{text-decoration:underline}
:root .sb-col .sb-card-actions{grid-column:1/-1;grid-template-columns:minmax(0,1fr) 28px;align-items:center;gap:6px;margin-top:0}
:root .sb-col .sb-card-actions:not(:has(.sb-more-btn)){grid-template-columns:minmax(0,1fr)}
:root .sb-col .sb-card-actions .sb-next{min-width:0;min-height:28px;padding:0 8px}
:root .sb-next-label{min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
:root .sb-next-short{display:none}
:root .sb-more-btn{display:grid;place-items:center;width:28px;height:28px;padding:0;border:1px solid var(--line);border-radius:var(--r-control,8px);background:var(--surface);color:var(--muted);cursor:pointer}
:root .sb-more-btn:hover,:root .sb-more-btn[aria-expanded="true"]{border-color:var(--sb-step,var(--accent));color:var(--sb-step,var(--accent))}
:root .sb-more-btn svg{width:18px;height:18px;stroke-width:2.6}
:root .sb-more{grid-column:1/-1;display:grid;gap:6px;padding-top:8px;border-top:1px dashed var(--line)}
:root .sb-more[hidden]{display:none}
:root .sb-more .sb-recon-move{min-height:30px}
:root .sb-col .sb-card .sb-meter{position:absolute;left:0;right:0;bottom:0;width:auto;height:4px;border-radius:0}
:root .sb-col .sb-card .sb-meter::-webkit-progress-bar{border-radius:0;background:color-mix(in srgb,var(--line) 70%,transparent)}
:root .sb-col .sb-card .sb-meter::-webkit-progress-value{border-radius:0;background:var(--sb-step,var(--green))}
:root .sb-col .sb-card .sb-meter::-moz-progress-bar{background:var(--sb-step,var(--green))}
:root .sb-col .sb-card.due .sb-meter::-webkit-progress-value{background:var(--amber)}
:root .sb-col .sb-card.due .sb-meter::-moz-progress-bar{background:var(--amber)}
:root .sb-col .sb-card.overdue .sb-meter::-webkit-progress-value{background:var(--red)}
:root .sb-col .sb-card.overdue .sb-meter::-moz-progress-bar{background:var(--red)}
/* Six columns share the width: about 206px each at 1440 and 180px at 1280. The board shrinks to fit rather than scroll
 * sideways. In a column under 230px the car's name takes the card's whole width (beside the photo it was cut to "2014
 * Honda Acc…"), the photo sits beside Next, and Next says just "Next": its step is in its tooltip and what a screen
 * reader hears, and it is the column to the right. Wider screens put the photo beside the name. Measured at 1280, 1440
 * and 1920, standard and large text, light and dark. */
:root .sb-board:not(.sb-board-people){grid-auto-columns:minmax(150px,1fr)}
:root .sb-board .sb-col{container-type:inline-size}
@container (max-width:230px){
  /* The car's name gets the card's whole width; the photo sits beside Next instead of beside the name. */
  :root .sb-card .sb-card-head{grid-column:1/-1}
  :root .sb-card .sb-thumb{grid-row:2;width:40px;height:28px;margin-top:0;align-self:center}
  :root .sb-col .sb-card:has(>.sb-thumb[src]) .sb-card-actions{grid-row:2;grid-column:2}
  :root .sb-next-step{display:none}
  :root .sb-next-short{display:inline}
  /* A car with no photo has the whole row for Next, so it says where the car goes. */
  :root .sb-card:not(:has(>.sb-thumb[src])) .sb-next-step{display:inline}
  :root .sb-card:not(:has(>.sb-thumb[src])) .sb-next-short{display:none}
}
@container (max-width:180px){
  :root .sb-col-head strong{font-size:var(--fs-small);line-height:var(--lh-small)}
  :root .sb-col header.sb-col-head{grid-template-columns:20px minmax(0,1fr) auto;column-gap:4px}
  :root .sb-col-head .sb-col-ico{width:20px;height:20px}
}
/* By person: the lanes share the row (auto-fit, not auto-fill), so four people do not leave an empty fifth track. */
:root .sb-board.sb-board-people{grid-template-columns:repeat(auto-fit,minmax(240px,1fr))}

/* The export page (web/export-only.js): what a dealer sees once the subscription has ended. A card centred on the
 * page, wide enough for the two downloads side by side, one above the other on a phone. Partner's non-payment ladder,
 * owner go 2026-11-08. Measured with tools/dev/walk/export-only-probe.mjs at 1440 and 390, light and dark. */
html:root body .export-only{min-height:calc(100vh - 48px);display:grid;place-items:center;padding:32px 16px;background:var(--canvas)}
html:root body .export-only-card{width:min(760px,100%);display:grid;gap:16px;padding:32px;background:var(--surface);border:1px solid var(--line);border-radius:var(--r-surface);box-shadow:var(--shadow-raised);color:var(--ink)}
html:root body .export-only-card h1{margin:0;font-size:var(--fs-h1);line-height:var(--lh-h1);font-weight:700}
html:root body .export-only-message{margin:0;font-size:var(--fs-body);line-height:var(--lh-body);color:var(--ink)}
html:root body .export-only-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
html:root body .export-only-option{display:grid;grid-template-rows:auto 1fr auto;gap:8px;padding:18px;border:1px solid var(--line);border-radius:var(--r-surface);background:var(--surface-soft)}
html:root body .export-only-option h2{margin:0;font-size:var(--fs-h3);line-height:var(--lh-h3);font-weight:600}
html:root body .export-only-option p{margin:0;font-size:var(--fs-small);line-height:var(--lh-small);color:var(--muted)}
html:root body .export-only-option .button{justify-self:start;min-height:44px}
html:root body .export-only-note,html:root body .export-only-fix{margin:0;font-size:var(--fs-small);line-height:var(--lh-small);color:var(--muted)}
html:root body .export-only-result{margin:0;padding:10px 14px;border-radius:var(--r-control);font-size:var(--fs-small);line-height:var(--lh-small);font-weight:600}
html:root body .export-only-result.is-ok{background:var(--surface-soft);color:var(--green)}
html:root body .export-only-result.is-bad{background:var(--surface-soft);color:var(--red)}
html:root body .export-only-foot{display:flex;justify-content:flex-end;padding-top:14px;border-top:1px solid var(--line)}
@media (max-width:760px){html:root body .export-only-card{padding:22px}html:root body .export-only-grid{grid-template-columns:1fr}}
/* Calculate Cancellation Deadline, highlighted while the deadline is still empty (Ayman, issue 197: "i almost missed it"). */
html:root body .sw-comp-action .button.sw-attention{box-shadow:0 0 0 3px color-mix(in srgb,var(--accent) 38%,transparent)}
html:root body .sw-derive .sw-derive-why{margin:2px 0 6px;color:var(--muted);font-size:var(--fs-small);line-height:var(--lh-small)}
/* Where the receipt comes from, under Record payment before the sale is finished (Ayman, issue 197). */
html:root body .sw-pay-section .sw-receipt-where{margin:8px 0 0}
/* The photo viewer, while a photo not drawn on the page loads (its own injected style sets the colour too). */
html:root body .pv-loading{margin:0;color:#e8eefc;font-size:var(--fs-body);line-height:var(--lh-body)}

/* Enlarge a picture (web/picture-zoom.js; owner, 2026-11-11: "i want to be able to enlarge these photos"). The picture
   is a button: it looks like the picture, says so with a small Enlarge chip, and opens a dialog that fills the window. */
:root .picture-zoom{position:relative;display:block;width:100%;min-height:0;margin:0;padding:0;border:0;border-radius:var(--r-control);background:none;box-shadow:none;cursor:zoom-in;text-align:left}
:root .picture-zoom img{display:block;width:100%;height:auto}
:root .picture-zoom:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
:root .picture-zoom .picture-zoom-chip{position:absolute;right:8px;bottom:8px;padding:2px 8px;border-radius:var(--r-control);color:#fff;background:rgba(15,18,23,.78);font-size:var(--fs-small);line-height:var(--lh-small);font-weight:600;opacity:.88;pointer-events:none}
:root .picture-zoom:hover .picture-zoom-chip,:root .picture-zoom:focus-visible .picture-zoom-chip{opacity:1}
/* One class more than .wz-picture-steps li span:not(.wz-pic-n), which would paint the chip muted grey on grey. */
:root .wz-picture-steps .picture-zoom{align-self:start}
@media (max-width:820px){:root .wz-picture-steps .picture-zoom{grid-column:1/-1}}
:root .picture-zoom-dialog{width:min(96vw,1800px);max-width:96vw;max-height:94vh;margin:auto;padding:0;border:1px solid var(--line);border-radius:var(--r-surface);color:var(--ink);background:var(--surface);overflow:hidden}
:root .picture-zoom-dialog::backdrop{background:rgba(8,12,18,.78)}
:root .picture-zoom-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 14px;border-bottom:1px solid var(--line)}
:root .picture-zoom-close{flex:0 0 auto}
:root .picture-zoom-caption{min-width:0;font-size:var(--fs-body);line-height:var(--lh-body);font-weight:600}
:root .picture-zoom-frame{display:grid;place-items:center;padding:12px;max-height:calc(94vh - 64px);overflow:auto;cursor:zoom-out}
:root .picture-zoom-img{display:block;max-width:100%;max-height:calc(94vh - 92px);width:auto;height:auto;cursor:default}

/* TEXT NEVER RUNS INTO THE CARDS UNDER IT (owner, 2026-11-12: "you see how the text is squashed in title record section",
 * "make sure this doesnt happen anywhere in the app"). The provider and lender link grids had no top margin, so the
 * paragraph above sat flush on the first row of cards. Measured with a sweep of every route at 1440x900, 1333x650 and
 * 375x812 at all four text sizes; each rule below closes a gap that sweep found at 0-4px. */
:root p + .fc-lender-links,:root .fc-head + .fc-lender-links{margin-top:12px}
/* The recall card's note sat 2-4px above the ratings and the recall grid (a later "margin:0" on the panel's paragraphs won
 * over styles.css's 10px), and the Expenses tab's note sat flush on the expense form. */
html:root body .nhtsa-panel .nh-card-sub{margin:0 0 12px}
html:root body .veh-subnote + .expense-editor-card{margin-top:12px}

/* EVERY TAB BAR: A TAB LOOKS LIKE A RAISED BUTTON (owner, 2026-11-15: "these tabs are not distinctive enough they need to be
   colored so i can be able to see them", "make that for all tabs like these", then "they need to be 3d"). Measured on every
   screen that has one (tools/dev/walk/out tab probe): eleven tab bars in four looks, and in seven of them an unchosen tab was
   bare text on the bar (no fill, no edge), so only the chosen one read as a tab. Now one look everywhere:
     - unchosen: a raised key in the design's accent (2026-11-22; it was one fixed blue): a tint of it with a light top and a
       darker foot, an edge of it, a darker bottom lip (its thickness) and a soft shadow under it; plain text;
     - chosen: the solid accent, raised the same way, in the design's own text colour for it (--accent-ink);
     - pressed: the shadow goes inside, so it reads as pushed in. Nothing translates: a tab bar never moves (owner).
   Every design, light and dark, from the --tab-key tokens at the top of this file; tools/dev/walk/themed-tabs-probe.mjs
   measures the text and the edge on each. Every tab in a bar gets the same 1px edge, chosen or not. A bar that
   underlined its chosen tab (Deal Desk, Workshop, Follow-ups, the Form Generation Center) now fills it, like the rest. */
:root :is(.ws-tabs,.ipt-tabs,.sw-paper-tabs,.mi-pop-tabs,.vehicle-tabs,.sales-view-tabs,.tools-section-tabs,.sb-tabs,.financial-top-tabs,.insights-tabs,.titles-tabs,.titles-subtabs,.form-center-tabs,.dealer-info-tabs,.system-tools-tabs,.vendor-detail-tabs,.vendor-view-tabs,.conn-tabs,.pui-rail-tabs,.aim-tabs,.bhph-register-tabs)>:is(a,button){
  border-width:1px;border-style:solid;
}
:root :is(.ws-tabs,.ipt-tabs,.sw-paper-tabs,.mi-pop-tabs,.vehicle-tabs,.sales-view-tabs,.tools-section-tabs,.sb-tabs,.financial-top-tabs,.insights-tabs,.titles-tabs,.titles-subtabs,.form-center-tabs,.dealer-info-tabs,.system-tools-tabs,.vendor-detail-tabs,.vendor-view-tabs,.conn-tabs,.pui-rail-tabs,.aim-tabs,.bhph-register-tabs)>:is(a,button):not([aria-current="page"]):not([aria-selected="true"]):not(.active):not(.is-active){
  background-color:var(--tab-key-fill);background-image:linear-gradient(180deg,rgba(255,255,255,.32) 0%,rgba(255,255,255,0) 50%,rgba(0,0,0,.14) 100%);
  border-color:var(--tab-key-edge);color:var(--ink);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.38),0 3px 0 var(--tab-key-lip),0 5px 10px rgba(0,0,0,.30);
}
:root :is(.ws-tabs,.ipt-tabs,.sw-paper-tabs,.mi-pop-tabs,.vehicle-tabs,.sales-view-tabs,.tools-section-tabs,.sb-tabs,.financial-top-tabs,.insights-tabs,.titles-tabs,.titles-subtabs,.form-center-tabs,.dealer-info-tabs,.system-tools-tabs,.vendor-detail-tabs,.vendor-view-tabs,.conn-tabs,.pui-rail-tabs,.aim-tabs,.bhph-register-tabs)>:is(a,button):not([aria-current="page"]):not([aria-selected="true"]):not(.active):not(.is-active):hover{
  background-color:var(--tab-key-fill-hover);color:var(--ink);
}
:root :is(.ws-tabs,.ipt-tabs,.sw-paper-tabs,.mi-pop-tabs,.vehicle-tabs,.sales-view-tabs,.tools-section-tabs,.sb-tabs,.financial-top-tabs,.insights-tabs,.titles-tabs,.titles-subtabs,.form-center-tabs,.dealer-info-tabs,.system-tools-tabs,.vendor-detail-tabs,.vendor-view-tabs,.conn-tabs,.pui-rail-tabs,.aim-tabs,.bhph-register-tabs)>:is(a,button):is([aria-current="page"],[aria-selected="true"],.active,.is-active){
  color:var(--tab-key-ink);background-color:var(--tab-key);background-image:linear-gradient(180deg,rgba(255,255,255,.18) 0%,rgba(255,255,255,0) 50%,rgba(0,0,0,.12) 100%);border-color:var(--tab-key-rim);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.38),0 3px 0 var(--tab-key-lip),0 0 0 2px var(--tab-key-ring),0 6px 12px var(--tab-key-glow);
}
:root :is(.ws-tabs,.ipt-tabs,.sw-paper-tabs,.mi-pop-tabs,.vehicle-tabs,.sales-view-tabs,.tools-section-tabs,.sb-tabs,.financial-top-tabs,.insights-tabs,.titles-tabs,.titles-subtabs,.form-center-tabs,.dealer-info-tabs,.system-tools-tabs,.vendor-detail-tabs,.vendor-view-tabs,.conn-tabs,.pui-rail-tabs,.aim-tabs,.bhph-register-tabs)>:is(a,button):active{
  box-shadow:inset 0 2px 5px rgba(0,0,0,.35);
}
/* Keys need air between them to look raised: the bars that butted their tabs together (the car, Backup & Restore and the
   other System sections, Customer Leads, Dealer Information) get the 6px most of the others already had. */
html:root body :is(.vehicle-tabs,.tools-section-tabs,.sales-view-tabs,.dealer-info-tabs){gap:6px}
/* ONE RED COUNT BADGE (issue 203, Phase 4C: "use the existing Sales/Deals red notification indicator as the design reference;
 * do not create different badge designs for similar actions"). The reference is the red count on the Sales / Deals line of
 * the sidebar (.sidebar-badge) and on its tabs (.ws-tab-badge): a red stadium, white bold micro text. The Manager Attention
 * bell's count and the count inside its menu were square and two other sizes; now all four are the same badge. Position is
 * left to each place (the collapsed sidebar rail still pins its badge to the icon). */
html:root body :is(.sidebar-link>.sidebar-badge,.ws-tab-badge,.manager-attention-count,.manager-attention-panel .ma-count){display:inline-grid;place-items:center;
  box-sizing:border-box;min-width:20px;height:20px;padding:0 6px;border-radius:var(--r-stadium,999px);background:var(--red-solid,#c9363e);color:#fff;
  font-size:var(--fs-micro);line-height:var(--lh-micro);font-weight:700;text-align:center;box-shadow:none}
/* Inside the bell's menu: a heading a category at a time, the could-not-check notice, a signature that could not be saved. */
html:root body .manager-attention-panel .ma-section{margin:0;padding:8px 18px 4px;color:var(--muted);font-size:var(--fs-micro);line-height:var(--lh-micro);font-weight:700;text-transform:uppercase;letter-spacing:.04em}
html:root body .manager-attention-panel .manager-attention-notice{display:flex;flex-wrap:wrap;align-items:center;gap:6px 8px;margin:0;padding:10px 18px;
  border-bottom:1px solid var(--line);color:var(--red-solid,#c9363e);font-size:var(--fs-small);line-height:var(--lh-small);font-weight:600}
html:root body .manager-attention-panel .manager-attention-item.ma-problem{border-left-color:var(--red-solid,#c9363e)!important;background:color-mix(in srgb,var(--red-solid,#c9363e) 6%,var(--surface))!important}
html:root body .manager-attention-panel .manager-attention-more{display:block;width:100%;padding:8px 18px;text-align:left}
/* The page squares every corner (layout.css, #app :is(...){border-radius:0}), which also squared the tab's count while the
 * sidebar's, the reference, kept its corners. Measured on the page at all four text sizes (hosted-idle-click-probe --badge). */
html:root body #app .ws-tabs .ws-tab .ws-tab-badge{border-radius:var(--r-stadium,999px)}
/* The Compliance Review history's "Showing the newest 500 of N. Show older" line (issue 203, AS-AUD-002). */
html:root body .watchlist-history-more{margin:0;padding:10px 14px;border-top:1px solid var(--line);color:var(--muted);font-size:var(--fs-small);line-height:var(--lh-small)}
