/* Always-On Pane — Dialect C: The State Contract.
   Every click has one meaning, written down; every state looks like what it is.
   Everything shared lives in ../shared/case-study.css. This file holds only the dialect:
   blue marks the scope (dashed = draft, solid = applied) while ticks stay ink, as in the
   original designs · dark means committed · trees and states · the specimen sheet ·
   the rule bench, where things move only when a state changes ("set"). */
@import url("../shared/case-study.css?v=4");

:root {
  --accent: #2d4cf5;          /* the scope (5.23:1 on paper; white on it 6.06:1) */
  --accent-ink: #2d4cf5;
  --accent-on-deep: #8fa0ff;  /* on ink (7.33:1) */
  --accent-tint: #e2e6ff;
  --deep: var(--ink);         /* dark = what is committed: the turn, the outcome */
  --hatch: repeating-linear-gradient(135deg, var(--ink) 0 1px, transparent 1px 5px);
  --t-set: 240ms;
}

/* "Always-On" is a longer word than "Triage": the title column is widened so it holds
   close to the shared hero size on one line. */
.hero h1 { font-size: clamp(64px, 11vw, 162px); }
@media (min-width: 1001px) { .hero-copy { grid-template-columns: 1.25fr .75fr; } }

/* ---------- State vocabulary: one hue plus form ---------- */
.state-key { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-block: 0; padding: 12px 16px; border: 1px solid var(--line-strong); background: var(--white); color: var(--text); font: 500 14px/1.4 var(--sans); list-style: none; }
.state-key li { display: inline-flex; align-items: center; gap: 8px; }
.box { display: inline-grid; place-items: center; flex: 0 0 auto; width: 15px; height: 15px; border: 1.5px solid var(--ink); background: var(--white); color: var(--white); font: 700 11px/1 var(--sans); }
.box.on, .box.some { background: var(--ink); }
.box.on:empty::before { content: "✓"; }
.box.some:empty::before { content: "–"; }
.bracket { position: relative; display: inline-block; width: 8px; height: 18px; border: 2.5px solid var(--accent); border-left: 0; }
.bracket.draft { border-style: dashed; }
.hatch-chip { display: inline-block; width: 18px; height: 12px; background: var(--hatch); border: 1px solid var(--ink); }
.caret { color: var(--muted); font: 700 12px/1 var(--mono); }
/* A row's scope tag: the words carry the state, the bracket shows it */
.scope-tag { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; color: var(--muted); font: 700 11px/1 var(--mono); letter-spacing: .07em; text-transform: uppercase; white-space: nowrap; }
.scope-tag::after { content: ""; width: 7px; height: 18px; border: 2.5px solid transparent; border-left: 0; }
.scope-tag.is-applied { color: var(--ink); }
.scope-tag.is-applied::after { border-color: var(--accent); }
.scope-tag.is-draft, .scope-tag.is-removed { color: var(--accent-ink); }
.scope-tag.is-draft::after, .scope-tag.is-removed::after { border-color: var(--accent); border-style: dashed; }
.scope-tag.is-removed { text-decoration: line-through; }
.scope-tag.is-out { color: var(--ink); }
.scope-tag.is-out::after { width: 18px; height: 12px; border: 1px solid var(--ink); background: var(--hatch); }

/* ---------- Context: what a planning scope is made of (zoomed out) ---------- */
.scope-map { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; border: 1px solid var(--line); background: var(--line); }
.scope-map .dim { display: flex; flex-direction: column; gap: 22px; min-height: 380px; padding: 26px 22px; background: var(--paper); }
.dim-name { display: flex; justify-content: space-between; gap: 12px; margin: 0; padding-bottom: 14px; border-bottom: 1px solid currentColor; font: 700 11px/1.3 var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.dim-name b { color: var(--muted); font-weight: 400; letter-spacing: .04em; }
.chain { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.chain li { position: relative; padding: 9px 12px; border: 1px solid var(--ink); background: var(--white); font-size: 16px; font-weight: 650; letter-spacing: -.01em; }
.chain li + li { margin-top: 20px; margin-left: 16px; }
.chain li + li::before { content: ""; position: absolute; left: -10px; top: -21px; width: 9px; height: 38px; border-left: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.chain li + li + li { margin-left: 32px; }
.chain li + li + li + li { margin-left: 48px; }
.chain li.leaf { box-shadow: inset 3px 0 0 var(--ink); }
.chain.alt li { border-style: dashed; }
.paths { display: grid; grid-template-columns: 1.3fr 1fr; gap: 10px; align-items: start; }
.paths small { display: block; margin-bottom: 8px; color: var(--muted); font: 11px/1.3 var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.dim-extra { margin: auto 0 0; padding-top: 14px; border-top: 1px dashed var(--line-strong); color: var(--text); font-size: 14px; line-height: 1.45; }
.dim-extra span { display: block; margin-bottom: 5px; color: var(--ink); font: 700 11px/1.2 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.scope-sum { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 20px 22px; background: var(--ink); color: var(--white); }
.scope-sum span { padding: 8px 12px; border: 1px solid var(--line-on-ink); font: 12px var(--mono); }
.scope-sum i { color: var(--muted-on-ink); font-size: 22px; font-style: normal; }
.scope-sum strong { padding: 8px 14px; background: var(--accent); color: var(--white); font-size: 16px; letter-spacing: -.01em; }
.scope-sum small { margin-left: auto; color: var(--muted-on-ink); font: 13px/1.4 var(--sans); }

/* ---------- The problem: three states at poster scale (zoomed in) ---------- */
.states { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 10px; }
.state { display: flex; flex-direction: column; min-height: 440px; padding: 26px; border: 1px solid var(--ink); background: var(--white); }
.state h3 { margin: 30px 0 22px; font-size: clamp(30px, 3vw, 42px); font-weight: 600; letter-spacing: -.05em; line-height: .95; }
.state > p:last-child { margin: auto 0 0; padding-top: 16px; border-top: 1px dashed var(--line-strong); color: var(--text); font-size: 15px; line-height: 1.5; }
.state > p:last-child b { color: var(--ink); font-weight: 650; }
.mini-tree { padding: 12px 14px; border: 1px solid var(--line-strong); background: var(--paper); font: 500 17px/1 var(--sans); }
.mini-tree div { display: flex; align-items: center; gap: 12px; min-height: 40px; }
.mini-tree .in { padding-left: 26px; }
.mini-tree .box { width: 18px; height: 18px; font-size: 12px; }
.mini-tree .caret { margin-left: auto; }
.mini-tree .focus { margin-inline: -8px; padding-inline: 8px; outline: 1.5px dotted var(--ink); outline-offset: -2px; }
.mini-report { display: grid; gap: 8px; padding: 14px; border: 1px solid var(--line-strong); background: var(--paper); font: 13px var(--mono); color: var(--text); }
.mini-report span { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.mini-report b { color: var(--ink); font-weight: 700; }
.mini-report i { display: block; height: 9px; background: rgba(23, 24, 22, .12); }
.mini-report i:nth-of-type(2) { width: 80%; } .mini-report i:nth-of-type(3) { width: 64%; }

/* ---------- The brief: two surfaces, one draft ---------- */
.anatomy .surface-shape { position: relative; z-index: 1; height: 118px; margin: 26px 0 0; border: 1px solid var(--ink); background: var(--white); }
.surface-shape.pane { background: linear-gradient(90deg, var(--white) 0 70%, var(--ink) 70% calc(70% + 1px), var(--paper-2) calc(70% + 1px)); }
.surface-shape.draft { display: grid; place-items: center; border: 2.5px dashed var(--accent); color: var(--accent-ink); font: 700 12px var(--mono); letter-spacing: .08em; }
.surface-shape.expanded { background:
  linear-gradient(var(--ink), var(--ink)) 8px 10px / 22% 3px no-repeat,
  linear-gradient(rgba(23, 24, 22, .16), rgba(23, 24, 22, .16)) 8px 18px / 22% 44% no-repeat,
  linear-gradient(rgba(23, 24, 22, .16), rgba(23, 24, 22, .16)) calc(8px + 24%) 18px / 22% 44% no-repeat,
  linear-gradient(rgba(23, 24, 22, .16), rgba(23, 24, 22, .16)) calc(8px + 48%) 18px / 22% 44% no-repeat,
  repeating-linear-gradient(rgba(23, 24, 22, .2) 0 1px, transparent 1px 8px) 8px 74% / calc(100% - 16px) 24% no-repeat,
  var(--white); }

/* ---------- The turn: review notes, redrawn ---------- */
.notes-card { display: grid; grid-template-columns: minmax(180px, .34fr) 1fr; gap: 40px; margin-top: 14px; padding: 28px; border: 1px solid var(--line-on-ink); background: var(--ink-3); }
.notes-card .label { color: var(--white); }
.notes-card .label b { display: block; margin-top: 8px; color: var(--white); font: 650 16px/1.3 var(--sans); letter-spacing: -.01em; text-transform: none; }
.notes-card .label small { display: block; margin-top: 10px; color: var(--muted-on-ink); font: 12px/1.45 var(--sans); letter-spacing: 0; text-transform: none; }
.notes-card ul { margin: 0; padding: 0; list-style: none; columns: 2; column-gap: 36px; }
.notes-card li { display: flex; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line-on-ink); break-inside: avoid; color: var(--text-on-ink); font: 15px/1.45 var(--sans); }
.notes-card li b { color: var(--white); }
.notes-card .rule { grid-column: 2; margin: 0; padding: 14px 16px 14px 20px; background: var(--paper); box-shadow: inset 4px 0 0 var(--ink); color: var(--ink); font: 650 17px/1.5 var(--sans); }

/* ---------- Decision glyphs (ticks ink; the scope is the blue) ---------- */
.g-row i { left: 6px; right: 6px; height: 12px; border: 1px solid var(--ink); background: var(--white); }
.g-row i:nth-child(1) { top: 6px; } .g-row i:nth-child(2) { top: 26px; background: var(--ink); } .g-row i:nth-child(3) { top: 46px; }
.g-two i:nth-child(1) { left: 6px; top: 20px; width: 20px; height: 20px; border: 1px solid var(--ink); background: var(--ink); }
.g-two i:nth-child(2) { left: 32px; top: 25px; width: 30px; height: 10px; background: var(--line-strong); }
.g-two i:nth-child(3) { right: 6px; top: 20px; width: 18px; height: 20px; border: 1px solid var(--ink); background: var(--white); }
.g-two i:nth-child(3)::before { content: "›"; position: absolute; left: 5px; top: 0; color: var(--ink); font: 700 16px/18px var(--sans); font-style: normal; }
.g-both i:nth-child(1) { left: 6px; top: 4px; width: 16px; height: 16px; border: 1px solid var(--ink); background: var(--ink); }
.g-both i:nth-child(2) { left: 28px; top: 7px; width: 58px; height: 10px; background: var(--ink); }
.g-both i:nth-child(3) { left: 28px; top: 28px; width: 52px; height: 11px; border: 1px solid var(--ink); background: var(--white); box-shadow: 6px 0 0 -2px var(--accent); }
.g-both i:nth-child(4) { left: 28px; top: 46px; width: 52px; height: 11px; border: 1px solid var(--ink); background: var(--white); box-shadow: 6px 0 0 -2px var(--accent); }
.g-popup i:nth-child(1) { inset: 4px; border: 1px solid var(--line-strong); background: var(--paper-2); }
.g-popup i:nth-child(2) { left: 24px; top: 12px; width: 46px; height: 40px; border: 2px solid var(--ink); background: var(--white); box-shadow: 0 6px 14px rgba(0, 0, 0, .2); }
.g-page i:nth-child(1) { inset: 4px; border: 2px solid var(--ink); background: var(--white); }
.g-page i:nth-child(2), .g-page i:nth-child(3), .g-page i:nth-child(4) { top: 12px; width: 17px; height: 26px; background: var(--line-strong); }
.g-page i:nth-child(2) { left: 13px; } .g-page i:nth-child(3) { left: 37px; } .g-page i:nth-child(4) { left: 61px; }
.g-page i:nth-child(5) { left: 13px; top: 44px; width: 65px; height: 8px; background: var(--ink); }
.g-pane i:nth-child(1) { left: 4px; top: 4px; width: 58px; height: 56px; border: 1px solid var(--ink); background: var(--white); }
.g-pane i:nth-child(2) { right: 4px; top: 4px; width: 26px; height: 56px; border: 1px solid var(--ink); background: var(--paper-2); }
.g-pane i:nth-child(3) { left: 12px; top: 14px; width: 42px; height: 8px; background: var(--ink); }
.g-pane i:nth-child(4) { left: 12px; top: 30px; width: 30px; height: 8px; background: var(--line-strong); }
.g-auto i { top: 22px; width: 18px; height: 18px; border: 2px solid var(--muted); border-radius: 50%; }
.g-auto i:nth-child(1) { left: 2px; } .g-auto i:nth-child(2) { left: 25px; } .g-auto i:nth-child(3) { left: 48px; } .g-auto i:nth-child(4) { left: 71px; }
.g-blind i:nth-child(1) { left: 6px; top: 22px; width: 44px; height: 22px; background: var(--ink); }
.g-blind i:nth-child(2) { right: 6px; top: 12px; width: 30px; height: 40px; border: 1px dashed var(--ink); background: var(--white); }
.g-blind i:nth-child(2)::before { content: "?"; position: absolute; inset: 0; display: grid; place-items: center; color: var(--ink); font: 700 20px var(--sans); font-style: normal; }
.g-draft i:nth-child(1) { left: 4px; top: 4px; width: 38px; height: 56px; border: 1px solid var(--ink); background: linear-gradient(var(--ink), var(--ink)) 6px 8px / 10px 10px no-repeat, var(--white); }
.g-draft i:nth-child(2) { left: 48px; top: 4px; width: 40px; height: 34px; border: 1px solid var(--ink); background: repeating-linear-gradient(var(--white) 0 7px, var(--line-strong) 7px 8px); }
.g-draft i:nth-child(3) { left: 48px; top: 44px; width: 40px; height: 16px; border: 2px dashed var(--accent); background: var(--white); }

/* ---------- The contract: numbered clauses ---------- */
.contract { margin: 14px 0 0; padding: 0; list-style: none; border: 1px solid var(--ink); background: var(--white); }
.contract li { display: grid; grid-template-columns: 56px minmax(0, 1fr) minmax(0, .9fr); gap: 16px; align-items: baseline; padding: 16px 20px; border-top: 1px solid var(--line); transition: background var(--t-set) var(--ease); }
.contract li:first-child { border-top: 0; }
.contract b { font: 700 13px/1.4 var(--mono); }
.contract strong { font-size: 18px; font-weight: 650; letter-spacing: -.015em; line-height: 1.3; }
.contract span { color: var(--text); font-size: 15px; line-height: 1.5; }
.contract span em { font-style: normal; color: var(--muted); }
.contract li.is-fired { background: var(--accent-tint); }
.contract-head + .contract { margin-top: 0; }
.contract-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin: 0; padding: 12px 20px; border: 1px solid var(--ink); border-bottom: 0; background: var(--paper-2); font: 700 11px/1.3 var(--mono); letter-spacing: .1em; text-transform: uppercase; }

/* ---------- The rule bench (signature) ---------- */
.bench { margin-top: 14px; border: 1px solid var(--ink); background: var(--white); }
.bench-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 18px; padding: 14px 18px; border-bottom: 1px solid var(--ink); background: var(--paper-2); }
.bench-top .label { color: var(--ink); }
.bench-tabs { display: inline-flex; border: 1px solid var(--ink); }
.bench-tabs button { min-height: 40px; padding: 0 16px; border: 0; border-right: 1px solid var(--ink); background: var(--white); font-weight: 650; cursor: pointer; }
.bench-tabs button:last-child { border-right: 0; }
.bench-tabs button[aria-selected="true"] { background: var(--ink); color: var(--white); }
.bench-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); }
.bench-surface { min-width: 0; padding: 18px; }
.bench-surface + .bench-surface { border-left: 1px solid var(--line-strong); }
.bench-surface > h4 { display: flex; justify-content: space-between; gap: 10px; margin: 0 0 12px; font: 700 11px/1.3 var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.bench-surface > h4 span { color: var(--muted); }
.lvl { margin: 0 0 12px; }
.lvl-name { display: flex; justify-content: space-between; margin: 0 0 4px; padding-bottom: 6px; border-bottom: 1px solid var(--ink); font: 700 11px/1.3 var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.lvl-name span { color: var(--muted); font-weight: 500; }
.lvl-group { margin: 6px 0 2px; color: var(--muted); font: 600 11px/1.3 var(--mono); letter-spacing: .05em; }
.m-row { display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 2px 4px; border-bottom: 1px solid var(--line); transition: background var(--t-set) var(--ease); }
.m-row input { flex: 0 0 auto; width: 18px; height: 18px; margin: 0; accent-color: var(--ink); cursor: pointer; }
/* The checkbox's own hit area. Kept apart from the name, which only opens and closes (the recorded interaction rule). */
.m-row .m-box { display: inline-grid; flex: 0 0 auto; place-items: center; cursor: pointer; }
.m-row .m-name { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 6px; border: 0; background: transparent; font-size: 15px; font-weight: 600; cursor: pointer; }
.m-row .m-name[disabled] { cursor: default; font-weight: 500; }
.m-row .m-name .caret { display: inline-block; transition: transform var(--t-set) var(--ease); }
.m-row .m-name[aria-expanded="true"] .caret { transform: rotate(90deg); }
.m-row .m-name:hover:not([disabled]) { text-decoration: underline; text-underline-offset: 3px; }
.m-row.is-open { outline: 1.5px dotted var(--ink); outline-offset: -2px; }
.m-row.is-fired { background: var(--accent-tint); }
.cols-view { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line-strong); }
.cols-view > div { min-width: 0; padding: 8px 10px; }
.cols-view > div + div { border-left: 1px solid var(--line-strong); }
.cols-view .m-row { min-height: 34px; }
.cols-view .m-row .m-name { font-size: 14px; }
.cols-view .scope-tag { font-size: 11px; }
.cols-view .scope-tag span { display: none; }
/* Phones: one surface at a time, and a line for what the other surface did */
.bench-switch, .bench-sync { display: none; }
.bench-foot { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px 20px; align-items: center; padding: 16px 18px; border-top: 1px solid var(--ink); }
.bench-meter { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 0; font: 600 12px/1.4 var(--mono); }
.bench-meter div { display: flex; align-items: center; gap: 8px; }
.bench-meter dt { color: var(--muted); font-weight: 600; }
.bench-meter dd { margin: 0; color: var(--ink); font-variant-numeric: tabular-nums; }
.bench-meter .is-diff dd { color: var(--accent-ink); }
.bench-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.bench-actions button { min-height: 42px; padding: 0 16px; border: 1px solid var(--ink); background: transparent; font-weight: 650; cursor: pointer; }
.bench-actions button.primary { background: var(--ink); color: var(--white); }
.bench-actions button:disabled { border-color: var(--line-strong); background: transparent; color: var(--muted); cursor: not-allowed; }
.bench-log { margin: 0; padding: 14px 18px; border-top: 1px solid var(--line-strong); background: var(--paper); font: 500 13px/1.55 var(--mono); }
.bench-log b { font-weight: 700; }
.bench-log .arrow { color: var(--muted); }
.bench-report { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; margin: 0; padding: 12px 18px; border-top: 1px solid var(--line-strong); font-size: 14px; }
.bench-report b { font: 700 11px/1.3 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.bench-report span { color: var(--text); }
.paths-mode { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; margin: 0 0 12px; font-size: 14px; }
.paths-mode label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.paths-mode input { accent-color: var(--ink); }
.m-row .why { flex-basis: 100%; margin: -2px 0 6px 28px; color: var(--ink); font: 600 11px/1.4 var(--mono); }
.m-row { flex-wrap: wrap; }
.filter-by { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 8px; padding: 4px 8px; border: 1px solid var(--ink); font: 700 11px/1.3 var(--mono); letter-spacing: .05em; }
.filter-by.is-off { border-style: dashed; color: var(--muted); }
.path-note { margin: 8px 0 0; padding: 8px 10px; border: 1px dashed var(--ink); color: var(--ink); font: 600 11px/1.45 var(--mono); }

/* Member state machine diagram */
.bench-notes { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; margin-top: 40px; }
.bench-notes .machine { max-width: 980px; }
.machine { margin: 0; padding: 22px; border: 1px solid var(--line-strong); background: var(--white); }
.machine .scroller { overflow-x: auto; }
.machine svg { width: 100%; min-width: 640px; height: auto; }
.machine figcaption { margin-top: 12px; color: var(--text); font-size: 15px; line-height: 1.5; }

/* ---------- The hero loupe: one component, three states, magnified ---------- */
.loupe { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px; align-items: center; margin-top: 12px; padding: 14px 18px; border: 1px solid var(--ink); background: var(--white); }
.loupe > p { margin: 0; color: var(--muted); font: 700 11px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; max-width: 16ch; }
.loupe-rows { margin: 0; padding: 0; list-style: none; }
.loupe-rows li { display: flex; align-items: center; gap: 14px; min-height: 44px; border-bottom: 1px solid var(--line); font-size: 19px; font-weight: 600; letter-spacing: -.01em; }
.loupe-rows li:last-child { border-bottom: 0; }
.loupe-rows .box { width: 20px; height: 20px; font-size: 13px; }

/* The system: the configuration matrix */
.config-matrix { margin-top: 14px; overflow-x: auto; border: 1px solid var(--ink); background: var(--white); }
.config-matrix table { width: 100%; min-width: 720px; border-collapse: collapse; }
.config-matrix th, .config-matrix td { padding: 14px 18px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; font-size: 15px; line-height: 1.45; }
.config-matrix thead th { background: var(--ink); color: var(--white); font: 700 11px/1.3 var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.config-matrix tbody th { position: sticky; left: 0; width: 30%; background: var(--white); font-weight: 650; }
.config-matrix tbody th small { display: block; margin-top: 4px; color: var(--muted); font-size: 13px; font-weight: 450; }
.config-matrix td::before { content: "✓" / ""; margin-right: 8px; color: var(--ink); font-weight: 700; }
.config-matrix tbody tr:hover > * { background: var(--paper); }
.config-matrix tbody tr:last-child > * { border-bottom: 0; }

.chosen-tag { display: inline-block; margin-left: 8px; padding: 3px 7px; background: var(--ink); color: var(--white); font: 700 11px/1.3 var(--mono); letter-spacing: .06em; vertical-align: 2px; }

/* Full study: the state inspector has three columns */
.desk-cols.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* Legacy (encrypted full study) */
.demo-counts .is-changed strong { color: var(--accent-ink); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .scope-map { grid-template-columns: 1fr 1fr; }
  .bench-body { grid-template-columns: 1fr; }
  .bench-surface + .bench-surface { border-left: 0; border-top: 1px solid var(--line-strong); }
}
@media (max-width: 1000px) {
  .states { grid-template-columns: 1fr; }
  .notes-card { grid-template-columns: 1fr; gap: 20px; }
  .notes-card .rule { grid-column: auto; }
  .contract li { grid-template-columns: 48px minmax(0, 1fr); }
  .contract li span { grid-column: 2; }
}
@media (max-width: 700px) {
  .hero h1 { font-size: 15vw; }
  .scope-map { grid-template-columns: 1fr; }
  .scope-map .dim { min-height: 0; }
  .scope-sum small { margin-left: 0; }
  .state { min-height: 0; }
  .notes-card { padding: 20px; }
  .notes-card ul { columns: 1; }
  .bench-switch { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding: 12px 18px; border-bottom: 1px solid var(--line-strong); }
  .bench-switch .segmented button { min-height: 40px; padding: 0 14px; font-size: 14px; }
  .bench[data-surface="pane"] [data-surface-panel="expanded"], .bench[data-surface="expanded"] [data-surface-panel="pane"] { display: none; }
  .bench-body .bench-surface + .bench-surface { border-top: 0; }
  .bench-sync:not(:empty) { display: block; margin: 0; padding: 10px 18px; border-top: 1px solid var(--line); font-size: 14px; font-weight: 600; }
  /* The expanded view keeps its columns, and scrolls sideways one level at a time */
  .cols-view { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(160px, 1fr); overflow-x: auto; scroll-snap-type: x mandatory; }
  .cols-view > div { scroll-snap-align: start; }
  .bench-foot { grid-template-columns: 1fr; }
  .loupe { grid-template-columns: 1fr; }
  /* Matrices become one card per configuration */
  .config-matrix { overflow: visible; border: 0; background: transparent; }
  .config-matrix table { min-width: 0; }
  .config-matrix thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .config-matrix tbody { display: grid; gap: 10px; }
  .config-matrix tr, .config-matrix th, .config-matrix td { display: block; }
  .config-matrix tr { border: 1px solid var(--ink); background: var(--white); }
  .config-matrix tbody th { position: static; width: auto; padding: 14px 16px 12px; border-bottom: 1px solid var(--line-strong); background: var(--paper-2); font-size: 17px; }
  .config-matrix td { padding: 12px 16px; }
  .config-matrix td::before { content: attr(data-label); display: block; margin: 0 0 4px; color: var(--muted); font: 700 11px/1.3 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
  .config-matrix tbody tr:last-child > * { border-bottom: 1px solid var(--line); }
  .config-matrix tbody tr > td:last-child { border-bottom: 0; }
  .config-matrix tbody tr:hover > * { background: inherit; }
  .config-matrix tbody tr:hover > th { background: var(--paper-2); }
}
@media (pointer: coarse) {
  .m-row, .cols-view .m-row { min-height: 44px; padding-block: 0; }
  .m-row .m-name { min-height: 44px; }
  .m-row .m-box { width: 44px; height: 44px; margin-inline: -13px -10px; }
  .contract-head .text-link { min-height: 44px; }
  .bench-tabs button, .bench-actions button, .bench-switch .segmented button, .paths-mode label { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  .contract li, .m-row, .m-row .m-name .caret { transition: none; }
}
