:root { color-scheme: light; font-family: ui-sans-serif, -apple-system, "Segoe UI", sans-serif; max-width: 100%; overflow-x: hidden; }
* { box-sizing: border-box; }
body { max-width: 100%; margin: 0; padding: 1.1rem clamp(1rem, 4vw, 2.2rem) 3rem; background: #f4f2ec; color: #1c2733; line-height: 1.5; }
main, header, .card { min-width: 0; max-width: 100%; }
header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: .4rem; }
h1 { font-size: 1.45rem; margin: 0; letter-spacing: -.02em; }
.tagline { color: #6b7683; font-size: .78rem; margin-top: .15rem; }
.judge-actions { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; margin-top: .65rem; }
.judge-actions button { padding: .38rem .65rem; border: 1px solid #cfc9bb; border-radius: 7px; background: #fffdf8; color: #1c2733; font: 600 .75rem/1.4 ui-sans-serif, -apple-system, "Segoe UI", sans-serif; cursor: pointer; }
.judge-actions button:hover { border-color: #1459d9; color: #1459d9; }
.judge-actions button:disabled { cursor: not-allowed; opacity: .6; }
#copy-prompt-1 { background: #17212b; border-color: #17212b; color: #fffdf8; }
#copy-prompt-1:hover { background: #1459d9; color: #fff; }
#copy-status { min-height: 1.1rem; color: #08795e; font-size: .75rem; font-weight: 700; }
#copy-status.error { color: #aa3434; }
.prompt-fallback { width: 100%; min-height: 5.5rem; white-space: pre-wrap; font: .78rem/1.5 ui-monospace, monospace; background: #f1ede2; border: 1px solid #cfc9bb; border-radius: 6px; padding: .5rem .65rem; margin: .4rem 0 0; }
.how { counter-reset: step; display: flex; flex-wrap: wrap; gap: .4rem .9rem; margin: .55rem 0 0; padding: 0; list-style: none; color: #6b7683; font-size: .75rem; line-height: 1.4; }
.how li { counter-increment: step; position: relative; flex: 1 1 15rem; padding-left: 1.4rem; }
.how li::before { content: counter(step); position: absolute; left: 0; top: .02rem; width: 1.05rem; height: 1.05rem; border-radius: 50%; background: #e7e3d8; color: #5b6672; text-align: center; font: 600 .67rem/1.05rem ui-monospace, monospace; }
.how b { color: #1c2733; }
.clipboard-fallback { position: fixed; left: -9999px; top: 0; opacity: 0; }
h2 { font-size: .95rem; margin: 0 0 .5rem; letter-spacing: -.01em; }
.badges { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; }
.badge { display: inline-block; padding: .18rem .6rem; border-radius: 999px; background: #e7e3d8; font: 600 .72rem/1.5 ui-monospace, monospace; white-space: nowrap; }
.badge.on { background: #d9f2e4; color: #08795e; }
.badge.off { background: #fbe2df; color: #aa3434; }
.badge.rev { background: #17212b; color: #fffdf8; }
.card { margin: .9rem 0; padding: .9rem 1rem 1rem; background: #fffdf8; border: 1px solid #ddd6c7; border-radius: 10px; }
.hint { color: #6b7683; font-size: .78rem; margin-bottom: .45rem; }
.section-gloss { margin: -.25rem 0 .5rem; color: #6b7683; font-size: .78rem; }
#priority-select { margin: 0 .25rem; padding: .2rem .35rem; border: 1px solid #cfc9bb; border-radius: 5px; background: #fff; color: #1c2733; font: 600 .75rem/1.5 ui-monospace, monospace; }
#priority-select:focus { outline: 2px solid #1459d9; border-color: transparent; }
table { border-collapse: collapse; width: 100%; }
.table-scroll { max-width: 100%; overflow-x: auto; }
.table-scroll table { width: max-content; min-width: 100%; }
.table-scroll:focus-visible { outline: 3px solid #1459d9; outline-offset: 2px; }
#grid input { min-width: 26rem; }
#matrix { min-width: 38rem; }
#witness:not(:has(> #all-clear:not([hidden]))) > .table-scroll:has(> #matrix > tbody:empty)::after { content: "No counterexamples yet — confirm rules, then let the agent run find."; display: block; padding: .55rem .7rem; border: 1px solid #e2dccd; border-top: 0; background: #faf7ef; color: #6b7683; font-size: .78rem; }
th, td { border: 1px solid #e2dccd; padding: .38rem .55rem; text-align: left; font-size: .82rem; }
th { background: #f1ede2; font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; color: #5b6672; }
#grid td:first-child, #matrix td:first-child { font: 600 .78rem/1.5 ui-monospace, monospace; }
td input { width: 100%; box-sizing: border-box; font: .8rem/1.5 ui-monospace, monospace; border: 1px solid #cfc9bb; border-radius: 5px; padding: .28rem .4rem; background: #fff; }
td input:focus { outline: 2px solid #1459d9; border-color: transparent; }
td input[aria-invalid="true"] { border-color: #aa3434; outline: 2px solid #f3b8b2; }
.expression-error { margin-top: .2rem; color: #7c2a2a; font-size: .72rem; font-weight: 600; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.prov-chip { font: 600 .7rem/1.4 ui-monospace, monospace; color: #173f76; }
#matrix tbody tr { cursor: pointer; }
#matrix tbody tr:hover td { background: #f6f2e8; }
.matrix-select { border: 0; border-radius: 3px; padding: .08rem .2rem; background: transparent; cursor: pointer; font: inherit; text-decoration: underline dotted; text-underline-offset: 2px; color: #1459d9; font-weight: 600; }
.matrix-select:focus-visible { outline: 3px solid #1459d9; outline-offset: 2px; }
#matrix td.viol { background: #fbe2df; color: #7c2a2a; font-weight: 600; }
#matrix tbody tr.stale td { opacity: .4; text-decoration: line-through; }
#witness-summary.stale { opacity: .55; text-decoration: line-through; }
#matrix tbody tr.selected td { outline: 2px solid #1459d9; outline-offset: -2px; }
.stale-banner { margin: 0 0 .5rem; padding: .5rem .7rem; border-left: 4px solid #aa3434; background: #fbe2df; color: #7c2a2a; font-size: .8rem; font-weight: 600; border-radius: 0 6px 6px 0; }
.pin-chip { display: inline-flex; align-items: center; gap: .45rem; margin: 0 .35rem .35rem 0; padding: .25rem .6rem; border: 1px solid #cfd9ee; background: #e4edff; border-radius: 999px; font-size: .76rem; }
.pin-chip code { font: 600 .72rem/1.4 ui-monospace, monospace; color: #173f76; }
.pin-chip button { border: 0; background: none; cursor: pointer; color: #6b7683; font-size: .8rem; padding: 0; line-height: 1; }
.pin-chip button:hover { color: #aa3434; }
#pins { list-style: none; margin: 0; padding: 0; }
#pins li { display: inline; }
.pending-rule { margin: .55rem 0; padding: .6rem .7rem; border: 1px solid #e2dccd; border-radius: 7px; background: #faf7ef; }
.pending-rule dl { display: grid; grid-template-columns: minmax(8rem, auto) 1fr; gap: .2rem .7rem; margin: 0; }
.pending-rule dt { color: #5b6672; font: 600 .7rem/1.5 ui-monospace, monospace; }
.pending-rule dd { margin: 0; overflow-wrap: anywhere; font: .78rem/1.5 ui-monospace, monospace; }
#pending-actions { display: flex; gap: .5rem; margin-top: .7rem; }
#pending-actions button { padding: .4rem .8rem; border: 1px solid #cfc9bb; border-radius: 7px; background: #f1ede2; font: 600 .8rem/1.4 inherit; cursor: pointer; }
#confirm-pending { color: #fff; background: #08795e !important; border-color: #08795e !important; }
#rail { font-size: .8rem; }
#rail .rail-head { font: 600 .8rem/1.6 ui-monospace, monospace; margin-bottom: .35rem; }
#rail table { margin-top: .3rem; }
#rail .table-scroll table { min-width: 32rem; }
#rail td.winner { background: #dff4eb; font-weight: 600; }
#rail td.loser { background: #fff0bf; }
#rail td.absent { color: #9aa4ae; }
#packet-state { font: .8rem/1.6 ui-monospace, monospace; }
#packet-state.green { color: #08795e; font-weight: 700; }
#packet-state.blocked { color: #aa3434; font-weight: 700; }
button#apply { margin-top: .55rem; padding: .45rem .9rem; border-radius: 7px; border: 1px solid #cfc9bb; background: #f1ede2; font: 600 .8rem/1.4 inherit; cursor: not-allowed; }
button#apply:not([disabled]) { background: #08795e; color: #fff; border-color: #08795e; cursor: pointer; }
.legend { margin-top: .7rem; padding-top: .55rem; border-top: 1px solid #e2dccd; color: #6b7683; font-size: .75rem; line-height: 1.45; }
