:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --ink: #17202a;
  --muted: #55606b;
  --line: #e3e6ea;
  --line-strong: #cbd1d8; /* the edge of a white track or swatch on a white or off-white ground */
  --code-bg: #f4f6f8;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 2px 8px rgba(16, 24, 40, .04);
  --ack: #14774a;
  --read: #c98a0b;
  --delivered: #4a6f94;
  --sent: #a9b8c8;
  --unreachable: #a8392b;
  --notstarted: #ffffff;
  --focus: #0b57d0;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --bg: #0f1419; --surface: #182029; --ink: #eef1f4; --muted: #a6b0ba; --line: #2a343f; --line-strong: #404c59; --code-bg: #121920; --shadow: 0 1px 2px rgba(0, 0, 0, .3); --notstarted: #182029; --sent: #6f8398; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 "Inter", system-ui, -apple-system, "Segoe UI", sans-serif; padding-bottom: 56px; }
header.top { display: flex; align-items: center; gap: 24px; padding: 14px 32px; border-bottom: 1px solid var(--line); background: var(--surface); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: .01em; }
.mark { width: 14px; height: 14px; border-radius: 3px; background: var(--ack); display: inline-block; }
.notice-title { color: var(--muted); flex: 1; }
.top-right { display: flex; align-items: center; gap: 14px; }
.chip { border: 1px solid var(--line); border-radius: 999px; padding: 3px 12px; font-size: 14px; color: var(--muted); }
.chip.running { color: var(--delivered); border-color: var(--delivered); }
.chip.closed { color: var(--ack); border-color: var(--ack); }
button.primary { background: var(--ink); color: var(--bg); border: 0; border-radius: 8px; padding: 9px 20px; font: inherit; font-weight: 600; cursor: pointer; }
button.primary:disabled { opacity: .5; cursor: default; }
button:focus-visible, a:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.banner { margin: 0; padding: 10px 32px; background: #fdecea; color: #7a1f14; border-bottom: 1px solid #f3c1bb; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .banner { background: #3a1c18; color: #f6c9c3; border-color: #5a2a24; } }
main { max-width: 1280px; margin: 0 auto; padding: 28px 32px 0; }
.hero { margin-bottom: 28px; }
.bar-label { font-size: 52px; line-height: 1; font-weight: 300; letter-spacing: -.02em; margin: 0 0 14px; font-variant-numeric: tabular-nums; } /* one element, so the whole line is styled together */
.bar-count { margin: -6px 0 12px; font-size: 20px; color: var(--muted); font-variant-numeric: tabular-nums; }
.bar-count.pulse { animation: pulse 1.2s ease; color: var(--ack); font-weight: 700; }
@keyframes pulse { 0% { transform: scale(1.12); } 100% { transform: none; } }
.bar { display: flex; height: 64px; border: 1px solid var(--line-strong); border-radius: 12px; overflow: hidden; background: var(--notstarted); }
.seg { height: 100%; transition: width .5s ease; min-width: 8px; } /* one recipient must stay visible on a 2,000 recipient bar */
.seg.acknowledged { background: var(--ack); }
.seg.read { background: var(--read); }
.seg.delivered { background: var(--delivered); }
.seg.sent { background: var(--sent); }
.seg.unreachable { background: repeating-linear-gradient(45deg, var(--unreachable), var(--unreachable) 6px, #c9645a 6px, #c9645a 12px); }
.seg.not_started { background: var(--notstarted); }
.legend { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 26px; padding: 0; margin: 14px 0 0; color: var(--ink); }
.legend li { display: flex; align-items: center; gap: 8px; font-variant-numeric: tabular-nums; }
.swatch { width: 14px; height: 14px; border-radius: 4px; border: 1px solid var(--line-strong); display: inline-block; }
.swatch.acknowledged { background: var(--ack); } .swatch.read { background: var(--read); } .swatch.delivered { background: var(--delivered); }
.swatch.sent { background: var(--sent); } .swatch.not_started { background: var(--notstarted); }
.swatch.unreachable { background: repeating-linear-gradient(45deg, var(--unreachable), var(--unreachable) 3px, #c9645a 3px, #c9645a 6px); }
.empty { font-size: 20px; color: var(--muted); margin: 14px 0 0; }
.layout { display: grid; grid-template-columns: 42fr 58fr; gap: 24px; align-items: start; margin-bottom: 24px; }
.col-side { display: flex; flex-direction: column; gap: 24px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 20px 24px; box-shadow: var(--shadow); }
.layout > *, .col-side > *, .report-cols > * { min-width: 0; } /* a wide raw JSON block must scroll inside its panel, not widen the page at phone width */
h2 { font-size: 18px; margin: 0 0 4px; }
h3 { font-size: 15px; margin: 18px 0 6px; color: var(--muted); font-weight: 600; }
.hint { color: var(--muted); font-size: 14px; margin: 0 0 14px; }
.chan { margin-bottom: 14px; }
.chan-name { display: flex; justify-content: space-between; font-weight: 600; }
.chan-bars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 6px; }
.chan-cell { font-size: 13px; color: var(--muted); }
.chan-cell b { display: block; font-size: 20px; color: var(--ink); font-variant-numeric: tabular-nums; }
.chan-cell .meter { height: 6px; background: var(--line); border-radius: 3px; margin-top: 4px; overflow: hidden; }
.chan-cell .meter i { display: block; height: 100%; background: var(--delivered); }
.chan-cell.ack .meter i { background: var(--ack); }
.chan-cell.read .meter i { background: var(--read); }
.device { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 12px; }
.device-head { display: flex; justify-content: space-between; align-items: center; }
.device-name { font-weight: 600; }
.state { font-size: 14px; font-weight: 600; padding: 2px 10px; border-radius: 999px; border: 1px solid currentColor; }
.state.acknowledged { color: var(--ack); } .state.read { color: var(--read); } .state.delivered { color: var(--delivered); }
.state.sent, .state.none, .state.not_started { color: var(--muted); } .state.unreachable { color: var(--unreachable); }
.events { list-style: none; margin: 10px 0 0; padding: 0; }
.events li { display: grid; grid-template-columns: 78px 1fr; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line); font-size: 14px; line-height: 20px; } /* read on camera at 80 % zoom: sizes as before, line-height trimmed to keep the row height */
.events .when { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.events .what b { font-weight: 500; }
.events .what small { color: var(--muted); display: block; font-size: 12px; line-height: 16px; word-break: break-all; }
details.raw { margin-top: 4px; }
details.raw summary { cursor: pointer; color: var(--muted); font-size: 12px; transition: color .2s ease; }
details.raw summary:hover { color: var(--ink); }
pre.json { margin: 6px 0 0; padding: 12px 14px; background: var(--code-bg); border: 1px solid var(--line); border-radius: 8px; color: var(--ink); font: 12px/1.45 ui-monospace, "SF Mono", Menlo, monospace; overflow: auto; max-height: 220px; }
.slide { animation: slidein .35s ease; }
@keyframes slidein { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .slide, .bar-count.pulse { animation: none; } .seg { transition: none; } }
.report-head { display: flex; justify-content: space-between; align-items: baseline; }
.headline { font-size: 26px; font-weight: 700; margin: 6px 0 2px; font-variant-numeric: tabular-nums; }
.breakdown { color: var(--muted); margin: 0 0 8px; }
.report-cols { display: grid; grid-template-columns: 1fr; gap: 0; } /* the report sits in the narrow column, so its two halves stack */
.exc-scroll { max-height: 224px; overflow: auto; } /* about six rows; the "more" line below stays in view */
table.exceptions { width: 100%; border-collapse: collapse; font-size: 14px; }
table.exceptions th { position: sticky; top: 0; background: var(--surface); text-align: left; color: var(--muted); font-weight: 600; border-bottom: 1px solid var(--line); padding: 4px 8px 6px 0; }
table.exceptions td { padding: 5px 8px 5px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.reasons, .themes { margin: 0; padding-left: 18px; }
.more { color: var(--muted); font-size: 14px; margin: 8px 0 0; }
.last-line { font-size: 22px; font-weight: 700; margin: 18px 0 0; border-top: 2px solid var(--ink); padding-top: 12px; }
footer.honesty { position: fixed; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; padding: 12px 32px; background: var(--ink); color: var(--bg); font-size: 15px; font-variant-numeric: tabular-nums; }
.brand-foot { opacity: .7; letter-spacing: .08em; }
@media (max-width: 900px) { .layout { grid-template-columns: 1fr; } .col-side { display: contents; } .col-side > * { order: 1; } /* phone order: hero, Live devices, By channel, Reach report, Notice text */ .bar-label { font-size: 30px; line-height: 1.15; } header.top { flex-wrap: wrap; padding: 12px 16px; } main { padding: 20px 16px 0; } footer.honesty { padding: 10px 16px; font-size: 13px; } }

/* Rule clock on a live device card and the notice text panel.
   New elements only: square corners, hairline rules, no shadows, one moving element per block, tier colours untouched. */
.clock-label, .text-seg, .text-more summary { font-size: 12px; line-height: 16px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0; }
.clock { margin: 12px 0 4px; padding-top: 12px; border-top: 1px solid var(--line); }
.clock-row { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-top: 4px; }
.clock-num { font-size: 48px; line-height: 56px; font-weight: 300; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.clock-due { font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; text-align: right; }
.clock-track { height: 2px; margin-top: 8px; background: var(--line); overflow: hidden; }
.clock-track i { display: block; width: 0; height: 100%; background: var(--ink); transition: width 1s linear; }
.clock-note { margin: 12px 0 0; min-height: 42px; font-size: 14px; color: var(--muted); } /* two lines reserved: the copy changes at zero and must not move the card */
.clock.sending .clock-track i { width: 28%; transition: none; animation: clock-sweep 4s linear infinite; }
.clock.late .clock-track i { width: 100%; background: var(--muted); }
.clock.paused { opacity: .5; }
.clock.paused .clock-track i { animation: none; }
.chip-status { display: inline-block; margin-left: 8px; padding: 1px 8px; border: 1px solid var(--ink); color: var(--ink); font-size: 12px; line-height: 16px; letter-spacing: .08em; text-transform: uppercase; }
@keyframes clock-sweep { from { transform: translateX(-100%); } to { transform: translateX(360%); } }

.texts { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 20px 24px; box-shadow: var(--shadow); }
.texts-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 16px; }
.texts-head h2 { white-space: nowrap; }
.texts-body { display: grid; grid-template-columns: 1fr; gap: 20px; margin-top: 16px; } /* consumer above dealer */
.texts-body > * { animation: texts-in .8s cubic-bezier(.19, 1, .22, 1); }
@keyframes texts-in { from { opacity: 0; } to { opacity: 1; } }
.texts-empty { margin: 0; max-width: 60ch; color: var(--muted); }
.text-col + .text-col { padding-top: 20px; border-top: 1px solid var(--line); }
.text-title { margin: 8px 0 4px; font-size: 24px; line-height: 32px; font-weight: 300; }
.text-body { margin: 0; max-width: 60ch; font-size: 16px; }
.stamp { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin: 12px 0 0; font-size: 12px; line-height: 16px; font-variant-numeric: tabular-nums; }
.stamp-verdict { padding: 4px 8px; border: 1px solid var(--ink); letter-spacing: .08em; text-transform: uppercase; }
.stamp.fail .stamp-verdict { background: var(--ink); color: var(--bg); }
.text-source { margin: 8px 0 0; font-size: 13px; color: var(--muted); }
.text-more { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.text-more summary { cursor: pointer; transition: color .3s ease; }
.text-more summary:hover { color: var(--ink); }
.text-more summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.text-more .text-item { margin-top: 16px; }
.text-item .text-seg { margin-bottom: 4px; }
@media (prefers-reduced-motion: reduce) {
  .texts-body > *, .clock.sending .clock-track i { animation: none; }
  .clock-track i { transition: none; }
  .clock.sending .clock-track i { width: 100%; opacity: .35; }
}
@media (max-width: 900px) {
  .texts-body { grid-template-columns: 1fr; }
  .text-col + .text-col { padding-left: 0; border-left: 0; }
  .clock-num { font-size: 40px; }
}
