:root {
  --ink: #14212b; --muted: #556270; --line: #d7dde3; --paper: #f6f7f5; --card: #ffffff;
  --accent: #0d6b5f; --accent-soft: #e2f1ee; --warn: #8a5300; --warn-soft: #fbf0dc; --bad: #a3302b; --bad-soft: #fbe7e5;
  font-family: "Source Sans 3", "Segoe UI", system-ui, sans-serif; color: var(--ink); background: var(--paper); line-height: 1.5;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; } /* a component's display rule must never un-hide it */
body { margin: 0; }
a { color: inherit; text-underline-offset: 3px; }
button { font: inherit; min-height: 42px; padding: 8px 16px; border-radius: 6px; border: 1px solid var(--ink); background: var(--ink); color: #fff; cursor: pointer; }
button:hover { background: #26394a; }
button:disabled { opacity: .55; cursor: progress; }
button.secondary { background: transparent; color: var(--ink); border-color: #8b97a3; }
button.secondary:hover { background: #e9edef; }
.text-button { background: none; border: 0; color: var(--accent); min-height: 32px; padding: 4px 0; text-decoration: underline; }
.text-button:hover { background: none; }
:focus-visible { outline: 3px solid #4aa596; outline-offset: 2px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.top { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 20px 5vw; border-bottom: 1px solid var(--line); }
.brand { font-weight: 700; font-size: 22px; letter-spacing: -.02em; text-decoration: none; }
.tag { margin: 0; font-size: 14px; color: var(--muted); }
main { max-width: 1180px; margin: 0 auto; padding: 44px 5vw 64px; }
h1 { font-size: clamp(32px, 4.4vw, 54px); line-height: 1.06; letter-spacing: -.03em; margin: 0 0 16px; font-weight: 650; }
h2 { font-size: 20px; margin: 0 0 12px; letter-spacing: -.01em; }
h3 { font-size: 16px; margin: 0 0 6px; }
.intro p { max-width: 720px; font-size: 18px; color: var(--muted); margin: 0; }
.eyebrow { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }

.sites { margin: 40px 0 32px; }
.site-row { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 0.8fr 1fr 1fr; gap: 14px; }
.site { position: relative; display: grid; align-content: start; gap: 6px; padding: 16px 16px 18px; background: var(--card); border: 1px solid var(--line); border-radius: 8px; }

.site.you { background: #edf1f0; }
.site-kind { font-size: 12px; color: var(--muted); }
.site b { font-size: 17px; }
.site-note { font-size: 13px; color: var(--muted); }
.rules { list-style: none; padding: 0; margin: 4px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.rules li { font-size: 13px; padding: 3px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.pin { font-family: ui-monospace, Consolas, monospace; font-size: 12px; color: #46525e; overflow-wrap: anywhere; }
.pill { justify-self: start; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 4px; background: #e9edef; color: var(--muted); }
.pill[data-tone=ok] { background: var(--accent-soft); color: var(--accent); }
.pill[data-tone=bad] { background: var(--bad-soft); color: var(--bad); }

.ask { padding: 24px; background: var(--card); border: 1px solid var(--line); border-radius: 8px; }
.question select { width: 100%; min-height: 46px; font: inherit; font-size: 17px; padding: 8px 10px; border: 1px solid #9aa6b1; border-radius: 6px; background: #fff; color: var(--ink); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 14px; }
.settings { flex-basis: 100%; font-size: 14px; }
.settings summary { cursor: pointer; color: var(--muted); min-height: 32px; padding-top: 6px; }
.settings label { display: grid; gap: 4px; margin-top: 10px; font-size: 13px; color: var(--muted); }
.settings input { font: inherit; padding: 8px; border: 1px solid #9aa6b1; border-radius: 4px; max-width: 520px; }
.status { font-size: 14px; color: var(--muted); margin: 12px 0 0; }
.status[data-tone=ok], .check[data-tone=ok] { color: var(--accent); }
.status[data-tone=bad], .check[data-tone=bad] { color: var(--bad); }

.results { display: grid; grid-template-columns: minmax(0, 1fr); gap: 34px; margin-top: 34px; }
.results > * { min-width: 0; }
.answer { font-size: 19px; line-height: 1.6; max-width: 820px; margin: 0; white-space: pre-line; } /* keep the model's own line breaks */
.answer.folded { max-height: 15em; overflow: hidden; -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
.num { font-variant-numeric: tabular-nums; padding: 0 1px; border-radius: 3px; }
.num.ok { color: var(--accent); font-weight: 600; }
.num.bad { background: var(--bad-soft); color: var(--bad); font-weight: 700; text-decoration: underline wavy; padding: 1px 4px; box-shadow: 0 0 0 1px #e0a39e; }
.legend { font-size: 13px; color: var(--muted); margin: 10px 0 0; }
.check { font-size: 14px; font-weight: 600; margin: 6px 0 0; }
.attribution { font-size: 13px; color: var(--ink); margin: 10px 0 0; max-width: 820px; }
.attribution::before { content: "Required by the publisher’s terms · "; color: var(--muted); }

.released-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.release { padding: 16px; background: var(--card); border: 1px solid var(--line); border-radius: 8px; }
.release[data-tone=bad] { border-color: #e2b5b1; background: #fffafa; }
.plan { font-family: ui-monospace, Consolas, monospace; font-size: 13px; color: var(--ink); margin: 0 0 10px; overflow-wrap: anywhere; }
.stats { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; margin: 0; font-size: 14px; }
.stats dd { margin: 0; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.refused { color: var(--bad); font-weight: 700; margin: 0 0 4px; }
.refused-attempt { font-size: 13px; color: var(--bad); background: var(--bad-soft); padding: 6px 10px; border-radius: 4px; margin: 0 0 8px; }
.problem { margin: 2px 0; font-size: 14px; }
.muted { color: var(--muted); }

.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.section-head p { margin: 0; font-size: 13px; color: var(--muted); }
.section-head p[data-tone=warn] { color: var(--warn); background: var(--warn-soft); padding: 8px 12px; border-radius: 6px; max-width: 640px; }
.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: 8px; max-width: 920px; } /* a shorter scan from district to status */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); background: #f9faf9; }
th small { display: block; font-weight: 400; }
td { padding: 9px 12px; border-bottom: 1px solid #eef1f3; vertical-align: top; }
.num-cell { font-variant-numeric: tabular-nums; }
.trace-link { min-height: 30px; padding: 4px 10px; background: transparent; color: var(--accent); border: 1px dashed #8fc3ba; font-weight: 600; font-variant-numeric: tabular-nums; }
.trace-link:hover { background: var(--accent-soft); }
td.blocked { color: var(--warn); font-size: 13px; }
td.okay { color: var(--accent); font-size: 13px; }

.trace { margin-top: 18px; padding: 18px 20px; background: #102027; color: #e8eef0; border-radius: 8px; }
.trace-head { display: flex; justify-content: space-between; align-items: center; }
.trace h2 { color: #fff; margin: 0; }
.trace .text-button { color: #9fd6cc; }
.trace dl { display: grid; grid-template-columns: 160px 1fr; gap: 6px 14px; margin: 14px 0; font-size: 14px; }
.trace dt { color: #9fb1b8; }
.trace dd { margin: 0; font-family: ui-monospace, Consolas, monospace; font-size: 13px; overflow-wrap: anywhere; }
.trace button.secondary { color: #fff; border-color: #6d8791; }
.trace button.secondary:hover { background: #1d3540; }
.trace .status { color: #c5d3d8; }
.trace .status[data-tone=ok] { color: #8fe3cf; }
.trace .status[data-tone=bad] { color: #ffb4ab; }

.receipt-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin-top: 16px; }
.receipt-row .status { margin: 0; }
.check-receipt { margin-top: 56px; padding: 24px; background: var(--card); border: 1px solid var(--line); border-radius: 8px; }
.file-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 14px; cursor: pointer; }
.file-button { display: inline-flex; align-items: center; min-height: 42px; padding: 8px 16px; border-radius: 6px; border: 1px solid #8b97a3; color: var(--ink); }
.file-pick:hover .file-button { background: #e9edef; }
.file-pick:focus-within .file-button { outline: 3px solid #4aa596; outline-offset: 2px; }
.receipt-result { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 6px; font-size: 14px; }
.receipt-result li { padding: 6px 10px; border-radius: 4px; }
.receipt-result li.ok { background: var(--accent-soft); color: var(--accent); }
.receipt-result li.bad { background: var(--bad-soft); color: var(--bad); }
.how-intro { max-width: 760px; color: var(--muted); margin: 0 0 18px; }
.how { margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--line); }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; counter-reset: step; }
.steps li { display: grid; align-content: start; gap: 4px; counter-increment: step; padding-top: 12px; border-top: 3px solid var(--accent); }
.steps .step-kind { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.steps .step-kind::before { content: counter(step) " · "; }
.steps b { font-size: 15px; line-height: 1.3; }
.steps span:last-child { font-size: 13px; color: var(--muted); }
.fine { font-size: 12px; color: var(--muted); max-width: 860px; margin-top: 22px; }
.log { margin-top: 28px; font-size: 13px; color: var(--muted); }
.log summary { cursor: pointer; min-height: 32px; }
.log ol { padding-left: 18px; }

@media (max-width: 900px) {
  .site-row { grid-template-columns: 1fr; }
  .site + .site::before { content: "↓"; left: 16px; top: -14px; }
  .released-grid { grid-template-columns: 1fr; }
  .section-head { flex-direction: column; gap: 6px; }
  .steps { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  main { padding: 28px 16px 48px; }
  .top { padding: 16px; flex-direction: column; gap: 2px; }
  .ask { padding: 16px; }
  .steps { grid-template-columns: 1fr; }
  .trace dl { grid-template-columns: 1fr; }
  .answer { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }

/* What the publishers' code did in this run, above the answer. */
.governance { margin: 0 0 12px; padding: 10px 12px; border: 1px solid #b9dad4; background: var(--accent-soft); border-radius: 4px; font-size: 14px; }
.governance a { color: var(--accent); font-weight: 600; }
/* Figures in the answer that open a trace, and the figure being traced. */
/* Figures in prose: a dotted underline, so a long answer still reads as text; the box appears on hover or focus. */
button.num.traceable { border: 0; border-bottom: 2px dotted #4f9d8f; border-radius: 0; background: none; padding: 0 1px; font: inherit; font-weight: 600; cursor: pointer; min-height: 0; line-height: inherit; }
button.num.traceable:hover, button.num.traceable:focus-visible { background: var(--accent-soft); border-radius: 3px; }
button.num.traceable.bad { background: var(--bad-soft); color: var(--bad); border-bottom-color: var(--bad); }
.tracing { outline: 2px solid var(--accent); outline-offset: 2px; }
/* The tessera: two halves, the pinned code and the rows, joined when the re-derived fingerprint matches. */
.tessera { display: flex; margin-top: 10px; font: 12px ui-monospace, Consolas, monospace; }
.tessera .half { padding: 8px 12px; border: 1px solid var(--line, #c9d3d0); background: #fff; }
.tessera .code { border-radius: 18px 0 0 18px; margin-right: 10px; }
.tessera .rows { border-radius: 0 18px 18px 0; }
.tessera.joined .half { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.tessera.joined .code { margin-right: 0; border-right: 1px dashed var(--accent); }
.intro p, .how-intro { max-width: 62ch; } /* about 75 characters a line */
.fine { max-width: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px 32px; } /* three short notes, none split */
.fine p { margin: 0; max-width: 62ch; }

.probe { margin-top: 20px; }
.probe .actions { flex-wrap: wrap; }
.rule-note { font-size: 13px; color: var(--muted); margin: 6px 0 8px; max-width: 62ch; }
.probe #probe-plan { margin-top: 14px; }

.edited-banner { margin: 0 0 12px; padding: 10px 12px; border-radius: 4px; background: var(--bad-soft); color: var(--bad); font-weight: 600; font-size: 14px; }
.terms-in-force { font-size: 13px; color: var(--muted); margin: -4px 0 12px; max-width: 80ch; }
.publish-ways { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin: 0 0 22px; }
.publish-ways > div { padding: 14px 16px; background: var(--card); border: 1px solid var(--line); border-radius: 8px; }
.publish-ways h3 { font-size: 15px; margin: 0 0 6px; }
.publish-ways p { font-size: 14px; color: var(--muted); margin: 0; }

/* Released and hidden cells of a week-by-category release. */
.suppression { margin: 10px 0 0; }
.suppression figcaption { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.grid-row { display: grid; grid-template-columns: 3.4em minmax(0, 1fr); align-items: center; gap: 6px; margin-bottom: 3px; }
.grid-label { font: 11px ui-monospace, Consolas, monospace; color: var(--muted); text-align: right; }
.grid-cells { display: grid; grid-template-columns: repeat(52, minmax(0, 1fr)); gap: 1px; }
.cell { aspect-ratio: 1; min-height: 4px; background: #e9ecee; border-radius: 1px; }
.cell.on { background: var(--accent); }
.grid-legend { font-size: 12px; color: var(--muted); margin: 6px 0 0; }

.aligned { margin-top: 14px; }
.aligned .check { margin: 0 0 8px; max-width: 80ch; }
.publish-ways p, .terms-in-force, .aligned .check { max-width: 62ch; }

.aligned .table-wrap { max-height: 380px; overflow-y: auto; } /* forty weeks stay one scroll away, not a page */
.aligned thead th { position: sticky; top: 0; }
.steps li { padding-right: 10px; }
.probe-table { margin-top: 10px; border-collapse: collapse; font-size: 13px; width: auto; }
.probe-table th, .probe-table td { padding: 4px 14px 4px 0; text-align: left; border-bottom: 1px solid var(--line, #e3e6e8); }
.probe-table th { font-weight: 600; color: var(--muted); }
.probe-table td.n, .probe-table th:not(:first-child) { font-variant-numeric: tabular-nums; text-align: right; padding-left: 24px; }
.cell { aspect-ratio: auto; height: 12px; }
.probe button[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.computed-summary { margin: 12px 0 0; padding: 10px 14px; border: 1px solid #b9dad4; border-radius: 6px; background: var(--accent-soft); color: var(--ink); font-size: 16px; font-weight: 500; max-width: 80ch; } /* the comparison the question asks for, computed in code: the answer's lead */
/* The check and its demo on one line; the rules behind it one click away. */
.check-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 16px; margin-top: 10px; }
.check-row .check { margin: 0; }
details.legend { margin: 4px 0 0; }
details.legend summary { cursor: pointer; width: fit-content; }
details.legend p { margin: 4px 0 0; max-width: 80ch; }
button.cell { min-height: 0; padding: 0; border: 0; border-radius: 1px; cursor: pointer; }
button.cell.on:hover, button.cell.on:focus-visible, button.cell.on.tracing { background: var(--ink); outline: 2px solid var(--accent); outline-offset: 1px; }
.offers { margin: 10px 0 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); font-size: 13px; }
/* The two checks that need no model sit side by side, below the answer, as tools rather than the page's main story. */
.no-model { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 0 28px; align-items: start; }
.no-model > .eyebrow { grid-column: 1 / -1; margin: 0; }
.no-model h2 { font-size: 20px; }
.no-model { margin-top: 56px; }
.no-model > section { margin-top: 12px; }
/* Every aligned week is joined; the table scrolls within the page instead of running 52 rows long. */
.aligned .table-wrap { max-height: 440px; overflow-y: auto; }
.scroll-hint { margin: 4px 0 6px; font-size: 12px; color: var(--muted); text-align: right; }
.aligned .table-wrap { box-shadow: inset 0 -10px 8px -8px rgba(0, 0, 0, .12); }
.offer-taken { margin: 0 0 8px; padding: 8px 10px; border: 1px solid #9fcfc5; border-radius: 6px; background: var(--accent-soft); font-size: 13px; }
.answer-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.run-kind { font-size: 12px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.run-kind[data-kind=live] { border-color: #9fcfc5; color: var(--accent); }
.run-kind[data-kind=edited] { border-color: #e0a39e; color: var(--bad); }
table.no-share th:nth-child(4), table.no-share td:nth-child(4) { display: none; }
/* The desk on its own row, the two data sites side by side under it: it asks each one; they never call each other. */
.site-row { grid-template-columns: 1fr 1fr; }
.site.you { grid-column: 1 / -1; display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; column-gap: 14px; }
.site.you .site-kind { grid-column: 1 / -1; }
.site.you::after { content: "↙ asks each data site separately ↘"; grid-column: 1 / -1; text-align: center; color: var(--accent); font-size: 14px; font-weight: 600; margin-top: 6px; }
@media (max-width: 760px) { .site.you { display: block; } }

/* A figure's size against the rest of its column: a thin bar under the traceable figure. */
.cell-bar { display: block; width: min(100%, 7.5rem); height: 4px; margin-top: 4px; border-radius: 2px; background: linear-gradient(90deg, #7fa9a2 var(--w), var(--line) var(--w)); }
.share-cell .cell-bar { margin-top: 6px; }

/* A figure and the bracket or quote around it stay on one line. */
.nowrap { white-space: nowrap; }
/* The run at a glance, above the answer. */
.run-steps { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 22px; padding: 0; margin: 0 0 14px; counter-reset: run-step; }
.run-steps li { position: relative; display: grid; gap: 2px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--card); font-size: 13px; max-width: 30ch; }
.run-steps li:not(:last-child)::after { content: "→"; position: absolute; right: -17px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.run-steps li b { font-size: 12px; color: var(--muted); font-weight: 600; }
.run-steps li.bad { border-color: #e3b3ae; }
.run-steps li.warn { border-color: #e7cf9e; }
/* Any Tessera site. */
.open-site-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; }
.open-site-row label, .open-site-plan { display: grid; gap: 4px; font-size: 13px; flex: 1 1 260px; }
.open-site-row input, .open-site-plan textarea { font: 13px var(--mono, ui-monospace, monospace); padding: 6px 8px; border: 1px solid var(--line); border-radius: 4px; width: 100%; }
.open-site-plan { margin: 10px 0; }
