.lab-hero h1 { max-width: 17ch; }
.lab-layout { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: clamp(2rem, 4vw, 4rem); padding-block: 3rem 5rem; align-items: start; }
.lab-layout .section-index { position: sticky; top: 1.5rem; }
.lab-content { min-width: 0; }
.scope-note { padding: 1rem 1.2rem; background: #eeebe0; border-left: 4px solid var(--ink); font-size: .9rem; margin-bottom: 3rem; }
.scope-note strong { display: block; }
.lab-section { padding-bottom: 2.5rem; margin-bottom: 2.5rem; border-bottom: 1px solid #b8b4a8; scroll-margin-top: 1.5rem; }
.lab-section:last-child { border: 0; margin: 0; padding: 0; }
.lab-section h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); }
.lab-section p { max-width: 72ch; }
.lab-section blockquote { font-size: 1.08rem; }
.task-example { padding: 1rem 1.25rem; margin-block: 1.5rem; border: 2px solid var(--ink); background: var(--signal); }
.task-example span { display: block; margin-bottom: .35rem; font-size: .8rem; }
.task-example code { padding: 0; background: transparent; font-size: 1.45rem; font-weight: 800; }
.rule-note { margin-top: 1.5rem; font-size: .9rem; }
.candidate-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.candidate-card { min-width: 0; padding: 1rem; border: 2px solid var(--ink); background: #fff; }
.candidate-card h3 { margin-bottom: .35rem; }
.file-label, .editor-label, .text-button, .editor-help, .lab-status, .check-pill, .command-box, .result-label { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace; }
.file-label { color: var(--muted); font-size: .68rem; margin-bottom: 1rem; overflow-wrap: anywhere; }
summary { cursor: pointer; min-height: 44px; padding-block: .65rem; font-weight: 700; font-size: .9rem; }
summary span { display: block; padding-left: 1rem; font-size: .7rem; font-weight: 400; color: var(--muted); }
summary:hover { color: var(--blue); }
.file-details { border-top: 1px solid #b8b4a8; }
.file-details pre { margin: .25rem 0 1rem; padding: .8rem; font-size: .68rem; line-height: 1.65; }
.baseline-details { margin-top: 1rem; }
.editor-label { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .5rem; padding: .45rem .75rem; background: var(--ink); color: white; font-size: .8rem; font-weight: 700; }
.text-button { cursor: pointer; min-height: 44px; padding: .6rem .7rem; border: 1px solid currentColor; background: transparent; color: inherit; font-size: .7rem; font-weight: 700; }
.text-button:hover { background: var(--signal); color: var(--ink); }
.cases-editor { display: block; resize: vertical; min-height: 280px; width: 100%; border: 2px solid var(--ink); border-top: 0; border-radius: 0; background: #fff; color: var(--ink); padding: 1rem; font: .8rem/1.65 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace; tab-size: 2; }
.editor-help { margin-top: .7rem; color: var(--muted); font-size: .73rem; line-height: 1.7; }
button { border-radius: 0; cursor: pointer; }
button:disabled { cursor: wait; opacity: .5; }
button:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }
.run-actions { margin-top: 1rem; }
.lab-status { font-size: .75rem; color: var(--muted); margin-top: 1rem; margin-bottom: 0; min-height: 1.3rem; }
.lab-error { margin-top: .75rem; margin-bottom: 0; border: 2px solid #8c221c; padding: .85rem; background: #ffebe7; color: #70211a; font-size: .9rem; overflow-wrap: anywhere; }
.empty-results { padding: 1.25rem; border: 1px dashed #8c8980; color: var(--muted); background: #eeebe0; }
.result-table { min-width: 630px; }
.result-table th, .result-table td { padding: .65rem; }
.result-table thead th { font-size: .72rem; }
.result-table thead th:first-child { width: 20%; }
.check-pill { display: inline-block; font-size: .69rem; font-weight: 800; padding: .2rem .4rem; border: 1px solid; white-space: nowrap; }
.check-pill.pass { background: #e1f2df; color: #225526; }
.check-pill.fail { background: #ffe2db; color: #7b261c; }
.result-explanation { padding: 1.2rem; background: var(--signal); border: 2px solid var(--ink); margin-bottom: 1.5rem; }
.result-explanation h3 { font-size: 1.1rem; }
.result-explanation p { margin-bottom: .6rem; font-size: .94rem; }
.result-explanation p:last-child { margin: 0; }
.candidate-evidence { border-top: 2px solid var(--ink); padding-top: .5rem; margin-top: 1.5rem; }
.candidate-evidence > summary { font-size: 1rem; }
.candidate-evidence > summary .check-pill { margin-left: .5rem; }
.evidence-group { padding-top: 1.2rem; }
.evidence-group h4 { margin: 0 0 .4rem; font-size: .95rem; }
.evidence-group > p { font-size: .82rem; color: var(--muted); }
.case-list { list-style: none; margin: 0; padding: 0; }
.case-item { padding: .8rem 0; border-top: 1px solid #c9c5b9; }
.case-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: .75rem; font-size: .82rem; overflow-wrap: anywhere; }
.case-values { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-top: .5rem; }
.case-value { min-width: 0; }
.result-label { font-size: .66rem; text-transform: uppercase; color: var(--muted); }
.case-value code { display: block; padding: .5rem; white-space: pre-wrap; font-size: .75rem; }
.case-detail { margin-top: .45rem; margin-bottom: 0; font-size: .78rem; color: var(--muted); overflow-wrap: anywhere; }
.protection-diff { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.protection-diff > div { min-width: 0; }
.protection-diff pre { margin-top: .3rem; padding: .8rem; font-size: .67rem; }
.protection-diff .diff-after.changed pre { background: #55271f; }
.command-box { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; justify-content: space-between; padding: 1rem; background: var(--ink); color: #fff; }
.command-box > code { background: transparent; padding: 0; font-size: .8rem; }
.format-note { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid #b8b4a8; }
.format-note p { font-size: .9rem; }
.adapt-details { border-block: 1px solid #b8b4a8; }
.adapt-details ol { padding-left: 1.35rem; font-size: .9rem; }
.adapt-details li { padding-left: .25rem; margin-block: 1rem; }
[hidden] { display: none !important; }
@media (max-width: 900px) {
  .lab-layout { grid-template-columns: 1fr; gap: 2rem; padding-top: 2rem; }
  .lab-layout .section-index { position: static; }
  .lab-layout .section-index ol { display: flex; flex-wrap: wrap; gap: 0 1.25rem; }
  .lab-layout .section-index li { border: 0; }
}
@media (max-width: 600px) {
  .result-table { display: block; min-width: 0; border: 0; background: transparent; }
  .result-table caption { display: block; }
  .result-table thead { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .result-table tbody { display: grid; gap: 1rem; }
  .result-table tbody tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 2px solid var(--ink); background: #fff; }
  .result-table tbody th { grid-column: 1; grid-row: 1; align-content: center; font-size: 1rem; border-bottom: 2px solid var(--ink); }
  .result-table tbody td { display: flex; flex-direction: column; align-items: flex-start; gap: .4rem; min-width: 0; padding: .8rem; }
  .result-table tbody td::before { content: attr(data-label); font-size: .72rem; font-weight: 700; }
  .result-table tbody td:last-child { grid-column: 2; grid-row: 1; border-bottom: 2px solid var(--ink); }
  .result-table tbody td:nth-last-child(2), .result-table tbody td:nth-last-child(3) { border-bottom: 0; }
  .lab-hero .button-row { flex-direction: column; align-items: stretch; }
  .candidate-grid, .protection-diff { grid-template-columns: 1fr; }
  .lab-section { padding-bottom: 2rem; margin-bottom: 2rem; }
  .scope-note { margin-bottom: 2rem; }
  .cases-editor { font-size: .75rem; padding: .75rem; }
  .task-example code { font-size: 1.25rem; }
  .run-actions > .button { flex-grow: 1; }
  .case-values { grid-template-columns: 1fr; }
  .command-box > code { font-size: .72rem; }
}
@media print {
  .lab-layout { display: block; }
  .lab-layout .section-index, .run-actions, .editor-label button, .command-box button { display: none; }
  .scope-note { margin-bottom: 1rem; }
  .lab-section { break-inside: avoid; }
}
