:root {
  color-scheme: light;
  --paper: #f5f4ef; --ink: #232c28; --muted: #5e6962; --line: #d5dbd1; --green: #225b42; --pale: #e8eee5; --sheet: #fcfcf9;
  --ins: #1f4fb3; --del: #b3261e; --balloon: #fff4c2; --balloon-line: #d9b94a; --warn: #8a5a00; --info: #4a5a80;
  --mono: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  --serif: Cambria, "Liberation Serif", Georgia, "Times New Roman", serif;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 16px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--paper); color: var(--ink); line-height: 1.55; }
main { max-width: 1080px; margin: auto; padding: 0 32px; }
a { color: var(--green); text-underline-offset: 4px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
code { font: 0.92em var(--mono); background: var(--pale); padding: 1px 5px; border-radius: 3px; }
pre code { background: none; padding: 0; }
h1, h2, h3 { font-weight: 600; letter-spacing: -.02em; margin: 0; }
h2 { font-size: clamp(24px, 3vw, 30px); line-height: 1.15; letter-spacing: -.03em; }
h3 { font-size: 17px; margin-bottom: 8px; }
section { padding: 56px 0 0; }
.section-head { max-width: 720px; margin-bottom: 26px; }
.section-head p { margin: 12px 0 0; color: var(--muted); }
.section-head em { font-style: italic; color: var(--ink); }

/* header */
header { min-height: 78px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { font-family: var(--mono); font-weight: 600; display: flex; align-items: center; gap: 12px; }
.mark { color: var(--green); font-size: 23px; }
nav { display: flex; gap: 22px; } nav a { font-size: 14px; color: var(--muted); text-decoration: none; } nav a:hover { color: var(--green); text-decoration: underline; }

/* hero */
.hero { padding-top: 52px; }
h1 { font-size: clamp(30px, 4.6vw, 48px); line-height: 1.08; letter-spacing: -.04em; max-width: 880px; }
.lede { max-width: 760px; font-size: 17px; margin: 22px 0 36px; }
.tally { max-width: 760px; margin: 28px 0 0; color: var(--muted); }
.tally strong { color: var(--ink); }

/* the redline: two document pages */
.redline { margin: 0; }
.redline { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.page { display: grid; grid-template-columns: 1fr 150px; background: #fff; border: 1px solid var(--line); box-shadow: 0 1px 0 var(--line), 0 14px 30px -24px rgba(35,44,40,.45); min-height: 300px; }
.doc { padding: 30px 26px 26px 34px; font-family: var(--serif); font-size: 14.5px; line-height: 1.5; color: #1a1a1a; border-right: 1px solid #eee9d8; }
.doc-title { margin: 0 0 4px; font-size: 18px; font-weight: 700; letter-spacing: 0; }
.doc-sub { margin: 0 0 16px; font-size: 13px; color: #555; }
.doc-body { margin: 16px 0 0; font-size: 13.5px; color: #333; }
.doc-table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
.doc-table th, .doc-table td { border: 1px solid #b8b8b8; padding: 5px 8px; text-align: left; }
.doc-table th { background: #f0eee6; font-weight: 700; }
.doc-table td:last-child, .doc-table th:last-child { text-align: right; white-space: nowrap; }
.doc-table td:nth-child(2) { white-space: nowrap; }
ins { color: var(--ins); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
del { color: var(--del); text-decoration: line-through; margin-right: 3px; }
.cmt-range { background: var(--balloon); box-shadow: 0 0 0 2px var(--balloon); position: relative; }
.margin { position: relative; padding: 30px 14px 0 10px; background: #f9f8f3; }
.balloon { position: relative; background: var(--balloon); border: 1px solid var(--balloon-line); border-radius: 3px; padding: 9px 10px 10px; font-size: 11.5px; line-height: 1.4; color: #3a3319; margin-top: 150px; }
.balloon .who { display: block; font-weight: 600; font-size: 10.5px; color: #6b5a12; margin-bottom: 3px; }
.balloon::before { content: ""; position: absolute; left: -46px; top: 14px; width: 45px; border-top: 1px dashed var(--balloon-line); }
.balloon::after { content: ""; position: absolute; left: -12px; top: 8px; width: 5px; height: 11px; border-left: 2px solid var(--balloon-line); }
.margin-empty { background: #f9f8f3; }
.page-fast .doc { border-right-color: #eee; }
.page-fast .doc-table td:last-child { color: #1a1a1a; }
figcaption { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 24px; font-size: 13.5px; color: var(--muted); }
figcaption span { padding-top: 10px; border-top: 2px solid var(--line); }
figcaption span:first-child { border-top-color: var(--green); }
figcaption span:last-child { border-top-color: var(--del); }

/* try */
.try .privacy { color: var(--green); }
.runtime { background: var(--pale); border: 1px solid var(--line); padding: 11px 15px; margin-bottom: 24px; font-size: 14px; }
.runtime summary { cursor: pointer; color: var(--green); } .runtime-hint { float: right; color: var(--muted); font-size: 12px; }
.runtime ol { margin: 10px 0 0; padding-left: 24px; font: 12px/1.7 var(--mono); }
.runtime.error { background: #fff0eb; } .runtime.error summary { color: #96352c; }
.file-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.field-heading { display: flex; justify-content: space-between; margin-bottom: 10px; gap: 8px; font-size: 14px; }
.field-heading label { font-weight: 600; } .field-heading > span { color: var(--muted); font-size: 12px; }
.drop-zone { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 142px; padding: 20px; background: var(--sheet); border: 1px dashed #9ea99b; cursor: pointer; text-align: center; }
.drop-zone:hover, .drop-zone.dragover { background: var(--pale); border-color: var(--green); }
.drop-zone:focus-within { outline: 2px solid var(--green); outline-offset: 3px; }
.drop-zone input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.drop-zone strong { font-size: 16px; font-weight: 500; overflow-wrap: anywhere; }
.file-icon { color: var(--green); font: 24px var(--mono); }
.file-help { font-size: 13px; color: var(--muted); }
button { font: inherit; cursor: pointer; color: inherit; border: 1px solid var(--line); background: transparent; border-radius: 4px; padding: 9px 14px; }
button:hover:not(:disabled) { background: var(--pale); border-color: #9ea99b; }
button:disabled { opacity: .45; cursor: not-allowed; }
button:focus-visible, a:focus-visible, input:focus-visible, summary:focus-visible, pre:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
.clear { font-size: 12px; padding: 5px 0; border: 0; text-decoration: underline; }
.examples { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 17px 0; }
.examples > span { font-size: 13px; color: var(--muted); margin-right: 6px; }
.examples button { font-size: 13px; padding: 6px 9px; background: var(--sheet); }
.actions { display: flex; align-items: center; gap: 20px; border-top: 1px solid var(--line); padding: 18px 0 23px; }
button.primary { background: var(--green); color: #fff; border-color: var(--green); min-width: 138px; font-weight: 500; }
button.primary:hover:not(:disabled) { background: #163f2d; }
.coverage { display: flex; align-items: center; gap: 7px; font-size: 14px; }
input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--green); }
.coverage code { color: var(--muted); font-size: 12px; background: none; } .doctor { margin-left: auto; font-size: 14px; }
.results { border: 1px solid var(--line); background: var(--sheet); }
.result-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 0 16px; border-bottom: 1px solid var(--line); }
[role="tablist"] { display: flex; gap: 20px; }
[role="tab"] { border: 0; border-radius: 0; border-bottom: 2px solid transparent; padding: 13px 0 11px; font-size: 14px; color: var(--muted); }
[role="tab"][aria-selected="true"] { border-color: var(--green); color: var(--green); }
#result-status { font: 12px var(--mono); color: var(--muted); }
#result-status.error { color: #96352c; }
.results pre { font: 13px/1.65 var(--mono); min-height: 164px; max-height: 520px; overflow: auto; margin: 0; padding: 20px; white-space: pre-wrap; overflow-wrap: anywhere; tab-size: 2; }
.fineprint { font-size: 12.5px; color: var(--muted); margin: 14px 0 0; max-width: 900px; }
.feedback { border-top: 1px solid var(--line); margin-top: 24px; padding-top: 20px; max-width: 760px; }
.feedback p { margin: 10px 0 0; }

/* shared code blocks */
pre.cmd, pre.output { font: 13px/1.6 var(--mono); margin: 0; padding: 14px 16px; background: var(--sheet); border: 1px solid var(--line); overflow: auto; white-space: pre; }
pre.output { border-left: 3px solid var(--green); }
.err { color: var(--del); font-weight: 600; } .warn { color: var(--warn); font-weight: 600; } .info { color: var(--info); font-weight: 600; }

/* two questions */
.two-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 18px; }
.q p { margin: 0 0 12px; color: var(--muted); font-size: 15px; }

/* detector matrix */
.table-scroll { overflow-x: auto; }
.table-hint { display: none; }
.detectors { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 14px; background: var(--sheet); border: 1px solid var(--line); }
.detectors th, .detectors td { padding: 9px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.detectors th { font-weight: 600; font-size: 13px; color: var(--muted); background: var(--pale); }
.detectors td:not(:first-child) { color: var(--muted); white-space: nowrap; }
.detectors .control td { color: var(--muted); font-style: normal; }
.detectors .control td:first-child { color: var(--ink); }
.detectors td.hit { color: var(--green); font-style: normal; font-weight: 600; }
.detectors th:last-child, .detectors td:last-child { border-left: 2px solid var(--green); }
.note { max-width: 760px; margin: 22px 0 0; color: var(--muted); font-size: 15px; }

/* decks */
.evidence { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin: 24px 0 0; }
.evidence div { border-top: 2px solid var(--line); padding-top: 12px; }
.evidence dt { font: 600 22px/1.1 var(--mono); letter-spacing: -.03em; color: var(--green); margin-bottom: 6px; }
.evidence dd { margin: 0; font-size: 13.5px; color: var(--muted); }

/* install */
.install-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.install-grid > div, .two-grid > div { min-width: 0; }
.install-grid p { margin: 12px 0 0; font-size: 14px; color: var(--muted); }

/* limits */
.limits ul { max-width: 760px; margin: 0; padding-left: 20px; color: var(--muted); }
.limits li { margin-bottom: 8px; }
.limits em { font-style: italic; color: var(--ink); }
.ask { max-width: 760px; margin: 26px 0 0; padding: 18px 20px; background: var(--pale); border-left: 3px solid var(--green); }

footer { margin-top: 56px; padding: 19px 0 32px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12.5px; }
footer > div { display: flex; justify-content: space-between; gap: 12px; } footer a { color: var(--muted); }
.error { color: #96352c; }
[hidden] { display: none !important; }

@media (max-width: 900px) {
  .evidence { grid-template-columns: 1fr 1fr; }
  .install-grid { grid-template-columns: 1fr; }
  .redline { grid-template-columns: 1fr; }
  figcaption { grid-template-columns: 1fr; gap: 10px; }
  .page { grid-template-columns: 1fr 140px; }
}
@media (max-width: 650px) {
  main { padding: 0 18px; } header { min-height: 70px; padding: 14px 0; flex-wrap: wrap; gap: 12px; } .brand { font-size: 14px; gap: 7px; white-space: nowrap; }
  nav { gap: 14px; } nav a { white-space: nowrap; }
  section { padding-top: 40px; } .hero { padding-top: 34px; } h1 br { display: none; }
  .page { grid-template-columns: 1fr; } .margin-empty { display: none; } .margin { padding: 0 14px 14px; } .balloon { margin-top: 10px; } .balloon::before, .balloon::after { display: none; }
  .doc { padding: 20px 18px; border-right: 0; border-bottom: 1px solid #eee9d8; }
  .file-grid, .two-grid { grid-template-columns: 1fr; gap: 18px; }
  .drop-zone { min-height: 120px; } .actions { gap: 12px; flex-wrap: wrap; } .coverage code { display: none; }
  .primary { flex: 1; } .coverage { order: 3; width: 100%; } .doctor { margin-left: 0; }
  .runtime-hint { display: none; } .evidence { grid-template-columns: 1fr; }
  .detectors { font-size: 13px; } .detectors th, .detectors td { padding: 7px 8px; } .detectors td:not(:first-child) { white-space: normal; }
  .table-hint { display: block; color: var(--muted); font-size: 13px; margin: 0 0 8px; }
  footer > div { flex-direction: column; } #result-status { text-align: right; font-size: 11px; }
}
