/* Showcase Board — "night shift": graphite base, diamond-plate header, condensed caps, burgundy where it means something.
   Light skin = "daylight": cool white panels, same structure. Toggle sets <html data-theme>. Fonts are vendored in /static/fonts. */

@font-face { font-family: "Oswald"; src: url(/static/fonts/oswald-latin-wght-normal.woff2) format("woff2"); font-weight: 200 700; font-display: swap; }
@font-face { font-family: "Plex"; src: url(/static/fonts/ibm-plex-sans-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plex"; src: url(/static/fonts/ibm-plex-sans-latin-500-normal.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Plex"; src: url(/static/fonts/ibm-plex-sans-latin-600-normal.woff2) format("woff2"); font-weight: 600 700; font-display: swap; }
@font-face { font-family: "JBM"; src: url(/static/fonts/jetbrains-mono-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "JBM"; src: url(/static/fonts/jetbrains-mono-latin-600-normal.woff2) format("woff2"); font-weight: 500 700; font-display: swap; }

:root, [data-theme="dark"] {
  --bg: #0d1015;
  --bg-2: #141820;
  --bg-3: #1b2029;
  --bg-4: #232935;
  --panel: linear-gradient(180deg, #161b23 0%, #12161d 100%);
  --panel-edge: #232a35;
  --line: #20262f;
  --line-2: #2e3643;
  --ink: #eef1f5;
  --ink-2: #a8b1bf;
  --ink-3: #6d7887;
  --burgundy: #7a1f2f;
  --burgundy-2: #a3243c;
  --burgundy-3: #e04a64;
  --brand-grad: linear-gradient(135deg, #c22e49 0%, #7a1f2f 100%);
  --head-bg: #10141a;
  --plate: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28'%3E%3Cpath d='M7 3l4 4-4 4-4-4zM21 17l4 4-4 4-4-4z' fill='%23ffffff' fill-opacity='.028'/%3E%3C/svg%3E");
  --ok: #2ec27e;
  --amber: #f3b33d;
  --red: #ff4d61;
  --blue: #4c8dff;
  --steel-c: #8796ab;
  --shadow: 0 1px 0 rgba(255,255,255,.035) inset, 0 18px 40px -24px rgba(0,0,0,.9);
  --grid: rgba(255,255,255,.035);
  --today: rgba(224,74,100,.14);
  --steel: linear-gradient(180deg, #343c49 0%, #262d38 100%);
  --steel-edge: #4a5466; --steel-ink: #c9d1dc; --weekend: rgba(255,255,255,.022);
  --s-paint: #9b6bff;
  --radius: 10px;
  --mono: "JBM", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans: "Plex", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --cond: "Oswald", "Arial Narrow", Impact, sans-serif;
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #eef1f5;
  --bg-2: #ffffff;
  --bg-3: #f3f5f8;
  --bg-4: #e7ebf0;
  --panel: linear-gradient(180deg, #ffffff 0%, #fbfcfd 100%);
  --panel-edge: #dbe1e8;
  --line: #e6eaef;
  --line-2: #d2d9e1;
  --ink: #121722;
  --ink-2: #4a5566;
  --ink-3: #7d8796;
  --burgundy: #7a1f2f;
  --burgundy-2: #9c2238;
  --burgundy-3: #b8293f;
  --head-bg: #141920;
  --ok: #17995b;
  --amber: #c98a0c;
  --red: #dc2d43;
  --blue: #2f6fe0;
  --steel-c: #66758a;
  --shadow: 0 1px 2px rgba(18,23,34,.05), 0 14px 32px -22px rgba(18,23,34,.35);
  --grid: rgba(18,23,34,.04);
  --today: rgba(184,41,63,.08);
  --steel: linear-gradient(180deg, #e3e8ee 0%, #d3dae3 100%);
  --steel-edge: #aab4c2; --steel-ink: #3a4556; --weekend: rgba(18,23,34,.035);
  --s-paint: #7a4fe0;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.45 var(--sans); -webkit-font-smoothing: antialiased; }
body { background-image: radial-gradient(1400px 500px at 15% -20%, rgba(224,74,100,.08), transparent 60%), radial-gradient(1000px 500px at 100% 0%, rgba(76,141,255,.05), transparent 60%); background-attachment: fixed; min-height: 100vh; }
a { color: var(--burgundy-3); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0 0 .5rem; font-family: var(--cond); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
h1 { font-size: 1.55rem; } h2 { font-size: 1rem; letter-spacing: .12em; } h3 { font-size: .9rem; color: var(--ink-2); }
h2 { padding-bottom: .55rem; border-bottom: 1px solid var(--line); }
code, .mono { font-family: var(--mono); font-size: .9em; }
small, .muted { color: var(--ink-3); }
::selection { background: color-mix(in srgb, var(--burgundy-3) 40%, transparent); }

/* ---------- top bar ---------- */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 1.25rem; padding: .7rem 1.5rem;
  background: var(--plate), linear-gradient(180deg, #151a22, var(--head-bg)); border-bottom: 1px solid #222a35;
  box-shadow: 0 10px 30px -18px rgba(0,0,0,.9); flex-wrap: wrap; }
.top .brand { display: flex; align-items: center; gap: .8rem; color: #fff; text-decoration: none; }
.top .brand .mark { width: 42px; height: 42px; border-radius: 10px; background: var(--brand-grad); display: grid; align-content: center; gap: 4px; padding: 0 9px;
  box-shadow: 0 0 0 1px rgba(255,255,255,.12) inset, 0 8px 22px -6px rgba(194,46,73,.65); }
.top .brand .mark i { display: block; height: 4px; border-radius: 2px; background: #fff; }
.top .brand .mark i:nth-child(2) { width: 70%; opacity: .9; } .top .brand .mark i:nth-child(3) { width: 42%; opacity: .8; }
.top .brand .word { display: grid; line-height: 1; }
.top .brand .word b { font-family: var(--cond); font-weight: 700; font-size: 1.55rem; letter-spacing: .05em; }
.top .brand .word em { font-style: normal; font-family: var(--cond); font-size: .66rem; letter-spacing: .42em; color: #9aa6b6; margin-top: 4px; }
.top .brand .stripe { height: 3px; margin-top: 5px; border-radius: 2px; background: linear-gradient(90deg, #c22e49 0 38%, #4c8dff 38% 100%); }
.today-chip { display: grid; line-height: 1.15; padding-left: 1.1rem; border-left: 1px solid #2a323e; }
.today-chip b { font-family: var(--cond); font-weight: 500; letter-spacing: .08em; color: #e6eaf0; text-transform: uppercase; font-size: .95rem; }
.today-chip span { font-size: .72rem; color: #7d8898; letter-spacing: .06em; }
.top nav { flex: 0 1 auto; margin: 0 auto; }
[hidden] { display: none !important; }
.top .who { color: #a8b1bf; font-size: .85rem; display: flex; gap: .55rem; align-items: center; }
.top .me { display: flex; gap: .55rem; align-items: center; line-height: 1.1; margin-right: .3rem; }
.top .me b { display: block; color: #eef1f5; font-weight: 600; } .top .me small { color: #7d8898; text-transform: uppercase; font-size: .66rem; letter-spacing: .12em; }
.top .avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-family: var(--cond); font-weight: 600; color: #fff;
  background: linear-gradient(135deg, #2b3442, #1b212b); border: 1px solid #3a4454; }
.top form { margin: 0; }
.top button { background: #171c24; border: 1px solid #2c3441; color: #d6dce5; font-family: var(--cond); letter-spacing: .1em; text-transform: uppercase; font-size: .78rem; box-shadow: none; }
.top button:hover { background: #202733; border-color: #3c4656; }
.top .theme { font-size: 1rem; line-height: 1; padding: .3rem .55rem; font-family: var(--sans); }

/* install button + steps popover */
.install-wrap { position: relative; }
.top button.install { background: var(--brand-grad); border-color: transparent; color: #fff; box-shadow: 0 6px 16px -8px rgba(194,46,73,.9); }
.top button.install:hover { filter: brightness(1.12); }
.install-help { position: absolute; right: 0; top: calc(100% + 10px); width: 320px; z-index: 30; background: #141820; color: #e6eaf0; border: 1px solid #2c3441;
  border-top: 3px solid #c22e49; border-radius: 10px; padding: .9rem 1rem; box-shadow: 0 24px 50px -20px rgba(0,0,0,.95); font-size: .88rem; line-height: 1.45; }
.install-help > b { font-family: var(--cond); font-weight: 600; letter-spacing: .1em; text-transform: uppercase; font-size: .9rem; }
.install-help ol { margin: .6rem 0; padding-left: 1.2rem; } .install-help li { margin: .3rem 0; }
.install-help small { color: #8c96a5; } .install-help p { color: #a8b1bf; margin: 0 0 .7rem; font-size: .8rem; }

/* segmented control (nav, zoom) */
.seg-group { display: inline-flex; background: rgba(0,0,0,.25); border: 1px solid var(--line-2); border-radius: 8px; padding: 3px; gap: 2px; }
.top .seg-group { border-color: #262e3a; background: rgba(0,0,0,.35); overflow-x: auto; max-width: 100%; }
.seg-group a { font-family: var(--cond); font-weight: 500; text-transform: uppercase; letter-spacing: .12em; font-size: .82rem; color: var(--ink-2);
  padding: .42rem .9rem; border-radius: 6px; white-space: nowrap; transition: background .15s, color .15s; }
.top .seg-group a { color: #aab3c0; }
.seg-group a:hover { text-decoration: none; color: var(--ink); background: rgba(255,255,255,.05); }
.top .seg-group a:hover { color: #fff; }
.seg-group a.active, .seg-group a.on { color: #fff; background: var(--brand-grad); box-shadow: 0 6px 16px -8px rgba(194,46,73,.8), 0 0 0 1px rgba(255,255,255,.08) inset; }
.zoom a { padding: .3rem .65rem; font-size: .75rem; }
[data-theme="light"] .page-head .seg-group { background: var(--bg-4); }

main { padding: 1.4rem 1.5rem 3rem; max-width: 1680px; margin: 0 auto; }
.page-head { display: flex; align-items: center; gap: 1rem; margin: 0 0 1rem; flex-wrap: wrap; }
.page-head h1 { margin: 0; display: flex; align-items: center; gap: .4rem; }
.page-head .spacer { flex: 1; }

/* ---------- buttons & forms ---------- */
button, .btn { background: var(--brand-grad); color: #fff; border: 0; border-radius: 7px; padding: .5rem .95rem; font: 500 .82rem/1.2 var(--cond); letter-spacing: .1em; text-transform: uppercase;
  cursor: pointer; box-shadow: 0 0 0 1px rgba(255,255,255,.08) inset, 0 8px 18px -10px rgba(194,46,73,.9); transition: filter .15s, transform .05s; display: inline-block; }
button:hover, .btn:hover { filter: brightness(1.12); text-decoration: none; }
button:active, .btn:active { transform: translateY(1px); }
button.ghost, .btn.ghost { background: var(--bg-3); border: 1px solid var(--line-2); color: var(--ink-2); box-shadow: none; }
button.ghost:hover, .btn.ghost:hover { border-color: var(--ink-3); color: var(--ink); filter: none; }
button.small, .btn.small { padding: .3rem .65rem; font-size: .74rem; }
button.danger { color: var(--red); border-color: color-mix(in srgb, var(--red) 55%, transparent); background: transparent; }
button.danger:hover { background: color-mix(in srgb, var(--red) 12%, transparent); color: var(--red); }
.row .spacer { flex: 1; }
input, select, textarea { background: var(--bg-3); color: var(--ink); border: 1px solid var(--line-2); border-radius: 7px; padding: .45rem .6rem; font: inherit; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--burgundy-3); box-shadow: 0 0 0 3px color-mix(in srgb, var(--burgundy-3) 25%, transparent); }
input[readonly], textarea[readonly] { opacity: .75; }
input[type=checkbox] { accent-color: var(--burgundy-3); }
label:has(> input[type=checkbox]) { font: 400 .95rem/1.5 var(--sans); letter-spacing: 0; text-transform: none; color: var(--ink); margin: .15rem 0; }
label:has(> input[type=checkbox]) small { font-family: var(--mono); font-size: .75rem; }
label { display: block; font-family: var(--cond); font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); margin-bottom: .3rem; }
.field { margin-bottom: .8rem; }
.row { display: flex; gap: .75rem; flex-wrap: wrap; align-items: flex-end; }
.row .field { margin-bottom: 0; }
form.inline { display: inline; }

/* ---------- panels ---------- */
.panel { background: var(--panel); border: 1px solid var(--panel-edge); border-radius: var(--radius); padding: 1.1rem 1.2rem; margin-bottom: 1rem; box-shadow: var(--shadow); }
.panel h2 { margin-bottom: .85rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 900px) { .grid-2 { grid-template-columns: 1fr; } }

table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: .5rem .55rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-family: var(--cond); color: var(--ink-3); font-weight: 500; font-size: .7rem; text-transform: uppercase; letter-spacing: .14em; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td.num { font-family: var(--mono); font-size: .88em; }
tr:hover td { background: var(--grid); }

.msg { background: color-mix(in srgb, var(--ok) 12%, var(--bg-2)); border: 1px solid color-mix(in srgb, var(--ok) 50%, transparent); border-left: 3px solid var(--ok); color: var(--ink); padding: .65rem .9rem; border-radius: 8px; margin-bottom: 1rem; word-break: break-word; }
.msg.error { background: color-mix(in srgb, var(--red) 10%, var(--bg-2)); border-color: color-mix(in srgb, var(--red) 45%, transparent); border-left-color: var(--red); }

/* ---------- status ---------- */
.dot { display: inline-block; width: .62em; height: .62em; border-radius: 50%; background: var(--ok); vertical-align: middle; margin-right: .35em; box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 18%, transparent); }
.dot.amber { background: var(--amber); box-shadow: 0 0 0 3px color-mix(in srgb, var(--amber) 20%, transparent); }
.dot.red { background: var(--red); box-shadow: 0 0 0 3px color-mix(in srgb, var(--red) 22%, transparent), 0 0 12px var(--red); animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--red) 10%, transparent), 0 0 18px var(--red); } }
@media (prefers-reduced-motion: reduce) { .dot.red { animation: none; } }
.tag { display: inline-block; padding: .08rem .5rem; border-radius: 999px; font-family: var(--cond); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; background: var(--bg-3); color: var(--ink-2); border: 1px solid var(--line-2); }
.tag.red { background: color-mix(in srgb, var(--red) 16%, transparent); color: var(--red); border-color: color-mix(in srgb, var(--red) 45%, transparent); }
.tag.amber { background: color-mix(in srgb, var(--amber) 16%, transparent); color: var(--amber); border-color: color-mix(in srgb, var(--amber) 45%, transparent); }
.tag.ok { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 45%, transparent); }
.tag.done { background: color-mix(in srgb, var(--blue) 16%, transparent); color: var(--blue); border-color: color-mix(in srgb, var(--blue) 45%, transparent); }
.tag.estimated { background: color-mix(in srgb, var(--s-paint) 16%, transparent); color: var(--s-paint); border-color: color-mix(in srgb, var(--s-paint) 45%, transparent); }

/* ---------- KPI strip ---------- */
.kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .9rem; margin-bottom: 1.4rem; }
@media (max-width: 1300px) { .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kpi { --c: var(--steel-c); position: relative; background: var(--panel); border: 1px solid var(--panel-edge); border-radius: var(--radius); padding: 1rem 1.1rem .95rem; box-shadow: var(--shadow); overflow: hidden; min-width: 0; }
.kpi::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--c); box-shadow: 0 0 18px var(--c); }
.kpi::after { content: ""; position: absolute; right: -40px; top: -40px; width: 120px; height: 120px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--c) 16%, transparent), transparent 70%); pointer-events: none; }
.kpi.is-red { --c: var(--red); } .kpi.is-ok { --c: var(--ok); } .kpi.is-amber { --c: var(--amber); } .kpi.is-blue { --c: var(--blue); } .kpi.is-steel { --c: var(--steel-c); }
.kpi label { margin: 0 0 .5rem; color: var(--ink-3); font-size: .7rem; letter-spacing: .18em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi .big { font-family: var(--mono); font-weight: 600; font-size: 2.2rem; line-height: 1; color: var(--c); letter-spacing: -.02em; display: flex; align-items: baseline; gap: .3rem; }
.kpi .big small { font-size: .9rem; color: var(--ink-3); font-weight: 400; letter-spacing: 0; }
.kpi .big small.amber { color: var(--amber); font-size: .78rem; font-family: var(--cond); letter-spacing: .1em; text-transform: uppercase; margin-left: .4rem; }
.kpi.is-blue .big, .kpi.is-steel .big { color: var(--ink); }
.kpi p { margin: .55rem 0 0; font-size: .8rem; color: var(--ink-2); line-height: 1.35; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.kpi p a { color: var(--ink); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--red) 60%, transparent); text-underline-offset: 2px; }
.kpi .meter { height: 5px; border-radius: 3px; background: var(--bg-4); margin-top: .6rem; overflow: hidden; }
.kpi .meter i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, color-mix(in srgb, var(--c) 55%, transparent), var(--c)); }

/* ---------- timeline ---------- */
.tl-wrap { overflow-x: auto; border: 1px solid var(--panel-edge); border-radius: var(--radius); background: var(--bg-2); box-shadow: var(--shadow); }
.tl { display: grid; grid-template-columns: 300px 1fr; min-width: 900px; }
.tl-head { display: contents; }
.tl-head > div { position: sticky; top: 0; background: var(--bg-3); z-index: 2; border-bottom: 1px solid var(--line-2); }
.tl-head .th { font-family: var(--cond); font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); }
.tl-weeks { display: grid; }
.tl-week { padding: .55rem .4rem; font-family: var(--mono); font-size: .7rem; color: var(--ink-3); border-left: 1px solid var(--line); white-space: nowrap; overflow: hidden; }
.tl-week b { font-family: var(--cond); font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.tl-week.today { color: #fff; background: var(--brand-grad); }
.tl-week.today b { color: #fff; }
.tl-row { display: contents; }
.tl-row > div { border-bottom: 1px solid var(--line); }
.tl-row:hover > div { background-color: var(--grid); }
.tl-label { padding: .55rem .75rem; display: flex; gap: .6rem; align-items: center; cursor: grab; background: var(--bg-2); position: sticky; left: 0; z-index: 1; border-right: 1px solid var(--line-2); }
.tl-row:hover .tl-label { background: var(--bg-3); }
.tl-label .rank { width: 1.75rem; height: 1.75rem; border-radius: 7px; background: var(--bg-4); border: 1px solid var(--line-2); display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: .75rem; font-weight: 600; color: var(--ink-2); flex: none; }
.tl-label .dot { flex: none; margin: 0; }
.tl-label .name { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink); font-size: .95rem; }
.tl-label .sub { display: block; font-size: .74rem; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-label .text { min-width: 0; flex: 1; overflow: hidden; }
.tl-lane { position: relative; height: 52px;
  background-image: linear-gradient(90deg, var(--line) 1px, transparent 1px),
                    linear-gradient(90deg, transparent calc(5 / 7 * 100%), var(--weekend) calc(5 / 7 * 100%));
  background-size: calc(var(--day) * 7) 100%; }
.tl.sat .tl-lane { background-image: linear-gradient(90deg, var(--line) 1px, transparent 1px),
                    linear-gradient(90deg, transparent calc(6 / 7 * 100%), var(--weekend) calc(6 / 7 * 100%)); }
.tl-row.dragging > div { opacity: .45; }
.tl-row.over > div { box-shadow: inset 0 3px 0 var(--burgundy-3); }
.today-line { position: absolute; top: 0; bottom: -1px; width: 2px; margin-left: -1px; background: var(--burgundy-3); box-shadow: 0 0 10px var(--burgundy-3); z-index: 3; pointer-events: none; }
.today-line span { position: absolute; top: 2px; left: 5px; font-family: var(--cond); font-size: .6rem; letter-spacing: .16em; text-transform: uppercase; color: var(--burgundy-3); white-space: nowrap; }

/* one bar = the whole time in the shop; segments are the stages, ticks the hand-offs */
.job { position: absolute; top: 13px; height: 26px; border-radius: 7px; background: var(--steel); border: 1px solid var(--steel-edge); overflow: hidden;
  box-shadow: 0 1px 0 rgba(255,255,255,.12) inset, 0 6px 14px -8px rgba(0,0,0,.8); }
.job .seg { position: absolute; top: 0; bottom: 0; container-type: inline-size; }
.job .seg b { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--cond); font-size: .72rem; font-weight: 600; letter-spacing: .08em; color: var(--steel-ink); pointer-events: none; text-shadow: 0 1px 1px rgba(0,0,0,.35); }
@container (max-width: 21px) { .job .seg b { display: none; } }
.job .seg .fill { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(180deg, color-mix(in srgb, var(--blue) 80%, #fff), var(--blue)); }
.job .seg.done .fill { background: linear-gradient(180deg, color-mix(in srgb, var(--ok) 80%, #fff), var(--ok)); }
.job .seg.amber .fill { background: linear-gradient(180deg, color-mix(in srgb, var(--amber) 80%, #fff), var(--amber)); }
.job .seg.red .fill { background: linear-gradient(180deg, color-mix(in srgb, var(--red) 80%, #fff), var(--red)); }
.job .seg:has(.fill) b { color: #fff; }
.job .seg.late_start { background: repeating-linear-gradient(-45deg, transparent 0 4px, color-mix(in srgb, var(--amber) 40%, transparent) 4px 8px); }
.job .seg.red { background: repeating-linear-gradient(-45deg, transparent 0 4px, color-mix(in srgb, var(--red) 38%, transparent) 4px 8px); }
.job .seg.pinned { box-shadow: inset 0 0 0 2px var(--ink); }
.tick { position: absolute; top: 0; bottom: 0; width: 1px; background: color-mix(in srgb, var(--bg) 70%, transparent); pointer-events: none; }
.runway { position: absolute; top: 9px; height: 22px; overflow: hidden; }
.runway::after { content: ""; position: absolute; left: 0; right: 0; bottom: 1px; height: 3px; border-radius: 2px; background: repeating-linear-gradient(90deg, var(--steel-edge) 0 6px, transparent 6px 11px); }
.runway i { position: absolute; left: 4px; right: 2px; top: 0; font-family: var(--cond); font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; font-style: normal; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.runway.late_start::after, .runway.red::after { background: repeating-linear-gradient(90deg, var(--red) 0 6px, transparent 6px 11px); }
.runway.late_start i, .runway.red i { color: var(--red); }
.flag { position: absolute; top: 13px; width: 0; height: 0; border-top: 13px solid transparent; border-bottom: 13px solid transparent; border-left: 10px solid var(--ink-2); filter: drop-shadow(0 2px 4px rgba(0,0,0,.4)); }
.late { position: absolute; top: 16px; font-family: var(--cond); font-size: .72rem; letter-spacing: .08em; font-weight: 600; color: var(--red); white-space: nowrap; padding-left: 7px; }
.due { position: absolute; top: 8px; bottom: 8px; width: 2px; background: var(--red); box-shadow: 0 0 8px color-mix(in srgb, var(--red) 70%, transparent); }
.due i { position: absolute; top: -6px; left: 4px; font-family: var(--cond); font-size: .56rem; letter-spacing: .12em; text-transform: uppercase; font-style: normal; font-weight: 600; color: #fff;
  background: var(--red); padding: 0 4px; border-radius: 3px; line-height: 1.5; }
.legend { display: flex; gap: 1.1rem; flex-wrap: wrap; font-size: .76rem; color: var(--ink-3); margin: .2rem 0 .8rem; align-items: center; }
.legend b { color: var(--ink-2); }
.legend i { display: inline-block; width: 14px; height: 9px; border-radius: 3px; vertical-align: middle; margin-right: .3rem; }
.legend .l-job { background: var(--steel); border: 1px solid var(--steel-edge); }
.legend .l-runway { height: 3px; background: repeating-linear-gradient(90deg, var(--steel-edge) 0 4px, transparent 4px 7px); }
.legend .l-flag { width: 0; height: 0; border-radius: 0; border-top: 6px solid transparent; border-bottom: 6px solid transparent; border-left: 6px solid var(--ink-2); }
.legend .l-due { width: 2px; height: 12px; background: var(--red); border-radius: 0; }
.legend .l-pin { background: transparent; box-shadow: inset 0 0 0 2px var(--ink); }

/* slack chip: days between planned ship and promised ship */
.slack { flex: none; font-family: var(--mono); font-size: .72rem; font-weight: 600; padding: .12rem .4rem; border-radius: 5px; border: 1px solid; line-height: 1.3; }
.slack.ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, transparent); background: color-mix(in srgb, var(--ok) 10%, transparent); }
.slack.thin { color: var(--amber); border-color: color-mix(in srgb, var(--amber) 45%, transparent); background: color-mix(in srgb, var(--amber) 12%, transparent); }
.slack.neg { color: #fff; border-color: var(--red); background: var(--red); box-shadow: 0 0 12px -2px var(--red); }
.slack.none { color: var(--ink-3); border-color: var(--line-2); }
.slack.big { font-size: .85rem; padding: .25rem .6rem; }

/* ---------- load chart ---------- */
.load { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; align-items: end; height: 220px; padding: .5rem 0 0; border-bottom: 1px solid var(--line-2); position: relative;
  background-image: linear-gradient(0deg, var(--line) 1px, transparent 1px); background-size: 100% 25%; }
.load .col { display: flex; flex-direction: column-reverse; height: 100%; justify-content: flex-start; position: relative; }
.load .seg { background: var(--blue); border-top: 1px solid var(--bg-2); min-height: 1px; }
.load .col .seg:last-child { border-radius: 4px 4px 0 0; }
.load .cap { position: absolute; left: 0; right: 0; border-top: 2px dashed var(--amber); z-index: 1; }
.load .cap::after { content: "capacity"; position: absolute; left: 0; top: .25rem; font-family: var(--cond); font-size: .62rem; letter-spacing: .14em; text-transform: uppercase; color: var(--amber); }
.load .col.over { box-shadow: 0 -3px 0 var(--red); border-radius: 4px 4px 0 0; }
.load .col.over::after { content: "over"; position: absolute; top: -1.15rem; left: 0; right: 0; text-align: center; font-family: var(--cond); font-size: .6rem; letter-spacing: .14em; text-transform: uppercase; color: var(--red); }
/* stage colours (load page only; distinct from the status colours) */
:root { --st-cut: #56b4e9; --st-weld: #e8913a; --st-paint: #a77bff; --st-assemble: #2fb8a6; }
[data-theme="light"] { --st-cut: #2b8fd0; --st-weld: #d0731a; --st-paint: #7f52e6; --st-assemble: #13917f; }
.sw-cut { --sc: var(--st-cut); } .sw-weld { --sc: var(--st-weld); } .sw-paint { --sc: var(--st-paint); } .sw-assemble { --sc: var(--st-assemble); }
.load .seg[class*="sw-"] { background: linear-gradient(180deg, color-mix(in srgb, var(--sc) 82%, #fff), var(--sc)); }
.legend i[class*="sw-"], i.sw { background: var(--sc); }
i.sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: .45rem; vertical-align: middle; }
.legend .l-cap { height: 0; border-top: 2px dashed var(--amber); border-radius: 0; }
.kpis-4 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1100px) { .kpis-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kpi.stage-cut { --c: var(--st-cut); } .kpi.stage-weld { --c: var(--st-weld); } .kpi.stage-paint { --c: var(--st-paint); } .kpi.stage-assemble { --c: var(--st-assemble); }
.kpi.is-red { --c: var(--red); }
.heat-wrap { overflow-x: auto; }
.heat td, .heat th { border-bottom: 1px solid var(--line); white-space: nowrap; }
.heat td:first-child { font-weight: 600; position: sticky; left: 0; background: var(--bg-2); }
.heat td:first-child small { font-weight: 400; margin-left: .3rem; }
.heat td.num { min-width: 3.2rem; text-align: center; background: color-mix(in srgb, var(--blue) var(--p), transparent); color: var(--ink); }
.heat td.num.over { background: color-mix(in srgb, var(--red) 70%, transparent); color: #fff; font-weight: 600; }
.heat tr:hover td { filter: brightness(1.15); }
.load-labels { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; font-family: var(--mono); font-size: .68rem; color: var(--ink-3); margin-top: .4rem; }
.load-labels div { text-align: center; }

/* ---------- calendar ---------- */
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal .dow { font-family: var(--cond); font-size: .72rem; color: var(--ink-3); text-align: center; text-transform: uppercase; letter-spacing: .16em; padding-bottom: .2rem; }
.cal .day { background: var(--panel); border: 1px solid var(--panel-edge); border-radius: 8px; min-height: 116px; padding: .35rem .45rem; }
.cal .day.other { opacity: .4; } .cal .day.today { border-color: var(--burgundy-3); box-shadow: 0 0 0 1px var(--burgundy-3) inset, 0 0 22px -8px var(--burgundy-3); }
.cal .day .n { font-family: var(--mono); font-size: .78rem; color: var(--ink-3); }
.cal .day.today .n { color: var(--burgundy-3); font-weight: 600; }
.cal .ev { font-size: .75rem; padding: .15rem .35rem; border-radius: 5px; margin: .2rem 0; background: var(--bg-4); display: flex; gap: .3rem; align-items: center; color: var(--ink); border-left: 3px solid var(--steel-c); }
.cal .ev.ship { background: color-mix(in srgb, var(--red) 14%, var(--bg-3)); border-left-color: var(--red); }
.cal .ev.delivery { background: color-mix(in srgb, var(--ok) 14%, var(--bg-3)); border-left-color: var(--ok); }
.cal .ev.appointment { background: color-mix(in srgb, var(--blue) 14%, var(--bg-3)); border-left-color: var(--blue); }
.cal .ev form { margin-left: auto; }
.cal .ev button { padding: 0 .3rem; font-size: .7rem; line-height: 1.2; background: transparent; color: var(--ink-3); box-shadow: none; }

.stage-table td:first-child { font-weight: 600; }
.behind-banner { background: color-mix(in srgb, var(--red) 12%, var(--bg-2)); border: 1px solid color-mix(in srgb, var(--red) 45%, transparent); border-left: 3px solid var(--red); color: var(--ink); padding: .7rem 1rem; border-radius: 8px; margin-bottom: 1rem; font-weight: 600; }
.behind-banner a { color: var(--ink); text-decoration: underline; }
.login { max-width: 400px; margin: 10vh auto; }
.login .panel { padding: 1.75rem; border-top: 3px solid var(--burgundy-3); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1rem; }
.kv dt { color: var(--ink-3); font-family: var(--cond); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; padding-top: .15rem; } .kv dd { margin: 0; }
details summary { cursor: pointer; color: var(--ink-2); font-family: var(--cond); font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; }

/* phones */
@media (max-width: 760px) {
  .top { padding: .6rem 1rem; gap: .7rem; }
  .today-chip { display: none; }
  .top nav { order: 3; flex-basis: 100%; justify-content: flex-start; }
  .top .me span:last-child { display: none; }
  main { padding: 1rem 1rem 2.5rem; }
  .tl { grid-template-columns: 210px 1fr; }
}

/* ---------- QR sticker (print) ---------- */
.sticker { display: flex; gap: 1.5rem; align-items: center; background: #fff; color: #111; border-radius: 12px; padding: 1.25rem 1.5rem; width: max-content; max-width: 100%; box-shadow: var(--shadow); border: 1px solid var(--panel-edge); }
.sticker .qr svg { display: block; width: 220px; height: 220px; }
.sticker .brandline { font-family: var(--cond); font-size: .7rem; letter-spacing: .3em; color: #7a1f2f; }
.sticker .jobname { font-family: var(--cond); font-weight: 700; font-size: 2rem; letter-spacing: .03em; text-transform: uppercase; line-height: 1.05; margin: .2rem 0; }
.sticker .cust { color: #444; margin-bottom: .5rem; }
.sticker dl { display: grid; grid-template-columns: max-content 1fr; gap: .1rem .8rem; margin: 0 0 .7rem; font-size: .9rem; }
.sticker dt { font-family: var(--cond); letter-spacing: .14em; font-size: .7rem; color: #777; text-transform: uppercase; padding-top: .15rem; }
.sticker dd { margin: 0; }
.sticker .cta { font-family: var(--cond); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; background: #111; color: #fff; padding: .45rem .7rem; border-radius: 6px; font-size: .95rem; }
.sticker .cta span { font-weight: 400; font-size: .72rem; letter-spacing: .16em; color: #bbb; }
@media print {
  .top, .noprint { display: none !important; }
  html, body { background: #fff !important; }
  main { padding: 0; }
  .sticker { box-shadow: none; border: 1px solid #000; }
}

/* ---------- scan page (phone) ---------- */
.scan { max-width: 520px; margin: 0 auto; }
.scan-head { margin: .2rem 0 1rem; }
.scan-head .brandline { font-family: var(--cond); font-size: .68rem; letter-spacing: .3em; color: var(--burgundy-3); }
.scan-head h1 { font-size: 1.9rem; margin: .15rem 0 .2rem; }
.who-in { width: 100%; font-size: 1.05rem; padding: .7rem .8rem; margin-bottom: 1rem; }
.who-in.need { border-color: var(--red); box-shadow: 0 0 0 3px color-mix(in srgb, var(--red) 30%, transparent); }
.scan-stage { background: var(--panel); border: 1px solid var(--panel-edge); border-left: 4px solid var(--line-2); border-radius: 10px; padding: .85rem .95rem; margin-bottom: .7rem; box-shadow: var(--shadow); }
.scan-stage.running { border-left-color: var(--blue); }
.scan-stage.done { border-left-color: var(--ok); opacity: .8; }
.scan-stage .top-line { display: flex; align-items: center; gap: .6rem; margin-bottom: .65rem; }
.scan-stage .top-line b { font-family: var(--cond); font-size: 1.25rem; letter-spacing: .08em; text-transform: uppercase; }
.scan-stage .hrs { margin-left: auto; color: var(--ink-3); font-size: .8rem; }
.scan-form { display: flex; gap: .6rem; align-items: center; }
.scan-form button { padding: .85rem 1rem; font-size: 1rem; }
.scan-form button.go { flex: 1; }
.scan-form button.go.done { background: linear-gradient(135deg, #34c983, #1f8f57); box-shadow: 0 8px 18px -10px rgba(46,194,126,.9); }
.scan-form button.small { padding: .4rem .7rem; font-size: .8rem; margin-left: auto; }

/* PO preview on the new-card form, Rippling status on a card */
.po-next { font-size: 1.15rem; font-weight: 600; padding: .4rem .7rem; border: 1px dashed var(--line-2); border-radius: 7px; color: var(--ink); background: var(--bg-3); }
.rip { margin-top: .8rem; padding: .5rem .7rem; border-radius: 7px; font-size: .85rem; border: 1px solid var(--line-2); border-left: 3px solid var(--steel-c); background: var(--bg-3); }
.rip.ok { border-left-color: var(--ok); } .rip.ok b { color: var(--ok); }
.rip.bad { border-left-color: var(--red); background: color-mix(in srgb, var(--red) 10%, var(--bg-3)); } .rip.bad b { color: var(--red); }

/* new card: Deliver by + live check */
.deliver { display: flex; flex-wrap: wrap; gap: .6rem 1rem; align-items: flex-end; margin-top: .9rem; padding: .9rem 1rem; border: 1px solid var(--line-2); border-radius: 9px; background: var(--bg-3); }
.deliver .field { margin: 0; }
.deliver .weeks { display: flex; gap: .3rem; }
.deliver .check { flex-basis: 100%; font-size: .9rem; padding: .55rem .75rem; border-radius: 7px; border: 1px solid var(--line-2); border-left: 3px solid var(--steel-c); background: var(--bg-2); }
.deliver .check.ok { border-left-color: var(--ok); } .deliver .check.ok b:first-child { color: var(--ok); }
.deliver .check.bad { border-left-color: var(--red); background: color-mix(in srgb, var(--red) 9%, var(--bg-2)); } .deliver .check.bad b:first-child { color: var(--red); }
.deliver .slipline { margin-top: .35rem; font-size: .82rem; color: var(--ink-2); }

/* board dragging */
.tl-label[draggable=true] { cursor: grab; }
.tl-label .rank.pinned { border-color: var(--burgundy-3); color: var(--ink); box-shadow: 0 0 0 1px var(--burgundy-3) inset; }
.tl-label .rank.pinned::after { content: "📌"; position: absolute; font-size: .55rem; transform: translate(.55rem, -.55rem); }
.tl-label .rank { position: relative; }
.tl[data-editable="1"] .job { cursor: grab; touch-action: none; }
.job.moving { cursor: grabbing; box-shadow: 0 0 0 2px var(--burgundy-3), 0 10px 24px -8px rgba(0,0,0,.9); z-index: 4; overflow: visible; }
.job .grip { position: absolute; right: -1px; top: 0; bottom: 0; width: 7px; cursor: ew-resize; z-index: 2; }
.job .grip::after { content: ""; position: absolute; right: 2px; top: 6px; bottom: 6px; width: 2px; border-radius: 1px; background: rgba(255,255,255,.0); }
.job:hover .grip::after { background: rgba(255,255,255,.55); }
.drag-tip { position: absolute; top: -2px; transform: translateX(-50%); z-index: 6; pointer-events: none; font: 600 .7rem var(--mono); color: #fff; background: var(--burgundy-2); padding: .1rem .4rem; border-radius: 4px; white-space: nowrap; }

/* ---------- Help (user manual) ---------- */
.help-q { display: inline-grid; place-items: center; width: 1.35rem; height: 1.35rem; border-radius: 50%; margin-left: .55rem; vertical-align: middle;
  font: 600 .8rem var(--cond); color: var(--ink-3); border: 1px solid var(--line-2); background: var(--bg-3); text-decoration: none; letter-spacing: 0; }
.help-q:hover { color: #fff; background: var(--brand-grad); border-color: transparent; text-decoration: none; }
.help { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 1.6rem; align-items: start; }
.help-side { position: sticky; top: 84px; display: grid; gap: .8rem; max-height: calc(100vh - 100px); overflow: auto; padding-right: .2rem; }
.help-search input { width: 100%; padding: .6rem .75rem; font-size: 1rem; }
.help-search .muted { font-size: .75rem; margin-top: .3rem; min-height: 1em; }
.help-toc { display: grid; gap: 1px; }
.help-toc a { display: flex; gap: .55rem; align-items: baseline; padding: .32rem .5rem; border-radius: 6px; color: var(--ink-2); font-family: var(--cond); font-size: .82rem; letter-spacing: .06em; text-transform: uppercase; text-decoration: none; }
.help-toc a span { font-family: var(--mono); font-size: .72rem; color: var(--ink-3); width: 1.2rem; text-align: right; flex: none; }
.help-toc a:hover { background: var(--bg-3); color: var(--ink); text-decoration: none; }
.help-toc a.on { background: var(--bg-3); color: var(--ink); box-shadow: inset 3px 0 0 var(--burgundy-3); }
.help-toc a.dim { opacity: .35; } .help-toc a.hit { color: var(--ink); }
.help-upd { font-size: .75rem; margin: 0; }
.help-body { max-width: 980px; min-width: 0; }
.help-sec { background: var(--panel); border: 1px solid var(--panel-edge); border-radius: var(--radius); padding: 1.4rem 1.6rem 1.2rem; margin-bottom: 1.2rem; box-shadow: var(--shadow); scroll-margin-top: 84px; }
.help-sec > h1 { display: flex; align-items: center; gap: .8rem; font-size: 1.6rem; margin: 0 0 1rem; padding-bottom: .7rem; border-bottom: 1px solid var(--line-2); }
.help-sec .sec-num { width: 2.2rem; height: 2.2rem; border-radius: 9px; background: var(--brand-grad); color: #fff; display: grid; place-items: center; font-size: 1.15rem; flex: none; }
.help-sec h2 { font-size: .95rem; letter-spacing: .1em; margin: 1.3rem 0 .55rem; border: 0; padding: 0; display: flex; align-items: center; gap: .5rem; }
.help-sec h2::before { content: ""; width: 4px; height: 1rem; border-radius: 2px; background: var(--burgundy-3); }
.help-sec h3 { margin: 1rem 0 .4rem; }
.help-sec p, .help-sec li { line-height: 1.6; }
.help-sec .lead { font-size: 1.05rem; color: var(--ink-2); }
.help-sec table { margin: .5rem 0 1rem; font-size: .9rem; }
.help-sec td.k { font-weight: 600; white-space: nowrap; }
.help-sec .mono-cell { font-family: var(--mono); }
.help .steps { list-style: none; counter-reset: s; padding: 0; margin: .4rem 0 .9rem; }
.help .steps > li { counter-increment: s; position: relative; padding: .2rem 0 .45rem 2.2rem; }
.help .steps > li::before { content: counter(s); position: absolute; left: 0; top: .2rem; width: 1.5rem; height: 1.5rem; border-radius: 50%; background: var(--bg-4); border: 1px solid var(--line-2); color: var(--ink); font: 600 .78rem/1.5rem var(--cond); text-align: center; }
.help .note { border: 1px solid var(--line-2); border-left: 4px solid var(--blue); background: color-mix(in srgb, var(--blue) 8%, var(--bg-2)); border-radius: 8px; padding: .6rem .85rem; margin: .7rem 0; font-size: .9rem; }
.help .note.warn { border-left-color: var(--red); background: color-mix(in srgb, var(--red) 8%, var(--bg-2)); }
.help .note.ok { border-left-color: var(--ok); background: color-mix(in srgb, var(--ok) 8%, var(--bg-2)); }
.help .note > b:first-child { font-family: var(--cond); letter-spacing: .1em; text-transform: uppercase; font-weight: 600; margin-right: .4rem; }
.help figure { margin: .7rem 0 1rem; }
.help figure img { width: 100%; display: block; border-radius: 9px; border: 1px solid var(--line-2); box-shadow: var(--shadow); }
.help figcaption { font-size: .8rem; color: var(--ink-3); margin-top: .35rem; }
.help .two, .help .two-1 { display: grid; gap: 1.2rem; align-items: start; grid-template-columns: 1fr 1fr; }
.help .two-1 { grid-template-columns: 1.35fr 1fr; } .help .narrowfig { grid-template-columns: .8fr 1.2fr; }
.help .phone img { max-width: 230px; margin: 0 auto; border-radius: 22px; border: 6px solid #0b0e13; }
.help .ui { font-family: var(--cond); font-weight: 500; letter-spacing: .08em; text-transform: uppercase; font-size: .82em; background: var(--bg-4); color: var(--ink); border: 1px solid var(--line-2); padding: .05rem .4rem; border-radius: 4px; white-space: nowrap; }
.help .ui.red { background: var(--brand-grad); color: #fff; border-color: transparent; }
.help .chip { font: 600 .78rem var(--mono); padding: .05rem .35rem; border-radius: 4px; border: 1px solid; white-space: nowrap; }
.help .chip.ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 45%, transparent); }
.help .chip.thin { color: var(--amber); border-color: color-mix(in srgb, var(--amber) 45%, transparent); }
.help .chip.neg { color: #fff; background: var(--red); border-color: var(--red); }
.help .sw { display: inline-block; width: 1.4rem; height: .65rem; border-radius: 3px; vertical-align: middle; margin: 0 .25rem; }
.help .flow { display: flex; margin: .6rem 0 .9rem; }
.help .flow div { flex: 1; text-align: center; padding: .55rem .2rem .45rem; color: #fff; font: 600 .82rem var(--cond); letter-spacing: .1em; text-transform: uppercase; margin-right: -6px;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%, 10px 50%); }
.help .flow div:first-child { clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%); }
.help .flow small { display: block; font: 400 .66rem var(--sans); letter-spacing: 0; text-transform: none; opacity: .85; }
.help .kpi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; margin: .5rem 0 1rem; }
.help .kpi-grid div { border: 1px solid var(--line-2); border-top: 3px solid var(--c); border-radius: 7px; padding: .5rem .7rem; font-size: .85rem; background: var(--bg-2); }
.help .kpi-grid b { display: block; font: 600 .82rem var(--cond); letter-spacing: .1em; text-transform: uppercase; }
.help .qr-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; }
.help .qr-grid .card { border: 1px solid var(--line-2); border-radius: 8px; padding: .7rem .9rem; background: var(--bg-2); }
.help .qr-grid .card h3 { margin: 0 0 .35rem; color: var(--ink); }
.help .qr-grid .card ol { margin: 0; padding-left: 1.1rem; font-size: .88rem; }
.help .anatomy { width: 100%; display: block; border-radius: 9px; border: 1px solid var(--line-2); margin: .5rem 0 .8rem; }
.help mark.hit { background: color-mix(in srgb, var(--amber) 55%, transparent); color: var(--ink); border-radius: 2px; padding: 0 1px; }
.help mark.hit.cur { background: var(--amber); color: #111; box-shadow: 0 0 0 2px var(--amber); }
@media (max-width: 900px) {
  .help { grid-template-columns: 1fr; }
  .help-side { position: static; max-height: none; }
  .help-toc { grid-template-columns: 1fr 1fr; }
  .help .two, .help .two-1, .help .narrowfig, .help .kpi-grid, .help .qr-grid { grid-template-columns: 1fr; }
  .help .flow { flex-wrap: wrap; } .help .flow div { flex-basis: 30%; margin-bottom: 4px; }
  .help-sec { padding: 1rem; }
}
.help code { overflow-wrap: anywhere; word-break: break-word; }
.help mark.hit { padding: 0; }
@media (max-width: 900px) {
  .help-sec { scroll-margin-top: 150px; }
  .help-sec td.k { white-space: normal; }
}
