:root {
  color-scheme: light;
  --page: #edf3f1;
  --surface: #fcfefa;
  --surface-2: #f3f7f3;
  --ink: #1a2927;
  --muted: #4c6560;
  --accent: #184542;
  --accent-tint: #e0eee8;
  --line: #bdd0c8;
  --edge: #6d8d84;
  --alert: #853c2b;
  --alert-tint: #f7e9df;
  --mono: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; font: 1rem/1.55 var(--sans); color: var(--ink); background: var(--page); }
h1, h2, h3, h4, p, dl, ul { margin: 0; }
ul { list-style: none; padding: 0; }
button, select { font: inherit; }
code, .mono { font-family: var(--mono); }
a { color: var(--accent); text-underline-offset: .18em; }
:focus-visible { outline: 3px solid #285f63; outline-offset: 3px; }
.skip { position: fixed; top: .65rem; left: .65rem; z-index: 2; transform: translateY(-200%); background: var(--surface); padding: .55rem .9rem; }
.skip:focus { transform: none; }
.shell { width: min(72rem, calc(100% - 4rem)); margin-inline: auto; }

.masthead { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0 .65rem; min-height: 3.8rem; border-bottom: 1px solid var(--line); }
.masthead a { display: inline-flex; align-items: center; min-height: 2.75rem; text-decoration: none; font-size: .9rem; font-weight: 650; }
.masthead a:hover { text-decoration: underline; }
.masthead nav { display: flex; gap: 1rem; }
.brand { gap: .48rem; }
.mark { inline-size: 1.02rem; block-size: .8rem; border: 2px solid var(--accent); box-shadow: .18rem .17rem 0 -.06rem var(--edge); }
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(16rem, .5fr); gap: .95rem 2rem; align-items: end; padding-block: clamp(2rem, 5.4vw, 4rem) clamp(1.5rem, 4vw, 2.45rem); }
.hero h1 { max-width: 17ch; font-size: clamp(2.55rem, 5.45vw, 4.95rem); font-weight: 650; line-height: .99; letter-spacing: -.065em; }
.hero p { max-width: 61ch; margin-top: .7rem; font-size: clamp(1rem, 1.4vw, 1.087rem); color: var(--muted); }
.handoff { display: grid; grid-template-columns: minmax(0, .75fr) minmax(0, 1fr); gap: .6rem .9rem; padding: .7rem .83rem; background: var(--accent); color: #ecf6ef; overflow-wrap: anywhere; }
.handoff dt { font-size: .73rem; color: #cae0d8; }
.handoff dd { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .2rem; margin: .1rem 0 0; font-size: 1rem; font-weight: 650; }
.handoff dd span { color: #bfdfd2; }

.viewer { border: 1px solid var(--line); border-top: 3px solid var(--accent); background: var(--surface); }
.viewer-head, .findings-head, .pagination { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .58rem .95rem; }
.viewer-head { padding: .88rem clamp(.95rem, 2.9vw, 1.56rem); }
.viewer-head > div { min-width: 0; }
.viewer h2, .guide h2 { font-size: clamp(1.65rem, 3vw, 2.37rem); letter-spacing: -.048em; line-height: 1.12; }
.viewer-head p, .findings-head p { margin-top: .25rem; color: var(--muted); font-size: .85rem; overflow-wrap: anywhere; }
.actions { display: grid; grid-template-columns: repeat(2, max-content); gap: .38rem; }
.actions #privacy { grid-column: 1 / -1; margin-top: 0; font-size: .73rem; }
.actions select { font-size: .84rem; }
button, select { min-height: 2.75rem; max-width: 100%; border: 1px solid var(--edge); border-radius: .17rem; background: var(--surface); color: var(--ink); padding: .38rem .65rem; }
button { cursor: pointer; font-size: .84rem; font-weight: 650; }
button:hover:enabled { background: var(--accent-tint); }
button:disabled { opacity: .46; cursor: default; }
.primary { background: var(--accent); color: var(--surface); border-color: var(--accent); }
.primary:hover:enabled { background: #28534e; }
.notice, .blank { color: var(--muted); padding: .63rem clamp(.95rem, 2.9vw, 1.56rem); border-top: 1px solid var(--line); font-size: .84rem; }
.notice:empty { padding: 0; border: 0; }
.notice[data-error] { color: var(--alert); background: var(--alert-tint); }
.example-note { padding: .68rem clamp(.95rem, 2.9vw, 1.56rem); color: var(--muted); border-top: 1px solid var(--line); font-size: .85rem; overflow-wrap: anywhere; }
.example-note strong { color: var(--accent); }

.summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-block: 1px solid var(--line); background: var(--accent-tint); }
.summary > div { min-width: 0; padding: .64rem clamp(.73rem, 2.9vw, 1.56rem); overflow-wrap: anywhere; }
.summary > div + div { border-inline-start: 1px solid var(--line); }
.summary dt { color: var(--muted); font-size: .73rem; font-weight: 700; }
.summary dd { margin: .1rem 0 0; color: var(--accent); font-size: .92rem; font-weight: 690; }
#unexpected, #expected { font: 650 1.17rem/1.45 var(--mono); }
#verdict { display: inline-block; }
#verdict[data-unexpected] { color: var(--alert); }

.findings { padding: .85rem clamp(.95rem, 2.9vw, 1.56rem) .92rem; }
.findings-head { align-items: end; }
.findings-head h3 { font-size: 1.23rem; letter-spacing: -.03em; }
.filters { display: grid; grid-template-columns: repeat(2, minmax(8.25rem, 1fr)); gap: .4rem .65rem; max-width: 100%; }
.filters > div { min-width: 0; }
.filters label { display: block; margin-bottom: .16rem; color: var(--muted); font-size: .74rem; font-weight: 650; }
.filters select { width: 100%; font-size: .92rem; }
.kind-counts { display: flex; flex-wrap: wrap; gap: .22rem .44rem; margin-block: .55rem .65rem; }
.kind-counts > div { display: inline-flex; align-items: baseline; gap: .3rem; padding: .12rem .32rem; background: var(--surface-2); color: var(--muted); font-size: .73rem; }
.kind-counts dd { margin: 0; color: var(--accent); font-family: var(--mono); font-weight: 650; }
.changes { display: grid; gap: .5rem; }
.change { min-width: 0; border: 1px solid var(--line); overflow-wrap: anywhere; }
.change header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .2rem .45rem; padding: .38rem .55rem; background: var(--surface-2); }
.change h4 { font-size: .9rem; line-height: 1.4; }
.change-status { font-size: .74rem; font-weight: 720; color: var(--accent); }
.change[data-status="unexpected"] .change-status { color: var(--alert); }
.change[data-status="unexpected"] { border-inline-start: 3px solid #bb7a60; }
.change[data-status="expected"] { border-inline-start: 3px solid var(--edge); }
.change-context { padding: .31rem .55rem 0; color: var(--muted); font-size: .76rem; }
.evidence-sides { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.evidence { min-width: 0; padding: .42rem .55rem .53rem; }
.evidence + .evidence { border-inline-start: 1px solid var(--line); }
.evidence dt { color: var(--muted); font-size: .73rem; font-weight: 650; }
.evidence dd { display: grid; justify-items: start; gap: .17rem; margin: .12rem 0 0; font-size: .81rem; }
.evidence dd code { color: var(--ink); background: #edf3ef; padding: 0 .21rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.evidence dd .missing { color: var(--alert); font-weight: 700; }
.evidence .evidence-kind { color: var(--muted); font-size: .73rem; }
.policy-required { border-top: 1px solid var(--line); padding: .3rem .55rem; color: var(--muted); font-size: .76rem; }
.pagination { margin-top: .5rem; color: var(--muted); font-size: .79rem; }
.pagination > div { display: flex; gap: .34rem; flex-wrap: wrap; }
.findings .blank { padding: .4rem 0; border: 0; }
.provenance { padding: 0 clamp(.95rem, 2.9vw, 1.56rem) .14rem; border-top: 1px solid var(--line); }
.provenance summary { min-height: 2.75rem; width: fit-content; padding-block: .57rem; cursor: pointer; color: var(--accent); font-size: .88rem; font-weight: 650; }
.provenance dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: .28rem .65rem; padding-bottom: .65rem; font-size: .79rem; }
.provenance dt { color: var(--muted); }
.provenance dd { margin: 0; font-family: var(--mono); overflow-wrap: anywhere; }

.guide { display: grid; grid-template-columns: minmax(0, .7fr) minmax(0, 1.45fr); padding-block: clamp(2.5rem, 5.6vw, 4.25rem); gap: 1.07rem 2.8rem; }
.guide h3 { font-size: 1.03rem; }
.guide p { margin-top: .29rem; color: var(--muted); }
.guide-sections > section + section { margin-top: .85rem; padding-top: .77rem; border-top: 1px solid var(--line); }
pre { margin: .43rem 0; padding: .66rem .76rem; border: 1px solid var(--line); background: var(--surface); font-size: .83rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .3rem 1rem; padding: .72rem 0 1.1rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .81rem; }

@media (max-width: 52rem) {
  .shell { width: calc(100% - 2rem); }
  .hero { grid-template-columns: 1fr; }
  .handoff { width: min(100%, 25rem); }
}

@media (max-width: 37rem) {
  .shell { width: calc(100% - 1.25rem); }
  .masthead nav { gap: .57rem; }
  .masthead a { font-size: .8rem; }
  .hero { padding-block: 1.55rem 1.15rem; }
  .hero p { margin-top: .53rem; }
  .summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .summary > div:nth-child(3) { border-inline-start: 0; }
  .summary > div:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  .filters > div { min-width: 0; }
  .provenance dl, .guide { grid-template-columns: 1fr; }
}

@media (max-width: 25rem) {
  .actions { grid-template-columns: minmax(0, 1fr); width: 100%; }
}

@media (forced-colors: active) {
  :focus-visible { outline-color: Highlight; }
}
