/* Cuyama worked example: page-specific rules on top of ../css/site.css.
 * Every colour is a site token; the only literals are the cut/fill ramp's
 * neutral midpoint and light-steel end, which cuyama.js mirrors exactly.
 */
.cy-page { --cy-aspect: 215 / 360; --cy-ar: .597; --cy-split-pct: 50%; }
html.cy-lock, html.cy-lock body { overflow: hidden; }

/* ---- hero: full-bleed before/after stage ------------------------------------ */
.section.cy-hero { padding-block: 0 clamp(40px, 5vw, 64px); background: var(--ink-0); }
.cy-stage { position: relative; isolation: isolate; height: min(78vh, 760px); min-height: 460px; overflow: hidden; border-bottom: 1px solid var(--line); background: radial-gradient(ellipse at 58% 60%, var(--ink-3), var(--ink-1) 52%, var(--ink-0) 82%); user-select: none; -webkit-user-select: none; }
.cy-stage__canvas { position: absolute; inset: var(--cy-top, 0px) 0 0; display: block; width: 100%; height: calc(100% - var(--cy-top, 0px)); touch-action: pan-y; cursor: grab; outline-offset: -4px; }
.cy-stage__canvas:active { cursor: grabbing; }
.cy-stage__canvas[hidden] { display: none; }
.cy-stage__fallback { position: absolute; inset: var(--cy-top, 0px) 0 0; }
.cy-stage__fallback[hidden] { display: none; }
.cy-stage__img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: contain; object-position: 80% 58%; }
/* The after image is clipped at the divider; both images share one box, so the
   wipe lines up with the handle at every size. */
.cy-stage__img--after { clip-path: inset(0 0 0 var(--cy-split-pct)); }
.cy-stage__fallback--static { position: absolute; inset: 0; }
.cy-stage__scrim { position: absolute; z-index: 1; inset: 0 0 auto; height: 60%; background: linear-gradient(180deg, rgba(6, 9, 14, .88), rgba(6, 9, 14, .5) 42%, rgba(6, 9, 14, 0)); pointer-events: none; }
.cy-stage__copy { position: absolute; z-index: 3; top: clamp(22px, 4.2vh, 46px); left: 0; right: 0; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); pointer-events: none; }
.cy-stage__title { max-width: 19ch; margin: 16px 0 12px; font-size: clamp(34px, 3.9vw, 56px); line-height: 1.02; font-weight: 700; letter-spacing: -.035em; }
.cy-stage__deck { max-width: 30ch; margin: 0; font: 600 clamp(17px, 1.6vw, 22px)/1.3 var(--font-display); font-stretch: 104%; letter-spacing: -.01em; color: var(--gold-2); }
.cy-stage__chips { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-top: 18px; }
.cy-stage__provenance { display: inline-flex; align-items: center; gap: 9px; max-width: 100%; padding: 7px 9px; border-radius: 3px; background: rgba(6, 9, 14, .82); color: var(--text-2); font: 400 13px/1.5 var(--font-mono); letter-spacing: .02em; }
.cy-stage__tag { max-width: 100%; padding: 6px 8px; border: 1px solid var(--gold-line); background: var(--ink-1); color: var(--gold-2); font: 400 13px/1.5 var(--font-mono); }

/* divider, handle and side labels ride on --cy-split-pct, written by cuyama.js */
.cy-stage__divider { position: absolute; z-index: 4; top: var(--cy-top, 0px); bottom: 0; left: var(--cy-split-pct); width: 2px; margin-left: -1px; background: var(--gold); box-shadow: 0 0 0 1px rgba(6, 9, 14, .45); cursor: ew-resize; touch-action: none; }
.cy-stage__divider::before { content: ""; position: absolute; top: 0; bottom: 0; left: -11px; width: 24px; }
.cy-stage__handle { position: absolute; z-index: 5; top: calc(var(--cy-top, 0px) + (100% - var(--cy-top, 0px)) / 2); left: var(--cy-split-pct); display: grid; place-items: center; width: 46px; height: 46px; border: 2px solid var(--gold); border-radius: 50%; background: var(--ink-1); color: var(--gold-2); transform: translate(-50%, -50%); box-shadow: 0 8px 24px rgba(0, 0, 0, .5); cursor: ew-resize; touch-action: none; }
.cy-stage__handle svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.cy-stage__handle:hover, .cy-stage.is-splitting .cy-stage__handle { background: var(--ink-3); color: var(--text); }
.cy-stage__handle:focus-visible { outline: 2px solid var(--gold-2); outline-offset: 4px; }
.cy-stage__side { position: absolute; z-index: 4; top: calc(var(--cy-top, 0px) + (100% - var(--cy-top, 0px)) / 2 + 36px); padding: 6px 9px; border: 1px solid var(--line-strong); border-radius: 3px; background: rgba(6, 9, 14, .86); color: var(--text); font: 500 13px/1.3 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; text-wrap: balance; pointer-events: none; transition: opacity .15s; }
.cy-stage__side--before { right: calc(100% - var(--cy-split-pct) + 14px); max-width: calc(var(--cy-split-pct) - 24px); }
.cy-stage__side--after { left: calc(var(--cy-split-pct) + 14px); max-width: calc(100% - var(--cy-split-pct) - 24px); border-color: var(--gold-line); color: var(--gold-2); }
.cy-stage__side.is-off { opacity: 0; }

/* furniture */
.cy-stage__tools { position: absolute; z-index: 5; right: 20px; bottom: 20px; display: flex; gap: 6px; }
.cy-tool { display: grid; place-items: center; min-width: 40px; height: 40px; padding: 0; border: 1px solid var(--line-strong); border-radius: 4px; background: var(--ink-1); color: var(--text); font: 400 20px/1 var(--font-body); cursor: pointer; }
.cy-tool:hover { border-color: var(--gold); color: var(--gold-2); }
.cy-tool[hidden] { display: none; }
.cy-tool--text { display: inline-flex; align-items: center; gap: 8px; padding: 0 12px; font: 500 14px/1 var(--font-mono); letter-spacing: .04em; color: var(--text-2); }
.cy-tool--text::before { content: ""; width: 10px; height: 10px; border: 1px solid var(--line-strong); border-radius: 2px; background: transparent; }
.cy-tool--text[aria-pressed="true"] { color: var(--gold-2); border-color: var(--gold-line); }
.cy-tool--text[aria-pressed="true"]::before { border-color: var(--gold); background: var(--gold); box-shadow: inset 0 0 0 2px var(--ink-1); }
.cy-tool__i { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.cy-stage.is-fs .cy-tool__i--enter, .cy-stage:not(.is-fs) .cy-tool__i--exit { display: none; }
.cy-stage__legend { position: absolute; z-index: 4; right: 20px; bottom: 72px; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 4px; background: rgba(6, 9, 14, .82); color: var(--text-2); font: 400 13px/1.3 var(--font-mono); pointer-events: none; }
.cy-stage__legend span { display: inline-flex; align-items: center; gap: 8px; }
.cy-stage__legend[hidden] { display: none; }
.cy-stage__ve, .cy-stage__hint { position: absolute; z-index: 4; left: 20px; margin: 0; padding: 5px 8px; border-radius: 3px; background: rgba(6, 9, 14, .78); font: 400 13px/1.4 var(--font-mono); pointer-events: none; }
.cy-stage__ve { bottom: 52px; color: var(--gold-2); }
.cy-stage__hint { bottom: 20px; color: var(--text-2); }
.cy-stage__toast { position: absolute; z-index: 6; left: 50%; top: 50%; max-width: min(360px, calc(100% - 32px)); margin: 0; padding: 10px 14px; border: 1px solid var(--line-strong); border-radius: 4px; background: rgba(6, 9, 14, .92); color: var(--text); font: 500 14.5px/1.45 var(--font-body); text-align: center; transform: translate(-50%, 40px); opacity: 0; pointer-events: none; transition: opacity .2s; }
.cy-stage__toast.is-on { opacity: 1; }
.cy-stage__close { position: absolute; z-index: 7; top: 16px; right: 16px; width: 44px; height: 44px; border: 1px solid var(--line-strong); border-radius: 4px; background: var(--ink-1); color: var(--text); font: 400 24px/1 var(--font-body); cursor: pointer; }
.cy-stage__close:hover { border-color: var(--gold); color: var(--gold-2); }
.cy-stage__close[hidden] { display: none; }

/* full screen: the native API, or the fixed-position fallback */
.cy-stage:fullscreen { width: 100%; height: 100%; min-height: 0; border: 0; }
.cy-stage.is-pseudo-fs { position: fixed; inset: 0; z-index: 200; width: 100%; height: 100%; min-height: 0; border: 0; }
.cy-stage.is-fs .cy-stage__canvas { touch-action: none; }
.cy-stage.is-fs .cy-stage__copy .eyebrow, .cy-stage.is-fs .cy-stage__title, .cy-stage.is-fs .cy-stage__deck { display: none; }
.cy-stage.is-fs .cy-stage__chips { margin-top: 0; }
.cy-stage.is-fs .cy-stage__scrim { height: 26%; }

/* no WebGL: plan-view images and the same divider */
.cy-stage.is-static .cy-stage__canvas, .cy-stage.is-static [data-cy-zoom-in], .cy-stage.is-static [data-cy-zoom-out],
.cy-stage.is-static [data-cy-reset], .cy-stage.is-static [data-cy-outlines], .cy-stage.is-static .cy-stage__legend { display: none; }

.cy-hero__below { padding-top: clamp(24px, 3vw, 36px); }
.cy-hero__source { margin: 16px 0 0; max-width: 110ch; color: var(--text-2); font: 400 13px/1.65 var(--font-mono); }

/* ---- stat tiles ----------------------------------------------------------- */
.cy-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 0; }
.cy-stat { min-width: 0; padding: 18px 20px; border: 1px solid var(--line); border-radius: 8px; background: var(--ink-1); }
.cy-stat dt { color: var(--text-2); font-size: 14px; line-height: 1.4; }
.cy-stat dd { margin: 0; }
.cy-stat__value { margin-top: 8px !important; color: var(--text); font: 500 clamp(23px, 2.4vw, 32px)/1.15 var(--font-display); letter-spacing: -.02em; white-space: nowrap; }
.cy-stat__value small { margin-left: 4px; color: var(--text-2); font: 400 14px var(--font-body); letter-spacing: 0; }
.cy-stat__note { margin-top: 6px !important; color: var(--text-3); font: 400 13px/1.45 var(--font-mono); }
.cy-stats--grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.cy-stats--grid .cy-stat { padding: 14px 16px; }
.cy-stats--grid .cy-stat__value { font-size: clamp(20px, 1.9vw, 26px); }

/* ---- plan-view maps (drainage and cut/fill share these) --------------------- */
.cy-plan { position: relative; }
.cy-plan__canvas { display: block; width: 100%; height: 100%; touch-action: pan-y; cursor: crosshair; }
.cy-plan__scale { position: absolute; z-index: 2; left: 14px; bottom: 12px; padding: 5px 8px 6px; border: 1px solid var(--line); border-radius: 4px; background: rgba(6, 9, 14, .8); color: var(--text-2); font: 500 13px/1 var(--font-mono); pointer-events: none; }
.cy-plan__scale i { display: block; height: 5px; margin-bottom: 5px; border: 1px solid var(--text-2); border-top: 0; }
.cy-plan__scale:empty { display: none; }
.cy-tip { position: absolute; z-index: 4; left: 0; top: 0; min-width: 150px; padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: 4px; background: rgba(6, 9, 14, .94); box-shadow: 0 8px 24px rgba(0, 0, 0, .45); color: var(--text-2); font: 400 13.5px/1.55 var(--font-mono); white-space: nowrap; pointer-events: none; }
.cy-tip b { display: block; margin-bottom: 2px; color: var(--text); font: 600 14px/1.4 var(--font-body); }
.cy-tip span { display: block; }
.cy-tip[hidden] { display: none; }

/* ---- drainage: the site's .ds frame, with a portrait (north-up) viewport ------ */
.cy-ds .ds__viewport { display: block; width: 100%; max-width: calc(min(72vh, 700px) * var(--cy-ar)); aspect-ratio: var(--cy-aspect); justify-self: center; background: var(--ink-1); }
.cy-ds .ds__canvas { position: absolute; inset: 0; }
.cy-surfaces { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
.cy-surfaces button[hidden] { display: none; }
.cy-surfaces button[aria-pressed="true"] { --ds-progress: 100%; }
.cy-key--tracer { height: 3px; border-radius: 2px; background: linear-gradient(90deg, rgba(234, 244, 255, 0), #EAF4FF); }
.cy-ds .ds__facts li { color: var(--text-2); }
.cy-ds .cy-table-wrap { margin-top: 22px; }
.cy-ds .ds__method p { margin: 0 0 10px; }
.cy-ds .ds__method .cy-table-wrap { margin: 6px 0 4px; }
@media (min-width: 1100px) {
  .cy-ds { grid-template-columns: minmax(0, 1fr) auto; column-gap: 36px; }
  .cy-ds .ds__copy { grid-column: 1; grid-row: 1; }
  .cy-ds .ds__viewport { grid-column: 2; grid-row: 1; width: calc(min(76vh, 740px) * var(--cy-ar)); max-width: none; min-height: 0; }
  .cy-ds .ds__bar { grid-column: 1 / -1; grid-row: 2; }
  .cy-ds .ds__disclaimer { grid-row: 3; }
  .cy-ds .ds__method { grid-row: 4; }
}

/* ---- cut / fill ------------------------------------------------------------ */
.cy-earthwork { background: var(--ink-0); }
.cy-cf__controls { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-bottom: 20px; }
.cy-seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--line-strong); border-radius: 6px; overflow: hidden; }
.cy-seg button { padding: 11px 16px; border: 0; border-right: 1px solid var(--line); background: var(--ink-1); color: var(--text-2); font: 500 14.5px/1.2 var(--font-body); cursor: pointer; }
.cy-seg button:last-child { border-right: 0; }
.cy-seg button:hover { color: var(--text); }
.cy-seg button[aria-pressed="true"] { background: var(--gold-dim); color: var(--gold-2); }
.cy-seg button[hidden] { display: none; }
.cy-seg button:focus-visible { outline-offset: -3px; }
.cy-cf__caption { flex: 1 1 320px; margin: 0; max-width: 72ch; color: var(--text-2); font-size: 15px; line-height: 1.55; }
.cy-cf__main { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 32px; align-items: start; }
.cy-cf__map { width: calc(min(76vh, 740px) * var(--cy-ar)); aspect-ratio: var(--cy-aspect); overflow: hidden; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--ink-1); }
.cy-cf__map .cy-plan__canvas { position: absolute; inset: 0; }
.cy-cf__side { display: flex; flex-direction: column; gap: 26px; min-width: 0; }
.cy-ramp .mono-label { color: var(--text-2); letter-spacing: .1em; line-height: 1.4; }
.cy-ramp__bar { height: 12px; margin-top: 12px; border-radius: 2px; }
.cy-ramp__labels { position: relative; height: 18px; margin-top: 6px; color: var(--text-2); font: 400 13px/1 var(--font-mono); }
.cy-ramp__labels span { position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; }
.cy-ramp__labels span:first-child { transform: none; }
.cy-ramp__labels span:last-child { transform: translateX(-100%); }
.cy-ramp__ends { display: flex; justify-content: space-between; margin: 6px 0 0; color: var(--text-3); font-size: 14px; }
.cy-outlines { display: flex; flex-direction: column; gap: 9px; margin: 0; padding: 0; list-style: none; color: var(--text-2); font-size: 14.5px; line-height: 1.4; }
.cy-outlines li { display: flex; align-items: center; gap: 10px; }
.cy-key { flex: none; display: inline-block; width: 20px; height: 0; border-top: 2px solid var(--steel); }
.cy-key--crit { border-top-color: var(--crit); }
.cy-key--steel { border-top-color: var(--steel); }
.cy-key--gold { border-top-color: var(--gold); }
.cy-key--review { border-top: 2px dashed var(--orange-2); }
.cy-earthwork .cy-table-wrap { margin-top: 36px; }
@media (max-width: 1000px) {
  .cy-cf__main { grid-template-columns: minmax(0, 1fr); }
  .cy-cf__map { justify-self: center; width: 100%; max-width: calc(min(72vh, 700px) * var(--cy-ar)); }
  .cy-cf__side { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px 28px; }
  .cy-cf__side .cy-stats { grid-column: 1 / -1; grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---- tables ---------------------------------------------------------------- */
.cy-table-wrap { overflow-x: auto; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
.cy-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.cy-table caption { caption-side: top; padding: 0 0 12px; color: var(--text-2); font-size: 14.5px; line-height: 1.5; text-align: left; }
.cy-table th, .cy-table td { padding: 12px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.cy-table thead th { padding-top: 8px; border-bottom-color: var(--line-strong); color: var(--text-2); font: 500 13px/1.4 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.cy-table thead th.num { text-align: right; }
.cy-table tbody th { color: var(--text); font-weight: 400; }
.cy-table tbody th.cy-table__sub { padding-left: 18px; color: var(--text-2); }
.cy-table tbody th small { display: block; margin-top: 3px; color: var(--text-3); font-size: 14px; line-height: 1.4; }
.cy-table td { color: var(--text-2); }
.cy-table td.num { color: var(--text); font: 400 15px/1.5 var(--font-mono); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.cy-table td.is-na { color: var(--text-3); }
.cy-table th:first-child, .cy-table td:first-child { padding-left: 0; }
.cy-table th:last-child, .cy-table td:last-child { padding-right: 0; }
.cy-table__group th { padding: 22px 0 8px; border-bottom-color: var(--line-strong); color: var(--gold); font: 500 13px/1.4 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; }
.cy-table tr.is-current th, .cy-table tr.is-current td { color: var(--gold-2); }
.cy-table--compact { font-size: 14.5px; }
.cy-table--compact th, .cy-table--compact td { padding: 9px 8px; }
.cy-table--compact td.num { font-size: 14px; }
.cy-table--audit th[scope="row"] { min-width: 15em; }

/* ---- audit ----------------------------------------------------------------- */
.cy-audit { background: var(--ink-1); }
.cy-notes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 32px; margin: 28px 0 0; padding: 0; list-style: none; }
.cy-notes li { position: relative; padding-left: 16px; color: var(--text-2); font-size: 15px; line-height: 1.55; }
.cy-notes li::before { content: ""; position: absolute; left: 0; top: .72em; width: 7px; height: 1px; background: var(--gold); }
.cy-notes:empty { display: none; }
.cy-fix { margin-top: 36px; padding: 24px 26px; border: 1px solid var(--line); border-left: 3px solid var(--gold); border-radius: var(--radius); background: var(--ink-0); }
.cy-fix[hidden] { display: none; }
.cy-fix h3 { margin: 0 0 14px; font-size: 18px; }
.cy-fix__list { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }
.cy-fix__list li { position: relative; padding-left: 16px; max-width: 110ch; color: var(--text-2); font-size: 14.5px; line-height: 1.55; }
.cy-fix__list li::before { content: ""; position: absolute; left: 0; top: .72em; width: 7px; height: 1px; background: var(--gold); }

/* ---- proposed plan ---------------------------------------------------------- */
.cy-doc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 340px); gap: clamp(32px, 5vw, 64px); align-items: start; }
.cy-doc__part { display: grid; grid-template-columns: minmax(150px, 210px) minmax(0, 1fr); gap: 8px 32px; padding: 24px 0; border-top: 1px solid var(--line); }
.cy-doc__part > h3 { display: flex; align-items: baseline; gap: 12px; font-size: 18px; }
.cy-doc__text { min-width: 0; }
.cy-doc__part p { margin: 0 0 12px; max-width: 66ch; color: var(--text-2); font-size: 15.5px; line-height: 1.65; }
.cy-doc__part p:last-child { margin-bottom: 0; }
.cy-doc__n { color: var(--gold); font: 400 14px/1 var(--font-mono); }
.cy-ref { margin-left: 2px; color: var(--gold-2); font: 500 14px/1 var(--font-mono); text-decoration: none; white-space: nowrap; }
.cy-ref + .cy-ref { margin-left: 0; }
.cy-ref:hover { text-decoration: underline; text-underline-offset: 3px; }
.cy-seq { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; margin: 0; padding: 0; list-style: none; counter-reset: cyseq; }
.cy-seq li { counter-increment: cyseq; display: grid; grid-template-columns: 34px minmax(0, 1fr); padding: 10px 0; border-bottom: 1px solid var(--line); color: var(--text-2); font-size: 15px; line-height: 1.5; }
.cy-seq li::before { content: counter(cyseq, decimal-leading-zero); color: var(--gold); font: 500 14px/1.9 var(--font-mono); }
.cy-open { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }
.cy-open li { position: relative; padding-left: 16px; max-width: 66ch; color: var(--text-2); font-size: 15px; line-height: 1.55; }
.cy-open li::before { content: ""; position: absolute; left: 0; top: .74em; width: 7px; height: 1px; background: var(--gold); }
.cy-doc__status { margin: 28px 0 0; padding: 10px 12px; border: 1px dashed var(--gold-line); border-radius: 4px; color: var(--gold-2); font: 500 14px/1.7 var(--font-mono); letter-spacing: .02em; }
.cy-doc__refs { position: sticky; top: 96px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--ink-1); }
.cy-doc__refs h3 { margin: 0 0 14px; font-size: 17px; }
.refs { display: flex; flex-direction: column; gap: 12px; margin: 0; padding-left: 22px; color: var(--text-2); font-size: 14.5px; line-height: 1.55; }
.refs li { padding-left: 4px; overflow-wrap: anywhere; scroll-margin-top: 110px; }
.refs li::marker { color: var(--gold); font: 500 14px var(--font-mono); }
.refs a { color: var(--steel); }
.refs a:hover { color: var(--gold-2); }
.refs li:target { color: var(--text); }
.cy-doc__part { scroll-margin-top: 90px; }

/* ---- responsive ------------------------------------------------------------ */
@media (max-width: 980px) {
  .cy-doc { grid-template-columns: minmax(0, 1fr); }
  .cy-doc__refs { position: static; }
  .cy-notes { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .cy-stats { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .cy-stat { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 2px 12px; padding: 14px 16px; }
  .cy-stat dt { grid-column: 1; }
  .cy-stat__value { grid-column: 2; grid-row: 1 / span 2; margin-top: 0 !important; font-size: 24px; }
  .cy-stat__note { grid-column: 1; margin-top: 0 !important; }
  .cy-cf__side { grid-template-columns: minmax(0, 1fr); }
  .cy-cf__side .cy-stats { grid-template-columns: minmax(0, 1fr); }
  .cy-doc__part { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .cy-seq { grid-template-columns: minmax(0, 1fr); }
}
/* Up to 900 px the title block sits above the view area (cuyama.js measures it
   into --cy-top); wider than that it overlays the stage and the model is framed
   into the room to its right. */
@media (max-width: 900px) {
  .cy-stage { height: calc(60vh + var(--cy-top, 0px)); min-height: calc(400px + var(--cy-top, 0px)); }
  .cy-stage:not(.is-fs) .cy-stage__scrim { display: none; }
  .cy-stage:not(.is-fs) .cy-stage__canvas, .cy-stage:not(.is-fs) .cy-stage__fallback { border-top: 1px solid var(--line); }
  .cy-stage__ve { top: calc(var(--cy-top, 0px) + 10px); bottom: auto; }
  .cy-stage__legend { top: calc(var(--cy-top, 0px) + 10px); bottom: auto; right: 12px; }
  .cy-stage__copy { top: 18px; }
  .cy-stage:not(.is-fs) .cy-stage__img { object-position: 50% 50%; }
  .cy-stage__hint { display: none; }
}
@media (max-width: 640px) {
  .cy-stage [data-cy-zoom-in], .cy-stage [data-cy-zoom-out] { display: none; }
  .cy-stage__title { margin: 12px 0 8px; font-size: 30px; max-width: 12ch; }
  .cy-stage__deck { max-width: 28ch; font-size: 15px; }
  .cy-stage__chips { gap: 6px; margin-top: 12px; }
  .cy-stage__provenance, .cy-stage__tag { padding: 5px 7px; }
  .cy-stage__handle { width: 44px; height: 44px; }
  .cy-stage__side { padding: 5px 7px; }
  .cy-stage__tools { right: 12px; bottom: 12px; gap: 5px; }
  .cy-tool { min-width: 38px; height: 38px; }
  .cy-tool--text { padding: 0 9px; }
  .cy-stage__legend { padding: 6px 8px; }
  .cy-stage__ve { left: 12px; }
  .cy-stage__hint { display: none; }
  .cy-ds .ds__viewport { max-width: calc(64vh * var(--cy-ar)); }
  .cy-cf__map { max-width: calc(64vh * var(--cy-ar)); }
  .cy-table { font-size: 14.5px; }
  .cy-table th, .cy-table td { padding: 10px 6px; }
  .cy-table thead th { white-space: normal; letter-spacing: .03em; font-size: 12.5px; }
  .cy-table td.num { font-size: 14px; }
  .cy-table--audit th[scope="row"] { min-width: 0; }
  .cy-table__group th { letter-spacing: .08em; }
}
@media (prefers-reduced-motion: reduce) {
  .cy-stage__side, .cy-stage__toast { transition: none; }
}

/* ---- larger small text (owner request 2026-09-25) ---------------------------
   Page-scoped overrides of the site's smallest sizes; site.css is untouched. */
body.cy-page .eyebrow { font-size: 13.5px; }
body.cy-page .mono-label { font-size: 13px; }
body.cy-page .muted { font-size: 15px; }
body.cy-page .badge { font-size: 12.5px; }
body.cy-page .ds__chapter-id { font-size: 13px; }
body.cy-page .ds__legend { font-size: 14px; }
body.cy-page .ds__facts, body.cy-page .ds__facts li { font-size: 14px; }
body.cy-page .ds__clock { font-size: 13.5px; }
body.cy-page .ds__chapters button { font-size: 14.5px; }
body.cy-page .ds__north { font-size: 13px; }
body.cy-page .ds__view { font-size: 13.5px; }
body.cy-page .ds__disclaimer { font-size: 13.5px; }
body.cy-page .ds__method { font-size: 15px; }
body.cy-page .ds__method > summary { font-size: 14.5px; }
body.cy-page .ds__label, body.cy-page .ds__label-lead, body.cy-page .ds__label-value { font-size: 13px; }
body.cy-page .ds__label-title { font-size: 13.5px; }
body.cy-page .site-footer__tag { font-size: 13.5px; }
body.cy-page .site-footer__nav a { font-size: 15px; }
body.cy-page .site-footer__legal { font-size: 14px; }
body.cy-page .site-footer__copy { font-size: 13.5px; }
