:root {
  --bg: #ffffff;
  --bg1: #fafafa;
  --bg2: #f3f3f3;
  --bg3: #ebebeb;
  --line: #e9e9e9;
  --line2: #d2d2d2;
  --fg: #111111;
  --fg2: #3b3b3b;
  --dim: #727272;
  --faint: #a2a2a2;
  --inv: #ffffff;               /* text on an inverted (black) background */
  --mono: 'JetBrains Mono', 'SF Mono', ui-monospace, Menlo, Consolas, monospace;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  /* syntax palette — muted, the only colour on the site */
  --syn-kw: #cf222e;
  --syn-type: #0550ae;
  --syn-str: #1a7f37;
  --syn-num: #b35900;
  --syn-com: #8c959f;
  --syn-def: #1f2328;
  --syn-fn: #8250df;
  --syn-meta: #cf222e;
  --syn-op: #57606a;
  --syn-tag: #b4232f;
  --syn-attr: #953800;
  --syn-prop: #24292f;
  --side: 268px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--fg); font: 14px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--fg); text-decoration: none; border-bottom: 1px solid var(--line2); }
a:hover { border-color: var(--fg); }
::selection { background: var(--fg); color: var(--inv); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line2); border: 3px solid var(--bg); border-radius: 6px; }
::-webkit-scrollbar-track { background: transparent; }
button, input, textarea, select { font: inherit; color: inherit; }
kbd { font: 11px var(--mono); border: 1px solid var(--line2); padding: 1px 5px; color: var(--dim); border-radius: 3px; }
h1, h2, h3, h4 { font-weight: 600; margin: 0; letter-spacing: -0.01em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 32px 0; }

/* ---------- layout ---------- */
#app { display: grid; grid-template-columns: var(--side) 1fr; height: 100vh; }
#app.side-collapsed { grid-template-columns: 44px 1fr; }
#side { border-right: 1px solid var(--line); overflow-y: auto; display: flex; flex-direction: column; background: var(--bg1); }
#main { overflow: hidden; position: relative; }
.scroll { overflow-y: auto; height: 100%; }
.page { max-width: 900px; margin: 0 auto; padding: 40px 40px 120px; }

/* ---------- sidebar ---------- */
.brand { padding: 16px 12px 6px 18px; display: flex; align-items: center; gap: 10px; }
.brand a { border: 0; font-weight: 700; font-size: 17px; font-family: var(--mono); }
.brand a.brand-l { display: inline-flex; align-items: center; gap: 8px; }
.brand a.brand-l img { display: block; }
.brand .prog { color: var(--dim); font-size: 12px; margin-left: auto; }
.side-btn { background: none; border: 1px solid transparent; border-radius: 4px; width: 24px; height: 24px; cursor: pointer; color: var(--dim); font-family: var(--mono); font-size: 14px; line-height: 1; display: inline-flex; align-items: center; justify-content: center; }
.side-btn:hover { border-color: var(--line2); color: var(--fg); background: var(--bg); }
.progbar { height: 2px; background: var(--line); margin: 6px 18px 12px; }
.progbar > i { display: block; height: 100%; background: var(--fg); }
.side-search { margin: 0 12px 8px; }
.side-search input { width: 100%; background: var(--bg); border: 1px solid var(--line2); border-radius: 4px; padding: 5px 8px; outline: none; font-size: 13px; }
.side-search input:focus { border-color: var(--fg); }
.navgroup { padding: 4px 0 10px; }
.navgroup > .label { padding: 8px 18px 4px; color: var(--faint); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 600; }
.navtopic > .row { display: flex; align-items: center; gap: 10px; padding: 3px 12px 3px 18px; cursor: pointer; color: var(--fg2); user-select: none; font-size: 13.5px; }
.navtopic > .row:hover, .navitem:hover { background: var(--bg3); color: var(--fg); }
.navtopic > .row .n { color: var(--faint); width: 20px; font-size: 11px; }
.navtopic > .row .t { flex: 1; }
.navtopic > .row .c { color: var(--faint); font-size: 11px; }
.navtopic.active > .row { color: var(--fg); font-weight: 600; }
.navtopic .kids { display: none; padding: 1px 0 6px; }
.navtopic.open .kids { display: block; }
.navitem { display: flex; gap: 10px; padding: 2px 12px 2px 46px; color: var(--dim); cursor: pointer; border: 0; font-size: 13px; line-height: 1.45; }
.navitem.active { color: var(--fg); background: var(--bg3); font-weight: 500; }
.navitem .g { width: 10px; flex: none; }
.side-foot { margin-top: auto; padding: 10px 18px; border-top: 1px solid var(--line); color: var(--faint); font-size: 11px; }
.rail { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 12px 0; }
.rail .prog { font-family: var(--mono); font-size: 10px; color: var(--dim); writing-mode: vertical-rl; transform: rotate(180deg); }

/* ---------- typography / blocks ---------- */
.muted { color: var(--dim); }
.faint { color: var(--faint); }
.eyebrow { color: var(--faint); font-size: 10.5px; letter-spacing: 0.15em; text-transform: uppercase; margin-bottom: 10px; font-weight: 600; }
.title { font-size: 26px; margin-bottom: 6px; letter-spacing: -0.025em; }
.lead { color: var(--fg2); font-size: 15px; margin: 0 0 24px; line-height: 1.6; }
.md p { margin: 0 0 12px; color: var(--fg2); line-height: 1.65; }
.md h2 { font-size: 12px; margin: 22px 0 8px; color: var(--fg); text-transform: uppercase; letter-spacing: 0.1em; }
.md h3 { font-size: 14px; margin: 18px 0 6px; }
.md ul, .md ol { margin: 0 0 12px; padding-left: 20px; color: var(--fg2); line-height: 1.65; }
.md li { margin: 2px 0; }
.md li::marker { color: var(--faint); }
.md strong { color: var(--fg); }
.md code, code.i { background: var(--bg2); border: 1px solid var(--line); border-radius: 3px; padding: 1px 5px; font-size: 12.5px; color: var(--fg); }
pre.code { background: var(--bg1); border: 1px solid var(--line); border-radius: 4px; padding: 12px 14px; overflow-x: auto; margin: 0 0 12px; font-size: 12.5px; line-height: 1.6; }
pre.code code { background: none; border: 0; padding: 0; }
.section { margin: 28px 0 0; }
.section > h2 { font-size: 11px; color: var(--dim); text-transform: uppercase; letter-spacing: 0.14em; margin-bottom: 18px; font-weight: 600; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
table.kv { border-collapse: collapse; width: 100%; }
table.kv td { border-bottom: 1px solid var(--line); padding: 6px 10px 6px 0; vertical-align: top; }
table.kv td:last-child { color: var(--dim); text-align: right; white-space: nowrap; }

.edgelist { list-style: none; padding: 0; margin: 0; columns: 2; column-gap: 40px; }
.edgelist li { padding: 4px 0 4px 20px; position: relative; break-inside: avoid; color: var(--fg2); line-height: 1.55; }
.edgelist li::before { content: '!'; position: absolute; left: 2px; color: var(--fg); font-weight: 700; font-family: var(--mono); }
.pattern { border-left: 2px solid var(--line2); padding: 2px 0 2px 14px; margin-bottom: 16px; }
.pattern b { display: block; }
.pattern .w { color: var(--dim); font-size: 13px; margin-bottom: 4px; }
.pattern pre { margin: 6px 0 0; }

/* problem list on topic page */
.plist { border-top: 1px solid var(--line); }
.prow { display: grid; grid-template-columns: 24px 1fr 90px 76px; gap: 12px; align-items: center; padding: 9px 6px; border-bottom: 1px solid var(--line); cursor: pointer; }
.prow:hover { background: var(--bg1); }
.prow .d { color: var(--dim); font-size: 13px; }
.prow .lc { color: var(--faint); font-size: 12px; text-align: right; }

/* ---------- controls ---------- */
.btn { background: var(--bg); border: 1px solid var(--line2); border-radius: 4px; padding: 4px 11px; cursor: pointer; color: var(--fg2); white-space: nowrap; font-size: 13px; line-height: 1.4; }
.btn:hover { border-color: var(--fg); color: var(--fg); }
.btn.primary { background: var(--fg); color: var(--inv); border-color: var(--fg); font-weight: 600; }
.btn.primary:hover { background: #000; color: var(--inv); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { border-color: var(--line2); }
.btn:disabled { opacity: 0.4; cursor: default; }
.btn.sm { padding: 1px 8px; font-size: 11.5px; }
.tag { display: inline-block; border: 1px solid var(--line2); border-radius: 3px; color: var(--dim); font-size: 10px; padding: 0 6px; letter-spacing: 0.06em; text-transform: uppercase; vertical-align: middle; font-weight: 600; }
.tag.inv { background: var(--fg); color: var(--inv); border-color: var(--fg); }
.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--line); flex: none; padding: 0 8px; align-items: center; }
.tabs button { background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; padding: 8px 11px 7px; color: var(--dim); cursor: pointer; font-size: 13px; }
.tabs button:hover { color: var(--fg); }
.tabs button.on { color: var(--fg); border-bottom-color: var(--fg); font-weight: 600; }
.tabs .sp { flex: 1; }
textarea.field, input.field { width: 100%; background: var(--bg); border: 1px solid var(--line2); border-radius: 4px; padding: 6px 9px; outline: none; resize: vertical; color: var(--fg); line-height: 1.5; }
textarea.field:focus, input.field:focus { border-color: var(--fg); }
.reveal { border: 1px dashed var(--line2); border-radius: 4px; padding: 8px 12px; color: var(--dim); cursor: pointer; margin-bottom: 10px; }
.reveal:hover { color: var(--fg); border-color: var(--fg); }
.reveal.open { border-style: solid; border-color: var(--line); color: var(--fg2); cursor: default; background: var(--bg1); }
.toast { position: fixed; bottom: 24px; right: 24px; background: var(--fg); color: var(--inv); padding: 10px 18px; z-index: 99; font-weight: 600; border-radius: 4px; }

/* ---------- workspace (problem view) ---------- */
.ws { display: grid; grid-template-columns: var(--left, 44%) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); height: 100%; }
.ws-left { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-width: 0; min-height: 0; position: relative; }
.ws-left .body { flex: 1; overflow-y: auto; padding: 20px 24px 80px; }
.ws-right { display: grid; grid-template-rows: auto minmax(0, 1fr) 7px var(--console, 42%); min-width: 0; min-height: 0; height: 100%; overflow: hidden; }
.ws-bar { display: flex; align-items: center; gap: 6px; padding: 5px 10px; border-bottom: 1px solid var(--line); }
.ws-bar .sp { flex: 1; }
.ws-editor { min-height: 0; overflow: hidden; }
.ws-split { background: var(--bg1); border-top: 1px solid var(--line); cursor: row-resize; }
.ws-split:hover { background: var(--line2); }
.ws-console { display: flex; flex-direction: column; min-height: 0; }
.ws-console .out { flex: 1; overflow-y: auto; padding: 12px 16px 36px; }
.ws-vsplit { position: absolute; top: 0; bottom: 0; right: -4px; width: 7px; cursor: col-resize; z-index: 5; }
.ws-vsplit:hover, .ws-vsplit.drag { background: var(--line2); }
.ws.wide { grid-template-columns: minmax(0, 1fr) 0; }
.ws.wide > .ws-right { display: none; }
.ws.wide .ws-left .body > * { max-width: 880px; margin-left: auto; margin-right: auto; }
.tabs button.x { color: var(--fg2); font-family: var(--mono); font-size: 12px; border: 1px solid var(--line2); border-radius: 4px; margin: 0 0 0 6px; padding: 1px 8px; }
.tabs button.x:hover { border-color: var(--fg); color: var(--fg); }
.phead { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.phead h1 { font-size: 19px; letter-spacing: -0.02em; }
.meta { color: var(--dim); font-size: 12.5px; margin-bottom: 16px; display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.sample { border: 1px solid var(--line); border-radius: 4px; margin-bottom: 8px; overflow: hidden; }
.sample .r { display: grid; grid-template-columns: 72px 1fr; border-bottom: 1px solid var(--line); }
.sample .r:last-child { border-bottom: 0; }
.sample .k { color: var(--faint); padding: 6px 10px; border-right: 1px solid var(--line); font-size: 11px; background: var(--bg1); text-transform: uppercase; letter-spacing: 0.08em; }
.sample .v { padding: 6px 10px; white-space: pre-wrap; word-break: break-all; font-size: 13px; }
.constraints { padding-left: 20px; color: var(--fg2); margin: 0; }
.constraints li { margin: 4px 0; }

/* results */
.verdict { font-size: 18px; font-weight: 700; margin-bottom: 6px; display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.verdict.bad span.v { background: var(--fg); color: var(--inv); padding: 1px 10px; border-radius: 3px; }
.verdict .s { font-size: 12px; font-weight: 400; color: var(--dim); }
.cases { margin-top: 12px; border-top: 1px solid var(--line); }
.case > .h { display: grid; grid-template-columns: 22px 48px 1fr auto; gap: 8px; padding: 6px 6px; border-bottom: 1px solid var(--line); cursor: pointer; align-items: baseline; }
.case > .h:hover { background: var(--bg1); }
.case.bad > .h .g { font-weight: 700; }
.case .h .i { color: var(--faint); }
.case .h .e { color: var(--fg2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.case.bad .h .e { color: var(--fg); font-weight: 500; }
.case .h .ms { color: var(--faint); font-size: 11px; }
.case .d { display: none; padding: 10px 0 12px 28px; border-bottom: 1px solid var(--line); }
.case.open .d { display: block; }
.kvb { margin-bottom: 8px; }
.kvb .k { color: var(--faint); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 4px; font-weight: 600; }
.kvb .v { background: var(--bg1); border: 1px solid var(--line); border-radius: 4px; padding: 6px 10px; white-space: pre-wrap; word-break: break-all; max-height: 240px; overflow: auto; font-size: 13px; }
.kvb .v.err { border-color: var(--fg); }
.edgebanner { border: 1.5px solid var(--fg); border-radius: 4px; padding: 7px 12px; margin: 10px 0 4px; }
.edgebanner b { background: var(--fg); color: var(--inv); padding: 1px 7px; margin-right: 10px; border-radius: 2px; font-size: 12px; letter-spacing: 0.06em; }
.compile { white-space: pre-wrap; background: var(--bg1); border: 1px solid var(--line2); border-radius: 4px; padding: 14px 16px; font-size: 12.5px; overflow-x: auto; }
.spin { display: inline-block; width: 11px; height: 11px; border: 1.5px solid var(--line2); border-top-color: var(--fg); border-radius: 50%; animation: s 0.7s linear infinite; vertical-align: -1px; margin-right: 10px; }
@keyframes s { to { transform: rotate(360deg); } }
.edgetags { list-style: none; padding: 0; margin: 0 0 20px; }
.edgetags li { padding: 4px 0; border-bottom: 1px solid var(--line); display: flex; gap: 12px; }
.edgetags li .g { width: 14px; flex: none; font-family: var(--mono); }
.edgetags li.miss { color: var(--fg); font-weight: 600; }
.edgetags li.unk { color: var(--dim); }
.arg-in { margin-bottom: 8px; }
.arg-in label { display: block; color: var(--faint); font-size: 11px; margin-bottom: 4px; }
.arg-in textarea { min-height: 30px; font-size: 12.5px; }
.casebar { display: flex; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }
.casebar .btn.on { border-color: var(--fg); color: var(--fg); font-weight: 600; }
.nudge { border: 1.5px solid var(--fg); border-radius: 4px; padding: 12px 14px; margin-bottom: 14px; }
.nudge p { margin: 0 0 14px; }

/* playground */
.pg { display: grid; grid-template-columns: 1fr 400px; grid-template-rows: minmax(0, 1fr); height: 100%; min-height: 0; }
.pg-io { border-left: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.pg-io textarea { flex: none; height: 140px; border: 0; border-bottom: 1px solid var(--line); background: var(--bg1); padding: 14px 16px; outline: none; resize: vertical; }
.pg-io pre { flex: 1; margin: 0; padding: 16px; overflow: auto; white-space: pre-wrap; }

/* home */
.grid2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.tcard { background: var(--bg); padding: 14px 16px; cursor: pointer; }
.tcard:hover { background: var(--bg1); }
.tcard .n { color: var(--faint); font-size: 11px; }
.tcard .t { font-weight: 600; margin: 4px 0 6px; }
.tcard .s { color: var(--dim); font-size: 13px; line-height: 1.55; }
.tcard .bar { height: 2px; background: var(--line); margin-top: 10px; }
.tcard .bar i { display: block; height: 100%; background: var(--fg); }
.rules { counter-reset: r; list-style: none; padding: 0; margin: 0; }
.rules li { counter-increment: r; padding: 7px 0 7px 36px; position: relative; border-bottom: 1px solid var(--line); color: var(--fg2); line-height: 1.6; }
.rules li::before { content: counter(r, decimal-leading-zero); position: absolute; left: 0; color: var(--faint); }
.rules li b { color: var(--fg); }

/* ---------- collapsible sections ---------- */
.sec { margin-top: 26px; }
.sec > .sec-h { display: flex; align-items: center; gap: 12px; width: 100%; background: none; border: 0; border-bottom: 1px solid var(--line); padding: 0 0 12px; cursor: pointer; text-align: left; color: var(--dim); padding-bottom: 7px; }
.sec > .sec-h:hover { color: var(--fg); }
.sec > .sec-h .car { font-family: var(--mono); width: 12px; color: var(--faint); transition: transform 0.12s; display: inline-block; }
.sec.open > .sec-h .car { transform: rotate(90deg); color: var(--fg); }
.sec > .sec-h .lbl { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.14em; font-weight: 600; }
.sec.open > .sec-h .lbl { color: var(--fg); }
.sec > .sec-h .cnt { font-family: var(--mono); font-size: 11px; color: var(--faint); }
.sec > .sec-h .sp { flex: 1; }
.sec > .sec-b { display: none; padding-top: 12px; }
.sec.open > .sec-b { display: block; }
.sec.sm { margin-top: 18px; }
.sec-tools { display: flex; gap: 6px; justify-content: flex-end; margin-top: -8px; }

/* ---------- CodeMirror light theme ---------- */
.CodeMirror { height: 100%; background: var(--bg); color: #1f2328; font: 13px/1.6 var(--mono); }
.CodeMirror-lines { padding: 8px 0; }
.CodeMirror pre.CodeMirror-line, .CodeMirror pre.CodeMirror-line-like { padding: 0 12px; }
.CodeMirror-gutters { background: var(--bg); border-right: 1px solid var(--line); }
.CodeMirror-linenumber { color: #bdbdbd; padding: 0 12px 0 14px; }
.CodeMirror-cursor { border-left: 2px solid var(--fg); }
.CodeMirror-selected, .CodeMirror-focused .CodeMirror-selected { background: #e4e8ee !important; }
.CodeMirror-line::selection, .CodeMirror-line > span::selection, .CodeMirror-line > span > span::selection { background: #e4e8ee; }
.CodeMirror-activeline-background { background: #f7f7f7; }
.CodeMirror-matchingbracket { color: var(--fg) !important; text-decoration: underline; font-weight: 700; }
.CodeMirror-nonmatchingbracket { background: var(--fg); color: var(--inv) !important; }

/* ---------- indent guides, active block, breadcrumb, folding ---------- */
:root { --guide: #ececec; --guide-on: #9b9b9b; --scope-bg: rgba(0, 0, 0, 0.022); }
.ig-1 { --d: 1 } .ig-2 { --d: 2 } .ig-3 { --d: 3 } .ig-4 { --d: 4 } .ig-5 { --d: 5 } .ig-6 { --d: 6 }
.ig-7 { --d: 7 } .ig-8 { --d: 8 } .ig-9 { --d: 9 } .ig-10 { --d: 10 } .ig-11 { --d: 11 } .ig-12 { --d: 12 }
.CodeMirror pre.CodeMirror-line[class*=" ig-"], pre.code .cl[class*="ig-"] {
  background-image: repeating-linear-gradient(90deg, var(--guide) 0 1px, transparent 1px calc(var(--iu, 4) * 1ch));
  background-repeat: no-repeat;
  background-size: calc(var(--d) * var(--iu, 4) * 1ch) 100%;
}
.CodeMirror pre.CodeMirror-line[class*=" ig-"] { background-position: 12px 0; }
pre.code .cl { display: inline-block; vertical-align: top; min-width: 1px; min-height: 1.6em; }
.cm-scope {
  position: absolute; right: 0; z-index: 1; pointer-events: none; display: none;
  border-left: 1px solid var(--guide-on); background: var(--scope-bg);
}
.cm-crumbs {
  position: absolute; right: 10px; bottom: 8px; z-index: 6; display: flex; align-items: center; gap: 2px;
  max-width: calc(100% - 80px); overflow: hidden; white-space: nowrap;
  font: 11px var(--mono); color: var(--dim); background: color-mix(in srgb, var(--bg) 92%, transparent);
  border: 1px solid var(--line); border-radius: 4px; padding: 2px 4px; opacity: 0.85;
}
.cm-crumbs:hover { opacity: 1; }
.cm-crumbs .crumb { font: inherit; color: inherit; background: none; border: 0; padding: 1px 4px; border-radius: 3px; cursor: pointer; overflow: hidden; text-overflow: ellipsis; }
.cm-crumbs .crumb:last-child { color: var(--fg); }
.cm-crumbs .crumb:hover { background: var(--bg2); color: var(--fg); }
.cm-crumbs .sep { color: var(--faint); }
.CodeMirror-foldgutter { width: 14px; }
.CodeMirror-foldgutter-open, .CodeMirror-foldgutter-folded { cursor: pointer; color: var(--faint); font-size: 11px; line-height: inherit; text-align: center; }
.CodeMirror-foldgutter-open::after { content: '▾'; }
.CodeMirror-foldgutter-folded::after { content: '▸'; color: var(--fg); }
.CodeMirror-foldgutter-open { opacity: 0; transition: opacity 0.15s; }
.CodeMirror:hover .CodeMirror-foldgutter-open { opacity: 1; }
.CodeMirror-foldmarker { color: var(--dim); background: var(--bg2); border: 1px solid var(--line2); border-radius: 3px; padding: 0 4px; margin: 0 2px; cursor: pointer; font-family: var(--mono); text-shadow: none; }
.cm-keyword { color: var(--syn-kw); }
.cm-type, .cm-variable-3 { color: var(--syn-type); }
.cm-builtin { color: var(--syn-type); }
.cm-def { color: var(--syn-fn); }
.cm-fn { color: var(--syn-fn); }
.cm-type { font-weight: 500; }
.cm-variable, .cm-variable-2 { color: #1f2328; }
.cm-property { color: var(--syn-prop); }
.cm-string, .cm-string-2 { color: var(--syn-str); }
.cm-number, .cm-atom { color: var(--syn-num); }
.cm-comment { color: var(--syn-com); font-style: italic; }
.cm-meta { color: var(--syn-meta); }
.cm-operator { color: var(--syn-op); }
.cm-tag { color: var(--syn-tag); }
.cm-attribute { color: var(--syn-attr); }
.cm-bracket { color: #8c8c8c; }
.cm-error { text-decoration: underline wavy #999; }
.cm-qualifier { color: var(--syn-attr); }

/* ---------- mono where it matters: code, data, numbers ---------- */
code, pre, kbd, textarea, input.field, .CodeMirror, .mono,
.sample .v, .kvb .v, .compile, .prow .lc, .case .h .ms, .case .h .i, .navtopic > .row .n, .navtopic > .row .c,
.brand .prog, .tcard .n, .side-foot, .verdict .s, .arg-in label, .rules li::before { font-family: var(--mono); }

@media (max-width: 900px) {
  #app, #app.side-collapsed { grid-template-columns: 1fr; }
  #side { display: none; }
  .page { padding: 32px 18px 100px; }
  .ws, .pg { grid-template-columns: 1fr; grid-template-rows: auto auto; height: auto; }
  .edgelist { columns: 1; }
}
