/* =====================================================================
   SWITCHBOARD DESIGN SYSTEM: sb.css (records.1800marketer.com)
   Owner: shell. Loaded by every rebuilt page (base.html, sb_page = true), the home included,
   after chrome.css and before the page's own sec-<name>.css (or dash.css on the home).
   Cream enamel, brass and deep teal; signal red only for alerts and "today". System fonts only.
   CSP default-src 'self': no inline styles anywhere; JS writes only through the CSSOM.

   FOR THE HOME BUILDER: what sb.css now provides from final/dash.css (entries/final, 1126 lines),
   copied VERBATIM so the home looks the same. Delete these line ranges from dash.css:
     8-111     tokens: light :root, dark @media (prefers-color-scheme: dark) :root:not([data-theme="light"]),
               :root[data-theme="dark"]
     113-143   base: *, html, body, a, b/strong, .mono, .vty, .num, .dim, .fine, button, kbd, :focus-visible,
               .icon, .icon-inline, .sb-defs, .hatch-line, .hatch
               EXCEPT body's "min-width: 1360px": sb.css leaves it out, so keep
               "body { min-width: 1360px; }" in dash.css (the home's own fold needs it)
     210-218   .card + brass screws (::before/::after), .load-err      (209 .page stays in dash.css)
     290-296   rotary dial .dl-ring .dl-face .dl-hole .dl-cap .dl-stop .dl-wheel
     300-301   .dial-empty, .dial-empty .dl-cap                        (297-299 .dial-brand, .brand:hover,
                                                                        .dial-op stay in dash.css)
     467-487   .fetch-note, .lamp-live + @keyframes breathe, lamps .lamp .lamp-ok/-warn/-bad/-info/-off,
               .blink + @keyframes blink
     511-518   deltas .dl .dl-a .dl-s .dl-good .dl-neg .dl-warn .dl-flat
     534-649   panels (.panel .ph .seg .chart .insight .in-mark .src, .panel.is-empty, .p-empty, .pe-art,
               .pe-z, .asof), legend + swatches, svg chart marks, bar lists, .mini-h, .big-stat, chips.
               545-546 (".panel.is-empty > :not(.ph):not(.p-empty):not(.shopify)" and
               ".panel.is-empty > .shopify") came along unchanged; they name the home's .shopify footer.
     720-735   speed-dial keys .sd-lab .sd-keys .sd-k .sd-d .sd-w .sd-k.on .sd-top
               (714-719 ".speed" itself, the sticky bar, stays in dash.css)
     738-758   sections: .sec .sec-head .vanity .v-pre .v-l .sec-t .sec-k .sec-hed .sec-deck .sec-tools,
               .grid .stack .duo .empty .empty-line
     822-829   .statrow .st .st-ok/-warn/-bad .st[tabindex]
     1041-1058 tooltip .tip .tip-t .tip-r .tip-strong .tip-n, .toast
     1064, 1066-1067  dark touch-ups: body dot pattern, .chip-new, .chip-rep (the other lines of that
               @media block stay in dash.css)
   Everything else in dash.css is the home's own layout and stays there. The topbar (145-183) is
   replaced by chrome.css (header.site-header ...) and the footer .foot (1059-1060) by footer.site-footer.

   Sections of this file:
     PART 1  from final/dash.css, verbatim (the ranges above), plus the PLAN 5.4 token aliases
     PART 2  new components: page frame, heads (page/section/record), plates, jacks, tables, forms,
             buttons, flash, pills (legacy names kept), the behavioural rules records.js depends on,
             the operator's card, dark touch-ups
     PART 3  print: chrome hidden, light tokens forced, white page
   Reserved names (PLAN 5.4) are styled here only as the hooks they already are; never reuse them for
   a new component: .steps .step .when .copy .dropzone .picked .pickfiles .againform .manualnum
   .manualnone .numpick .kindsel .pickrow .navmenu .ans .kw .answers .sb .sw, and .cal outside the home.
   ===================================================================== */

/* =====================================================================
   PART 1: from final/dash.css, verbatim
   ===================================================================== */

/* ---- final/dash.css 8-111: tokens */
:root {
  color-scheme: light;
  /* surfaces */
  --bg: #F1E9D7;
  --panel: #FCF8EF;
  --panel-2: #F5EEDF;
  --panel-3: #EFE6D2;
  --line: #E1D3B6;
  --line-2: #D3C29F;
  --grid: #ECE2CD;
  --axis: #CDBD9B;
  /* ink */
  --ink: #1B2528;
  --ink-2: #435053;
  --muted: #66706B;
  --faint: #7E847D;
  /* brand */
  --teal-deep: #0E3B43;
  --teal-deeper: #0A2C32;
  --teal: #00697A;
  --red: #C4302B;
  --red-ink: #A8231F;
  --brass: #9A6510;
  --brass-hi: #E2B458;
  --brass-mid: #C99234;
  --brass-lo: #8A5A0C;
  --cream: #F6EFE0;
  /* data: validated categorical (teal, brass, plum, olive) */
  --c1: #00869E;
  --c2: #B47510;
  --c3: #9A4A86;
  --c4: #4F8A3A;
  --c1-wash: rgba(0, 134, 158, .11);
  --c1-light: #A9D3DB;
  --gray-mark: #A6A091;
  --gray-mark-2: #CFC8B8;
  /* sequential teal (quality ramp / heat grid) */
  --q1: #A6D2DA; --q2: #3FA3B6; --q3: #005B6C;
  --h0: #EDE4D0; --h1: #CFE6EA; --h2: #93C9D3; --h3: #4FA7B8; --h4: #12819A; --h5: #005466;
  /* status */
  --ok: #2E8B4F;
  --ok-ink: #22703E;
  --warn: #D18B12;
  --warn-ink: #8A5300;
  --warn-wash: rgba(209, 139, 18, .13);
  --bad: #C4302B;
  --info: #2F7FB0;
  --off: #BDB5A3;
  --neg: #9A5414;      /* a falling number: not an alert, so not signal red */
  /* type */
  --f-ui: "Segoe UI Variable Text", "Segoe UI", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  --f-disp: "Bahnschrift", "DIN Alternate", "Avenir Next", "Franklin Gothic Medium", "Segoe UI", sans-serif;
  --f-cond: "Bahnschrift Condensed", "Bahnschrift SemiCondensed", "DIN Condensed", "Avenir Next Condensed", "Arial Narrow", sans-serif;
  --f-mono: "Cascadia Mono", "Cascadia Code", "SF Mono", Menlo, Consolas, monospace;
  /* misc */
  --r: 14px;
  --shadow: 0 1px 0 rgba(255, 255, 255, .7) inset, 0 1px 2px rgba(70, 48, 10, .07), 0 10px 28px -16px rgba(70, 48, 10, .28);
  --tip-bg: #13262B;
  --tip-ink: #F6EFE0;
  --tip-dim: #A9B8B5;
  --board-w: 540px;
  --kp-span: 196px;
  --key-bg: linear-gradient(#FFFDF7, #F1E8D5);
  --box-bg: #FFFDF8;
  --vanity-ink: #0E3B43;
  --net-bar: #0E3B43;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0C1A1E; --panel: #132529; --panel-2: #172C31; --panel-3: #1C343A;
    --line: #25403F; --line-2: #2E4C4B; --grid: #1D3439; --axis: #35514F;
    --ink: #F1E9D8; --ink-2: #CFC6B3; --muted: #9EA8A2; --faint: #87918C;
    --teal-deep: #08171A; --teal-deeper: #050F11; --teal: #5CC2CF; --red: #E5534B; --red-ink: #F07068; --brass: #DDA94A;
    --c1: #1F9FB3; --c2: #BF8020; --c3: #B06BA2; --c4: #6E9E48; --c1-wash: rgba(31, 159, 179, .16); --c1-light: #2D6E78;
    --gray-mark: #6F7A76; --gray-mark-2: #4A5755;
    --q1: #2C6670; --q2: #2794A8; --q3: #7FD3E0;
    --h0: #1A2F34; --h1: #1D4950; --h2: #1F6672; --h3: #22869A; --h4: #3FA9BC; --h5: #8EDCE8;
    --ok: #4FBF72; --ok-ink: #6CCB8A; --warn: #E9A93A; --warn-ink: #EDB45A; --warn-wash: rgba(233, 169, 58, .14); --bad: #EF5B52; --info: #5AA9DA; --off: #3F504E;
    --neg: #E0A55A;
    --shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 12px 30px -18px rgba(0, 0, 0, .7);
    --tip-bg: #F1E9D8; --tip-ink: #13262B; --tip-dim: #4E5C5A;
    --key-bg: linear-gradient(#1D363C, #152A2F); --box-bg: #0F2024;
    --vanity-ink: #EADFC6; --net-bar: #7FD3E0;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0C1A1E; --panel: #132529; --panel-2: #172C31; --panel-3: #1C343A;
  --line: #25403F; --line-2: #2E4C4B; --grid: #1D3439; --axis: #35514F;
  --ink: #F1E9D8; --ink-2: #CFC6B3; --muted: #9EA8A2; --faint: #87918C;
  --teal-deep: #08171A; --teal-deeper: #050F11; --teal: #5CC2CF; --red: #E5534B; --red-ink: #F07068; --brass: #DDA94A;
  --c1: #1F9FB3; --c2: #BF8020; --c3: #B06BA2; --c4: #6E9E48; --c1-wash: rgba(31, 159, 179, .16); --c1-light: #2D6E78;
  --gray-mark: #6F7A76; --gray-mark-2: #4A5755;
  --q1: #2C6670; --q2: #2794A8; --q3: #7FD3E0;
  --h0: #1A2F34; --h1: #1D4950; --h2: #1F6672; --h3: #22869A; --h4: #3FA9BC; --h5: #8EDCE8;
  --ok: #4FBF72; --ok-ink: #6CCB8A; --warn: #E9A93A; --warn-ink: #EDB45A; --warn-wash: rgba(233, 169, 58, .14); --bad: #EF5B52; --info: #5AA9DA; --off: #3F504E;
  --neg: #E0A55A;
  --shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 12px 30px -18px rgba(0, 0, 0, .7);
  --tip-bg: #F1E9D8; --tip-ink: #13262B; --tip-dim: #4E5C5A;
  --key-bg: linear-gradient(#1D363C, #152A2F); --box-bg: #0F2024;
  --vanity-ink: #EADFC6; --net-bar: #7FD3E0;
}

/* ---- PLAN 5.4 aliases (follow the theme through the tokens they name) */
:root {
  --field-bg: var(--box-bg);
  --field-line: var(--line-2);
  --focus: var(--red);
  --row-hover: var(--panel-2);
  --th-ink: var(--brass);
  --measure: 62ch;
}

/* ---- final/dash.css 113-143: base (body min-width left to dash.css) */
/* ---------------------------------------------------------------- base */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 64px; }
body {
  margin: 0;
  background: var(--bg);
  background-image: radial-gradient(rgba(120, 90, 30, .05) 1px, transparent 1.2px);
  background-size: 6px 6px;
  color: var(--ink); font: 14px/1.42 var(--f-ui);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }
b, strong { font-weight: 650; }
.mono { font-family: var(--f-mono); font-size: .92em; letter-spacing: -.01em; }
.vty { font-family: var(--f-disp); font-weight: 700; letter-spacing: .02em; }
.num { font-variant-numeric: tabular-nums; text-align: right; }
.dim { color: var(--faint); }
.fine { margin: 10px 0 0; color: var(--muted); font-size: 11.5px; }
button { font: inherit; color: inherit; }
kbd {
  display: inline-block; min-width: 20px; padding: 1px 6px; border-radius: 5px; text-align: center;
  font: 600 11px var(--f-ui); color: var(--ink-2); background: var(--panel-2);
  border: 1px solid var(--line-2); border-bottom-width: 2px;
}
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.icon { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.icon-inline { width: 15px; height: 15px; vertical-align: -3px; margin-right: 6px; }
.sb-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.hatch-line { fill: var(--panel); opacity: .62; }
.hatch { pointer-events: none; }

/* ---- final/dash.css 210-218: cards with brass screws */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); position: relative; }
.card::before, .card::after {
  content: ""; position: absolute; width: 9px; height: 9px; border-radius: 50%; top: 10px;
  background: radial-gradient(circle at 35% 35%, var(--brass-hi), var(--brass-mid) 55%, var(--brass-lo));
  box-shadow: inset 0 0 0 .5px rgba(0, 0, 0, .25);
}
.card::before { left: 10px; }
.card::after { right: 10px; }
.load-err { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-radius: 12px; background: rgba(196, 48, 43, .1); border: 1px solid rgba(196, 48, 43, .4); color: var(--red-ink); margin-bottom: 14px; font-weight: 600; }

/* ---- final/dash.css 290-296, 300-301: the rotary dial */
/* rotary dial */
.dl-ring { fill: var(--brass-mid); }
.dl-face { fill: var(--cream); }
.dl-hole { fill: var(--teal-deep); }
.dl-cap { fill: var(--red); }
.dl-stop { stroke: #C0C4BE; stroke-width: 3; stroke-linecap: round; }
.dl-wheel { transform-origin: 32px 32px; transition: transform .45s cubic-bezier(.3, 1.4, .5, 1); }
.dial-empty { opacity: .5; }
.dial-empty .dl-cap { fill: var(--gray-mark); }

/* ---- final/dash.css 467-487: fetch note, lamps */
.fetch-note { display: inline-flex; align-items: center; gap: 6px; color: var(--warn-ink); font-weight: 600; font-size: 11.5px; }
.fetch-note[hidden] { display: none; }
.fetch-note .lamp { width: 8px; height: 8px; }
.lamp-live { animation: breathe 2.6s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: .45; } }

/* lamps (status indicators) */
.lamp {
  --lc: var(--off);
  display: inline-block; width: 11px; height: 11px; border-radius: 50%; flex: none; vertical-align: middle;
  background: radial-gradient(circle at 34% 30%, rgba(255, 255, 255, .85) 0 14%, var(--lc) 46%, color-mix(in srgb, var(--lc) 62%, #000) 100%);
  box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--lc) 30%, transparent), 0 0 9px color-mix(in srgb, var(--lc) 55%, transparent);
}
.lamp-ok { --lc: var(--ok); }
.lamp-warn { --lc: var(--warn); }
.lamp-bad { --lc: var(--bad); }
.lamp-info { --lc: var(--info); }
.lamp-off { --lc: var(--off); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .18); background: radial-gradient(circle at 34% 30%, rgba(255, 255, 255, .6) 0 12%, var(--lc) 50%); }
.blink { animation: blink 1.1s steps(2, start) infinite; }
@keyframes blink { 50% { opacity: .35; } }


/* ---- final/dash.css 511-518: deltas */
.dl { font-weight: 650; white-space: nowrap; }
.dl-a { font-style: normal; font-size: 9px; margin-right: 3px; vertical-align: 1px; }
.dl-s { font-weight: 400; color: var(--muted); }
.dl-good { color: var(--ok-ink); }
.dl-neg { color: var(--neg); }
.dl-warn { color: var(--warn-ink); }
.dl-flat { color: var(--ink-2); }
.dl-flat b { color: var(--ink); }

/* ---- final/dash.css 534-649: panels, empty and late states, legend, chart marks, bar lists, chips */
/* ---------------------------------------------------------------- panels */
.panel {
  min-width: 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow);
  padding: 13px 16px 14px; display: flex; flex-direction: column; position: relative;
}
.ph { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.ph h3 { margin: 0; font: 650 15.5px/1.25 var(--f-ui); color: var(--ink); }
.ph-dim { font-weight: 500; color: var(--muted); font-size: 13.5px; }
.ph-sub { margin: 2px 0 0; font-size: 12.5px; color: var(--muted); }
.ph-link { font-size: 12.5px; font-weight: 600; white-space: nowrap; padding-top: 2px; }
.seg { display: inline-flex; padding: 2px; border-radius: 9px; background: var(--panel-3); border: 1px solid var(--line); flex: none; }
.seg button { border: 0; background: none; padding: 3px 10px; border-radius: 7px; font-size: 12px; font-weight: 600; color: var(--muted); cursor: pointer; }
.seg button.on { background: var(--panel); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }
.chart { position: relative; min-height: 20px; }
.chart svg, .cv { display: block; overflow: visible; }
/* one computed sentence, then the source line */
.insight { margin: 9px 0 0; padding-left: 20px; text-indent: -20px; font-size: 12.5px; line-height: 1.4; color: var(--ink-2); }
.insight[hidden], .src[hidden] { display: none; }
.insight b { color: var(--ink); }
.in-mark { display: inline-block; width: 20px; text-indent: 0; font-style: normal; color: var(--brass); font-size: 12px; }
.src { margin: 5px 0 0; font-size: 10.5px; line-height: 1.35; color: var(--faint); }
/* calm per-panel empty state when a feed is missing */
.panel.is-empty > :not(.ph):not(.p-empty):not(.shopify) { display: none !important; }
.panel.is-empty > .shopify { margin-top: auto; }
.p-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 28px 18px; min-height: 150px; text-align: center; color: var(--muted); font-size: 12.5px; }
.p-empty b { color: var(--ink-2); font-size: 14px; }
.pe-art { position: relative; display: inline-flex; }
.pe-z { position: absolute; right: -10px; top: -4px; font: 700 13px var(--f-disp); font-style: normal; color: var(--brass); opacity: .8; }
.pe-z2 { right: -20px; top: -14px; font-size: 10px; opacity: .55; }
.asof { display: inline-flex; align-items: center; gap: 5px; margin-left: 8px; padding: 1px 8px 1px 6px; border-radius: 999px; background: var(--warn-wash); color: var(--warn-ink); font: 600 11px var(--f-ui); vertical-align: 2px; cursor: help; }
.asof .lamp { width: 7px; height: 7px; }

/* legend */
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; margin: 0 0 6px; font-size: 12.5px; }
.lg { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); white-space: nowrap; }
.lg b { color: var(--ink); font-variant-numeric: tabular-nums; }
.legend-inline { margin: 2px 0 0; }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; flex: none; background: var(--gray-mark); }
.sw-none { background: none; }
.sw.f1 { background: var(--c1); } .sw.f2 { background: var(--c2); } .sw.f3 { background: var(--c3); } .sw.f4 { background: var(--c4); }
.sw.fr { background: var(--red); } .sw.fg { background: var(--gray-mark); } .sw.fg2 { background: var(--gray-mark-2); }
.sw.q1 { background: var(--q1); } .sw.q2 { background: var(--q2); } .sw.q3 { background: var(--q3); }
.sw.ln-sw { height: 2px; width: 14px; border-radius: 1px; background: var(--ink-2); }
.sw.hatch-sw { background: repeating-linear-gradient(135deg, var(--c1) 0 2.5px, var(--panel) 2.5px 4.5px); }
.sw.fan-sw { background: color-mix(in srgb, var(--c2) 28%, transparent); border: 1px dashed var(--c2); }
.lg-line .sw { height: 2px; width: 16px; }
.sw.pip-drop { background: var(--red); border-radius: 50%; }
.sw.pip-dropx { background: none; border: 2px solid var(--red); border-radius: 50%; opacity: .6; }
.sw.pip-window { background: var(--c1); border-radius: 50%; }
.sw.pip-fuse { background: var(--brass-mid); border-radius: 2px; transform: rotate(45deg) scale(.85); }
.sw.fz-burn { background: repeating-linear-gradient(90deg, var(--gray-mark-2) 0 3px, transparent 3px 5px); height: 6px; width: 16px; }
.sw.fz-cord { background: var(--brass-mid); height: 6px; width: 16px; }
.sw.fz-spark { background: #FF8A2A; border-radius: 50%; box-shadow: 0 0 6px #FF8A2A; }

/* svg chart marks */
.gl { stroke: var(--grid); stroke-width: 1; shape-rendering: crispEdges; }
.gl-dash { stroke-dasharray: 2 3; stroke: var(--axis); }
.bl { stroke: var(--axis); stroke-width: 1; shape-rendering: crispEdges; }
.ax { fill: var(--muted); font: 11px var(--f-ui); font-variant-numeric: tabular-nums; }
.ax-dim { fill: var(--faint); font-size: 10.5px; }
.vl { fill: var(--ink-2); font: 600 11px var(--f-ui); font-variant-numeric: tabular-nums; }
.sm-l { fill: var(--ink-2); font: 600 11.5px var(--f-ui); }
.sm-v { fill: var(--ink); font: 600 18px var(--f-disp); }
.bar { transition: opacity .12s; }
.f1 { fill: var(--c1); } .f2 { fill: var(--c2); } .f3 { fill: var(--c3); } .f4 { fill: var(--c4); }
.fr { fill: var(--red); } .fg { fill: var(--gray-mark); } .fg2 { fill: var(--gray-mark-2); }
.f-none { fill: var(--grid); }
.col-dim .bar { opacity: .55; }
.hov .col:not(.on) .bar { opacity: .38; }
.hit { fill: transparent; cursor: crosshair; }
.ln { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.ln-ink { stroke: var(--ink-2); }
.ln-c1 { stroke: var(--c1); }
.ln-c2 { stroke: var(--c2); }
.ln-prev { stroke: var(--gray-mark); stroke-width: 1.6; }
.ln-proj { stroke: var(--c2); stroke-width: 1.4; stroke-dasharray: 3 3; }
.fan { fill: var(--c2); opacity: .17; }
.area { stroke: none; }
.area.c1 { fill: var(--c1-wash); }
.dot { stroke: var(--panel); stroke-width: 2; }
.dot-c1 { fill: var(--c1); } .dot-pen { fill: var(--red); } .dot-c2 { fill: var(--c2); }
.mark-ring { fill: none; stroke: var(--warn); stroke-width: 2; }
.xh-l { stroke: var(--ink-2); stroke-width: 1; opacity: .5; }
.spark { display: block; overflow: visible; }

/* bar lists */
.blist { display: flex; flex-direction: column; gap: 7px; }
.blist-c { gap: 5px; }
.bl-row { display: grid; grid-template-columns: minmax(90px, 40%) minmax(0, 1fr) auto; align-items: center; gap: 10px; font-size: 12.5px; }
.bl-l { color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bl-track { position: relative; height: 12px; border-radius: 0 4px 4px 0; background: var(--panel-3); }
.bl-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 0 4px 4px 0; }
.bl-v { font-weight: 650; font-variant-numeric: tabular-nums; color: var(--ink); text-align: right; min-width: 38px; }
.b1 { background: var(--c1); } .b1l { background: var(--c1-light); } .b2 { background: var(--c2); } .b3 { background: var(--c3); } .b4 { background: var(--c4); }
.bg { background: var(--gray-mark); }
.br { background: var(--red); }
.mini-h { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 12px 0 6px; font-size: 12.5px; }
.mini-h b { font-weight: 650; color: var(--ink); }
.mini-h span { color: var(--muted); font-size: 11.5px; }
.big-stat { display: flex; align-items: baseline; gap: 10px; margin: 2px 0 8px; }
.big-stat b { font: 600 30px/1 var(--f-disp); }
.big-stat span { color: var(--muted); font-size: 12.5px; }

/* chips */
.chip { display: inline-flex; align-items: center; height: 19px; padding: 0 7px; border-radius: 999px; font-size: 11px; font-weight: 600; white-space: nowrap; background: var(--panel-3); color: var(--ink-2); border: 1px solid var(--line); }
.chip-new, .chip-tag.chip-new { color: #00596A; background: rgba(0, 134, 158, .1); border-color: rgba(0, 134, 158, .3); }
.chip-rep, .chip-tag.chip-repeat { color: #7A4E08; background: rgba(180, 117, 16, .1); border-color: rgba(180, 117, 16, .32); }
.chip-bo { color: var(--c3); background: rgba(154, 74, 134, .08); border-color: rgba(154, 74, 134, .3); }
.chip-tag.chip-on-file, .chip-tag.chip-pursuing { color: #fff; background: var(--ok); border-color: var(--ok); }
.chip-tag.chip-registry { color: var(--brass-hi); background: var(--teal-deep); border-color: var(--teal-deep); }
.chip-tag.chip-cancelled { color: var(--red-ink); border-color: rgba(196, 48, 43, .3); }
.chip-tag.chip-high { color: var(--red-ink); border-color: rgba(196, 48, 43, .3); }
.chip-folder { font-family: var(--f-mono); font-weight: 500; font-size: 10.5px; }
.chip-eff { text-transform: uppercase; letter-spacing: .06em; font-size: 9.5px; }
.chip-arch { color: var(--faint); }
.chip-det { font-size: 10.5px; }

/* ---- final/dash.css 720-735: speed-dial keys (the sticky .speed bar stays in dash.css) */
.sd-lab { display: flex; flex-direction: column; line-height: 1.1; }
.sd-lab b { font: 700 12px var(--f-ui); letter-spacing: .14em; text-transform: uppercase; color: var(--brass); }
.sd-lab small { font-size: 10.5px; color: var(--muted); }
.sd-keys { display: flex; gap: 8px; flex: 1; }
.sd-k {
  display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 10px; color: var(--ink);
  border: 1px solid var(--line-2); background: var(--key-bg); box-shadow: 0 2px 0 var(--line-2);
}
.sd-k:hover { text-decoration: none; border-color: var(--teal); }
.sd-d { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 30px; height: 28px; border-radius: 7px; background: var(--teal-deep); color: var(--cream); line-height: 1; }
.sd-d b { font: 700 13px var(--f-disp); }
.sd-d i { font: 600 7px var(--f-ui); font-style: normal; letter-spacing: .1em; color: var(--brass-hi); min-height: 7px; }
.sd-w { font: 700 14px var(--f-cond); letter-spacing: .08em; }
.sd-k.on { background: var(--teal-deep); color: var(--cream); border-color: var(--teal-deeper); box-shadow: 0 2px 0 var(--teal-deeper); }
.sd-k.on .sd-d { background: var(--red); }
.sd-top { font-size: 12.5px; font-weight: 600; white-space: nowrap; }

/* ---- final/dash.css 738-758: sections, 1-800 headers, grids, empty */
.sec { margin-top: 20px; scroll-margin-top: 60px; }
.sec-head { display: flex; align-items: flex-end; gap: 22px; margin-bottom: 12px; padding-bottom: 7px; border-bottom: 2px solid var(--line); position: relative; }
.sec-head::after { content: ""; position: absolute; left: 0; bottom: -2px; width: 220px; height: 2px; background: var(--red); }
.vanity { display: flex; align-items: flex-end; color: var(--vanity-ink); line-height: 1; flex: none; }
.v-pre { font: 700 20px var(--f-cond); color: var(--brass); letter-spacing: .02em; margin-right: 3px; padding-bottom: 14px; }
.v-l { display: flex; flex-direction: column; align-items: center; padding: 0 1px; }
.v-l b { font: 700 42px/0.92 var(--f-cond); letter-spacing: 0; }
.v-l i { font: 600 10px var(--f-mono); font-style: normal; color: var(--red); margin-top: 3px; }
.sec-t { min-width: 0; }
.sec-k { margin: 0; font: 700 11.5px var(--f-ui); letter-spacing: .14em; text-transform: uppercase; color: var(--brass); }
.sec-hed { margin: 2px 0 0; font: 600 21px/1.22 var(--f-disp); color: var(--ink); letter-spacing: -.002em; }
.sec-deck { margin: 3px 0 0; font-size: 13px; color: var(--muted); max-width: 1100px; }
.sec-deck[hidden] { display: none; }
.sec-tools { margin-left: auto; }
.grid { display: grid; gap: 16px; align-items: stretch; }
.stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 34px 10px; color: var(--muted); text-align: center; }
.empty b { color: var(--ink); font-size: 15px; }
.empty .icon { width: 26px; height: 26px; color: var(--ok); }
.empty-line { position: absolute; inset: 40% 0 auto; text-align: center; color: var(--muted); font-style: italic; }

/* ---- final/dash.css 822-829: stat row */
.statrow { display: grid; grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)); gap: 8px; margin-bottom: 4px; }
.st { display: flex; flex-direction: column; padding: 8px 10px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); min-width: 0; }
.st b { font: 600 21px/1.05 var(--f-disp); }
.st span { font-size: 11.5px; color: var(--muted); line-height: 1.25; }
.st-ok { box-shadow: inset 3px 0 0 var(--ok); }
.st-warn { box-shadow: inset 3px 0 0 var(--warn); }
.st-bad { box-shadow: inset 3px 0 0 var(--bad); }
.st[tabindex] { cursor: help; }

/* ---- final/dash.css 1041-1058: tooltip, toast */
.tip {
  position: fixed; z-index: 200; pointer-events: none; max-width: 360px; padding: 9px 11px; border-radius: 10px;
  background: var(--tip-bg); color: var(--tip-ink); font-size: 12px; line-height: 1.4;
  box-shadow: 0 14px 30px -10px rgba(0, 0, 0, .5); border: 1px solid rgba(255, 255, 255, .06);
}
.tip[hidden] { display: none; }
.tip-t { font-weight: 700; margin-bottom: 4px; font-size: 12.5px; }
.tip-r { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; align-items: center; gap: 7px; }
.tip-r span { color: var(--tip-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tip-r b { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.tip-strong span { color: var(--tip-ink); }
.tip-n { margin-top: 5px; color: var(--tip-dim); font-style: italic; max-width: 330px; }
.toast {
  position: fixed; left: 50%; bottom: 70px; transform: translate(-50%, 30px); opacity: 0; z-index: 210; pointer-events: none;
  padding: 10px 16px; border-radius: 12px; background: var(--teal-deep); color: var(--cream); font-size: 13px; font-weight: 600;
  box-shadow: 0 16px 34px -14px rgba(0, 0, 0, .55); border-bottom: 3px solid var(--brass-mid); transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---- final/dash.css 1064, 1066-1067: dark touch-ups for the parts above */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) body { background-image: radial-gradient(rgba(220, 200, 150, .035) 1px, transparent 1.2px); }
  :root:not([data-theme="light"]) .chip-new { color: #7FD3E0; }
  :root:not([data-theme="light"]) .chip-rep { color: #E8B865; }
}

/* =====================================================================
   PART 2: components for section, record and shell pages (new in sb.css)
   ===================================================================== */

/* ---------------------------------------------------------------- page frame */
.sb-page { display: block; padding: 16px 28px 40px; max-width: 1880px; margin: 0 auto; }
.sb-page > .sec:first-child, .sb-page > .sb-head:first-child { margin-top: 8px; }
:where(.sb-page) h1 { margin: 18px 0 6px; font: 600 24px/1.2 var(--f-disp); color: var(--ink); }
:where(.sb-page) h2 { margin: 24px 0 8px; font: 650 17px/1.25 var(--f-ui); color: var(--ink); }
:where(.sb-page) h3 { margin: 16px 0 6px; font: 650 15px/1.3 var(--f-ui); color: var(--ink); }
:where(.sb-page) p { margin: 8px 0; }
:where(.sb-page) ul, :where(.sb-page) ol { margin: 8px 0; padding-left: 22px; }
:where(.sb-page) hr { border: 0; border-top: 1px dashed var(--line-2); margin: 16px 0; }
:where(.sb-page) code { font-family: var(--f-mono); font-size: .92em; background: var(--panel-2); border: 1px solid var(--line); border-radius: 5px; padding: 0 4px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.term { font-family: var(--f-mono); font-weight: 600; }
.measure { max-width: var(--measure); }
.spacer { flex: 1; }
.sb-vh { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.sb-card { padding: 20px 24px 18px; }
.sb-card > h2:first-child, .sb-card > h3:first-child, .sb-card > .ph:first-child { margin-top: 0; }

/* grids: 1:1, three across, 2:1 */
.grid.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.g-21 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.grid.g-12 { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
.grid + .grid, .grid + .sec, .sec + .grid { margin-top: 16px; }
.span-all { grid-column: 1 / -1; }

/* ---------------------------------------------------------------- page and record heads (ui.page_head, ui.sec_head, ui.detail_head) */
.sb-head { margin-top: 6px; }
.sb-head .sec-t { flex: 1; min-width: 0; }
.sb-head h1.sec-hed { font-size: 24px; margin: 2px 0 0; }
.sb-head h2.sec-hed { font-size: 20px; margin: 2px 0 0; }
.sb-head .sec-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.sec-head.is-quiet::after { width: 120px; background: var(--brass-mid); }
/* vanity sizes; the 8th and later dialable letters are dimmed like a real plate's overflow */
.vanity.v-sm .v-l b { font-size: 30px; }
.vanity.v-sm .v-pre { font-size: 15px; padding-bottom: 11px; }
.vanity.v-lg .v-l b { font-size: 52px; }
.vanity .v-x { opacity: .42; }
.vanity .v-x b { text-transform: none; }
.vanity .v-sep { align-self: center; padding: 0 2px 14px; font: 700 24px var(--f-cond); color: var(--brass); }

/* a record's own plate: "1-800-FLOWERS" big, its digits under it (heads only, never rows or copy targets) */
.sb-plate { display: inline-flex; flex-direction: column; color: var(--vanity-ink); line-height: 1; }
.sb-plate .pl-top { display: flex; align-items: flex-end; gap: 4px; }
.sb-plate .pl-pre { font: 700 22px var(--f-cond); color: var(--brass); padding-bottom: 5px; letter-spacing: .02em; }
.sb-plate .pl-word { font: 700 46px/.92 var(--f-cond); letter-spacing: .015em; white-space: nowrap; }
.sb-plate .pl-dig { margin-top: 5px; font: 600 13px var(--f-mono); letter-spacing: .1em; color: var(--red); }
.sb-plate.is-digits .pl-word { font-size: 40px; letter-spacing: .03em; }

.sb-detail { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 24px; align-items: end; margin: 6px 0 16px; padding-bottom: 12px; border-bottom: 2px solid var(--line); position: relative; }
.sb-detail::after { content: ""; position: absolute; left: 0; bottom: -2px; width: 220px; height: 2px; background: var(--red); }
.sb-crumbs { grid-column: 1 / -1; display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
.sb-crumbs a { font-weight: 600; }
.sb-crumbs .cr-sep { color: var(--faint); }
.sb-detail .sb-sub { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.sb-detail .statrow { grid-column: 1 / -1; margin-top: 4px; }
.sb-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }

/* lamps with a word beside each */
.sb-lamps { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin-top: 8px; }
.sb-lamps > * { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-2); white-space: nowrap; }
.sb-lamps b { color: var(--ink); font-weight: 650; }

/* step lamps in a record head (mirrors the worksheet ticks; records.js toggles .on) */
.sb-steplamps { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.sb-steplamps .dot { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px 0 7px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--panel-2); font: 650 11.5px var(--f-ui); color: var(--muted); }
.sb-steplamps .dot::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--off); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .18); }
.sb-steplamps .dot.on { color: var(--ink); border-color: color-mix(in srgb, var(--ok) 45%, var(--line-2)); }
.sb-steplamps .dot.on::before { background: var(--ok); box-shadow: 0 0 7px color-mix(in srgb, var(--ok) 60%, transparent); }

/* a release's step rail (never .steps/.step: those are records.js hooks) */
.sb-rail { display: flex; list-style: none; margin: 10px 0 16px; padding: 0; counter-reset: rail; }
.sb-rail > li { flex: 1; position: relative; padding: 26px 6px 0; text-align: center; font-size: 12px; color: var(--muted); counter-increment: rail; }
.sb-rail > li::before { content: counter(rail); position: absolute; left: 50%; top: 0; width: 20px; height: 20px; margin-left: -10px; border-radius: 50%; display: grid; place-items: center; font: 700 10.5px var(--f-ui); color: var(--muted); background: var(--panel-2); border: 2px solid var(--line-2); z-index: 1; }
.sb-rail > li + li::after { content: ""; position: absolute; top: 10px; right: 50%; width: 100%; height: 2px; background: var(--line-2); }
.sb-rail > li.done { color: var(--ink-2); }
.sb-rail > li.done::before { content: "✓"; background: var(--ok); border-color: var(--ok); color: #fff; }
.sb-rail > li.done + li::after { background: var(--ok); }
.sb-rail > li.now { color: var(--ink); font-weight: 650; }
.sb-rail > li.now::before { border-color: var(--red); color: var(--red); background: var(--box-bg); box-shadow: 0 0 0 4px color-mix(in srgb, var(--red) 15%, transparent); }
.sb-rail > li.stop::before { background: var(--off); border-color: var(--off); color: var(--panel); }

/* the desk: things that want a human, one action each */
.sb-desk { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.sb-desk > li { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 10px 8px 12px; border-radius: 11px; background: var(--panel-2); border: 1px solid var(--line); }
.sb-desk > li.is-now { box-shadow: inset 3px 0 0 var(--red); }
.sb-desk .dk-t { min-width: 0; font-size: 13px; color: var(--ink); }
.sb-desk .dk-t small { display: block; color: var(--muted); font-size: 11.5px; }

/* the jack strip under a page head: anchors or sibling pages, current one lit */
.sb-jacks { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: -2px 0 16px; }
.sb-jacks a { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 13px 0 8px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--panel); color: var(--ink-2); font: 600 12.5px var(--f-ui); box-shadow: 0 1px 0 var(--line-2); white-space: nowrap; }
.sb-jacks a::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--teal-deep); box-shadow: inset 0 0 0 2px var(--brass-mid); flex: none; }
.sb-jacks a:hover { text-decoration: none; border-color: var(--teal); color: var(--teal); }
.sb-jacks a.on, .sb-jacks a[aria-current] { background: var(--teal-deep); border-color: var(--teal-deeper); color: var(--cream); box-shadow: 0 1px 0 var(--teal-deeper); }
.sb-jacks a.on::before, .sb-jacks a[aria-current]::before { background: var(--red); box-shadow: 0 0 0 2px var(--brass-hi), 0 0 8px var(--red); }
.sb-jacks .jk-n { font: 700 10.5px var(--f-ui); color: var(--brass); }
.sb-jacks a.on .jk-n, .sb-jacks a[aria-current] .jk-n { color: var(--brass-hi); }
.sb-jacks .jk-lab { margin-right: 4px; font: 700 10.5px var(--f-ui); letter-spacing: .14em; text-transform: uppercase; color: var(--brass); }

/* the speed dial on index pages: once, in the footer, not sticky (the home's is sticky: dash.css .speed) */
/* nav.sb-speed, not .sb-speed: the home's uptime rows have a span.sb-speed cell of their own (dash.css) */
nav.sb-speed { display: flex; align-items: center; gap: 16px; padding: 10px 0 12px; }
nav.sb-speed .sd-keys { flex-wrap: wrap; }

/* ui.empty: the sleeping dial and one sentence */
.p-empty.sb-empty { min-height: 0; padding: 22px 16px; }

/* ---------------------------------------------------------------- tables */
.tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.sb-table, .number-table, .adm-table, .sr-table {
  width: 100%; border-collapse: separate; border-spacing: 0; margin: 0 0 12px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; font-size: 13.5px; color: var(--ink);
  box-shadow: var(--shadow);
}
:is(.sb-table, .number-table, .adm-table, .sr-table) th {
  background: var(--panel-2); color: var(--th-ink); font: 700 10.5px/1.3 var(--f-ui); letter-spacing: .11em; text-transform: uppercase;
  text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line-2); white-space: nowrap; vertical-align: bottom;
}
:is(.sb-table, .number-table, .adm-table, .sr-table) thead tr:first-child th:first-child { border-top-left-radius: 11px; }
:is(.sb-table, .number-table, .adm-table, .sr-table) thead tr:first-child th:last-child { border-top-right-radius: 11px; }
:is(.sb-table, .number-table, .adm-table, .sr-table) td { padding: 9px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
:is(.sb-table, .number-table, .adm-table, .sr-table) tbody tr:last-child td { border-bottom: 0; }
:is(.sb-table, .number-table, .adm-table, .sr-table) tbody tr:hover td { background: var(--row-hover); }
:is(.sb-table, .number-table, .adm-table, .sr-table) a { font-weight: 600; }
:is(.sb-table, .number-table, .adm-table, .sr-table) .num, :is(.sb-table, .number-table, .adm-table, .sr-table) th.num { text-align: right; font-variant-numeric: tabular-nums; }
:is(.sb-table, .number-table) .vty { font-size: 15px; color: var(--ink); white-space: nowrap; }
:is(.sb-table, .number-table) a .vty, :is(.sb-table, .number-table) a.vty { color: var(--teal); }
.sb-table.dense td { padding: 5px 10px; font-size: 12.5px; }
.sb-table.dense th { padding: 7px 10px; }
.sb-table.sticky th { position: sticky; top: 0; z-index: 2; }
tr.is-released td, tr.row-released td { color: var(--muted); background: color-mix(in srgb, var(--panel-2) 55%, transparent); }
tr.is-today td:first-child { box-shadow: inset 3px 0 0 var(--red); }
tr.row-other td { background: var(--panel-2); color: var(--ink-2); }
/* sortable headers (records.js adds sort-asc / sort-desc; th[data-num] sorts as numbers) */
table.adm-table th[data-k] { cursor: pointer; user-select: none; }
table.adm-table th[data-k]:hover { color: var(--teal); }
th.sort-asc::after { content: " ▲"; font-size: .8em; color: var(--red); }
th.sort-desc::after { content: " ▼"; font-size: .8em; color: var(--red); }

/* key / value rows (activation panel 3 keeps its table.kv with tr.manualnum / tr.manualnone) */
table.kv { width: 100%; border-collapse: collapse; margin-top: 8px; }
table.kv th { width: 42%; padding: 7px 12px 7px 0; text-align: left; vertical-align: top; font: 600 11.5px/1.5 var(--f-ui); letter-spacing: .04em; color: var(--muted); }
table.kv td { padding: 6px 0; border-bottom: 1px dashed var(--line); font-size: 13.5px; line-height: 1.9; }
table.kv tr:last-child td { border-bottom: 0; }
.kv .val { font-family: var(--f-mono); font-weight: 600; color: var(--ink); }
.kv-const td .val { font-weight: 500; color: var(--muted); }
.kv-missing th, .kv-missing td { background: var(--warn-wash); }
.tag { margin-left: 6px; font-size: 10.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }

/* ---------------------------------------------------------------- forms */
:where(.sb-page) :is(input:not([type]), input[type=text], input[type=search], input[type=email], input[type=tel],
  input[type=number], input[type=date], input[type=password], input[type=url], select, textarea) {
  height: 36px; padding: 0 10px; font: 14px var(--f-ui); color: var(--ink);
  background: var(--field-bg); border: 1px solid var(--field-line); border-radius: 8px;
  box-shadow: inset 0 1px 2px rgba(60, 40, 10, .06); max-width: 100%;
}
:where(.sb-page) textarea { height: auto; min-height: 84px; padding: 8px 10px; line-height: 1.45; resize: vertical; }
:where(.sb-page) select { padding-right: 6px; }
:where(.sb-page) :is(input, select, textarea):focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 16%, transparent); }
:where(.sb-page) :is(input, select, textarea):disabled { opacity: .6; cursor: not-allowed; }
:where(.sb-page) :is(input[type=checkbox], input[type=radio]) { accent-color: var(--teal); width: 17px; height: 17px; vertical-align: -3px; }
:where(.sb-page) ::placeholder { color: var(--faint); }
.sb-fields, .editgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px 16px; margin: 12px 0 6px; }
.sb-fields label, .editgrid label, .sb-label { display: flex; flex-direction: column; gap: 5px; font: 600 11px var(--f-ui); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.sb-fields label > :is(input, select, textarea), .editgrid label > :is(input, select, textarea) { width: 100%; letter-spacing: 0; text-transform: none; }
.sb-fields .hint, .sb-hint { font: 400 12px var(--f-ui); letter-spacing: 0; text-transform: none; color: var(--muted); }
.sb-form-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 12px; }
.checkline { display: flex; align-items: center; gap: 9px; font-weight: 400; }
form.inline { display: inline; }
.admin-tools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 14px 0 10px; }
.admin-tools input[type=text], .admin-tools input[type=search] { min-width: 290px; }
.admin-tools-hint { color: var(--muted); font-size: 12px; }
.releaseform { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.releaseform label { display: flex; flex-direction: column; gap: 5px; font: 600 11px var(--f-ui); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

/* ---------------------------------------------------------------- buttons: the telephone key, and quieter ones */
.sb-btn, button.primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 0 16px;
  border-radius: 9px; border: 1px solid var(--teal-deeper); background: var(--teal-deep); color: var(--cream);
  font: 650 13.5px var(--f-ui); white-space: nowrap; cursor: pointer; text-decoration: none;
  box-shadow: 0 2px 0 var(--teal-deeper); transition: background .12s, transform .06s;
}
.sb-btn:hover, button.primary:hover { background: #135260; color: #fff; text-decoration: none; }
.sb-btn:active, button.primary:active { transform: translateY(1px); box-shadow: 0 1px 0 var(--teal-deeper); }
.sb-btn-2, .row-cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 0 15px;
  border-radius: 9px; border: 1px solid var(--line-2); background: var(--panel); color: var(--teal);
  font: 650 13.5px var(--f-ui); white-space: nowrap; cursor: pointer; text-decoration: none; box-shadow: 0 2px 0 var(--line-2);
}
.sb-btn-2:hover, .row-cta:hover { border-color: var(--teal); text-decoration: none; }
.sb-btn-2:active, .row-cta:active { transform: translateY(1px); box-shadow: 0 1px 0 var(--line-2); }
.sb-btn-q, .linkbtn {
  display: inline; height: auto; padding: 0 2px; border: 0; background: none; box-shadow: none; cursor: pointer;
  color: var(--teal); font: 600 13px var(--f-ui); text-decoration: none;
}
.sb-btn-q:hover, .linkbtn:hover { text-decoration: underline; }
.linkish { background: none; border: 0; padding: 0; color: inherit; cursor: pointer; text-decoration: underline; font: inherit; opacity: .75; }
.linkish:hover { opacity: 1; }
.sb-btn-danger {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 0 15px;
  border-radius: 9px; border: 1px solid color-mix(in srgb, var(--red) 55%, var(--line-2)); background: var(--panel);
  color: var(--red-ink); font: 650 13.5px var(--f-ui); white-space: nowrap; cursor: pointer;
  box-shadow: 0 2px 0 color-mix(in srgb, var(--red) 35%, var(--line-2));
}
.sb-btn-danger:hover { border-color: var(--red); text-decoration: none; }
.sb-btn-danger.is-filled { background: var(--red); border-color: var(--red-ink); color: #fff; box-shadow: 0 2px 0 var(--red-ink); }
.sb-btn.sm, .sb-btn-2.sm, .sb-btn-danger.sm { height: 30px; padding: 0 11px; font-size: 12.5px; }
:is(.sb-btn, .sb-btn-2, .sb-btn-danger, button.primary, .row-cta):disabled,
:is(.sb-btn, .sb-btn-2, .sb-btn-danger, .row-cta)[aria-disabled="true"] { opacity: .5; cursor: not-allowed; box-shadow: none; transform: none; }
/* copy buttons are the point of the worksheet: loud, and loud again when done */
button.copy {
  display: inline-flex; align-items: center; justify-content: center; min-width: 74px; height: 30px; margin-left: 10px; padding: 0 14px;
  border-radius: 8px; border: 1px solid var(--teal-deeper); background: var(--teal-deep); color: var(--cream);
  font: 650 12px var(--f-ui); letter-spacing: .02em; cursor: pointer; vertical-align: middle; box-shadow: 0 2px 0 var(--teal-deeper);
}
button.copy:hover { background: #135260; }
button.copy:active { transform: translateY(1px); }
button.copy:focus-visible { outline: 3px solid var(--brass-hi); outline-offset: 2px; }
button.copy.done { background: var(--ok); border-color: var(--ok-ink); color: #fff; box-shadow: 0 2px 0 var(--ok-ink); }
button.copy.done::after { content: " ✓"; }

/* ---------------------------------------------------------------- flash messages (ui.flash) and the legacy message styles */
.sb-flash {
  display: flex; align-items: flex-start; gap: 10px; margin: 0 0 12px; padding: 10px 12px 10px 14px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--panel); color: var(--ink); font-size: 13.5px; box-shadow: var(--shadow);
}
.sb-flash > .lamp { margin-top: 4px; }
.sb-flash .fl-t { flex: 1; min-width: 0; }
.sb-flash .fl-t b { font-weight: 650; }
.sb-flash .fl-t small { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.sb-flash-ok { border-color: color-mix(in srgb, var(--ok) 45%, var(--line)); background: color-mix(in srgb, var(--ok) 8%, var(--panel)); }
.sb-flash-info { border-color: color-mix(in srgb, var(--info) 45%, var(--line)); background: color-mix(in srgb, var(--info) 7%, var(--panel)); }
.sb-flash-warn { border-color: color-mix(in srgb, var(--warn) 55%, var(--line)); background: var(--warn-wash); }
.sb-flash-bad { border-color: color-mix(in srgb, var(--bad) 50%, var(--line)); background: color-mix(in srgb, var(--bad) 8%, var(--panel)); color: var(--ink); }
.sb-flash [data-dismiss] { flex: none; margin-left: 8px; width: 24px; height: 24px; border: 0; border-radius: 6px; background: none; color: var(--muted); font-size: 17px; line-height: 1; cursor: pointer; }
.sb-flash [data-dismiss]:hover { background: var(--panel-3); color: var(--ink); }
.notice, .error, .flash, .admin-banner {
  margin: 12px 0; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel);
  color: var(--ink); font-size: 13.5px; box-shadow: inset 4px 0 0 var(--info);
}
.error { border-color: color-mix(in srgb, var(--bad) 45%, var(--line)); background: color-mix(in srgb, var(--bad) 7%, var(--panel)); color: var(--red-ink); box-shadow: inset 4px 0 0 var(--bad); }
.flash-ok { border-color: color-mix(in srgb, var(--ok) 45%, var(--line)); background: color-mix(in srgb, var(--ok) 8%, var(--panel)); box-shadow: inset 4px 0 0 var(--ok); }
.flash-bad { border-color: color-mix(in srgb, var(--bad) 45%, var(--line)); background: color-mix(in srgb, var(--bad) 7%, var(--panel)); box-shadow: inset 4px 0 0 var(--bad); }
.admin-banner { border-color: color-mix(in srgb, var(--warn) 55%, var(--line)); background: var(--warn-wash); box-shadow: inset 4px 0 0 var(--warn); }
.admin-banner.flagged { border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); background: color-mix(in srgb, var(--warn) 10%, var(--panel)); box-shadow: inset 4px 0 0 var(--red); }
.admin-banner.flagged ul { margin: 8px 0 0; padding-left: 20px; }
.admin-banner.flagged li { margin: 3px 0; }

/* ---------------------------------------------------------------- pills (legacy names kept, colors from the tokens) */
.pill {
  display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--panel-3); color: var(--ink-2); font: 650 11px var(--f-ui); white-space: nowrap; vertical-align: 1px;
}
:is(.pill-held, .conf-confirmed, .ctlpill-ours, .vpill-held, .vpill-spare, .wpill-open) {
  background: color-mix(in srgb, var(--ok) 13%, var(--panel)); border-color: color-mix(in srgb, var(--ok) 35%, transparent); color: var(--ok-ink);
}
:is(.pill-released, .ctlpill-released) {
  background: color-mix(in srgb, var(--brass-mid) 16%, var(--panel)); border-color: color-mix(in srgb, var(--brass-mid) 40%, transparent); color: var(--brass);
}
:is(.conf-order, .ctlpill-elsewhere, .vpill-coming, .wpill-early) {
  background: color-mix(in srgb, var(--info) 11%, var(--panel)); border-color: color-mix(in srgb, var(--info) 32%, transparent); color: var(--info);
}
:is(.conf-unresolved, .vpill-gone) {
  background: color-mix(in srgb, var(--bad) 11%, var(--panel)); border-color: color-mix(in srgb, var(--bad) 35%, transparent); color: var(--red-ink);
}
:is(.pill-flag, .wpill-late) {
  background: var(--warn-wash); border-color: color-mix(in srgb, var(--warn) 45%, transparent); color: var(--warn-ink);
}
/* "Registry says nobody holds it" on a number our records say a customer bought: the alarm on every page that
   shows it (/numbers, /customer), so the bad pill, not green (REQ-numbers-8). The backorder verdict
   .vpill-spare ("can be taken today") is good news and stays green above. */
.ctlpill-spare { background: color-mix(in srgb, var(--bad) 11%, var(--panel)); border-color: color-mix(in srgb, var(--bad) 35%, transparent); color: var(--red-ink); }
:is(.ctlpill-unchecked, .ctlpill-unknown, .vpill-unknown, .wpill-unknown, .pill-secondary) { background: var(--panel-2); border-color: var(--line); color: var(--muted); }
.vpill-spare, .vpill-gone { font-weight: 750; }
.stat.ctl-ours b { color: var(--ok-ink); }
.stat.ctl-elsewhere b { color: var(--info); }

/* the legacy stat boxes look like the home's .st */
.statrow > .stat { display: flex; flex-direction: column; min-width: 0; padding: 8px 10px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); }
.statrow > .stat b { font: 600 21px/1.05 var(--f-disp); }
.statrow > .stat span { font-size: 11.5px; color: var(--muted); line-height: 1.25; }

/* pager, override list, status flow (restyled, never renamed) */
.pager { display: flex; gap: 14px; align-items: center; margin: 16px 0 28px; font-size: 13px; }
.pager a.on { font-weight: 700; color: var(--ink); text-decoration: none; }
.override-box { margin: 0 0 24px; padding: 16px 18px 18px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); box-shadow: var(--shadow); }
.override-box h2 { margin: 0 0 6px; }
.ovr-filters { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; margin: 10px 0 8px; font-size: 13px; }
.ovr-filters a { border-bottom: 2px solid transparent; }
.ovr-filters a.on { font-weight: 650; color: var(--ink); border-bottom-color: var(--red); text-decoration: none; }
.ovr-table td { vertical-align: top; }
.ovr-note td { padding-top: 0; border-top: 0; }
.ovr-add { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 14px; }
.rule-flow { display: flex; flex-direction: column; gap: 12px; margin: 18px 0 24px; max-width: 80ch; }
.rule-card { padding: 12px 16px; border: 1px solid var(--line); border-left: 4px solid var(--teal); border-radius: 10px; background: var(--panel); box-shadow: var(--shadow); }
.rule-card.rule-off { opacity: .55; border-left-color: var(--off); }
.rule-head { display: flex; align-items: baseline; gap: 10px; }
.rule-when { font-weight: 650; }
.rule-stage { font-family: var(--f-mono); font-size: .92em; color: var(--muted); }
.rule-preview { margin: 6px 0 9px; font-size: 15px; }
.rule-fields { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: flex-end; }
.rule-fields label { display: flex; flex-direction: column; gap: 3px; color: var(--muted); font-size: 12px; }
.rule-enable { display: flex; align-items: center; gap: 5px; color: var(--muted); }
.rule-cond { margin: 8px 0 0; }

/* ---------------------------------------------------------------- what records.js binds: base looks + BEHAVIOUR (never drop these) */
[hidden] { display: none !important; }
.defaultsubmit { position: absolute; width: 1px; height: 1px; padding: 0; border: 0; opacity: 0; pointer-events: none; }
.pickrow { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 7px 14px; border-top: 1px solid var(--line); }
.pickrow:first-of-type { border-top: 0; }
.pickrow input.numpick { flex: 0 0 auto; width: 19px; height: 19px; margin: 0; accent-color: var(--ok); cursor: pointer; }
.pickrow .numlabel { flex: 0 0 auto; display: flex; gap: 8px; align-items: baseline; font-family: var(--f-mono); }
.pickrow .prod { flex: 1 1 170px; min-width: 0; }
.pickrow.off .numlabel, .pickrow.off .prod { opacity: .55; }
.pickrow[data-kind="backorder"] { background: var(--warn-wash); }
.pickrow[data-kind="ignore"] .numlabel b { color: var(--muted); text-decoration: line-through; }
.pickrow.on { box-shadow: inset 4px 0 0 var(--teal); }
.pickrow .bo-add { display: none; }
.pickrow[data-kind="backorder"] .bo-add { display: inline-block; }
.dropzone { padding: 24px 18px; border: 2px dashed var(--line-2); border-radius: 14px; background: var(--panel-2); text-align: center; transition: background .15s, border-color .15s; }
.dropzone b { display: block; margin-bottom: 4px; font-size: 15px; }
.dropzone .picked { margin: 10px 0 0; color: var(--ok-ink); font-weight: 600; }
.dropzone.over { background: var(--c1-wash); border-color: var(--teal); }
.dropzone.busy { opacity: .55; }
.dropzone.busy b::after { content: " ... checking"; }
.steps { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.steps-head { margin: 0 0 6px; font: 700 11px var(--f-ui); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.step { display: flex; align-items: center; gap: 10px; padding: 7px 0; font-size: 13.5px; cursor: pointer; }
.step input { flex: 0 0 auto; width: 20px; height: 20px; accent-color: var(--ok); cursor: pointer; }
.step .when { margin-left: auto; font-size: 11.5px; color: var(--muted); }
.step.saving { opacity: .5; }
.step.failed span { color: var(--red-ink); }
.registry .verdict { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 4px 0 2px; font-size: 15px; }
.registry.checking { opacity: .7; }
.registry.failed .verdict .pill { opacity: .6; }
.progcell { white-space: nowrap; }
.progcell .dot { display: inline-block; min-width: 26px; margin-right: 2px; padding: 2px 4px; border-radius: 4px; text-align: center; font: 700 10px var(--f-ui); background: var(--panel-3); color: var(--faint); }
.progcell .dot.on { background: color-mix(in srgb, var(--ok) 16%, var(--panel)); color: var(--ok-ink); }
.progcell .dot.part { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--ok) 16%, var(--panel)) 0 4px, var(--panel-3) 4px 8px); color: var(--warn-ink); }
.progcell .dot.on.rel { background: color-mix(in srgb, var(--brass-mid) 18%, var(--panel)); color: var(--brass); }

/* ---------------------------------------------------------------- the operator's card (login, error pages) */
.sb-center { display: grid; place-items: center; min-height: calc(100vh - 170px); padding: 24px 0; }
.sb-opcard { width: min(420px, 100%); padding: 30px 34px 26px; }
.sb-opcard .sb-op-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; color: var(--vanity-ink); }
.sb-opcard .sb-op-brand b { display: block; font: 700 24px/1 var(--f-cond); letter-spacing: .04em; }
.sb-opcard .sb-op-brand small { display: block; margin-top: 3px; font: 600 10.5px var(--f-ui); letter-spacing: .14em; text-transform: uppercase; color: var(--brass); }
.sb-opcard .sb-fields { grid-template-columns: 1fr; }
.sb-opcard .sb-btn { width: 100%; height: 40px; margin-top: 8px; }
.sb-line { font: 600 18px/1.35 var(--f-disp); color: var(--ink-2); }

/* ---------------------------------------------------------------- small parts the macros emit */
.st .st-sub { display: block; margin-top: 2px; font-size: 11px; color: var(--faint); }
.sb-dt { min-width: 0; }
h1.sb-plate, h2.sb-plate { margin: 0; }
.ph h2 { margin: 0; font: 650 15.5px/1.25 var(--f-ui); color: var(--ink); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ph h2 .lamp { margin-right: 1px; }
.sb-hint { margin: 6px 0 0; color: var(--muted); font-size: 12.5px; }
.sb-hint .icon-inline { color: var(--brass); }
.sb-chip-warn { color: var(--warn-ink); background: var(--warn-wash); border-color: color-mix(in srgb, var(--warn) 45%, transparent); }
a.ext::after { content: " \2197"; font-size: .85em; opacity: .65; }
/* a <details> that holds the long instructions or a fallback form */
.sb-more { margin-top: 12px; border-top: 1px dashed var(--line-2); padding-top: 8px; }
.sb-more > summary { cursor: pointer; width: max-content; max-width: 100%; color: var(--teal); font: 600 12.5px var(--f-ui); list-style: none; }
.sb-more > summary::-webkit-details-marker { display: none; }
.sb-more > summary::before { content: "\25B8"; display: inline-block; width: 14px; color: var(--brass); transition: transform .12s; }
.sb-more[open] > summary::before { transform: rotate(90deg); }
.sb-more > summary:hover { text-decoration: underline; }
/* a whole card that is a link (Settings -> System health) */
.sb-linkcard { display: flex; align-items: center; gap: 18px; padding: 18px 24px; color: var(--ink); text-decoration: none; }
.sb-linkcard:hover { text-decoration: none; border-color: var(--teal); }
.sb-linkcard .sb-lc-t { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.sb-linkcard .sb-lc-t b { font: 650 16px var(--f-ui); color: var(--teal); }
.sb-linkcard .sb-lc-go { margin-left: auto; font: 700 22px var(--f-disp); color: var(--brass); }
.sb-linkcard:hover .sb-lc-go { color: var(--red); }

/* ---------------------------------------------------------------- shell pages: login, 404 / 500 */
.pg-login .sb-opcard .sb-flash { margin: 0 0 6px; box-shadow: none; }
/* 404 / 500 fill the window exactly, footer at the bottom, no scroll (REQ-integrate-6): the body is a column
   and <main> takes what the header and footer leave, whatever their heights (no guessed 150px). Screen only. */
@media screen {
  body:has(> main.pg-error) { display: flex; flex-direction: column; min-height: 100vh; }
  body:has(> main.pg-error) > main.pg-error { flex: 1 0 auto; width: 100%; }
}
.pg-error .sb-errbody { max-width: var(--measure); margin: 6px 0 40px; }
.pg-error .sb-line { margin: 18px 0 6px; }
.sb-bare { margin: 18vh auto 0; max-width: 32ch; text-align: center; color: var(--muted); font-size: 15px; }

/* ---------------------------------------------------------------- /search: 1-800-FOUNDIT */
.sb-opbox {
  display: flex; align-items: center; gap: 12px; margin: 4px 0 0; padding: 10px 12px 10px 16px; border-radius: 16px;
  border: 2px solid var(--teal-deep); background: var(--box-bg); box-shadow: inset 0 2px 3px rgba(60, 40, 10, .07), var(--shadow);
}
.sb-opbox::before, .sb-opbox::after { display: none; }
.sb-opbox:focus-within { border-color: var(--red); box-shadow: inset 0 2px 3px rgba(60, 40, 10, .07), 0 0 0 4px rgba(196, 48, 43, .14); }
.sb-opbox .sb-op-dial { display: flex; flex: none; }
.sb-opbox input[name="q"] {
  flex: 1; min-width: 0; height: 44px; padding: 0 4px; border: 0; outline: 0; background: transparent; box-shadow: none;
  color: var(--ink); font: 600 22px var(--f-disp); letter-spacing: .015em;
}
.sb-opbox input[name="q"]:focus { box-shadow: none; }
.sb-opbox input[name="q"]::placeholder { font-weight: 400; font-size: 17px; letter-spacing: 0; }
.sb-opbox .sb-btn { flex: none; height: 42px; }
.sb-op-hint { margin: 8px 2px 14px; }
/* the type chip: what the operator heard (TOLL FREE 800-356-9377, ORDER, EMAIL, NAME) */
.sb-tc { display: inline-flex; align-items: center; gap: 8px; flex: none; height: 32px; padding: 0 10px 0 4px; border-radius: 9px; background: var(--panel-2); border: 1px solid var(--line-2); white-space: nowrap; }
.sb-tc b { font: 700 10.5px var(--f-ui); letter-spacing: .1em; padding: 4px 7px; border-radius: 6px; background: var(--teal-deep); color: var(--brass-hi); }
.sb-tc span { font: 700 18px var(--f-disp); color: var(--teal); letter-spacing: .03em; }
.sb-tc-ord b { background: var(--c2); color: #fff; }
.sb-tc-part b, .sb-tc-name b, .sb-tc-mail b { background: var(--panel-3); color: var(--ink-2); border: 1px solid var(--line-2); }
.sb-tc-name, .sb-tc-mail, .sb-tc-ord { padding-right: 4px; }
/* one panel per group of records, in the contract's order */
.pg-search .sr-group { margin: 0 0 14px; padding-bottom: 6px; }
.pg-search .sr-group .ph { margin-bottom: 6px; }
.pg-search .sr-ic { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--panel-2); border: 1px solid var(--line); color: var(--teal); flex: none; }
.pg-search .sr-ic .icon { width: 16px; height: 16px; }
.pg-search .sr-table { margin: 0; box-shadow: none; }
.pg-search .sr-table td { vertical-align: middle; }
.pg-search .sr-table td.sr-t { width: 28%; }
.pg-search .sr-table td:nth-child(3) { width: 22%; }
.pg-search .sr-table td.sr-tagcell { width: 1%; white-space: nowrap; text-align: right; }
.pg-search .sr-table .vty { font-size: 15.5px; }
.pg-search .sr-v { font-size: 13px; color: var(--ink-2); margin-top: 2px; }
.pg-search .sr-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.pg-search .sr-tag .lamp { width: 9px; height: 9px; }
/* the registry is the authority: the dark teal line, as in the home's dropdown */
.pg-search .sr-registry { background: linear-gradient(90deg, color-mix(in srgb, var(--teal-deep) 9%, var(--panel)), var(--panel) 70%); border-color: color-mix(in srgb, var(--teal-deep) 35%, var(--line)); }
.pg-search .sr-registry .sr-ic { background: var(--teal-deep); border-color: var(--teal-deeper); color: var(--brass-hi); }
.pg-search .sr-registry .sr-table { background: transparent; }
.pg-search .sr-registry .sr-t a, .pg-search .sr-registry .sr-t span { font: 700 18px var(--f-disp); letter-spacing: .03em; }
/* nothing found, and the detailed table under everything */
.pg-search .sr-none { padding: 6px 12px; }
.pg-search .sr-detail { margin-top: 24px; }
.pg-search .sr-detail h2 { margin: 0; }
.pg-search .sr-detail .sec-deck { margin: 2px 0 10px; }
.pg-search .sr-foot { margin-top: 18px; }

/* ---------------------------------------------------------------- /settings: 1-800-CONNECT */
.pg-settings .sb-conn-grid { margin-top: 4px; align-items: start; }
.pg-settings .sb-conn-grid + .sb-conn-grid { margin-top: 16px; }
.pg-settings .sb-card .ph { margin-bottom: 4px; }
.pg-settings .subhead { margin: 18px 0 2px; font: 700 11px var(--f-ui); letter-spacing: .12em; text-transform: uppercase; color: var(--brass); }
.pg-settings table.kv th { width: 34%; }
.pg-settings .sb-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pg-settings table.kv .chip { margin: 2px 4px 2px 0; }
.pg-settings .tokenbox { flex: 1; min-width: 220px; }
.pg-settings .sb-redirect { margin: 14px 0 4px; overflow-wrap: anywhere; }
.pg-settings .sb-redirect .term { color: var(--ink); }
.pg-settings .sb-flash .fl-t small + small { margin-top: 0; }

/* ---------------------------------------------------------------- source lines (REQ-releases-8)
   final's .src ink (--faint, PART 1) is 3.6:1 on a light panel at 10.5px, below AA for small text. In the
   light theme and in print the source line takes --src-ink: 5.4:1 on --panel, 4.9:1 on --panel-2, 4.6:1 on
   --panel-3. The dark theme keeps --faint (4.9:1 on its panel). One rule for every page's charts. */
:root { --src-ink: #5F6964; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --src-ink: var(--faint); } }
:root[data-theme="dark"] { --src-ink: var(--faint); }
.src { color: var(--src-ink); }

/* ---------------------------------------------------------------- dark-mode touch-ups for the components above */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .sb-btn, :root:not([data-theme="light"]) button.primary,
  :root:not([data-theme="light"]) button.copy:not(.done) { background: #1B4A53; border-color: #0C2B31; box-shadow: 0 2px 0 #0C2B31; }
  :root:not([data-theme="light"]) .sb-btn:hover, :root:not([data-theme="light"]) button.primary:hover,
  :root:not([data-theme="light"]) button.copy:not(.done):hover { background: #22606C; }
  :root:not([data-theme="light"]) :where(.sb-page) :is(input, select, textarea) { box-shadow: inset 0 1px 2px rgba(0, 0, 0, .3); }
}
:root[data-theme="dark"] .sb-btn, :root[data-theme="dark"] button.primary, :root[data-theme="dark"] button.copy:not(.done) { background: #1B4A53; border-color: #0C2B31; box-shadow: 0 2px 0 #0C2B31; }

/* =====================================================================
   PART 3: print. Chrome hidden, light tokens forced, a white page (a page printed at night must
   not come out cream ink on white paper). The customer documents (.doc) are never themed.
   ===================================================================== */
@media print {
  @page { margin: .6in .55in; }
  html:root:not([data-print-never]) {
    color-scheme: light;
    /* surfaces */
    --bg: #F1E9D7;
    --panel: #FCF8EF;
    --panel-2: #F5EEDF;
    --panel-3: #EFE6D2;
    --line: #E1D3B6;
    --line-2: #D3C29F;
    --grid: #ECE2CD;
    --axis: #CDBD9B;
    /* ink */
    --ink: #1B2528;
    --ink-2: #435053;
    --muted: #66706B;
    --faint: #7E847D;
    /* brand */
    --teal-deep: #0E3B43;
    --teal-deeper: #0A2C32;
    --teal: #00697A;
    --red: #C4302B;
    --red-ink: #A8231F;
    --brass: #9A6510;
    --brass-hi: #E2B458;
    --brass-mid: #C99234;
    --brass-lo: #8A5A0C;
    --cream: #F6EFE0;
    /* data: validated categorical (teal, brass, plum, olive) */
    --c1: #00869E;
    --c2: #B47510;
    --c3: #9A4A86;
    --c4: #4F8A3A;
    --c1-wash: rgba(0, 134, 158, .11);
    --c1-light: #A9D3DB;
    --gray-mark: #A6A091;
    --gray-mark-2: #CFC8B8;
    /* sequential teal (quality ramp / heat grid) */
    --q1: #A6D2DA; --q2: #3FA3B6; --q3: #005B6C;
    --h0: #EDE4D0; --h1: #CFE6EA; --h2: #93C9D3; --h3: #4FA7B8; --h4: #12819A; --h5: #005466;
    /* status */
    --ok: #2E8B4F;
    --ok-ink: #22703E;
    --warn: #D18B12;
    --warn-ink: #8A5300;
    --warn-wash: rgba(209, 139, 18, .13);
    --bad: #C4302B;
    --info: #2F7FB0;
    --off: #BDB5A3;
    --neg: #9A5414;      /* a falling number: not an alert, so not signal red */
    /* type */
    --f-ui: "Segoe UI Variable Text", "Segoe UI", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
    --f-disp: "Bahnschrift", "DIN Alternate", "Avenir Next", "Franklin Gothic Medium", "Segoe UI", sans-serif;
    --f-cond: "Bahnschrift Condensed", "Bahnschrift SemiCondensed", "DIN Condensed", "Avenir Next Condensed", "Arial Narrow", sans-serif;
    --f-mono: "Cascadia Mono", "Cascadia Code", "SF Mono", Menlo, Consolas, monospace;
    /* misc */
    --r: 14px;
    --shadow: 0 1px 0 rgba(255, 255, 255, .7) inset, 0 1px 2px rgba(70, 48, 10, .07), 0 10px 28px -16px rgba(70, 48, 10, .28);
    --tip-bg: #13262B;
    --tip-ink: #F6EFE0;
    --tip-dim: #A9B8B5;
    --board-w: 540px;
    --kp-span: 196px;
    --key-bg: linear-gradient(#FFFDF7, #F1E8D5);
    --box-bg: #FFFDF8;
    --vanity-ink: #0E3B43;
    --net-bar: #0E3B43;
    --bg: #fff; --panel: #fff; --panel-2: #F7F5F0; --panel-3: #F0ECE3; --box-bg: #fff; --ink: #000;
    --shadow: none;
    --src-ink: #5F6964;
  }
  html, body { background: #fff !important; background-image: none !important; color: #000; }
  .site-header, .site-footer, nav.sb-speed, .speed, .sb-jacks, .sb-flash, #alertBanner, #tip, .tip, .toast,
  .noprint, .docbar, .sb-qmini, .load-err, .fetch-note { display: none !important; }
  .sb-page { padding: 0; max-width: none; }
  .tablewrap { overflow: visible; }
  tr, .card, .panel, .sb-desk > li, .rule-card { break-inside: avoid; page-break-inside: avoid; }
  .card, .panel, .sb-table, .number-table, .adm-table, .sr-table, .sb-flash, .override-box, .rule-card {
    box-shadow: none !important; }
  .card::before, .card::after { display: none; }
  a { color: inherit; text-decoration: none; }
  .sb-btn, .sb-btn-2, .sb-btn-danger, button.primary, button.copy { box-shadow: none; }
}
