:root {
  color-scheme: light;
  --paper:#f5f4f0; --panel:#ffffff; --panel-soft:#fafaf7; --ink:#242d29; --muted:#6f776f; --line:#e0e2db; --line-soft:#eef0e9; --green:#2f614b; --focus:#47926d;
  --accept:#2e7d62; --check:#c07a2a; --reject:#a3a8a2; --same:#8a5fc0;
  --class:#3b6fb6; --meaning:#b4507a; --core:#7b8478;
  --box:#f4f5ee; --box-line:#d6dbcf; --box-action:#fbf0e3; --box-action-line:#e6cba9; --box-small:#fbfbf8; --box-context:#f6f4f9;
  --mark:#dcebd2; --mark-soft:#eef4e9; --warn:#b5512f; --halo:#ffffff;
  --deep:#0b7f8f;
  --r0:#2f7059; --r1:#b0672a; --r2:#5464a8; --r3:#a5527a; --r4:#4f7c9e; --r5:#8b62a3; --r6:#857a1f; --r7:#3c827c;
  --e0:#d1495b; --e1:#00798c; --e2:#edae49; --e3:#5b8e7d; --e4:#8e6c8a; --e5:#3d5a80; --e6:#e07a5f; --e7:#6a994e; --e8:#b56576; --e9:#4f772d;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --paper:#141614; --panel:#1c1f1c; --panel-soft:#181a18; --ink:#e7eae4; --muted:#9aa197; --line:#30352f; --line-soft:#262a25; --green:#7cc59a; --focus:#7cc59a;
    --accept:#5fc29b; --check:#e0a35a; --reject:#6e746c; --same:#b493e4;
    --class:#82aef0; --meaning:#e48bb0; --core:#a2ab9e;
    --box:#232722; --box-line:#3a4038; --box-action:#33291e; --box-action-line:#5c4630; --box-small:#1e211d; --box-context:#25222b;
    --mark:#2f4a37; --mark-soft:#253328; --warn:#ec8c6a; --halo:#1c1f1c;
    --deep:#4fcadb;
    --r0:#6fcf9f; --r1:#eaa461; --r2:#93a3ec; --r3:#e892b8; --r4:#8cbde0; --r5:#c7a2e4; --r6:#d4c66a; --r7:#7fd1c8;
  }
}
* { box-sizing:border-box; }
body { margin:0; background:var(--paper); color:var(--ink); font:13px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; }
button,select { font:inherit; color:inherit; }
button { cursor:pointer; border:1px solid var(--line); background:var(--panel); border-radius:7px; padding:8px 12px; }
button:hover:not(:disabled) { border-color:var(--muted); }
button:disabled { opacity:.45; cursor:default; }
button:focus-visible,select:focus-visible,#graph [role=button]:focus-visible { outline:2px solid var(--focus); outline-offset:2px; }
header { min-height:72px; background:var(--panel); display:flex; align-items:center; justify-content:space-between; gap:16px; border-bottom:1px solid var(--line); padding:14px 28px; }
.brand { display:flex; align-items:center; gap:12px; min-width:0; }
.brand strong { display:block; font-size:17px; }
.brand div>span { display:block; color:var(--muted); font-size:11px; margin-top:2px; }
.mark { font:italic 22px Georgia,serif; background:var(--mark); color:var(--green); height:38px; width:38px; flex:none; display:grid; place-items:center; border-radius:11px; }
.scores { font-size:11px; color:var(--muted); margin:0; text-align:right; max-width:420px; }
main { display:grid; grid-template-columns:290px minmax(0,1fr); min-height:calc(100vh - 72px); }
aside { padding:22px 16px; background:var(--panel-soft); border-right:1px solid var(--line); min-width:0; }
.eyebrow { font-size:10px; letter-spacing:1.5px; color:var(--muted); font-weight:600; }
select { width:100%; min-width:0; border:1px solid var(--line); border-radius:6px; background:var(--panel); padding:8px; margin:10px 0 6px; }
.muted { font-size:11px; color:var(--muted); line-height:1.6; margin:0 0 18px; }
#sentences { margin-top:10px; max-height:calc(100vh - 250px); overflow:auto; }
.sentence { border-color:transparent; background:transparent; text-align:left; display:flex; gap:10px; width:100%; padding:9px 8px; margin-bottom:3px; line-height:1.5; font-size:12px; }
.sentence.active { border-color:var(--line); background:var(--panel); }
.sentence .number { font:10px ui-monospace,monospace; color:var(--muted); padding-top:2px; min-width:28px; }
.sentence-text { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.content { padding:22px 28px; min-width:0; }
#status { color:var(--muted); min-height:18px; font-size:12px; margin:0 0 10px; }
#status.error { color:var(--warn); }
.workspace { background:var(--panel); border:1px solid var(--line); border-radius:10px; min-width:0; overflow:hidden; }
.graph-heading { padding:20px 22px 0; display:flex; align-items:center; justify-content:space-between; gap:12px; }
h1 { font:400 22px/1.3 Georgia,serif; margin:6px 0 0; }
.steps { display:flex; gap:6px; }
.quiet { font-size:11px; padding:6px 9px; white-space:nowrap; }
.source-text { font:19px/1.6 Georgia,serif; margin:14px 22px 10px; white-space:pre-wrap; overflow-wrap:anywhere; }
mark { color:inherit; border-radius:3px; }
mark.primary { background:var(--mark); }
mark.related { background:var(--mark-soft); }
.filters { display:flex; flex-wrap:wrap; gap:8px 20px; padding:4px 22px 14px; }
.filter-group { display:flex; flex-wrap:wrap; align-items:center; gap:6px; }
.filter-label { font-size:10px; letter-spacing:1px; color:var(--muted); text-transform:uppercase; margin-right:2px; }
.chip { border-radius:20px; font-size:11px; padding:5px 10px; display:inline-flex; align-items:center; gap:6px; }
.chip[aria-pressed=false] { opacity:.5; }
.chip[aria-pressed=true] { border-color:var(--muted); }
.swatch { display:inline-block; width:16px; height:0; border-top:2px solid; }
.swatch.zone-accept { border-color:var(--accept); border-top-width:3px; }
.swatch.zone-check { border-color:var(--check); border-top-style:dashed; }
.swatch.zone-reject { border-color:var(--reject); border-top-style:dotted; }
.swatch.same { border-color:var(--same); border-top-style:dotted; border-top-width:3px; }
.swatch.layer-class { border-color:var(--class); }
.swatch.layer-meaning { border-color:var(--meaning); }
.swatch.layer-core { border-color:var(--core); border-top-style:dashed; }
.graph-scroll { overflow:auto; min-height:240px; max-height:72vh; border-top:1px solid var(--line-soft); background:var(--panel-soft); }
#graph { display:block; font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; }
#graph [role=button] { cursor:pointer; }
.section-label { font-size:9px; letter-spacing:1.2px; fill:var(--muted); font-weight:600; }
.halo,.edge-label { paint-order:stroke; stroke:var(--halo); stroke-width:4px; stroke-linejoin:round; }
.empty-note { font-size:12px; fill:var(--muted); }
.edge .line { fill:none; opacity:.8; }
.edge .hit { stroke:transparent; stroke-width:12; fill:none; pointer-events:stroke; }
.edge.zone-accept .line { stroke:var(--accept); }
.edge.zone-check .line { stroke:var(--check); stroke-dasharray:5 4; }
.edge.zone-reject .line { stroke:var(--reject); stroke-dasharray:2 4; }
.edge.same .line { stroke:var(--same); stroke-dasharray:1.5 3.5; stroke-width:2.2; stroke-linecap:round; }
.edge:hover .line,.edge.selected .line { opacity:1; stroke-width:3.2; }
.edge-label { font-size:10px; fill:var(--muted); }
.edge-label.name-miracle { font-weight:600; }
.edge-label.name-rules { font-style:italic; }
.edge-label.name-model { fill:var(--same); }
.arrow-accept path { fill:var(--accept); }
.arrow-check path { fill:var(--check); }
.arrow-reject path { fill:var(--reject); }
.arrow-same path { fill:var(--same); }
.box .frame { fill:var(--box); stroke:var(--box-line); }
.box.kind-action .frame { fill:var(--box-action); stroke:var(--box-action-line); }
.box.kind-small .frame { fill:var(--box-small); }
.box.context .frame { fill:var(--box-context); stroke-dasharray:3 3; }
.box-text { font-size:13px; fill:var(--ink); }
.box.context .box-text { font-size:12px; }
.box-kind { font-size:9px; fill:var(--muted); letter-spacing:.3px; }
.box:hover .frame { stroke:var(--muted); }
.box.selected .frame { stroke:var(--green); stroke-width:2; }
.box.related .frame { stroke:var(--green); stroke-dasharray:none; }
.flag-dot { fill:var(--warn); }
.flag-mark { font-size:8px; font-weight:700; fill:#fff; pointer-events:none; }
.olink { cursor:pointer; }
.olink .bracket,.olink .leader { fill:none; stroke-width:1.3; opacity:.65; }
.olink .leader { stroke-width:1.1; opacity:.45; }
.olink.layer-class path { stroke:var(--class); }
.olink.layer-meaning path { stroke:var(--meaning); }
.olink.layer-core path { stroke:var(--core); stroke-dasharray:3 3; }
.olink:hover path,.olink.related path { opacity:1; stroke-width:2; }
.kind-of { fill:none; stroke:var(--class); stroke-width:1.2; opacity:.55; }
.onode .frame { fill:var(--panel); stroke-width:1.5; }
.onode.layer-class .frame { stroke:var(--class); }
.onode.layer-class.parent .frame { stroke-dasharray:4 3; }
.onode.layer-meaning .frame { stroke:var(--meaning); }
.onode.layer-core .frame { stroke:var(--core); stroke-dasharray:3 3; }
.node-text { font-size:11.5px; font-weight:600; fill:var(--ink); }
.node-kind { font-size:9px; fill:var(--muted); }
.onode.layer-class .node-kind { fill:var(--class); }
.onode.layer-meaning .node-kind { fill:var(--meaning); }
.onode:hover .frame,.onode.selected .frame { stroke-width:2.6; }
.dim { opacity:.14; }
.graph-footer { padding:10px 18px; border-top:1px solid var(--line-soft); font-size:11px; color:var(--muted); display:flex; align-items:center; justify-content:space-between; gap:12px; }
.inspection { padding:18px 22px 22px; display:grid; grid-template-columns:minmax(0,1.3fr) minmax(0,1fr); gap:26px; border-top:1px solid var(--line); }
.details,.notes { padding-top:8px; }
.detail-head h2 { font:400 19px/1.35 Georgia,serif; margin:0; overflow-wrap:anywhere; }
.detail-sub { margin:2px 0 10px; color:var(--muted); font-size:11px; }
.detail-section { margin-top:14px; }
.detail-section h3 { font-size:10px; letter-spacing:1px; text-transform:uppercase; color:var(--muted); margin:0 0 6px; font-weight:600; }
.detail-line { margin:0 0 6px; font-size:12px; overflow-wrap:anywhere; }
.detail-line.indent { padding-left:12px; }
.muted-line { color:var(--muted); }
.detail-note { margin:12px 0 0; font-size:11px; color:var(--muted); }
.warn { color:var(--warn); }
.item { display:flex; justify-content:space-between; align-items:baseline; gap:10px; width:100%; text-align:left; border:0; border-bottom:1px solid var(--line-soft); border-radius:0; background:transparent; padding:7px 2px 7px 10px; font-size:12px; position:relative; overflow-wrap:anywhere; }
.item::before { content:""; position:absolute; left:0; top:9px; bottom:9px; width:3px; border-radius:2px; background:var(--line); }
.item.zone-accept::before { background:var(--accept); }
.item.zone-check::before { background:var(--check); }
.item.zone-reject::before { background:var(--reject); }
.item.layer-class::before { background:var(--class); }
.item.layer-meaning::before { background:var(--meaning); }
.item.layer-core::before { background:var(--core); }
.item.warn::before { background:var(--warn); }
.item:hover { background:var(--panel-soft); }
.item-meta { color:var(--muted); font-size:11px; white-space:nowrap; flex:none; }
.chips { display:flex; flex-wrap:wrap; gap:6px; }
.chip-link { font-size:11px; padding:4px 9px; border-radius:14px; border-left:4px solid var(--entity); }
.chip-link.here { background:var(--mark-soft); }
.component { margin:0 0 10px; font-size:12px; }
footer { margin-top:18px; font-size:11px; color:var(--muted); max-width:900px; }
footer p { margin:0 0 8px; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
@media (max-width:1100px) {
  main { grid-template-columns:240px minmax(0,1fr); }
  .content { padding:18px; }
  .inspection { grid-template-columns:1fr; }
  .scores { display:none; }
}
@media (max-width:760px) {
  header { padding:12px 16px; }
  main { display:block; }
  aside { padding:16px; border-right:0; border-bottom:1px solid var(--line); }
  #sentences { max-height:170px; }
  .content { padding:16px; }
  .graph-heading { padding:16px 14px 0; align-items:flex-start; flex-direction:column; }
  .source-text { margin:12px 14px; font-size:17px; }
  .filters { padding:4px 14px 12px; }
  .inspection { padding:16px 14px; }
}
.swatch.layer-concept,.swatch.name-deep { border-color:var(--deep); border-top-width:3px; }
.swatch.name-miracle { border-color:var(--r2); border-top-width:3px; }
.edge-label.name-deep,.edge-label .name-deep { fill:var(--deep); font-weight:600; }
.edge-label .name-split { fill:var(--muted); }
.edge-label.name-both { font-weight:600; }
.olink.layer-concept path { stroke:var(--deep); }
.onode.layer-concept .frame { stroke:var(--deep); }
.onode.layer-concept.parent .frame { stroke-dasharray:4 3; }
.onode.layer-concept .node-kind { fill:var(--deep); }
.kind-of.concept { stroke:var(--deep); }
.item.layer-concept::before { background:var(--deep); }
p.name-deep,h3.name-deep { color:var(--deep); }
details.features { margin:4px 0 8px; font-size:12px; }
details.features summary { cursor:pointer; color:var(--muted); font-size:11px; }
.olink.low-fit path { opacity:.18; stroke-dasharray:2 3; }
.onode.low-fit { opacity:.42; }
.onode.low-fit .frame { stroke-dasharray:2 3; }
.onode.grown .frame { stroke-width:2.6; stroke-dasharray:7 2; }
.fit-control { display:inline-flex; align-items:center; gap:6px; font-size:11px; color:var(--muted); margin-left:4px; }
.fit-control input { width:110px; accent-color:var(--deep); }
.fit-control output { font-variant-numeric:tabular-nums; min-width:28px; color:var(--ink); }
/* Pages */
nav.pages { display:flex; gap:4px; }
nav.pages a { font-size:12px; color:var(--muted); text-decoration:none; padding:7px 11px; border-radius:7px; border:1px solid transparent; }
nav.pages a:hover { border-color:var(--line); color:var(--ink); }
nav.pages a[aria-current=page] { color:var(--ink); border-color:var(--line); background:var(--panel-soft); }
/* Question → answer */
:root { --pass:var(--accept); --fail:var(--warn); --pending:var(--reject); --answer:#d08a1a; --answer-soft:#f7e6c4; }
@media (prefers-color-scheme: dark) { :root { --answer:#f0b04a; --answer-soft:#4a3a1f; } }
.qa-summary { padding:8px 22px 0; }
.gold { margin:0 0 6px; font-size:14px; }
.gold-label { font-size:10px; letter-spacing:1px; text-transform:uppercase; color:var(--muted); font-weight:600; margin-right:6px; }
.outcome { margin:0; font-size:11px; color:var(--muted); }
.outcome-badge { display:inline-block; font-size:10.5px; font-weight:600; padding:2px 8px; border-radius:10px; border:1px solid; margin-right:6px; white-space:nowrap; }
.outcome-badge.tone-pass { color:var(--pass); border-color:var(--pass); }
.outcome-badge.tone-fail { color:var(--fail); border-color:var(--fail); }
.outcome-badge.tone-warn { color:var(--check); border-color:var(--check); }
.parts { display:flex; flex-wrap:wrap; gap:6px; padding:10px 22px 0; }
.parts:empty { display:none; }
.stage-strip { display:flex; flex-wrap:wrap; gap:4px; padding:12px 22px 0; }
.stage-chip { font-size:10.5px; padding:4px 9px; border-radius:12px; border:1px solid var(--line); color:var(--muted); }
.stage-chip.pass { background:var(--pass); border-color:var(--pass); color:var(--panel); }
.stage-chip.fail { border-color:var(--fail); color:var(--fail); font-weight:600; }
.stop-reason { margin:8px 22px 0; font-size:12px; color:var(--fail); }
.stop-reason:empty { display:none; }
.legend-item { display:inline-flex; align-items:center; gap:5px; font-size:11px; color:var(--muted); margin-right:8px; }
.swatch.check-pass { border-color:var(--pass); border-top-width:3px; }
.swatch.check-fail { border-color:var(--fail); border-top-width:3px; }
.swatch.check-pending { border-color:var(--pending); border-top-style:dotted; }
.swatch.by-words { border-color:var(--answer); border-top-style:dashed; }
.sentence-choice { display:inline-flex; flex-wrap:wrap; gap:4px; }
.question-item .question-body { display:flex; flex-direction:column; gap:4px; min-width:0; }
.question-item .number { min-width:44px; text-transform:uppercase; font-size:9px; }
.question-filter { margin:8px 0 4px; }
mark.answer-mark { background:var(--answer-soft); box-shadow:inset 0 -2px 0 var(--answer); }
.route .line { fill:none; stroke-width:2; opacity:.85; }
.route .hit { stroke:transparent; stroke-width:12; fill:none; pointer-events:stroke; }
.route.check-pass .line { stroke:var(--pass); }
.route.check-fail .line { stroke:var(--fail); }
.route.check-pending .line { stroke:var(--pending); stroke-dasharray:2 4; }
.route.by-words .line { stroke-dasharray:6 4; }
.route.answer .line { stroke-width:2.6; }
.route .badge { stroke:var(--panel); stroke-width:2; }
.route.check-pass .badge { fill:var(--pass); }
.route.check-fail .badge { fill:var(--fail); }
.route.check-pending .badge { fill:var(--pending); }
.route .badge-mark { font-size:10px; font-weight:700; fill:var(--panel); pointer-events:none; }
.route .route-label { font-size:10.5px; fill:var(--ink); paint-order:stroke; stroke:var(--panel-soft); stroke-width:4px; stroke-linejoin:round; }
.route.check-fail .route-label { fill:var(--fail); }
.route:hover .line,.route.selected .line { stroke-width:3.4; opacity:1; }
.route.dim { opacity:.15; }
.qbox .frame { fill:var(--box); stroke:var(--box-line); }
.qbox.role-verb .frame { fill:var(--box-action); stroke:var(--box-action-line); }
.qbox.role-named .frame { stroke:var(--class); stroke-width:1.4; }
.qbox.role-unknown .frame { fill:var(--answer-soft); stroke:var(--answer); stroke-width:1.6; stroke-dasharray:5 3; }
.qbox.role-none .frame { fill:var(--box-small); }
.qpill .frame { fill:var(--panel); stroke:var(--deep); stroke-width:1.5; }
.qpill .node-kind { fill:var(--deep); }
.qpill-stem { stroke:var(--deep); stroke-width:1; opacity:.5; }
.qarc { fill:none; stroke:var(--muted); stroke-width:1.3; opacity:.7; }
.qarc-label { fill:var(--muted); }
.box.qa-answer .frame { stroke:var(--answer); stroke-width:2.6; }
.box.qa-constant.qa-pass .frame,.box.qa-concept.qa-pass .frame { stroke:var(--pass); stroke-width:2; }
.box.qa-constant.qa-fail .frame,.box.qa-concept.qa-fail .frame { stroke:var(--fail); stroke-width:2; }
.onode.qa-concept.qa-pass .frame { stroke:var(--pass); stroke-width:2.6; }
.onode.qa-concept.qa-fail .frame { stroke:var(--fail); stroke-width:2.6; }
.item.check-pass::before { background:var(--pass); }
.item.check-fail::before { background:var(--fail); }
.item.check-pending::before { background:var(--pending); }
@media (max-width:760px) { nav.pages a { padding:6px 8px; } .qa-summary,.parts,.stage-strip { padding-left:14px; padding-right:14px; } .stop-reason { margin:8px 14px 0; } }
.kin path { fill:none; stroke:var(--deep); stroke-width:1.4; stroke-dasharray:1.5 4; stroke-linecap:round; opacity:.8; }
.kin.dim { opacity:.15; }
a.item { color:var(--ink); text-decoration:none; }
a.item:hover { background:var(--panel-soft); }
.run-banner { margin:10px 22px 0; padding:8px 12px; border:1px solid var(--line); border-radius:8px; font-size:12px; background:var(--panel-soft); }
.run-banner strong { font-weight:600; }
.stage-chip.warn { border-color:var(--check); color:var(--check); font-weight:600; }
.route.stub .line { stroke-dasharray:3 3; }
.across { display:grid; grid-template-columns:auto 1fr; gap:4px 10px; align-items:baseline; font-size:11.5px; }
.across button { text-align:left; border:0; padding:2px 0; background:transparent; color:var(--muted); font-size:11px; }
.across button.current { color:var(--ink); font-weight:600; }
@media (max-width:760px) { .run-banner { margin:10px 14px 0; } }
.stop-reason.passed { color:var(--pass); }
/* Question → answer: the drawing first, everything else in pinnable panels */
body.qa { height:100vh; overflow:hidden; display:flex; flex-direction:column; }
body.qa header.slim { min-height:0; height:42px; padding:0 14px; gap:12px; justify-content:flex-start; }
body.qa header.slim .brand { gap:8px; }
body.qa header.slim .brand strong { display:inline; font-size:14px; }
body.qa header.slim .mark { height:26px; width:26px; font-size:15px; border-radius:7px; }
body.qa .brand-sub { color:var(--muted); font-size:12px; }
body.qa nav.pages { margin-left:auto; }
body.qa .icon { min-width:28px; padding:4px 8px; font-size:13px; line-height:1; }
body.qa .qa-main { flex:1; min-height:0; display:grid; grid-template-columns:250px minmax(0,1fr); }
body.qa.sidebar-hidden .qa-main { grid-template-columns:0 minmax(0,1fr); }
body.qa #sidebar { padding:12px 12px; overflow:auto; transition:padding .2s; }
body.qa.sidebar-hidden #sidebar { padding:0; overflow:hidden; border-right:0; }
body.qa #sidebar .eyebrow { display:block; margin-top:4px; }
body.qa #sidebar select { margin:6px 0 4px; padding:6px; font-size:12px; }
body.qa #sidebar .muted { margin:0 0 10px; font-size:10.5px; }
body.qa #questions { max-height:none; margin-top:6px; }
body.qa .question-item { padding:7px 6px; font-size:11.5px; }
body.qa .qa-content { min-width:0; min-height:0; display:flex; flex-direction:column; background:var(--panel); }
body.qa .question-bar { display:flex; align-items:center; gap:10px; padding:6px 14px; border-bottom:1px solid var(--line-soft); min-width:0; }
body.qa .question-line { display:flex; align-items:baseline; gap:8px; min-width:0; flex:1 1 auto; }
body.qa .where { font-size:9.5px; letter-spacing:1px; color:var(--muted); white-space:nowrap; text-transform:uppercase; }
body.qa h1 { font:400 16px/1.3 Georgia,serif; margin:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; min-width:0; }
body.qa .outcome { flex:none; }
body.qa .gold { margin:0; font-size:12px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:34%; flex:0 1 auto; }
body.qa #status { font-size:11px; color:var(--muted); white-space:nowrap; }
body.qa #status:empty { display:none; }
body.qa .stage-bar { display:flex; align-items:center; gap:8px; padding:5px 14px; border-bottom:1px solid var(--line-soft); min-width:0; flex-wrap:nowrap; }
body.qa .parts { padding:0; flex:none; gap:4px; }
body.qa .part-chip { font-size:10.5px; padding:3px 8px; }
body.qa .stage-strip { padding:0; flex:none; gap:3px; }
body.qa .stage-chip { font-size:10px; padding:2px 7px; }
body.qa .stop-reason { margin:0; font-size:11.5px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; min-width:0; flex:1 1 auto; cursor:help; }
body.qa .panel-bar { display:flex; align-items:center; gap:4px; padding:4px 14px; border-bottom:1px solid var(--line-soft); flex-wrap:wrap; }
.panel-toggle { font-size:11px; padding:4px 10px; border-radius:14px; background:transparent; border-color:transparent; color:var(--muted); }
.panel-toggle[aria-expanded=true] { background:var(--panel-soft); border-color:var(--line); color:var(--ink); }
.panel-toggle.pinned::after { content:" •"; color:var(--deep); }
body.qa .zoom { margin-left:auto; display:inline-flex; align-items:center; gap:3px; }
body.qa .zoom .quiet { padding:3px 8px; font-size:11px; }
.zoom-value { font-size:10.5px; color:var(--muted); min-width:36px; text-align:right; font-variant-numeric:tabular-nums; }
body.qa .panels { max-height:42vh; overflow:auto; flex:none; }
body.qa .panels:not(:has(.panel:not([hidden]))) { display:none; }
.panel { border-bottom:1px solid var(--line-soft); background:var(--panel); animation:slide .16s ease-out; }
@keyframes slide { from { opacity:0; transform:translateY(-6px); } to { opacity:1; transform:none; } }
.panel-head { display:flex; align-items:center; gap:6px; padding:5px 14px 0; font-size:10px; letter-spacing:1px; text-transform:uppercase; color:var(--muted); font-weight:600; }
.panel-head span { margin-right:auto; }
.panel-head button { font-size:11px; padding:2px 7px; border-color:transparent; background:transparent; text-transform:none; letter-spacing:0; }
.panel-head .pin { filter:grayscale(1); opacity:.45; }
.panel.pinned .panel-head .pin { filter:none; opacity:1; }
.panel-body { padding:6px 14px 10px; }
body.qa .panel-body .source-text { font-size:15px; margin:0 0 6px; }
body.qa .panel-body.filters { padding-top:6px; }
body.qa .run-banner { margin:0 0 4px; padding:0; border:0; background:none; }
.basis { margin:0; font-size:11px; color:var(--muted); }
body.qa .details,body.qa .notes { padding-top:0; }
body.qa .details { display:grid; grid-template-columns:repeat(auto-fill, minmax(320px, 1fr)); gap:0 24px; }
body.qa .details .detail-head { grid-column:1 / -1; }
.about p { margin:0 0 6px; font-size:11.5px; color:var(--muted); max-width:1000px; }
body.qa .qa-graph { flex:1 1 auto; min-height:260px; max-height:none; border-top:0; }
body.qa .graph-footer { padding:4px 14px; font-size:10.5px; }
@media (max-width:760px) {
  body.qa { height:auto; overflow:auto; }
  body.qa .qa-main { display:block; }
  body.qa.sidebar-hidden #sidebar { display:none; }
  body.qa .question-bar,body.qa .stage-bar { flex-wrap:wrap; }
  body.qa h1 { white-space:normal; }
  body.qa .gold { max-width:none; white-space:normal; }
  body.qa .qa-graph { height:70vh; }
  body.qa .details { grid-template-columns:1fr; }
}
/* Grab to move */
.graph-scroll { cursor:grab; }
.graph-scroll.panning { cursor:grabbing; user-select:none; }
.graph-scroll.panning * { cursor:grabbing !important; }
.stage-chip.scope-chip { border-color:var(--class); color:var(--class); }
.filter-note { font-size:10.5px; color:var(--muted); margin-left:6px; }
.detail-line.layer-class { color:var(--class); }
.detail-line.layer-meaning { color:var(--meaning); }
.detail-line.layer-core { color:var(--core); }
.panel-toggle.alarm { color:var(--fail); border-color:var(--fail); }
.pass-line { color:var(--pass); }
.reject-panel .detail-section { margin-top:8px; }
.reject-row { display:grid; grid-template-columns:auto minmax(0,1fr) minmax(0,2fr); gap:8px; align-items:baseline; font-size:11.5px; padding:3px 0; border-bottom:1px solid var(--line-soft); }
.reject-row.admitted .reject-text { color:var(--fail); font-weight:600; }
.reject-why { color:var(--muted); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
@media (max-width:760px) { .reject-row { grid-template-columns:1fr; } }
.reading-row { display:flex; flex-wrap:wrap; gap:4px; }
.reading-group { display:inline-flex; flex-direction:column; border:1px solid var(--box-line); background:var(--box); border-radius:6px; padding:3px 8px; font-size:11.5px; line-height:1.3; }
.reading-group.differs { border-color:var(--check); border-width:2px; }
.reading-group.concept-differs .reading-concept { color:var(--fail); font-weight:600; }
.reading-kind { font-size:9px; color:var(--muted); }
.reading-concept { font-size:9.5px; color:var(--deep); }
