/* theme.css: Cost Movers, "month-end paper ledger".
   Loaded after styles.css, so these rules win. The builder links it and does not edit it; layout
   the builder needs goes in its own rules, never colours, radii, shadows or font sizes.
   Contrast ratios (WCAG 2.x) are worked out beside each colour. Text pairs are all >= 4.5:1;
   bars and borders that carry meaning are >= 3:1. */

/* ------------------------------------------------------------------ tokens */
:root {
  color-scheme: light dark;

  /* Paper and ink */
  --bg: #f6f5f1;            /* warm paper */
  --surface: #ffffff;
  --raised: #fbfaf7;        /* table head, file slots */
  --text: #1b1e21;          /* 16.3:1 on --surface, 15.0:1 on --bg */
  --muted: #565c62;         /* 6.7:1 on --surface, 6.2:1 on --bg */
  --border: #dcd9d0;        /* hairlines only, never text */
  --border-strong: #8f8a80; /* 3.4:1 on --surface: control edges */

  /* Ledger green: the one accent */
  --accent: #1d5c45;        /* white on it 7.9:1; as text on --bg 7.2:1 */
  --accent-hover: #174b38;
  --accent-active: #113a2b;
  --accent-tint: #e6f1ec;   /* --accent on it 6.8:1 */
  --on-accent: #ffffff;

  /* Direction of cost change (the diverging pair; never used for anything else) */
  --up: #b03a1e;            /* cost went up. 6.0:1 on --surface, 5.5:1 on --bg, 5.2:1 on --up-tint */
  --up-tint: #fbebe5;
  --down: #2c5c9e;          /* cost went down. 6.7:1 on --surface, 6.2:1 on --bg, 5.7:1 on --down-tint */
  --down-tint: #e8eef8;
  --zero: #8f8a80;          /* centre line and "no change" ticks, 3.4:1 */

  /* Status */
  --success: #1d5c45;       /* 7.9:1 on white, 6.8:1 on tint */
  --success-tint: #e6f1ec;
  --warning: #8a5a00;       /* 5.9:1 on white, 5.3:1 on tint */
  --warning-tint: #fbf1dc;
  --danger: #a8281b;        /* 7.0:1 on white, 6.0:1 on tint */
  --danger-tint: #fbeae6;

  /* Type */
  --font-ui: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-num: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --t-label: 0.8125rem;     /* 13px caps labels, 700, 0.08em */
  --t-small: 0.9375rem;     /* 15px meta, hints, table cells on phone */
  --t-body: 1.0625rem;      /* 17px */
  --t-lede: 1.25rem;        /* 20px */
  --t-title: 1.625rem;      /* 26px results title */
  --t-hero: 2.25rem;        /* 36px net change figure */

  /* Space */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px;

  /* Shape */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --shadow-1: 0 1px 2px rgb(27 30 33 / 0.06), 0 1px 1px rgb(27 30 33 / 0.04);
  --shadow-2: 0 8px 24px rgb(27 30 33 / 0.10), 0 2px 6px rgb(27 30 33 / 0.06);

  --ease: cubic-bezier(.2, .7, .3, 1);
  --fast: 160ms;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141618;
    --surface: #1c1f22;
    --raised: #24282c;
    --text: #ecebe6;        /* 14.6:1 on --surface */
    --muted: #a9aeb3;       /* 7.4:1 on --surface, 8.2:1 on --bg */
    --border: #343a40;
    --border-strong: #6b737b; /* 3.4:1 on --surface */

    --accent: #6fcf9f;      /* --on-accent on it 8.0:1; as text on --surface 8.7:1 */
    --accent-hover: #86dbb0;
    --accent-active: #5bbd8c;
    --accent-tint: #183229; /* --accent on it 7.6:1 */
    --on-accent: #0b2a1e;

    --up: #ff9a7a;          /* 8.0:1 on --surface, 7.0:1 on --up-tint */
    --up-tint: #3a231c;
    --down: #8db4ff;        /* 8.0:1 on --surface, 6.9:1 on --down-tint */
    --down-tint: #1c2a40;
    --zero: #6b737b;

    --success: #6fcf9f;
    --success-tint: #183229;
    --warning: #e8b44a;     /* 7.9:1 on --surface, 6.9:1 on tint */
    --warning-tint: #362a12;
    --danger: #ff8a7a;      /* 7.2:1 on --surface, 6.3:1 on tint */
    --danger-tint: #3a1f1b;

    --shadow-1: 0 1px 2px rgb(0 0 0 / 0.4);
    --shadow-2: 0 10px 28px rgb(0 0 0 / 0.45), 0 2px 6px rgb(0 0 0 / 0.3);
  }
}

/* ------------------------------------------------------------------ page */
html { background: var(--bg); }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: var(--t-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
header, main, footer { max-width: 60rem; padding-inline: var(--s5); }
header {
  max-width: none;
  padding-block: var(--s3);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--s3);
  min-height: 44px;
  line-height: 1.2;
  font-weight: 750;
  letter-spacing: -0.01em;
  color: var(--text);
}
.brand::before {
  content: "";
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: var(--r-sm);
  background: url("icons/favicon.svg") center / contain no-repeat;
}
header nav a {
  padding-inline: var(--s3);
  border-radius: var(--r-sm);
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  transition: background-color var(--fast) var(--ease), color var(--fast) var(--ease);
}
header nav a:hover { background: var(--raised); color: var(--text); }

main { padding-top: var(--s6); }
main > p, main > ul, main > ol, main > h2, main > h3 { max-width: 68ch; }
h1 {
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0 0 var(--s3);
}
h2 { font-size: 1.375rem; line-height: 1.25; margin: var(--s7) 0 var(--s3); letter-spacing: -0.01em; }
h3 { font-size: var(--t-body); margin: var(--s5) 0 var(--s1); }
.lede { font-size: var(--t-lede); line-height: 1.45; color: var(--muted); max-width: 60ch; margin: 0 0 var(--s6); }
main li { margin-bottom: var(--s2); }
main ol, main ul { padding-left: 1.4em; }
main li::marker { color: var(--muted); font-weight: 700; }

a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
code, .num, .money {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  font-size: 0.94em;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  box-shadow: 0 0 0 5px var(--accent-tint);
  border-radius: var(--r-sm);
}

/* ------------------------------------------------------------------ tool panel */
.tool {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
  padding: var(--s5);
}
.panel-label, .label {
  margin: 0 0 var(--s3);
  font-size: var(--t-label);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Two invoice slots, side by side */
.slots {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s4);
  margin: 0;
}
.slot {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--s2);
  min-height: 11rem;
  padding: var(--s4);
  border: 2px dashed var(--border-strong);
  border-radius: var(--r-md);
  background: var(--raised);
  transition: border-color var(--fast) var(--ease), background-color var(--fast) var(--ease);
}
.slot:focus-within { border-color: var(--accent); }
.slot.over { border-style: solid; border-color: var(--accent); background: var(--accent-tint); }
.slot.over .slot-icon { transform: translateY(-3px); }
.slot.filled { border-style: solid; border-color: var(--border); background: var(--surface); }
.slot.invalid { border-style: solid; border-color: var(--danger); background: var(--danger-tint); }
.slot-head { display: flex; align-items: center; gap: var(--s2); }
.slot-tag {
  display: inline-grid;
  place-items: center;
  min-width: 2.25rem;
  height: 1.5rem;
  padding: 0 var(--s2);
  border-radius: var(--r-sm);
  background: var(--text);
  color: var(--surface);
  font-family: var(--font-num);
  font-size: var(--t-label);
  font-weight: 700;
  letter-spacing: 0.04em;
}
.slot-title { font-weight: 700; }
.slot-icon {
  width: 28px; height: 28px;
  color: var(--muted);
  transition: transform var(--fast) var(--ease);
}
.slot-hint { margin: 0; font-size: var(--t-small); color: var(--muted); }
.slot .btn { margin-top: auto; align-self: flex-start; }
.slot-file {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--s1) var(--s3);
  align-items: center;
}
.file-name {
  font-family: var(--font-num);
  font-size: var(--t-small);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.file-meta { grid-column: 1 / -1; font-size: var(--t-small); color: var(--muted); }
.file-meta .num { color: var(--text); }
.file-input {
  position: absolute;
  width: 1px; height: 1px;
  opacity: 0;
  overflow: hidden;
  clip-path: inset(50%);
}
.slot-error { margin: 0; color: var(--danger); font-size: var(--t-small); font-weight: 600; }

.compare-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s2) var(--s3);
  margin-top: var(--s5);
}
.compare-row .local {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  margin-left: auto;
  font-size: var(--t-small);
  color: var(--muted);
}
.local svg { width: 18px; height: 18px; color: var(--success); }

/* ------------------------------------------------------------------ buttons */
.btn, .actions button, .consent button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  min-height: 44px;
  padding: var(--s2) var(--s4);
  border-radius: var(--r-md);
  border: 1px solid transparent;
  font: inherit;
  font-size: var(--t-body);
  font-weight: 650;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--fast) var(--ease), border-color var(--fast) var(--ease),
    color var(--fast) var(--ease), transform var(--fast) var(--ease);
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:active { transform: translateY(1px); }

.btn.primary, .actions button.primary {
  min-height: 48px;
  padding-inline: var(--s5);
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: var(--shadow-1);
}
#compare { min-width: 13rem; } /* "Compare invoices" and "Comparing…" share one width */
.btn.primary:hover:not(:disabled) { background: var(--accent-hover); }
.btn.primary:active { background: var(--accent-active); }
.btn.primary:disabled, .btn.primary[aria-disabled="true"] {
  background: var(--raised);
  color: var(--muted);
  border-color: var(--border);
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

.btn.secondary, .actions button, .consent button {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-strong);
}
.btn.secondary:hover, .actions button:hover, .consent button:hover { background: var(--raised); border-color: var(--text); }
.btn.secondary:active, .actions button:active { background: var(--border); }

.btn.quiet {
  background: transparent;
  color: var(--accent);
  padding-inline: var(--s3);
}
.btn.quiet:hover { background: var(--accent-tint); }
.btn.quiet:active { background: var(--border); }

/* ------------------------------------------------------------------ status and reserved space */
#status {
  min-height: 1.6em;
  margin: var(--s4) 0 0;
  font-size: var(--t-small);
  font-weight: 600;
  color: var(--muted);
}
#status.error { color: var(--danger); }
#status.ok { color: var(--success); }
#output { min-height: 7rem; margin-top: var(--s3); }

/* Empty */
.empty-state {
  display: flex;
  gap: var(--s4);
  align-items: flex-start;
  padding: var(--s5);
  border: 1px dashed var(--border);
  border-radius: var(--r-md);
  color: var(--muted);
}
.empty-state svg { width: 44px; height: 44px; flex: none; color: var(--zero); }
.empty-state strong { display: block; color: var(--text); margin-bottom: var(--s1); }
.empty-state p { margin: 0; max-width: 60ch; }

/* Working */
.working { padding: var(--s4) 0; }
.progress-text { margin: 0 0 var(--s2); font-size: var(--t-small); color: var(--muted); }
.progress {
  height: 8px;
  border-radius: 999px;
  background: var(--raised);
  border: 1px solid var(--border);
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  width: 100%;
  background: var(--accent);
  transform-origin: left center;
  transform: scaleX(var(--p, 0));
  transition: transform var(--fast) linear;
}

/* Notices */
.notice {
  display: flex;
  gap: var(--s3);
  align-items: flex-start;
  padding: var(--s4) var(--s5);
  border-radius: var(--r-md);
  border: 1px solid;
  border-left-width: 4px;
}
.notice svg { width: 22px; height: 22px; flex: none; margin-top: 2px; }
.notice strong { display: block; margin-bottom: var(--s1); }
.notice p { margin: 0 0 var(--s3); max-width: 62ch; color: var(--text); }
.notice p:last-child { margin-bottom: 0; }
.notice code { background: var(--surface); padding: 1px 5px; border-radius: 4px; border: 1px solid var(--border); }
.notice.error { background: var(--danger-tint); border-color: var(--danger); color: var(--danger); }
.notice.warn { background: var(--warning-tint); border-color: var(--warning); color: var(--warning); }
.notice.ok { background: var(--success-tint); border-color: var(--success); color: var(--success); }

/* ------------------------------------------------------------------ results */
.results { animation: rise 180ms var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.results-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--s3) var(--s5);
  padding-bottom: var(--s4);
  border-bottom: 2px solid var(--text);
}
.results-title { margin: 0; font-size: var(--t-title); line-height: 1.2; letter-spacing: -0.01em; }
.results-title:focus-visible { box-shadow: none; }
.period { margin: var(--s1) 0 0; font-size: var(--t-small); color: var(--muted); }

/* Totals strip: previous, current, net change */
.totals {
  display: grid;
  grid-template-columns: 1fr 1fr 1.4fr;
  gap: 0;
  margin: 0 0 var(--s5);
  border-bottom: 1px solid var(--border);
}
.total { padding: var(--s4) var(--s4) var(--s4) 0; }
.total + .total { padding-left: var(--s4); border-left: 1px solid var(--border); }
.total dt {
  font-size: var(--t-label);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.total dd { margin: var(--s1) 0 0; font-family: var(--font-num); font-variant-numeric: tabular-nums; font-size: var(--t-lede); font-weight: 600; }
.total.net dd { font-size: var(--t-hero); line-height: 1.1; font-weight: 700; letter-spacing: -0.02em; }
.total.net .pct { display: block; margin-top: var(--s1); font-size: var(--t-small); font-weight: 600; }
[data-dir="up"] .delta, .delta[data-dir="up"], .total.net[data-dir="up"] dd { color: var(--up); }
[data-dir="down"] .delta, .delta[data-dir="down"], .total.net[data-dir="down"] dd { color: var(--down); }
[data-dir="flat"] .delta, .delta[data-dir="flat"] { color: var(--muted); }

/* View switch: Customers | Azure subscriptions */
.view-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
  margin-bottom: var(--s3);
}
.segmented {
  display: inline-flex;
  padding: var(--s1);
  gap: var(--s1);
  border-radius: var(--r-md);
  background: var(--raised);
  border: 1px solid var(--border);
}
.segmented button {
  min-height: 40px;
  min-width: 44px;
  padding: var(--s2) var(--s4);
  border: 0;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: var(--t-small);
  font-weight: 650;
  cursor: pointer;
  transition: background-color var(--fast) var(--ease), color var(--fast) var(--ease);
}
.segmented button:hover { color: var(--text); background: var(--surface); }
.segmented button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-1); }
.segmented .count { margin-left: var(--s2); color: var(--muted); font-family: var(--font-num); font-variant-numeric: tabular-nums; font-weight: 500; }
.view-note { margin: 0; font-size: var(--t-small); color: var(--muted); }

/* The movers table */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r-md); }
table.movers {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--t-small);
  background: var(--surface);
}
.movers th, .movers td {
  padding: var(--s3) var(--s3);
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
}
.movers tbody tr:last-child td { border-bottom: 0; }
.movers thead th {
  background: var(--raised);
  font-size: var(--t-label);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  padding-block: 0;
}
.movers th.n, .movers td.n { text-align: right; font-family: var(--font-num); font-variant-numeric: tabular-nums; white-space: nowrap; }
.movers td.rank { width: 2.5rem; color: var(--muted); font-family: var(--font-num); font-variant-numeric: tabular-nums; }
.movers tbody tr { transition: background-color var(--fast) var(--ease); }
.movers tbody tr:hover { background: var(--raised); }
.movers .name { font-weight: 600; max-width: 22rem; overflow-wrap: anywhere; }
.movers .sub { display: block; font-weight: 400; color: var(--muted); font-size: var(--t-label); font-family: var(--font-num); overflow-wrap: anywhere; }

/* Sort buttons inside header cells */
.sort {
  display: inline-flex;
  align-items: center;
  gap: var(--s1);
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
}
.sort:hover { color: var(--text); }
.sort svg { width: 12px; height: 12px; opacity: 0.35; transition: transform var(--fast) var(--ease), opacity var(--fast) var(--ease); }
th[aria-sort] .sort { color: var(--text); }
th[aria-sort] .sort svg { opacity: 1; }
th[aria-sort="ascending"] .sort svg { transform: rotate(180deg); }

/* SIGNATURE: the swing bar. A centre rule; cost up grows right in rust, cost down grows left in
   blue. --w is |change| / largest |change| in the current view, 0..1. */
.swing {
  position: relative;
  width: 100%;
  min-width: 8rem;
  height: 14px;
}
.swing::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -5px;
  bottom: -5px;
  width: 2px;
  margin-left: -1px;
  background: var(--zero);
}
.swing i {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  transform: scaleX(var(--w, 0));
  transition: transform 200ms var(--ease);
}
.swing[data-dir="up"] i { left: 50%; transform-origin: left center; background: var(--up); border-radius: 0 4px 4px 0; }
.swing[data-dir="down"] i { right: 50%; transform-origin: right center; background: var(--down); border-radius: 4px 0 0 4px; }
.swing[data-dir="flat"] i { display: none; }
td.swing-cell { width: 28%; min-width: 9rem; }
.delta { font-weight: 700; }
.delta svg { width: 10px; height: 10px; margin-right: 3px; vertical-align: 0; }

/* New and gone chips */
.chip {
  display: inline-block;
  margin-left: var(--s2);
  padding: 1px var(--s2);
  border-radius: 999px;
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  vertical-align: 1px;
  white-space: nowrap;
}
.chip.new { background: var(--up-tint); color: var(--up); }
.chip.gone { background: var(--down-tint); color: var(--down); }

.table-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--s3);
  margin-top: var(--s3);
  font-size: var(--t-small);
  color: var(--muted);
}
.caveat { margin: var(--s4) 0 0; font-size: var(--t-small); color: var(--muted); max-width: 70ch; }

/* Phone */
@media (max-width: 46rem) {
  header, main, footer { padding-inline: var(--s4); }
  main { padding-top: var(--s5); }
  .tool { padding: var(--s4); border-radius: var(--r-md); }
  .slots { grid-template-columns: 1fr; gap: var(--s3); }
  .slot { min-height: 0; }
  .slot .btn { align-self: stretch; }
  .compare-row .btn.primary { flex: 1 1 100%; }
  .compare-row .local { margin-left: 0; }
  .totals { grid-template-columns: 1fr 1fr; }
  .total.net { grid-column: 1 / -1; order: -1; padding-left: 0; border-left: 0; border-bottom: 1px solid var(--border); }
  .total:nth-child(2) { padding-left: 0; border-left: 0; }
  .segmented { width: 100%; }
  .segmented button {
    flex: 1;
    min-width: max-content;
    white-space: nowrap;
    font-size: var(--t-small);
    padding-inline: var(--s2);
  }
  /* Cards instead of a wide table */
  .table-wrap { border: 0; overflow: visible; }
  table.movers, .movers tbody, .movers tr, .movers td { display: block; width: auto; }
  .movers thead { display: block; }
  .movers thead tr {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 0 var(--s4);
    scrollbar-width: none;
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 0 var(--s3);
    margin-bottom: var(--s3);
    background: var(--raised);
  }
  .movers thead th { display: block; background: none; padding: 0; border: 0; }
  .movers thead th.rank-h, .movers thead th.bar-h { display: none; }
  .movers thead .sort:focus-visible { outline-offset: calc(-1 * var(--s1)); }
  .movers tbody tr {
    display: grid;
    grid-template-columns: 2rem 1fr auto;
    gap: var(--s1) var(--s2);
    padding: var(--s3);
    margin-bottom: var(--s2);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    background: var(--surface);
  }
  .movers td { padding: 0; border: 0; }
  .movers td.rank { grid-row: 1; grid-column: 1; }
  .movers td.name { grid-row: 1; grid-column: 2; }
  .movers td.change { grid-row: 1; grid-column: 3; font-size: var(--t-body); }
  .movers td.swing-cell { grid-row: 2; grid-column: 1 / -1; width: auto; padding-block: var(--s2); }
  .movers td.prev, .movers td.curr, .movers td.pct { grid-row: 3; text-align: left; color: var(--muted); }
  .movers td.prev { grid-column: 1 / 3; }
  .movers td.prev::before { content: "Before "; font-family: var(--font-ui); }
  .movers td.curr { grid-column: 3; text-align: right; }
  .movers td.curr::before { content: "After "; font-family: var(--font-ui); }
  .movers td.pct { display: none; }
  .total.net dd { font-size: 1.875rem; }
}

/* ------------------------------------------------------------------ template parts, restyled */
.drop span { color: var(--text); }
.drop textarea { border-color: var(--border-strong); background: var(--raised); border-radius: var(--r-md); }
.drop.over textarea { background: var(--accent-tint); border-color: var(--accent); }

/* Ad slot: height and containment stay as styles.css sets them. */
.ad-slot { background: var(--raised); border: 1px solid var(--border); }
.ad-label { opacity: 1; color: var(--muted); font-size: var(--t-label); letter-spacing: 0.06em; text-transform: uppercase; font-weight: 700; }
.house-card { background: var(--surface); border: 1px solid var(--border); transition: border-color var(--fast) var(--ease); }
.house-card:hover { border-color: var(--accent); }
.house-card strong { color: var(--accent); }
.house-card span { color: var(--muted); }

.consent { background: var(--surface); color: var(--text); border-color: var(--border); box-shadow: var(--shadow-2); border-radius: var(--r-lg); }

footer {
  opacity: 1;
  color: var(--muted);
  font-size: var(--t-small);
  margin-top: var(--s8);
  padding-block: var(--s5) var(--s6);
  border-top: 1px solid var(--border);
}
footer a { color: var(--accent); }

/* ------------------------------------------------------------------ motion off */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .slot.over .slot-icon { transform: none; }
}

/* Forced colours: keep the bars visible */
@media (forced-colors: active) {
  .swing i { background: CanvasText !important; }
  .swing::before { background: GrayText; }
}
