/* Desk styles. They were injected as inline <style> elements by brief.js and
   walk.js; a strict style-src CSP blocks those, so they ship as a file. */

/* ── Brief desk (moved from brief.js) ── */
#briefDesk .br-desk{font:inherit;font-size:13px;line-height:1.45;color:var(--ink);border-top:2px solid var(--ink);padding-top:10px}
#briefDesk .br-h{margin:0 0 4px;font-size:15px;font-weight:600;letter-spacing:.01em}
#briefDesk .br-lede{margin:0 0 4px;font-size:12px;color:var(--muted);max-width:32em}
#briefDesk .br-sec{margin:0;padding:13px 0 4px;border-top:1px solid var(--line)}
#briefDesk .br-sec:first-of-type{border-top:0}
#briefDesk .br-sec>h4{margin:0 0 9px;font-size:11px;font-weight:600;letter-spacing:.1em;text-transform:uppercase;color:var(--faint)}
/* The fields and the ledger are one table of quantities, and a table has one
   value axis. The inputs used to sit wherever the flex line put them — three
   of them in a row, each ending at a different place, none of them on the
   edge where the ledger's numbers are. A reader looking for "the number"
   found three different columns and then a fourth. */
#briefDesk .br-fields{display:grid;grid-template-columns:minmax(0,1fr) 104px;align-items:center;gap:7px 16px;margin:0 0 9px}
#briefDesk .br-fields label{font-size:11px;color:var(--muted);min-width:0}
#briefDesk .br-fields input[type=number]{width:104px;justify-self:end}
#briefDesk input[type=number]{width:104px;font:inherit;font-family:var(--mono);font-size:12px;padding:2px 4px;border:1px solid var(--line);background:var(--panel);color:var(--ink)}
#briefDesk input[type=number]:focus,#briefDesk select:focus{outline:2px solid var(--accent);outline-offset:-1px}
#briefDesk input[type=range]{width:118px;accent-color:var(--accent)}
#briefDesk select{font:inherit;font-size:12px;padding:2px 4px;border:1px solid var(--line);background:var(--panel);color:var(--ink)}
/* A ledger is a table of quantities, so the value column takes the width the
   values need and the label column takes the rest. It used to be a fixed
   fifty-fifty: the labels stopped halfway across a 614px desk and the values
   sat in a 327px column that held "120,060 m²" — a third of the space given
   to a number that needs a tenth of it. */
#briefDesk .br-ledger{width:100%;margin:0 0 9px;border-collapse:collapse;table-layout:auto;font-size:12px}
#briefDesk .br-ledger th{overflow-wrap:anywhere;text-align:left;font-weight:400;vertical-align:top;padding:2px 16px 2px 0;color:var(--muted)}
#briefDesk .br-ledger td{text-align:right;vertical-align:top;padding:2px 0;font-family:var(--mono);white-space:nowrap;overflow-wrap:anywhere;width:1px}
#briefDesk .br-ledger thead th{font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:var(--faint);border-bottom:1px solid var(--line);padding-bottom:4px}
#briefDesk .br-cur{color:var(--accent);font-weight:600}
#briefDesk .br-flag{color:var(--accent);font-weight:600}
#briefDesk .br-rule{display:block;width:100%;height:auto;margin:2px 0 9px;color:var(--ink)}
#briefDesk .br-rule.over{color:var(--ink)}
#briefDesk .br-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:1px;background:var(--line);margin:0 0 9px}
#briefDesk .br-card{background:var(--panel);padding:9px 10px 10px}
#briefDesk .br-card.br-on{background:var(--paper);border-left:3px solid var(--accent);padding-left:7px}
#briefDesk .br-card button{font:inherit;font-size:12px;font-weight:600;color:var(--ink);background:none;border:0;border-bottom:1px solid var(--accent);padding:0 0 2px;cursor:pointer}
#briefDesk .br-card dl{display:flex;flex-wrap:wrap;gap:2px 8px;margin:7px 0 0;font-size:11px}
#briefDesk .br-card dt{color:var(--faint)}
#briefDesk .br-card dd{margin:0 0 0 6px;font-family:var(--mono)}
#briefDesk .br-opt{margin:8px 0 0;font-size:11.5px;color:var(--muted)}
#briefDesk .br-sac{margin:5px 0 0;padding-top:5px;border-top:1px dotted var(--line);font-size:11.5px}
#briefDesk .br-note{margin:0 0 9px;font-size:11px;color:var(--muted);max-width:32em}
#briefDesk .br-solve-table thead th+th{text-align:right;white-space:nowrap;padding-right:0}
#briefDesk .br-solve-table th[scope=row]{text-transform:none;letter-spacing:0;padding:6px 12px 6px 0;border-bottom:1px solid var(--line);font-weight:400;color:var(--ink);overflow-wrap:normal}
#briefDesk .br-solve-table td{padding:6px 0;border-bottom:1px solid var(--line);vertical-align:top}
#briefDesk .br-solve-table td+td{padding-left:12px;width:1px}
#briefDesk .br-sub{display:block;text-transform:none;letter-spacing:0;font-family:var(--mono);font-size:11px;color:var(--muted);white-space:normal;overflow-wrap:normal}
#briefDesk .br-solve-table td .br-sub{white-space:nowrap}
#briefDesk .br-plan-facts{display:flex;flex-wrap:wrap;gap:0 8px}
#briefDesk .br-plan-facts span{white-space:nowrap}
#briefDesk .br-solve-method summary{min-height:32px;width:fit-content;display:list-item;align-content:center}
/* The action of a solved form is a target, not a label. It is sized to its
   words, but never below the house floor of 32px, and it takes the coarse
   pointer's 44px like every other control in the console. Measured at 28px
   before this rule, which is four pixels under what the candidate table
   in the comparison desk already guarantees. */
#briefDesk .br-solve-table button{min-height:32px}
#briefDesk .br-tag{display:inline-block;margin:5px 0 0;font-family:var(--mono);font-size:11px;letter-spacing:.04em;color:var(--accent);border:1px solid var(--accent);padding:0 4px}
#briefDesk .br-read{font-size:11px;color:var(--muted);margin:0 0 9px}
#briefDesk details{margin:0 0 9px}
#briefDesk summary{font-size:11px;color:var(--muted);cursor:pointer}
#briefDesk .br-svg{margin:7px 0 0;max-width:340px;color:var(--ink)}
#briefDesk .br-svg svg{display:block;width:100%;height:auto}
#briefDesk .br-disclaimer{margin:13px 0 0;padding-top:9px;border-top:1px solid var(--line);font-size:11px;color:var(--faint);max-width:32em}
#briefDesk .br-jump{font:inherit;font-size:11px;color:var(--ink);background:none;border:1px solid var(--line);padding:1px 6px;cursor:pointer;white-space:nowrap}
#briefDesk .br-jump:hover{border-color:var(--accent);color:var(--accent)}
@media(pointer:coarse){#briefDesk .br-solve-table button,#briefDesk .br-solve-method summary{min-height:44px}}

/* ── Walk-in desk (moved from walk.js) ── */
.wk *{box-sizing:border-box}
.wk-sec{border-top:1px solid var(--line);padding-top:12px;margin-top:20px}
.wk-h{font:600 12px/1.5 var(--sans);letter-spacing:.06em;text-transform:uppercase;color:var(--ink);margin:0 0 2px}
.wk-note{font:400 12px/1.55 var(--sans);color:var(--muted);margin:0 0 8px;max-width:32em}
.wk-fig{margin:0}
.wk-figwrap{border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
.wk-figwrap svg{display:block;width:100%;height:auto;background:var(--dark)}
.wk-cap{font:400 11px/1.6 var(--mono);color:var(--muted);padding:6px 0 0}
.wk-key{display:grid;grid-template-columns:auto minmax(0,1fr) auto minmax(0,1fr);gap:1px 10px;margin:8px 0 0;font:400 11px/1.5 var(--sans);color:var(--muted)}
.wk-key b{font:400 11px/1.7 var(--mono);color:var(--accent)}
.wk-key i{overflow-wrap:anywhere;font-style:normal;font-family:var(--mono)}
.wk-ctl{display:grid;grid-template-columns:minmax(80px,1fr) minmax(80px,2fr) auto;gap:6px 10px;align-items:center;margin:12px 0}
.wk-ctl label,.wk-ctl output{font:400 11px/1.4 var(--sans);color:var(--muted)}
.wk-ctl output{font-family:var(--mono);color:var(--ink);text-align:right}
.wk-ctl input{width:100%;accent-color:var(--accent)}
.wk-btn{font:400 11px/1 var(--sans);color:var(--ink);background:var(--panel);border:1px solid var(--line);border-radius:0;padding:6px 10px;cursor:pointer;justify-self:start;width:fit-content}
.wk-btn:hover{border-color:var(--accent);color:var(--accent)}
.wk-ctl p{grid-column:1/4;font:400 11px/1.55 var(--sans);color:var(--faint);margin:2px 0 0}
.wk-src{font:400 11px/1.55 var(--sans);color:var(--faint);margin:8px 0 0;max-width:32em}
.wk-src b{font-weight:400;color:var(--accent)}
.wk-svg .wk-sky{fill:var(--dark,#111416)}
.wk-svg .wk-glass{fill:#1e2629;stroke:var(--dim);stroke-width:1}
.wk-svg .wk-wall{fill:#1a2022;stroke:var(--dim);stroke-width:1}
.wk-svg .wk-floor{fill:#141a1c;stroke:var(--dim);stroke-width:1}
.wk-svg .wk-ceil{fill:#262e31;stroke:var(--dim);stroke-width:1}
.wk-svg .wk-hatch{fill:#20272a;stroke:var(--dim);stroke-width:1}
.wk-svg .wk-ground{fill:#1a1f21;stroke:var(--dim);stroke-width:1}
.wk-svg .wk-kerb{fill:none;stroke:var(--dim);stroke-width:2}
.wk-svg .wk-tw{fill:#232b2e}
.wk-svg .wk-tw2{fill:#1f2629}
.wk-svg .wk-nb{fill:#191f21}
.wk-svg .wk-nb-l{fill:none;stroke:#4d5856;stroke-width:1}
.wk-svg .wk-fig{fill:var(--dim,#a2aca9)}
.wk-svg .wk-l{fill:none;stroke:var(--dim,#a2aca9);stroke-width:1}
.wk-svg .wk-l2{fill:none;stroke:var(--dim,#a2aca9);stroke-width:2}
.wk-svg .wk-faint{fill:none;stroke:#3f4a4b;stroke-width:1}
.wk-svg .wk-ghost{opacity:.4}
.wk-svg .wk-svc{fill:none;stroke:#77858a;stroke-width:1}
.wk-svg .wk-a{stroke:var(--accent,#f59e0b);fill:none}
.wk-svg .wk-bg{fill:var(--dark,#111416);stroke:none}
.wk-svg .wk-pin{fill:var(--dark,#111416);stroke:var(--accent,#f59e0b);stroke-width:1}
.wk-svg .wk-pin-t{fill:var(--accent,#f59e0b);font-family:var(--mono);font-size:24px}
.wk-svg text{font-family:var(--mono);font-size:11px;fill:var(--dim,#a2aca9)}

/* ── Place / context desk (moved from context.js) ── */
.cx-desk,.cx-desk *{box-sizing:border-box}
.cx-desk{font-size:13px;line-height:1.45;color:var(--ink)}
.cx-head{border-bottom:2px solid var(--ink);padding-bottom:6px;margin:0 0 10px}
.cx-head h2{margin:0;font-size:19px;letter-spacing:.01em}
.cx-head p{margin:3px 0 0;color:var(--muted)}
.cx-row{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin:0 0 12px;font-size:12px}
.cx-cities{display:flex;flex-wrap:wrap;border:1px solid var(--line)}
.cx-cities button{font:inherit;background:transparent;border:0;border-right:1px solid var(--line);padding:6px 11px;min-height:34px;cursor:pointer;color:var(--muted)}
.cx-cities button:last-child{border-right:0}
.cx-cities button[aria-pressed=true]{background:var(--accent);color:var(--dark);font-weight:600}
.cx-input{font:inherit;font-family:var(--mono);padding:4px 6px;border:1px solid var(--line);background:var(--panel);min-height:32px}
.cx-grid{align-items:start;display:grid;grid-template-columns:minmax(0,1fr);gap:12px}
@media(min-width:960px){.cx-grid{grid-template-columns:minmax(0,1.05fr) minmax(0,.95fr)}}
.cx-card{border:1px solid var(--line);background:var(--panel);padding:10px 12px;margin:0 0 12px}
.cx-card h3{margin:0 0 6px;font-size:11px;letter-spacing:.09em;text-transform:uppercase;color:var(--muted);font-weight:600}
.cx-site b{display:block;font-size:16px}
.cx-kv{display:grid;grid-template-columns:auto 1fr;gap:2px 10px;margin:6px 0 0;font-size:12px}
.cx-kv dt{color:var(--muted)}
.cx-kv dd{margin:0;font-family:var(--mono);word-break:break-word}
.cx-note{font-size:11px;line-height:1.5;color:var(--faint);margin:6px 0 0}
.cx-note p{margin:0 0 4px}
.cx-warn{font-size:12px;line-height:1.5;border-left:2px solid var(--accent);padding:2px 0 2px 10px;margin:0 0 8px}
.cx-fig{margin:0}
.cx-fig svg{display:block;width:100%;height:auto;background:var(--dark)}
.cx-legend{display:flex;flex-wrap:wrap;gap:3px 14px;margin:6px 0 0;padding:0;list-style:none;font-size:11px;color:var(--muted)}
.cx-legend i{display:inline-block;width:13px;height:9px;margin-right:5px;vertical-align:-1px}
.cx-strips{margin-top:12px}
.cx-strip{display:flex;align-items:center;gap:10px;margin:2px 0}
.cx-strip-holder{width:392px;max-width:62vw}
.cx-strip svg{display:block;width:100%;height:auto;background:var(--dark)}
.cx-strip figcaption{font-family:var(--mono);font-size:11px;color:var(--muted);min-width:104px;text-align:right}
.cx-strips .cx-strip svg{max-width:392px}
table.cx-table{border-collapse:collapse;width:100%;font-family:var(--mono);font-size:11.5px}
.cx-table caption{text-align:left;font-family:var(--sans);font-size:11px;color:var(--muted);padding:0 0 4px}
.cx-table th,.cx-table td{border-bottom:1px solid var(--line);padding:3px 5px;text-align:right;white-space:nowrap}
.cx-table th:first-child,.cx-table td:first-child{text-align:left}
.cx-table thead th{border-bottom:2px solid var(--ink);color:var(--muted);font-weight:600}
.cx-table tbody th{font-weight:600;color:var(--ink)}
.cx-hit{color:var(--accent);font-weight:600}
.cx-zero{color:var(--faint)}
.cx-g{stroke:var(--line);fill:none;stroke-width:1}
.cx-axis{stroke:var(--dim);fill:none;stroke-width:1}
.cx-nb{fill:var(--panel);stroke:var(--dim);stroke-width:1}
.cx-nb.hit{fill:var(--accent);fill-opacity:.3;stroke:var(--accent)}
.cx-ref{fill:none;stroke:var(--dim);stroke-width:1;stroke-dasharray:4 3}
.cx-tower{fill:var(--accent);fill-opacity:.16;stroke:var(--accent);stroke-width:2}
.cx-shadow{fill:var(--accent);fill-opacity:.24;stroke:none}
.cx-bar-nb{fill:var(--panel);stroke:var(--dim);stroke-width:1}
.cx-bar-model{fill:var(--accent)}
.cx-t{fill:var(--dim);font-family:var(--mono);font-size:11px}
.cx-t-d{fill:var(--dim);font-family:var(--mono);font-size:11px}
.cx-t-a{fill:var(--accent);font-family:var(--mono);font-size:11px;font-weight:600}
.cx-t-n{fill:var(--dim);font-family:var(--mono);font-size:12px;font-weight:700}
.cx-line{stroke:var(--accent);stroke-width:1.5}
.cx-strip-frame{fill:none;stroke:var(--line);stroke-width:1}
.cx-strip-hit{fill:var(--accent)}
.cx-now{stroke:var(--dim);stroke-width:2}
.cx-legend i.cx-shadow{background:rgba(245,158,11,.24)}
.cx-legend i.cx-tower{border:1px solid var(--accent);background:rgba(245,158,11,.16)}
.cx-legend i.cx-nb{border:1px solid var(--muted)}
.cx-legend i.cx-ref{border:1px dashed var(--muted)}

/* ── the city lens ────────────────────────────────────────────────────────
   SEVEN typographic roles and seven distinct sizes: 22 / 15 / 13 / 12 / 11 /
   10 / 9.5. The previous version ran 10 / 11 / 13.5 — three sizes for six
   roles, with a ONE PIXEL step between the source list and the fact values, so
   the eye had nothing to land on and every line arrived at the same volume.
   That is the failure this block is written against, and tests/lens.test.mjs
   now parses these numbers and fails the build if the scale collapses again.

   The drawing carries FILL, not outline, so it has mass and separates from
   the text. An outlined box on a cream page is the same value as the page: a
   picture with no tone in it reads as a second caption.

   The column is still content-width — a fact is as wide as its words. Fixing
   the hierarchy and fixing the air-slop are the same job: weight goes on the
   one thing that matters, and the rest goes tight against it. */
.lx-band{border:1px solid var(--accent);border-left-width:3px;background:var(--panel);padding:14px 18px 13px;margin:0 0 12px;display:block}
/* Role 7 — a label, not a headline. It was 11px uppercase amber, which made it
   compete with the sentence it labels. */
.lx-head h3{margin:0 0 5px;font-size:11px;letter-spacing:.11em;text-transform:uppercase;color:var(--faint);font-weight:600}
/* Role 1 — the claim. The only large thing in the band, and the first thing
   read. Nothing else is allowed to be bigger than 15px. */
.lx-head p{margin:0;max-width:50ch;font-size:22px;line-height:1.26;font-weight:500;letter-spacing:-.012em;color:var(--ink)}
.lx-body{display:flex;flex-wrap:wrap;gap:12px 34px;align-items:flex-start;margin-top:14px}
.lx-fig{flex:0 0 auto;line-height:0}
.lx-fig svg{display:block;width:420px;height:auto;max-width:100%}
.lx-s{font:9.5px var(--mono);fill:var(--muted)}
/* Labels printed on the dark ground. Muted is #585e5b and disappears on
   #111416 — the same token that reads as "quiet" on cream reads as "missing"
   on soil, so anything inside the earth carries this class instead. */
.lx-on{fill:var(--dim)}
.lx-side{flex:0 1 auto;min-width:0}
.lx-fx{margin:0 0 9px}
/* Role 2 — the proof. */
.lx-fx code{display:block;font:600 15px var(--mono);color:var(--accent);letter-spacing:-.01em;line-height:1.35}
/* Role 3 — what the proof means, in words. */
.lx-fx span{display:block;margin-top:4px;max-width:46ch;font-size:12px;line-height:1.5;color:var(--muted)}
/* Roles 4 and 5 — the numbers lead, the label supports. The value is a full
   step BIGGER than its label, which is the opposite of the old table. */
.lx-rows{display:grid;grid-template-columns:max-content max-content;gap:4px 18px;margin:0;align-items:baseline}
.lx-rows dt{font-size:11px;color:var(--faint);white-space:nowrap}
.lx-rows dd{margin:0;font:600 13px var(--mono);color:var(--ink);white-space:nowrap}
/* Role 6 — provenance. Demoted to the bottom, on a hairline, with no underline
   until the pointer is on it: a field of underlined links reads as content. */
.lx-meta{margin:14px 0 0;padding-top:10px;border-top:1px solid var(--line)}
.lx-assume{margin:0;font-size:11px;line-height:1.55;color:var(--dim);max-width:32em}
.lx-band h4{margin:9px 0 3px;font-size:11px;letter-spacing:.11em;text-transform:uppercase;color:var(--faint);font-weight:600}
.lx-src{margin:0;padding:0;list-style:none;font-size:11px;line-height:1.6;color:var(--dim)}
.lx-src li{margin:0}
.lx-src a{color:var(--dim);text-decoration:none;border-bottom:1px solid var(--line)}
.lx-src a:hover,.lx-src a:focus-visible{color:var(--accent);border-bottom-color:var(--accent)}
@media(max-width:900px){.lx-body{gap:12px 20px}.lx-fig svg{width:300px}.lx-head p{font-size:19px}.lx-side{max-width:none}}

/* The stand-here desk. Same discipline as the lens band: one drawing, one
   reading order, nothing stretched. The landscape is the drawing and it is
   dark; the numbers sit beside it on the panel, not on top of it. */
.st-head h3{margin:0 0 4px;font-size:11px;letter-spacing:.11em;text-transform:uppercase;color:var(--faint);font-weight:600}
.st-head p{margin:0 0 12px;max-width:62ch;font-size:19px;line-height:1.4;color:var(--ink)}
/* THE DRAWING IS FLUID, AND THE NUMBERS ARE AN INSTRUMENT BESIDE IT — NOT A
   CAPTION UNDER IT.

   `.st-fig` used to be `flex:0 0 auto` with the SVG at a fixed 760px and
   `max-width:100%`. That is circular and it constrained nothing: an auto flex
   basis takes its width from its content, so the figure was already 760px wide
   and the percentage resolved against that. The drawing overflowed its panel at
   every desktop width — this panel measures 414 to 614px inside the console —
   and `flex-wrap` then pushed the numbers into a narrow ribbon underneath with
   two thirds of the sheet blank. The imbalance in the screenshot was never a
   colour or a spacing decision; it was a circle.

   So the figure gets a real flex basis and the SVG fills it, and the number rail
   is a fixed column held against the right edge with a rule between them. The
   rule is not decoration: these are measurements of a lot, not labels on the
   drawing, and a line between the two is what stops a reader binding "84%" to
   a shape in the picture rather than to the ground it came from. */
.st-body{display:flex;flex-wrap:wrap;gap:14px 40px;align-items:flex-start;justify-content:space-between;margin:0 0 14px}
/* The figure column carries the flex basis, because it now holds both drawings.
   It has to be the column and not the individual figures: two children, one of
   which must be allowed to fill it. */
.st-figcol{flex:1 1 360px;min-width:0;max-width:580px;display:flex;flex-direction:column;gap:14px}
.st-fig{flex:0 0 auto;min-width:0;max-width:none;line-height:0}
.st-fig svg{display:block;width:100%;height:auto}
.st-side{flex:0 0 250px;max-width:250px;padding-left:20px;border-left:1px solid var(--line)}
.st-pick{display:block;width:100%;margin:0 0 12px;padding:5px 6px;border:1px solid var(--line);border-radius:0;background:var(--paper);color:var(--ink);font:13px var(--mono)}
/* Each pair is its own box, so a grid column can never put a label in one cell
   and its number in the next. The <div> inside <dl> is valid HTML and is the
   only way to group a dt/dd pair without changing what the list means.

   The grid is what stops the stacked layout from becoming a tall thin ribbon of
   numbers under a wide drawing — the second half of the imbalance. Each row is
   its own grid item, so the block under the picture is as wide as the picture. */
.st-rows{margin:0;display:grid;grid-template-columns:repeat(auto-fit,minmax(148px,1fr));gap:9px 26px}
.st-row{display:flex;flex-direction:column;min-width:0}
.st-rows dt{font-size:11px;color:var(--muted);line-height:1.5}
.st-rows dd{margin:0;font:600 13px var(--mono);color:var(--ink);letter-spacing:-.01em}
/* Inside the figure column the sky section is a stack, not a pair: the column is
   narrow, and a chart with a note beside it would wrap the note under anyway.
   The section keeps its rule so the two drawings read as two sheets. */
.st-sky{display:flex;flex-direction:column;gap:10px;border-top:1px solid var(--line);padding-top:12px;min-width:0;flex:1 1 100%}
.st-sky p{margin:0;max-width:54ch;font-size:12px;line-height:1.55;color:var(--muted)}
.sx-s{font:9.5px var(--mono);fill:var(--muted)}
.st-source{margin:12px 0 0;font-size:11px;line-height:1.6;color:var(--faint)}
.st-warn{border:1px solid var(--accent);border-left-width:3px;padding:10px 14px;margin:0 0 12px}
.st-warn p{margin:0;font-size:13px;line-height:1.5;color:var(--ink)}
/* THE READER'S OWN PLOT.

   One row of three ways to state which land the building stands on, and the
   input that belongs to the chosen one directly beneath it. The three are
   peers, not a hierarchy, so they are a row of equal buttons with the
   house's pressed style rather than a select that hides the other two.

   The lot list moved here from the rail. It chooses what the drawing shows,
   so it belongs with the drawing; leaving it in the rail put the control
   that picks the picture on the other side of the picture. */
.st-plot{display:flex;flex-direction:column;gap:8px;margin:0 0 12px}
.st-modes{display:flex;flex-wrap:wrap;gap:2px 0;border-bottom:1px solid var(--line)}
.st-modes button{border:0;border-bottom:2px solid transparent;background:none;color:var(--muted);
 padding:5px 10px;min-height:26px;font-size:12px}
.st-modes button:hover{background:none;color:var(--ink)}
.st-modes button[aria-pressed="true"]{background:none;border-bottom-color:var(--accent);color:var(--ink)}
.st-fields{display:flex;flex-wrap:wrap;gap:8px 18px}
.st-field{display:flex;align-items:center;gap:7px}
.st-field label{font-size:11px;color:var(--muted)}
.st-field input{width:82px;padding:4px 6px;border:1px solid var(--line);border-radius:0;
 background:var(--paper);color:var(--ink);font:13px var(--mono)}
.st-tools{display:flex;gap:8px}
.st-tools button{font-size:12px}
.st-hint{margin:0;font-size:11px;line-height:1.55;color:var(--faint);max-width:32em}
/* THE DRAWING IS THE DRAWING SURFACE.

   A crosshair says the map takes a click, and the focus ring is the house's
   own 2px accent so a keyboard reader can see the map is live. The corners
   are squares, not discs: this is a drafting sheet. */
.st-fig svg.st-drawable{cursor:crosshair}
.st-fig svg.st-drawable:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.st-corner{fill:var(--accent);stroke:var(--paper);stroke-width:1}
.st-corner.st-first{fill:var(--paper);stroke:var(--accent)}
/* WHAT THE LAND WILL CARRY. */
.st-takes{margin-top:14px;padding-top:12px;border-top:1px solid var(--line)}
/* The money is a second question on the same building, so it is a second block
   inside the first, ruled off from the plate rows rather than floating in
   them. */
.st-money{margin-top:12px;padding-top:10px;border-top:1px solid var(--line)}
.st-money h4{margin:0 0 9px;font-size:11px;letter-spacing:.11em;text-transform:uppercase;
 color:var(--muted);font-weight:600}
.st-takes h4{margin:0 0 9px;font-size:11px;letter-spacing:.11em;text-transform:uppercase;
 color:var(--faint);font-weight:600}
.st-use{margin:11px 0 6px;padding:6px 12px;border:1px solid var(--ink);background:none;
 color:var(--ink);font-size:12px}
.st-use:hover{border-color:var(--accent);color:var(--accent);background:none}
/* WHICH LAYOUT APPLIES IS A QUESTION ABOUT THE PANEL, NOT THE WINDOW.

   Inside the console this desk panel measures 414 to 614px on a desktop
   viewport and 864px on a narrow one, because the console's own rail comes and
   goes and takes the width with it. A viewport media query therefore keys off
   the wrong number, and gets it exactly backwards: it stacks at 1440px where
   the panel is narrow, and would sit side by side at 900px where the panel is
   wide. This asks the panel instead. */
#siteDesk{container-type:inline-size}
@container (max-width:680px){
 .st-body{gap:14px}
 .st-figcol{flex:1 1 100%;max-width:none}
 /* The rail goes full width when it wraps, and its rule turns with it — a
    vertical rule on a full-width block would be a line hanging off the drawing
    with nothing to divide. The fact rows then lay out across the whole sheet
    instead of standing in a narrow ribbon under a wide picture, which is the
    other half of the imbalance. */
 .st-side{flex:1 1 100%;max-width:none;border-left:0;border-top:1px solid var(--line);padding:12px 0 0}
 .st-pick{max-width:320px}
}
@media(max-width:900px){.st-head p{font-size:17px}}
/* Environmental sheets: one city drawing, compact controls, measured outputs. */
#environmentPanel{margin:0;padding:9px 0;border-top:2px solid var(--ink)}
#environmentDesk{padding:12px 0}#environmentDesk h2{font-size:18px;margin:0 0 8px}
#environmentDesk p{max-width:32em;font-size:12px;line-height:1.6;margin:9px 0}
.env-nav{display:flex;flex-wrap:wrap;gap:6px;margin:9px 0}.env-nav button{padding:6px 9px;min-height:32px}.env-nav [aria-pressed=true]{border-bottom:2px solid var(--accent);font-weight:700}
.env-inputs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:10px 0}.env-inputs label{display:flex;flex-direction:column;gap:4px;font-size:12px}.env-inputs input{width:100%;min-width:0;padding:6px}
.env-scene{margin:10px 0}.env-scene svg{display:block;width:100%;height:auto}.env-scene figcaption,.env-curve figcaption{font-size:11px;line-height:1.5;margin:6px 0;max-width:32em}
.env-results{margin:10px 0;font-size:12px}.env-results>div{display:flex;justify-content:space-between;gap:12px;padding:7px 0;border-bottom:1px solid var(--line)}.env-results dd{margin:0;text-align:right;font-variant-numeric:tabular-nums}
.env-table{overflow:auto;max-width:100%;margin:12px 0}.env-table table{width:100%;font-size:12px}.env-table td,.env-table th{padding:7px;text-align:left}
.env-curve{margin:8px 0;max-width:440px}.env-curve svg{width:100%;height:auto}.env-curve text{font:13px Arial,sans-serif;fill:currentColor}
#environmentDesk details{margin:12px 0;border-top:1px solid var(--line);padding-top:9px}
@media(max-width:600px){.env-nav button,#env-day{min-height:44px}.env-inputs input{min-height:44px}.env-results>div{flex-wrap:wrap}.env-results dd{text-align:left}.env-nav{gap:4px}}
@media(max-width:600px){
 .console-subnav{gap:8px}
}
/* A studio memory and comparison sheet, with a fixed reference rather than a verdict. */
.study-fields{display:grid;gap:4px;margin:8px 0;max-width:32em}.study-fields label{font-size:12px}.study-fields input,.study-fields textarea{font:inherit;min-width:0;width:100%;padding:5px;border:1px solid var(--line);background:var(--paper);color:var(--ink);border-radius:0}.study-fields textarea{resize:vertical}
.study-tools{display:flex;flex-wrap:wrap;gap:6px;margin:4px 0}.study-tools button{padding:5px 8px}
.study-note{flex-basis:100%;max-width:32em;white-space:pre-wrap;margin:5px 0;font-size:12px}
#decisionDesk{margin:14px 0;padding-top:12px;border-top:2px solid var(--ink)}#decisionDesk h2{font-size:18px}#decisionDesk h3{font-size:14px;margin:14px 0 6px}#decisionDesk p,.studies>.note{max-width:32em;font-size:12px;line-height:1.6}
.decision-figure{margin:8px 0}.decision-figure svg{display:block;width:100%;height:auto;max-height:390px}.decision-figure figcaption{display:grid;grid-template-columns:1fr 1fr;gap:16px;font-size:12px;overflow-wrap:anywhere}.decision-table{overflow:auto;max-width:100%;margin:12px 0}.decision-table table{width:100%;font-size:12px}.decision-table th,.decision-table td{padding:7px 5px;font-variant-numeric:tabular-nums}.decision-table td{text-align:right;white-space:nowrap}.decision-changed{font-weight:700;text-decoration:underline;text-decoration-color:var(--accent);text-underline-offset:3px}#decisionDesk blockquote{border-left:3px solid var(--accent);padding-left:10px;margin:12px 0;white-space:pre-wrap;font-size:12px;max-width:32em}
@media(max-width:600px){.study-tools button,.study-fields input{min-height:44px}.decision-table th,.decision-table td{padding:8px 4px}.decision-figure figcaption{gap:8px}}
.console-dock .saved>button:first-child{white-space:normal;overflow-wrap:anywhere;max-width:100%;text-align:left}
/* The old appendix shelf had a label column. Docked studies are one task sheet. */
.console-dock .studies{display:block}
#clearReference{width:fit-content;padding:6px 9px;margin:7px 0;min-height:32px}
@media(max-width:600px){#clearReference{min-height:44px}}

/* ── Feng Shui desk (moved from feng.js) ─────────────────────────────────────
   Two columns of equal weight: the instrument and its own measurements on the
   left, the eight palaces and what the tradition says on the right. The luopan
   is kept square on purpose — every band on it is concentric, so an ellipse
   would print a 15-degree division that does not measure 15 degrees.

   The home palace is marked with a 2px amber rule in the row's own gutter
   rather than an amber fill. A filled row turns the table's one piece of
   emphasis into a slab, and the slab then outshouts the luopan it is supposed
   to be reading. */
#fengshuiDesk{font:inherit;font-size:13px;line-height:1.5;color:var(--ink);border-top:2px solid var(--ink);padding-top:10px}
#fengshuiDesk .feng-head{margin:0 0 14px}
#fengshuiDesk .feng-head h2{margin:0 0 4px;font-size:15px;font-weight:600;letter-spacing:.01em}
#fengshuiDesk .note{margin:0;font:400 12px/1.55 var(--sans);color:var(--muted);max-width:32em}
#fengshuiDesk .note.strong{color:var(--ink)}
#fengshuiDesk .feng-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:0 30px;align-items:start}
/* Grid items default to min-width:auto, which lets one long unbreakable run of
   Chinese or a wide table push a column past its share of the sheet. Both
   columns opt out, so the luopan keeps half the width in every language. */
#fengshuiDesk .feng-pane,#fengshuiDesk .feng-side{min-width:0}
#fengshuiDesk h3{margin:18px 0 3px;font-size:11px;font-weight:600;letter-spacing:.1em;text-transform:uppercase;color:var(--faint)}
#fengshuiDesk .feng-side>h3:first-of-type{margin-top:0}
#fengshuiDesk .feng-ctl{display:grid;grid-template-columns:auto minmax(0,1fr);gap:4px 10px;align-items:center;margin:0 0 16px}
#fengshuiDesk .feng-ctl label{font:400 11px/1.4 var(--sans);color:var(--muted)}
#fengshuiDesk .feng-ctl input[type=range]{width:100%;accent-color:var(--accent)}
#fengshuiDesk .feng-read{grid-column:1/3;font:400 14px/1.4 var(--mono);color:var(--accent);letter-spacing:.02em}
#fengshuiDesk .feng-ctl p{grid-column:1/3;color:var(--faint)}
#fengshuiDesk .feng-fig{margin:0}
#fengshuiDesk .feng-lpbox{display:flex;justify-content:flex-start}
/* The luopan is 280, not 336, so the left column ends sooner and the right
   column can hold the FACES card and the sources without the desk scrolling
   forever on a laptop. The drawing stays square (R.plan at 44 px and the viewBox
   fixed at 320), so this only affects display. */
#fengshuiDesk .feng-lp{display:block;width:100%;max-width:280px;height:auto;background:var(--dark);border:1px solid var(--line)}
#fengshuiDesk .feng-fig .note{padding:6px 0 0;font-size:11.5px;line-height:1.55}
#fengshuiDesk .feng-forms{display:grid;grid-template-columns:auto minmax(0,1fr);gap:0 14px;margin:8px 0 0;font:400 12px/1.55 var(--sans)}
#fengshuiDesk .feng-form{display:contents}
#fengshuiDesk .feng-form dt{color:var(--muted);padding-top:2px}
#fengshuiDesk .feng-val{font-family:var(--mono);color:var(--ink);padding:2px 0}
#fengshuiDesk .feng-reading{margin:0 0 4px;font:400 12px/1.5 var(--sans);color:var(--ink)}
/* Tightened: 4px row padding, 8px cell padding, and the bottom rule under the
   row is a single 1px line. The home palace's amber rule is the only colour
   on the row — a filled slab outshouts the luopan it is supposed to read.

   The headers wrap and the figures may break. They did not: the headers were
   held on one line, and the mass cell's "34 · 17,715 m² · 64 m" could not
   break, so the table's smallest honest width was 457px — wider than the
   column it sits in. The table pushed the sheet past its own edge, and the
   last column was cut off the page. */
#fengshuiDesk .feng-table{width:100%;border-collapse:collapse;font-size:12px}
#fengshuiDesk .feng-table th{font:600 11px/1.6 var(--sans);letter-spacing:.08em;text-transform:uppercase;color:var(--faint);text-align:left;border-bottom:1px solid var(--line);padding:0 8px 4px 4px;font-weight:500}
#fengshuiDesk .feng-table td{padding:4px 8px 4px 4px;border-bottom:1px solid var(--line);border-left:2px solid transparent;vertical-align:top;overflow-wrap:anywhere}
#fengshuiDesk .feng-table td b{font:500 12.5px/1.35 var(--sans);color:var(--ink)}
#fengshuiDesk .feng-table td span{display:block;font:400 11px/1.4 var(--mono);color:var(--faint);margin-top:2px}
#fengshuiDesk .feng-table tr.is-home td{border-left-color:var(--accent)}
#fengshuiDesk .feng-table tr.is-home td b{color:var(--accent)}
/* the bottom strip became the right-column source block; see feng-srcbox */
#fengshuiDesk .feng-src{margin:8px 0 0;padding-left:18px;font:400 11px/1.6 var(--sans);color:var(--faint);max-width:32em}
#fengshuiDesk .feng-src li{margin-bottom:3px}
@media (max-width:900px){#fengshuiDesk .feng-grid{grid-template-columns:minmax(0,1fr);gap:0}}

/* ── Structure, read from the geometry (structure.js) ── */
.structure-desk{border-bottom:2px solid var(--ink);padding:0 0 12px;margin:0 0 14px}
.structure-desk .sd-title{font-size:11px;letter-spacing:.08em;text-transform:uppercase;margin:0 0 8px}
.structure-desk .sd-verdict{font-size:20px;font-weight:600;margin:0;line-height:1.2}
.structure-desk .sd-verdict.sd-flag{color:var(--ink);border-left:3px solid var(--accent);padding-left:8px}
.structure-desk .sd-lede{margin:2px 0 6px;color:var(--muted);font-size:12px}
.structure-desk .sd-scale{margin:0 0 8px}
.structure-desk .sd-scale svg{width:100%;height:auto;display:block;max-width:520px}
.structure-desk .sd-axis{font-size:11px;color:var(--muted)}
.structure-desk .sd-facts{margin:0 0 8px;display:grid;gap:3px}
.structure-desk .sd-facts>div{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;border-bottom:1px solid var(--line);padding:3px 0}
.structure-desk .sd-facts dt{font-size:12px}
.structure-desk .sd-facts dd{margin:0;font-family:var(--mono);font-size:12px;text-align:right}
.structure-desk .sd-note{font-size:12px;line-height:1.45;margin:6px 0;max-width:32em}
.structure-desk .sd-limits{color:var(--muted)}

/* The walk-in section is drawn on a 1000-unit sheet shown ~425 px wide, so its
   type is set in sheet units: 26 units reads at about 11 px. */
.wk-svg text{font-size:26px}

/* The FACES card is a three-line summary of the opposite half of 坐向. It is
   set apart from the table by its own top rule and a thin margin, so it reads
   as the next thought, not a ninth row. */
#fengshuiDesk .feng-faces{margin-top:12px;padding-top:10px;border-top:1px solid var(--line)}
#fengshuiDesk .feng-faces-h{margin:0 0 3px;font:600 13px/1.35 var(--sans);color:var(--ink);letter-spacing:.01em}
#fengshuiDesk .feng-faces-h::before{content:"→ ";color:var(--accent);font-weight:400}
#fengshuiDesk .feng-faces-star{margin:0 0 2px;font:500 12px/1.4 var(--sans);color:var(--ink)}
#fengshuiDesk .feng-faces-mass{margin:0;font:400 11px/1.5 var(--mono);color:var(--muted)}
/* Sources and study note, here instead of a bottom strip — the strip was the
   dead zone under the right column. A hairline closes the right column. */
#fengshuiDesk .feng-srcbox{margin-top:12px;padding-top:10px;border-top:1px solid var(--line)}
#fengshuiDesk .feng-src{margin:0 0 8px;padding-left:18px;font:400 11px/1.55 var(--sans);color:var(--faint)}
#fengshuiDesk .feng-src li{margin-bottom:2px}
#fengshuiDesk .feng-srcbox .note.strong{font:400 12px/1.55 var(--sans);color:var(--ink);margin:0;max-width:32em}
#fengshuiDesk .feng-measure{margin:0 0 4px;font:400 11px/1.5 var(--mono);color:var(--faint)}

.st-side>.st-takes:first-child{margin-top:0;padding-top:0;border-top:0}

.env-scene figcaption{display:flex;align-items:center;justify-content:space-between;gap:8px;max-width:none}
.env-scene figcaption span{min-width:0;max-width:32em;overflow-wrap:anywhere}
.env-scene figcaption .env-nav{flex:none;flex-wrap:nowrap;margin:0}
.env-scene figcaption button{min-width:32px}
@media(max-width:600px){.env-scene figcaption button{min-width:44px}}
@media(pointer:coarse){#br-solve{min-height:44px}}

.decision-basis{display:flex;flex-wrap:wrap;gap:6px 20px;margin:8px 0}
.decision-basis dt{font-weight:600}
.decision-basis dd{margin:0;overflow-wrap:anywhere}

.env-height-option{display:inline-flex;align-items:center;gap:6px;max-width:100%;font-size:12px}
.env-height-option input{flex:none;margin:0}
@media(pointer:coarse){.env-height-option{min-height:44px}}
