/* craigh.com.au — shared styling.
   Lives at the site root and is linked with an ABSOLUTE path (/style.css)
   from every page. Relative paths broke once already: a page served at
   /bc/admin* resolved bc/style.css to /bc/bc/style.css and arrived unstyled. */

:root {
  --bg: #fbfaf8;
  --bg-tint: #f4f2ee;
  --surface: #ffffff;
  --border: #e6e3dd;
  --border-soft: #efece7;
  --text: #171614;
  --muted: #6b675f;
  --faint: #9a958c;
  --accent: #2f5d50;
  --accent-soft: #e8f0ed;
  --accent-text: #ffffff;
  --error: #9b2c2c;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(23, 22, 20, .04);
  --shadow: 0 1px 2px rgba(23, 22, 20, .04), 0 12px 32px rgba(23, 22, 20, .06);
  --shadow-lift: 0 2px 4px rgba(23, 22, 20, .05), 0 20px 48px rgba(23, 22, 20, .10);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #131416;
    --bg-tint: #191b1e;
    --surface: #1d1f23;
    --border: #2f333a;
    --border-soft: #25282d;
    --text: #edebe8;
    --muted: #9c978f;
    --faint: #6d6963;
    --accent: #74b4a1;
    --accent-soft: #1d2b28;
    --accent-text: #0d1a17;
    --error: #ef938f;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .35);
    --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 12px 32px rgba(0, 0, 0, .3);
    --shadow-lift: 0 2px 4px rgba(0, 0, 0, .4), 0 20px 48px rgba(0, 0, 0, .45);
  }
}

:root[data-theme="dark"] {
  --bg: #131416;
  --bg-tint: #191b1e;
  --surface: #1d1f23;
  --border: #2f333a;
  --border-soft: #25282d;
  --text: #edebe8;
  --muted: #9c978f;
  --faint: #6d6963;
  --accent: #74b4a1;
  --accent-soft: #1d2b28;
  --accent-text: #0d1a17;
  --error: #ef938f;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ── header ─────────────────────────────────────────────────────────── */

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border-soft);
}

.home {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 12px 6px 9px;
  margin-left: -9px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--text);
  text-decoration: none;
  transition: background .12s;
}

.home:hover { background: var(--bg-tint); }
.home svg { flex: none; opacity: .55; }
.home span { color: var(--faint); font-weight: 400; }

.topbar nav { display: flex; align-items: center; gap: 2px; }

.topbar nav a {
  padding: 6px 12px;
  border-radius: 9px;
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
  transition: background .12s, color .12s;
}

.topbar nav a:hover { background: var(--bg-tint); color: var(--text); }
.topbar nav a.here { color: var(--text); font-weight: 500; }

/* ── layout ─────────────────────────────────────────────────────────── */

main {
  flex: 1;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 64px 20px 72px;
}

main.centred {
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 460px;
}

.lede { margin-bottom: 44px; }

.lede h1 {
  margin: 0 0 10px;
  font-size: clamp(30px, 6vw, 40px);
  font-weight: 640;
  letter-spacing: -.035em;
  line-height: 1.12;
}

.lede p {
  margin: 0;
  max-width: 46ch;
  font-size: 17px;
  color: var(--muted);
}

/* ── gates: the big choices on the home page ────────────────────────── */

.gates { display: grid; gap: 14px; }

@media (min-width: 620px) {
  .gates { grid-template-columns: 1fr 1fr; }
}

.gate {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 190px;
  padding: 26px 24px 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  color: var(--text);
  text-decoration: none;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.gate:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
  box-shadow: var(--shadow-lift);
}

.gate .mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-bottom: 18px;
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent);
}

.gate h2 {
  margin: 0 0 6px;
  font-size: 21px;
  font-weight: 620;
  letter-spacing: -.02em;
}

.gate p {
  margin: 0;
  font-size: 14.5px;
  color: var(--muted);
}

.gate .go {
  margin-top: auto;
  padding-top: 18px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--accent);
}

.gate .go::after { content: " →"; }

.gate[aria-disabled="true"] {
  cursor: default;
  opacity: .62;
}

.gate[aria-disabled="true"]:hover {
  transform: none;
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.gate[aria-disabled="true"] .go { color: var(--faint); }
.gate[aria-disabled="true"] .go::after { content: ""; }

/* ── cards ──────────────────────────────────────────────────────────── */

.card {
  width: 100%;
  padding: 36px 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.card h1 {
  margin: 0 0 8px;
  font-size: 25px;
  font-weight: 630;
  letter-spacing: -.025em;
}

.sub { margin: 0 0 28px; color: var(--muted); font-size: 15px; }
.sub:last-child { margin-bottom: 0; }

/* ── actions ────────────────────────────────────────────────────────── */

.actions { display: flex; flex-direction: column; gap: 10px; }

a.btn, button {
  display: block;
  width: 100%;
  padding: 13px 18px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: border-color .12s, opacity .12s, background .12s;
}

a.btn:hover, button:hover { border-color: var(--faint); background: var(--bg-tint); }

.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-text);
}

.primary:hover { opacity: .92; background: var(--accent); border-color: var(--accent); }
button:disabled { opacity: .5; cursor: default; }

/* ── identity strip ─────────────────────────────────────────────────── */

.who {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 26px;
  padding: 11px 14px;
  border: 1px solid var(--border-soft);
  border-radius: 11px;
  background: var(--bg-tint);
  font-size: 13px;
  color: var(--muted);
}

.who b { font-weight: 500; color: var(--text); }
.who .dot {
  display: inline-block;
  width: 7px; height: 7px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--accent);
  vertical-align: 1px;
}

.who a {
  flex: none;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
}

.who a:hover { color: var(--text); border-bottom-color: var(--faint); }
.who[hidden] { display: none; }

/* ── forms ──────────────────────────────────────────────────────────── */

label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}

input {
  width: 100%;
  padding: 13px 14px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 16px; /* 16px stops iOS zooming on focus */
}

input:focus {
  outline: 2px solid var(--accent);
  outline-offset: -1px;
  border-color: transparent;
}

.msg { min-height: 22px; margin: 12px 0 0; font-size: 13.5px; color: var(--error); }

/* ── misc ───────────────────────────────────────────────────────────── */

.tag {
  display: inline-block;
  margin-bottom: 18px;
  padding: 4px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--faint);
}

.rule {
  margin: 26px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--border-soft);
  font-size: 13px;
  color: var(--muted);
}

.foot {
  padding: 0 20px 28px;
  text-align: center;
  font-size: 12.5px;
  color: var(--faint);
}

@media (max-width: 440px) {
  main { padding-top: 40px; }
  .card { padding: 28px 22px; }
}

/* ── the checker (/bc/staff) ────────────────────────────────────────── */

main.wide { max-width: none; padding-left: 28px; padding-right: 28px; }
main.wide .lede { margin-bottom: 28px; }
main.wide .lede .tag { margin-bottom: 14px; }

.drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 190px;
  padding: 30px 24px;
  margin: 0;
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--accent);
  text-align: center;
  cursor: pointer;
  transition: border-color .14s, background .14s, transform .14s;
  font-size: inherit;
  font-weight: 400;
}

.drop:hover, .drop.over {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.drop.over { transform: scale(1.005); }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; margin: 0; }
.drop-title { font-size: 16px; font-weight: 500; color: var(--text); }
.drop-hint { font-size: 13px; color: var(--muted); max-width: 46ch; }
.drop.compact { min-height: 0; padding: 16px 20px; flex-direction: row; gap: 14px; }
.drop.compact svg { width: 18px; height: 18px; }
.drop.compact .drop-title { font-size: 14px; }
.drop.compact .drop-hint { display: none; }

kbd {
  display: inline-block;
  padding: 0 6px;
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: var(--bg-tint);
  font: 12px/1.7 ui-monospace, "Cascadia Code", Consolas, monospace;
  color: var(--text);
}

.status { min-height: 24px; margin: 12px 2px 0; font-size: 13.5px; color: var(--muted); }
.status.ok { color: var(--accent); }
.status.bad { color: var(--error); }
.status.warn { color: var(--text); }

.filebar {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 14px;
  margin: 18px 2px 14px;
  font-size: 14px;
  color: var(--muted);
}
.filebar b { font-weight: 500; color: var(--text); }

.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.metric {
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  min-width: 0;
}
.metric span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.metric b {
  display: block;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: help;
}
.metric b.missing { color: var(--faint); font-weight: 400; }
.metric.wide { grid-column: span 2; }
.metric.strong { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
.metric.strong b { color: var(--accent); }

.checks { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 6px; }
.checks li { padding: 9px 14px 9px 34px; border-radius: 10px; font-size: 13.5px; position: relative; background: var(--bg-tint); color: var(--text); }
.checks li::before { content: ""; position: absolute; left: 14px; top: 14px; width: 9px; height: 9px; border-radius: 50%; background: var(--faint); }
.checks li.ok::before { background: var(--accent); }
.checks li.bad { color: var(--error); }
.checks li.bad::before { background: var(--error); }
.checks:empty { display: none; }

.panel {
  margin-bottom: 14px;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.panel h2 { margin: 0; font-size: 17px; font-weight: 620; letter-spacing: -.015em; }
.panel h2 small { margin-left: 8px; font-size: 13px; font-weight: 400; color: var(--muted); }

button.small { width: auto; padding: 7px 13px; font-size: 13px; border-radius: 9px; }

.scroll { overflow-x: auto; margin: 0 -20px; padding: 0 20px; }

table.lines { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.lines th, table.lines td { padding: 8px 10px; border-bottom: 1px solid var(--border-soft); text-align: left; vertical-align: top; }
table.lines th { font-size: 12px; font-weight: 500; color: var(--muted); white-space: nowrap; }
table.lines td { white-space: nowrap; }
table.lines .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.lines .mono { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 12.5px; white-space: nowrap; }
table.lines tbody tr:hover { background: var(--bg-tint); }
table.lines tfoot td { border-bottom: 0; border-top: 1px solid var(--border); font-weight: 500; }
table.lines tr.group td { padding: 12px 10px 5px; font-size: 11.5px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); border-bottom: 0; }
table.lines tr.flag td:first-child { box-shadow: inset 3px 0 0 var(--error); }
table.lines tr.flag td { background: color-mix(in srgb, var(--error) 7%, transparent); }
.hint { margin: 12px 0 0; font-size: 12.5px; color: var(--faint); }

.check { margin: 12px 0 0; font-size: 13.5px; color: var(--muted); min-height: 0; }
.check.ok { color: var(--accent); }
.check.bad { color: var(--error); }
.check:empty { display: none; }

.raw-panel summary { cursor: pointer; font-weight: 500; font-size: 15px; }
.raw-panel summary small { display: block; margin-top: 2px; font-size: 13px; font-weight: 400; color: var(--muted); }
.raw {
  margin: 14px 0 0;
  padding: 14px;
  max-height: 420px;
  overflow: auto;
  border-radius: 10px;
  background: var(--bg);
  border: 1px solid var(--border-soft);
  font: 12px/1.55 ui-monospace, "Cascadia Code", Consolas, monospace;
  color: var(--text);
  white-space: pre;
}

@media (max-width: 440px) {
  .panel { padding: 16px; }
  .scroll { margin: 0 -16px; padding: 0 16px; }
}

/* ── the checker, stage two: document chips and the comparison ───────── */

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; }
.chips[hidden] { display: none; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 8px 7px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  font-size: 13px;
  cursor: pointer;
  transition: border-color .12s, background .12s;
}
.chip:hover { border-color: var(--faint); }
.chip.here { border-color: var(--accent); background: var(--accent-soft); }
.chip b { font-weight: 600; white-space: nowrap; }
.chip small { color: var(--muted); white-space: nowrap; }
.chip.po b::before, .chip.invoice b::before {
  content: "PO"; display: inline-block; margin-right: 7px; padding: 0 5px; border-radius: 5px;
  font-size: 10px; font-weight: 600; letter-spacing: .05em; vertical-align: 1px;
  background: var(--bg-tint); color: var(--muted);
}
.chip.invoice b::before { content: "INV"; }
.chip.po b::before { content: "PO"; }
.chip .x { color: var(--faint); text-decoration: none; font-size: 16px; line-height: 1; padding: 0 4px; }
.chip .x:hover { color: var(--error); }

.metrics.tight { margin-top: 4px; }
.metric.good b { color: var(--accent); }
.metric.warn b { color: var(--error); }

.cmp h2 small { display: block; margin: 4px 0 0; }
table.cmp tr.diff td { background: color-mix(in srgb, var(--error) 8%, transparent); }
table.cmp tr.diff td:first-child { box-shadow: inset 3px 0 0 var(--error); }
table.cmp tr.missing td { background: color-mix(in srgb, var(--error) 8%, transparent); color: var(--muted); }
table.cmp tr.missing td:first-child { box-shadow: inset 3px 0 0 var(--error); color: var(--text); }
table.cmp tr.extra td { background: color-mix(in srgb, var(--error) 8%, transparent); }
table.cmp tr.extra td:first-child { box-shadow: inset 3px 0 0 var(--error); }
table.cmp tr.ok td:last-child { color: var(--faint); }
table.cmp td:last-child { font-size: 12.5px; white-space: nowrap; color: var(--error); }
table.cmp td { white-space: nowrap; }
table.cmp th:nth-child(7), table.cmp td:nth-child(7) { border-left: 1px solid var(--border); }

/* ── the checker, the pair workflow ─────────────────────────────────── */

.setup { display: grid; gap: 14px; }
@media (min-width: 1100px) { .setup { grid-template-columns: 220px 1fr 1.2fr; align-items: start; } }
.step-h { margin: 0 0 12px; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }

.suppliers { display: grid; gap: 6px; }
.supplier {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; padding: 10px 14px; text-align: left; font-size: 14.5px;
}
.supplier.here { border-color: var(--accent); background: var(--accent-soft); color: var(--text); font-weight: 600; }
.supplier.soon { opacity: .55; cursor: default; }
.supplier.soon:hover { border-color: var(--border); background: transparent; }
.supplier small { font-size: 11px; font-weight: 500; letter-spacing: .05em; text-transform: uppercase; color: var(--faint); }

.slots { display: grid; gap: 10px; }
@media (min-width: 620px) { .slots { grid-template-columns: 1fr 1fr; } }
.drop.slot { min-height: 118px; padding: 18px 14px; gap: 5px; }
.drop.slot.filled { border-style: solid; border-color: var(--accent); }
.drop.slot.filled .drop-title { color: var(--accent); }
.drop.slot .drop-title { font-size: 14.5px; }
.drop.slot .drop-hint { font-size: 12.5px; }

.steps { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.step { display: grid; grid-template-columns: 22px 1fr; column-gap: 10px; align-items: baseline; font-size: 14px; }
.step .mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--border);
  font-size: 12px; font-weight: 700; color: var(--accent-text); align-self: start; margin-top: 2px;
}
.step.ok .mark { background: var(--accent); border-color: var(--accent); }
.step.ok .mark::before { content: "✓"; }
.step.bad .mark { background: var(--error); border-color: var(--error); }
.step.bad .mark::before { content: "!"; }
.step-text { font-weight: 500; }
.step.todo .step-text { color: var(--muted); font-weight: 400; }
.step.bad .step-text { color: var(--error); }
.step-detail { grid-column: 2; font-size: 12.5px; color: var(--muted); }

.row { display: flex; gap: 8px; margin-top: 6px; }
.row button { width: auto; padding: 11px 22px; }
.row button[hidden] { display: none; }

.panel-head .sub { margin: 4px 0 0; font-size: 13.5px; }

/* the worksheet */
table.ws td, table.ws th { padding: 7px 10px; white-space: nowrap; }
table.ws tr.po td { border-bottom: 0; font-weight: 500; }
table.ws tr.inv td { padding-top: 2px; padding-bottom: 9px; color: var(--muted); font-size: 12.5px; border-bottom: 1px solid var(--border-soft); }
table.ws tr.po.missing td { border-bottom: 1px solid var(--border-soft); }
table.ws .from {
  display: inline-block; margin-right: 8px; padding: 0 5px; border-radius: 4px;
  font-size: 10px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase;
  background: var(--bg-tint); color: var(--faint); vertical-align: 1px;
}
table.ws td.chg { background: color-mix(in srgb, #e8b400 28%, var(--surface)); color: var(--text); font-weight: 700; border-radius: 4px; }
table.ws td.gst, .metric b.gst { font-weight: 700; color: #b0651b; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) table.ws td.gst, :root:not([data-theme="light"]) .metric b.gst { color: #f0a45a; } }
table.ws tr.missing td, table.ws tr.add td { background: color-mix(in srgb, var(--error) 8%, transparent); }
table.ws tr.missing td:first-child, table.ws tr.add td:first-child { box-shadow: inset 3px 0 0 var(--error); }
table.ws tr.add td { color: var(--text); font-size: 13.5px; padding-top: 7px; padding-bottom: 7px; }
table.ws td.note { color: var(--error); font-size: 12.5px; font-weight: 500; }
table.ws tr.rounding td.note { color: var(--faint); }
table.ws tr.rounding td.chg { background: color-mix(in srgb, #e8b400 12%, var(--surface)); font-weight: 500; }
table.ws td small { display: block; font-size: 11px; color: var(--faint); font-weight: 400; }
table.ws tr.group td { padding-top: 16px; }
.key { padding: 1px 6px; border-radius: 4px; }
.key.chg { background: color-mix(in srgb, #e8b400 28%, var(--surface)); font-weight: 700; }
.key.gst { font-weight: 700; color: #b0651b; }

.metric.wide b { white-space: normal; font-size: 15px; line-height: 1.35; }

/* ── worksheet: each order line and its invoice line as one block ─────── */

table.ws { border-collapse: separate; border-spacing: 0; }
table.ws thead th { background: var(--surface); border-bottom: 1px solid var(--border); }
table.ws tr.po td { border-top: 1px solid var(--border); padding-top: 10px; padding-bottom: 3px; font-size: 14px; }
table.ws tr.inv td { border-bottom: 0; padding-top: 0; padding-bottom: 11px; }
table.ws tr.po.missing td { border-bottom: 0; padding-bottom: 11px; }
table.ws tr.po td:first-child, table.ws tr.inv td:first-child, table.ws tr.add td:first-child { padding-left: 14px; }
table.ws tr.po td:last-child, table.ws tr.inv td:last-child { padding-right: 14px; }

/* a pair with something to change: both rows tinted, an amber bar down the side */
table.ws tr.change td { background: color-mix(in srgb, #e8b400 9%, var(--surface)); }
table.ws tr.change td:first-child { box-shadow: inset 4px 0 0 #d9a400; }
table.ws tr.change.po td { border-top-color: color-mix(in srgb, #d9a400 55%, var(--border)); }
table.ws tr.change.inv td { color: var(--text); }
table.ws tr.rounding td { background: color-mix(in srgb, #e8b400 4%, var(--surface)); }
table.ws tr.rounding td:first-child { box-shadow: inset 4px 0 0 color-mix(in srgb, #d9a400 40%, transparent); }

/* one document only: red bar, both rows */
table.ws tr.missing td, table.ws tr.add td { background: color-mix(in srgb, var(--error) 7%, var(--surface)); }
table.ws tr.missing td:first-child, table.ws tr.add td:first-child { box-shadow: inset 4px 0 0 var(--error); }
table.ws tr.add td { border-top: 1px solid var(--border); }

/* the cell to change stays the strongest thing on the row */
table.ws td.chg { background: #f3d26a; color: #1a1400; font-weight: 700; outline: 2px solid #e2b93b; outline-offset: -2px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) table.ws td.chg { background: #8a6d12; color: #fff6d6; outline-color: #b8921e; } }

/* hover: both rows of the pair */
table.ws tr.hov td { background: color-mix(in srgb, var(--accent) 10%, var(--surface)) !important; }
table.ws tr.hov.change td { background: color-mix(in srgb, #e8b400 22%, var(--surface)) !important; }
table.ws tr.hov td.chg { background: #f3d26a !important; }
table.ws tbody tr:hover { background: transparent; }

table.ws td.note { white-space: nowrap; }
table.ws tr.po td.note { font-size: 13px; }
