/* KBM A1 Lean — the product shell. Workbench tokens, far fewer things on screen. */
body.lean{background:var(--paper);color:var(--ink);font-family:var(--sans)}
/* The hidden attribute always wins: a display rule on a component must never reveal a closed drawer or another step. */
body.lean [hidden]{display:none !important}
body.lean main.lean-wrap{max-width:1240px;margin:0 auto;padding:18px 20px 120px}

.lean-top{position:sticky;top:0;z-index:30;background:var(--paper);border-bottom:1px solid var(--line)}
.lean-top-inner{max-width:1240px;margin:0 auto;padding:10px 20px;display:flex;align-items:center;gap:14px}
.lean-brand{display:flex;align-items:baseline;gap:10px;font-weight:700;color:var(--ink);text-decoration:none}
.lean-brand .mark{font-family:var(--mono);font-size:13px;color:#fff;background:var(--brand);padding:3px 7px;border-radius:6px}
.lean-spacer{flex:1}
.lean-study{font:12px var(--mono);color:var(--ink-soft)}
.lean-link{background:none;border:0;color:var(--brand);font:inherit;font-size:14px;cursor:pointer;text-decoration:underline;padding:0 4px}
.lean-steps{max-width:1240px;margin:0 auto;padding:0 20px 10px;display:flex;gap:6px;flex-wrap:wrap}
.lean-steps button{border:1px solid var(--line);background:var(--surface);color:var(--ink-soft);border-radius:999px;padding:5px 12px;font:inherit;font-size:13px;cursor:pointer}
.lean-steps button b{font-family:var(--mono);margin-right:4px}
.lean-steps button[data-state="current"]{background:var(--brand);border-color:var(--brand);color:#fff}
.lean-steps button[data-state="done"]{color:var(--brand);border-color:var(--brand)}
.lean-steps button[disabled]{opacity:.45;cursor:not-allowed}

.lean-step h1{font-size:26px;margin:10px 0 4px;letter-spacing:-.01em}
.lean-lede{color:var(--ink-soft);margin:0 0 14px;max-width:760px}
.lean-card{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);padding:16px 18px;margin:0 0 14px;box-shadow:var(--shadow)}
.lean-card h2{font-size:16px;margin:0 0 10px}
.lean-card h3{font-size:14px;margin:14px 0 8px}
.lean-upload{display:flex;gap:12px;align-items:flex-end;flex-wrap:wrap}
.lean-field{display:flex;flex-direction:column;gap:4px;font-size:13px;min-width:180px}
.lean-field>span{color:var(--ink-soft)}
.lean-field input,.lean-field select{font:inherit;font-size:14px;padding:7px 9px;border:1px solid var(--line);border-radius:8px;background:#fff;min-width:0}
.lean-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:12px}
.lean-status{font-size:13px;color:var(--ink-soft);margin:8px 0 0}
.lean-primary{background:var(--brand);color:#fff;border:0;border-radius:8px;padding:9px 16px;font:inherit;font-weight:600;cursor:pointer}
.lean-primary[disabled]{opacity:.5;cursor:not-allowed}
.lean-secondary{background:#fff;color:var(--brand);border:1px solid var(--brand);border-radius:8px;padding:8px 14px;font:inherit;cursor:pointer}
.lean-secondary[disabled]{opacity:.5;cursor:not-allowed}
.lean-notice{border:1px solid #d9c38f;background:#fff8e6;color:#6b4e00;border-radius:8px;padding:9px 12px;margin:0 0 12px;font-size:14px}
.lean-notice[data-kind="error"]{border-color:#e3b2ae;background:#fdf0ef;color:var(--blocked)}
.lean-notice[data-kind="ok"]{border-color:#b7d8cb;background:#eef8f3;color:var(--pass)}

.lean-actionbar{position:sticky;bottom:0;z-index:20;background:var(--surface);border:1px solid var(--line);border-radius:var(--r);padding:10px 14px;margin-top:12px;display:flex;gap:12px;align-items:center;flex-wrap:wrap;box-shadow:0 -2px 10px #0000000f}
.lean-checks{display:flex;gap:14px;flex-wrap:wrap;font-size:13px;flex:1}
.lean-checks span[data-ok="true"]{color:var(--pass)}
.lean-checks span[data-ok="false"]{color:var(--ink-soft)}
/* Upload first: no per-file chooser; what KBM took each source to be, and the architect's say. */
body.lean #evidenceFileTypeRows{display:none !important}
.lean-recognition{border-left:3px solid var(--brand);padding:6px 0 6px 12px;margin:8px 0 10px}
.lean-recognition[data-confidence="moderate"],.lean-recognition[data-confidence="low"]{border-left-color:#c98a00}
.lean-recognition-said{margin:0 0 2px;font-weight:600}
.lean-recognition-question{margin:8px 0 6px;font-weight:600;color:#6b4e00}
.lean-recognition-choices{display:flex;gap:8px;flex-wrap:wrap;margin:4px 0}
.lean-recognition details summary{cursor:pointer;color:var(--brand)}
/* The scale and area panel stays in view at the top of the editor while the drawing scrolls. */
body.lean .bnd-editor .be-area-summary{position:sticky;top:96px;z-index:7}
.lean-area-headline{margin:0;font-weight:700;font-size:15px;color:var(--ink)}
.lean-scale-ways{display:flex;flex-direction:column;gap:6px;margin-top:6px}
.lean-scale-way{display:flex;gap:8px;align-items:center;flex-wrap:wrap;font-size:13px}
.lean-scale-way input,.lean-scale-way select{font:inherit;font-size:13px;padding:4px 6px;border:1px solid var(--line);border-radius:6px;width:110px}
.lean-scale-ways [data-scale-proposal]{min-width:0}
/* The optional recorded-extent question at the Site step. */
.lean-extent-question{border-top:1px solid var(--line);margin:14px 0 10px;padding-top:4px}
.lean-extent-question .lean-small{margin:0 0 8px;max-width:820px}
/* The area of the boundary being edited, and what that area is. */
.lean-area{border:1px solid var(--line);border-left:4px solid var(--brand);border-radius:8px;background:var(--surface);padding:10px 14px;margin:8px 0 12px;display:flex;flex-direction:column;gap:4px}
.lean-area-line{display:flex;gap:10px;align-items:baseline;flex-wrap:wrap;font-size:13.5px;color:var(--ink-soft)}
.lean-area-line strong{font-size:20px;color:var(--ink);font-variant-numeric:tabular-nums}
.lean-area-line[data-area-line="geometry_difference"] strong,.lean-area-line[data-area-line="scale_basis"] strong{font-size:14px;font-weight:600}
.lean-area-compact{flex:1 0 100%;font-size:14px;font-weight:600;color:var(--ink)}
.lean-area-compact:empty{display:none}
/* What still stops Confirm site, in the bar with the button: each takes the bar's full width. */
.lean-site-needs,.lean-site-block{flex:1 0 100%;margin:0;min-width:0}
.lean-site-needs-row{display:flex;flex-wrap:wrap;gap:12px;align-items:flex-end}
.lean-site-needs-row .lean-field{flex:1 1 200px;min-width:0}
.lean-site-block{border:1px solid #e3b2ae;background:#fdf0ef;color:var(--blocked);border-radius:var(--r);padding:8px 10px;font-size:13px}

.lean-units{width:100%;border-collapse:collapse;font-size:14px}
.lean-units th,.lean-units td{border-bottom:1px solid var(--line);padding:6px 8px;text-align:left}
.lean-units input{width:92px;font:inherit;padding:5px 7px;border:1px solid var(--line);border-radius:6px}
.lean-derived{color:var(--ink-soft);font-size:13px}
.lean-drivers{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:10px}
.lean-driver{border:1px solid var(--line);border-radius:10px;padding:10px 12px;cursor:pointer;background:#fff;display:flex;gap:8px;align-items:flex-start}
.lean-driver[data-selected="true"]{border-color:var(--brand);box-shadow:0 0 0 2px var(--brand-soft)}
.lean-driver strong{display:block;font-size:14px}
.lean-driver small{color:var(--ink-soft);font-size:12.5px}
.lean-driver-input{margin-top:12px;padding:12px;border-radius:10px;background:var(--brand-soft)}
.lean-levels{display:flex;flex-direction:column;gap:6px;font-size:14px}
.lean-levels label{display:flex;gap:8px;align-items:baseline}
.lean-levels small{color:var(--ink-soft)}
.lean-card details{margin-top:10px}
.lean-card summary{cursor:pointer;color:var(--brand);font-size:14px}

.lean-history{display:flex;gap:6px;flex-wrap:wrap;margin:6px 0 12px}
.lean-chip{border:1px solid var(--line);background:#fff;border-radius:999px;padding:4px 10px;font-size:13px;cursor:pointer}
.lean-chip[data-active="true"]{border-color:var(--brand);color:var(--brand);font-weight:600}
.lean-chip[data-stale="true"]{text-decoration:line-through;color:var(--ink-soft)}
.lean-toolbar{display:flex;gap:8px;flex-wrap:wrap;margin:8px 0 14px}

/* auto-fill, not auto-fit: one option keeps a card's width instead of stretching the plan across the page. */
.lean-options{display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:14px;align-items:start}
.lean-option{background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:12px;box-shadow:var(--shadow);display:flex;flex-direction:column;gap:8px}
.lean-option h3{margin:0;font-size:16px}
.lean-thumb{border:1px solid var(--line);border-radius:8px;overflow:hidden;background:#fff}
.lean-thumb svg{display:block;width:100%;height:auto}
.lean-metrics{display:grid;grid-template-columns:auto 1fr;gap:3px 10px;margin:0;font-size:13.5px}
.lean-metrics dt{color:var(--ink-soft)}
.lean-metrics dd{margin:0;font-weight:600;font-variant-numeric:tabular-nums}
.lean-status-chip{display:inline-block;border-radius:6px;padding:2px 8px;font-size:12px;font-weight:700;letter-spacing:.02em;background:#eef2f1;color:var(--ink)}
.lean-status-chip[data-class^="PASS"]{background:#e6f4ee;color:var(--pass)}
.lean-status-chip[data-class^="FAIL"]{background:#fbeceb;color:var(--blocked)}
.lean-status-chip[data-class*="UNRESOLVED"],
.lean-status-chip[data-class^="FEASIBLE"],
.lean-status-chip[data-class^="ADDITIONAL"]{background:#fff4dc;color:var(--evidence)}
.lean-small{font-size:12.5px;color:var(--ink-soft);margin:0}
/* ARCHITECT REFINEMENTS, on the option card itself.
   These are questions KBM asks AFTER generating, so they belong where the architect is
   already looking - between the verdict and the downloads - and not behind a report
   button, which is where they first went and where nobody would have found them. */
.lean-refine{border:1px solid var(--line);border-left:3px solid var(--evidence);border-radius:10px;padding:10px 12px;background:#fffdf7;display:flex;flex-direction:column;gap:7px}
.lean-refine h4{margin:0;font-size:12.5px;letter-spacing:.04em;text-transform:uppercase;color:var(--ink)}
.lean-refine h5{margin:4px 0 0;font-size:13px}
.lean-refine .lean-choice{display:flex;gap:6px;flex-wrap:wrap;align-items:flex-end}
.lean-refine .lean-choice button{font:inherit;font-size:12.5px;border:1px solid var(--line);background:#fff;border-radius:7px;padding:5px 10px;cursor:pointer}
.lean-refine .lean-choice button[aria-pressed="true"]{background:var(--brand);border-color:var(--brand);color:#fff;font-weight:600}
.lean-refine .lean-field{min-width:120px}
.lean-refine .lean-apply{align-self:flex-start;font:inherit;font-size:12.5px;border:1px solid var(--brand);background:var(--brand);color:#fff;border-radius:7px;padding:5px 11px;cursor:pointer;font-weight:600}
.lean-refine .lean-apply[disabled]{opacity:.45;cursor:not-allowed}
/* A LIVE PROCESS MUST NOT LOOK LIKE A DEAD BUTTON.
   While a regeneration runs the control is non-clickable, but it is NOT inactive - it is
   rebuilding the basement and re-packing the cars, which takes minutes. Dimming it to the
   ordinary disabled grey told the architect the thing had failed while the work was still
   going on. It keeps full-strength brand colour, a moving stripe and a progress cursor; only
   the pointer is taken away. This rule follows [disabled] deliberately: same specificity,
   later wins. */
.lean-refine .lean-apply[data-running]{
  opacity:1;cursor:progress;color:#fff;font-weight:700;
  border-color:var(--brand);background-color:var(--brand);
  background-image:linear-gradient(115deg,rgba(255,255,255,.30) 25%,transparent 25%,
    transparent 50%,rgba(255,255,255,.30) 50%,rgba(255,255,255,.30) 75%,transparent 75%);
  background-size:24px 24px;
  animation:lean-working 1s linear infinite;
  box-shadow:0 0 0 3px rgba(31,122,114,.18);
}
@keyframes lean-working{from{background-position:0 0}to{background-position:24px 0}}

/* The same treatment for the banner, so the two agree at a glance. */
.lean-notice[data-kind="running"]{
  border-color:var(--brand);background:#eef6f5;color:var(--ink);font-weight:600;
  display:flex;align-items:center;gap:9px;
}
.lean-notice[data-kind="running"]::before{
  content:"";width:13px;height:13px;flex:none;border-radius:50%;
  border:2px solid var(--brand);border-top-color:transparent;
  animation:lean-spin .8s linear infinite;
}
@keyframes lean-spin{to{transform:rotate(360deg)}}

@media (prefers-reduced-motion: reduce){
  .lean-refine .lean-apply[data-running]{animation:none}
  .lean-notice[data-kind="running"]::before{animation:none;border-top-color:var(--brand)}
}
.lean-refine .lean-measured{font-size:12.5px;color:var(--ink);margin:0}
.lean-downloads{display:flex;gap:6px;flex-wrap:wrap}
.lean-downloads button{font:inherit;font-size:13px;border:1px solid var(--line);background:#fff;border-radius:7px;padding:5px 9px;cursor:pointer}
.lean-downloads button.lean-report-btn{background:var(--brand);border-color:var(--brand);color:#fff;font-weight:600}
.lean-downloads button[disabled]{opacity:.55;cursor:not-allowed}

.lean-drawer{position:fixed;top:0;right:0;bottom:0;width:min(1040px,100vw);z-index:60;background:var(--paper);border-left:1px solid var(--line);box-shadow:-10px 0 30px #0000001f;display:flex;flex-direction:column}
.lean-drawer-head{display:flex;justify-content:space-between;align-items:center;padding:12px 18px;border-bottom:1px solid var(--line);background:var(--surface)}
.lean-drawer-body{overflow:auto;padding:12px 18px 40px}
.lean-drawer-body .drawing-svg svg{max-width:100%;height:auto}
.lean-table{width:100%;border-collapse:collapse;font-size:13.5px}
.lean-table th,.lean-table td{border-bottom:1px solid var(--line);padding:5px 8px;text-align:left;vertical-align:top}

@media (max-width:640px){
  .lean-top-inner{flex-wrap:wrap}
  .lean-step h1{font-size:21px}
  .lean-options{grid-template-columns:1fr}
}
.lean-table td.lean-num{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
.lean-table tr[data-level] td:first-child{white-space:nowrap}

/* The architect's own assumption, marked out among the strategies KBM tested beside it. */
.lean-row-assumption{background:var(--tint, rgba(0,0,0,.04))}
.lean-row-assumption td{font-weight:600}

/* The four coordinated plans of an option, as tabs inside its card. */
.lean-plans{margin:0 0 10px}
.lean-plantabs{display:flex;flex-wrap:wrap;gap:4px;margin-bottom:6px}
.lean-plantab{font:500 11.5px system-ui,sans-serif;padding:3px 9px;border:1px solid var(--line,#d8d8d2);
  background:#fff;border-radius:999px;cursor:pointer;color:var(--ink-soft,#5a5a55)}
.lean-plantab[data-active="true"]{background:var(--ink,#1d1d1b);border-color:var(--ink,#1d1d1b);color:#fff}
.lean-planstage svg{display:block;width:100%;height:auto}
/* The setback sheet follows its plot's proportions; on the card it is kept to a sensible height. */
.lean-planstage svg[data-setback-drawing]{max-height:720px}
.lean-plannote{margin:5px 0 0;color:var(--ink-soft,#5a5a55)}

/* ------------------------------------------------------------------------------------
   EVERY FAR TARGET THAT WAS ASKED FOR.
   A target that produced no option is not a footnote. It gets a row like the others, in a
   muted tone so the eye still lands on the options first, but never so quiet that it reads
   as though the target was never looked at.
   ------------------------------------------------------------------------------------ */
.lean-far-outcomes{margin:0 0 1rem;padding:.75rem .9rem;border:1px solid var(--lean-line,#d8d8d8);
  border-radius:8px;background:var(--lean-soft,#fafafa)}
.lean-far-outcomes h3{margin:0 0 .5rem;font-size:.95rem}
.lean-far-row{padding:.35rem 0;border-top:1px solid var(--lean-line,#e6e6e6)}
.lean-far-row:first-of-type{border-top:0}
.lean-far-row strong{font-size:.95rem}
.lean-far-row p{margin:.2rem 0 0}
.lean-far-row[data-outcome="option"] strong{color:var(--lean-ink,#1a1a1a)}
.lean-far-row[data-outcome="attempted_no_separate_option"] strong,
.lean-far-row[data-outcome="not_evaluated"] strong{color:var(--lean-muted,#6a6a6a)}
.lean-far-row[data-outcome="attempted_no_separate_option"],
.lean-far-row[data-outcome="not_evaluated"]{border-left:3px solid var(--lean-muted,#b8b8b8);
  padding-left:.6rem}

/* ------------------------------------------------------------------ large drawing viewer --
   The thumbnails on the option card are an overview; this is the inspection surface. It shows
   the SAME generated SVG at 88% of the viewport, with zoom, pan and the exports for the sheet
   being viewed. Nothing here recomputes geometry - the stage is a container. */
.lean-viewer{position:fixed;inset:6vh 5vw;z-index:70;background:var(--paper,#fff);
  border:1px solid var(--line,#d8d8d2);border-radius:10px;box-shadow:0 18px 60px #00000033;
  display:flex;flex-direction:column;overflow:hidden}
.lean-viewer-head{display:flex;align-items:center;gap:14px;padding:10px 14px;
  border-bottom:1px solid var(--line,#d8d8d2);background:var(--surface,#f7f7f4);flex-wrap:wrap}
.lean-viewer-id{display:flex;flex-direction:column;min-width:210px;flex:1 1 auto}
.lean-viewer-zoom,.lean-viewer-exports{display:flex;gap:4px;align-items:center;flex:0 0 auto}
.lean-viewer-zoom button,.lean-viewer-exports button{font:500 11.5px system-ui,sans-serif;
  padding:4px 9px;border:1px solid var(--line,#d8d8d2);border-radius:6px;background:#fff;
  color:var(--ink,#1d1d1b);cursor:pointer}
.lean-viewer-zoom button:hover,.lean-viewer-exports button:hover{background:var(--surface,#f7f7f4)}
.lean-viewer-zoom button:disabled,.lean-viewer-exports button:disabled{opacity:.45;cursor:default}
.lean-viewer-tabs{display:flex;flex-wrap:wrap;gap:4px;padding:8px 14px;
  border-bottom:1px solid var(--line,#d8d8d2)}
/* Neutral and uncluttered: the drawing is the only thing with ink on it. */
.lean-viewer-stage{flex:1 1 auto;overflow:hidden;background:#fbfbf9;cursor:grab;position:relative}
.lean-viewer-stage[data-panning="true"]{cursor:grabbing}
.lean-viewer-canvas{transform-origin:0 0;will-change:transform;padding:10px}
.lean-viewer-canvas svg{display:block;width:100%;height:auto;background:#fff;
  box-shadow:0 1px 8px #00000014}
.lean-viewer-note{margin:0;padding:8px 14px;border-top:1px solid var(--line,#d8d8d2);
  max-height:22%;overflow:auto}
.lean-viewer-print-id{display:none}
.lean-thumb[data-openable="true"]{cursor:zoom-in}
/* ONE DRAWING, TWO DENSITIES. The generated SVG carries its feasibility dimensions; the card's
   thumbnail is an overview, so it hides that layer, and the large viewer - and every export,
   which is the SVG itself - shows it. There is no second drawing and no second geometry. */
.lean-thumb .kbm-dims{display:none}
.lean-viewer-canvas .kbm-dims{display:block}
/* The page behind the viewer does not scroll while the architect is panning a drawing. */
body[data-viewer-open="true"]{overflow:hidden}

/* PRINT / PDF. The architect prints the sheet being viewed, not the page around it, so the
   browser's own print-to-PDF is the whole implementation. */
@media print{
  body[data-printing="drawing"] > *{display:none !important}
  body[data-printing="drawing"] .lean-viewer{display:flex !important;position:static;inset:auto;
    border:0;box-shadow:none;border-radius:0}
  body[data-printing="drawing"] .lean-viewer-head,
  body[data-printing="drawing"] .lean-viewer-tabs,
  body[data-printing="drawing"] .lean-viewer-note{display:none !important}
  body[data-printing="drawing"] .lean-viewer-stage{overflow:visible;background:#fff}
  body[data-printing="drawing"] .lean-viewer-canvas{transform:none !important;padding:0}
  body[data-printing="drawing"] .lean-viewer-print-id{display:block;font:600 12px system-ui,
    sans-serif;margin:0 0 8px}
  @page{margin:12mm}
}

/* =====================================================================================
   THREE LEVELS OF ONE REPORT.

   The bar sits at the top of the drawer, so the reader can go from the owner's page to the
   architect's document to the evidence without closing anything. The status cells are coloured
   by the word the SERVER chose - this stylesheet never decides what a status means, it only
   makes a failure impossible to skim past and an unresolved item impossible to mistake for a
   settled one.
   ===================================================================================== */
.lean-levels{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:0 0 14px;
  padding-bottom:10px;border-bottom:1px solid var(--line)}
.lean-level{border:1px solid var(--line);background:var(--surface);color:var(--ink-soft);
  border-radius:999px;padding:5px 14px;font:inherit;font-size:13px;cursor:pointer}
.lean-level.is-on{background:var(--ink);color:#fff;border-color:var(--ink);font-weight:600}
.lean-level-note{flex:1 1 220px;min-width:0}
.lean-summary-verdict{font-size:15px;font-weight:600;margin:0 0 12px}
.lean-bullets{margin:0 0 12px;padding-left:20px;font-size:13.5px}
.lean-bullets li{margin:0 0 4px}
.lean-pair-note{color:var(--ink-soft);font-weight:400}

/* THE OPTION'S DRAWINGS IN ITS REPORTS: each sheet at the report's full width, its caption under
   it. On paper each sheet takes its own page, so a plan is printed at a scale that can be read. */
.lean-report-drawings{margin:18px 0 8px}
.lean-report-figure{margin:12px 0 18px;page-break-inside:avoid;break-inside:avoid}
.lean-report-figure img{display:block;width:100%;height:auto;border:1px solid var(--line);border-radius:6px;background:#fff}
.lean-report-figure figcaption{font-size:12.5px;margin-top:5px;color:var(--ink)}
.lean-metrics dd[data-unresolved="true"]{color:var(--evidence)}

/* REQUIRED vs PROVIDED, and the readiness list. */
.lean-verify,.lean-readiness{margin:0 0 14px}
.lean-verify td:nth-child(2),.lean-verify td:nth-child(3){font-variant-numeric:tabular-nums}
.lean-verify tr[data-limit-row="true"] td:nth-child(3){color:var(--ink-soft);font-style:italic}
.lean-verify-status{white-space:nowrap;font-size:12px;font-weight:700;letter-spacing:.02em}
.lean-verify-status[data-status="COMPLIES"],
.lean-verify-status[data-status="APPLIES"]{color:var(--pass)}
.lean-verify-status[data-status="DOES NOT COMPLY"]{color:var(--blocked)}
.lean-verify-status[data-status="PROVISIONAL"],
.lean-verify-status[data-status="DESIGN ESTIMATE"],
.lean-verify-status[data-status="LIKELY - CONFIRM"],
.lean-verify-status[data-status^="NOT YET DEMONSTRATED"]{color:var(--evidence)}
.lean-verify-status[data-status="ARCHITECT DECISION REQUIRED"],
.lean-verify-status[data-status="INPUT REQUIRED"]{color:var(--ink-soft)}
.lean-verify-status[data-status="ARCHITECT INPUT REQUIRED"],
.lean-verify-status[data-status="SPECIALIST INPUT REQUIRED"],
.lean-verify-status[data-status="NOT YET RESOLVED"],
.lean-verify-status[data-status="NOT YET DESIGNED"]{color:var(--ink-soft)}
.lean-verify-status[data-status="NOT APPLICABLE"],
.lean-verify-status[data-status="FOR INFORMATION"]{color:var(--ink-soft);font-weight:400}

/* PRINT THE OPEN REPORT. The drawer becomes the page: its own scroll box, fixed position and
   controls are all print chrome, and the level bar is a navigation device that means nothing on
   paper. Tables are kept off page breaks where the browser allows it. */
@media print{
  body[data-printing="report"] > *{display:none !important}
  body[data-printing="report"] .lean-drawer#leanReport{display:flex !important;position:static;
    inset:auto;width:auto;border:0;box-shadow:none}
  body[data-printing="report"] .lean-drawer-head .lean-link{display:none !important}
  body[data-printing="report"] .lean-drawer-body{overflow:visible;padding:0}
  body[data-printing="report"] .lean-levels{display:none !important}
  body[data-printing="report"] .lean-table{page-break-inside:auto}
  body[data-printing="report"] .lean-table tr{page-break-inside:avoid}
  body[data-printing="report"] h2,
  body[data-printing="report"] h3,
  body[data-printing="report"] h4{page-break-after:avoid}

  /* THE BRIEF IS 3-5 PAGES OR IT IS THE LONG REPORT AGAIN.
     Sixteen pages came from printing the basis of every verification row and the reasoning behind
     every readiness item - depth that belongs in Technical Details, which still has all of it.
     Nothing is deleted: the marked cells and paragraphs are hidden for paper only, leaving
         Item | Required / permissible | Proposed / provided | Status | Rule
     and  Item | Applicability | Reserve / confirm. */
  body[data-printing="report"] .lean-print-hide{display:none !important}
  body[data-printing="report"] .lean-report-drawings{page-break-before:always}
  body[data-printing="report"] .lean-report-figure + .lean-report-figure{page-break-before:always}
  body[data-printing="report"] .lean-report-figure img{max-height:24cm;object-fit:contain;border-radius:0}
  body[data-printing="report"] .lean-verify [data-col="basis"]{display:none}
  body[data-printing="report"] .lean-readiness [data-col="knows"],
  body[data-printing="report"] .lean-readiness [data-col="basis"]{display:none}

  /* Tighter, still legible: 9pt body, 8.5pt tables, narrow gutters. */
  body[data-printing="report"]{font-size:9pt;line-height:1.3}
  body[data-printing="report"] .lean-table{font-size:8.5pt}
  body[data-printing="report"] .lean-table th,
  body[data-printing="report"] .lean-table td{padding:2px 5px}
  body[data-printing="report"] .lean-metrics{font-size:9pt;gap:1px 10px}
  body[data-printing="report"] .lean-bullets{margin:0 0 6px;padding-left:16px}
  body[data-printing="report"] .lean-bullets li{margin:0}
  body[data-printing="report"] h2{font-size:13pt;margin:0 0 4px}
  body[data-printing="report"] h3{font-size:10.5pt;margin:8px 0 3px}
  body[data-printing="report"] h4{font-size:9.5pt;margin:6px 0 2px}
  body[data-printing="report"] p{margin:0 0 5px}
  body[data-printing="report"] .lean-notice{padding:4px 7px;margin:0 0 6px}
  /* The page margin is set once, in the drawing print block above: @page cannot be scoped to a
     selector, so a second declaration here would silently change the drawing sheets too. */
}
.lean-level-print{margin-left:auto}

/* Proposed basement setbacks and the reusable coverage feedback (web/kbm-coverage-feedback.js).
   The band is never colour alone: the chip names it and the figures stand beside it. */
.lean-setbacks{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:8px}
.lean-setback{border:1px solid var(--line);border-radius:8px;padding:7px 9px;background:#fff;display:flex;flex-direction:column;gap:4px}
.lean-setback b{font-size:13px}
.lean-setback .lean-min{font:12px var(--mono);color:var(--ink-soft)}
.lean-setback[data-invalid="1"]{border-color:#b42318;background:#fff5f4}
.kbm-cf{border:1px solid var(--line);border-left-width:5px;border-radius:8px;padding:8px 10px;background:#fff;display:flex;flex-direction:column;gap:6px}
.kbm-cf[data-band="red"]{border-left-color:#b42318;background:#fff5f4}
.kbm-cf[data-band="green"]{border-left-color:#1d7a46;background:#f3fbf6}
.kbm-cf[data-band="amber"]{border-left-color:#b7791f;background:#fffaf0}
.kbm-cf[data-band="neutral"]{border-left-color:#8a8f98;background:#f7f7f8}
.kbm-cf-head{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.kbm-cf-chip{font:600 11.5px var(--mono);letter-spacing:.04em;padding:2px 7px;border-radius:5px;color:#fff;background:#8a8f98}
.kbm-cf[data-band="red"] .kbm-cf-chip{background:#b42318}
.kbm-cf[data-band="green"] .kbm-cf-chip{background:#1d7a46}
.kbm-cf[data-band="amber"] .kbm-cf-chip{background:#b7791f}
.kbm-cf-scope{font-size:12.5px;font-weight:600}
.kbm-cf-why,.kbm-cf-parking,.kbm-cf-scope-note,.kbm-cf-scenario{margin:0;font-size:12.5px}
.kbm-cf-parking{color:var(--ink-soft);font-style:italic}
.kbm-cf-errors{margin:0;padding-left:18px;color:#b42318;font-size:12.5px}
.kbm-cf-table{border-collapse:collapse;font-size:12.5px}
.kbm-cf-table th{text-align:left;font-weight:500;color:var(--ink-soft);padding:2px 10px 2px 0;vertical-align:top}
.kbm-cf-table td{font-family:var(--mono);padding:2px 0}
.kbm-cf-note{font-family:var(--sans);color:var(--ink-soft)}

/* H3.4 Site CAD: the page prepares the site drawing only - steps 3 to 5 are Building Development's. */
body[data-purpose="site_drawing"] .lean-steps button[data-step-link="3"],
body[data-purpose="site_drawing"] .lean-steps button[data-step-link="4"],
body[data-purpose="site_drawing"] .lean-steps button[data-step-link="5"]{display:none}

/* H3.4 Site CAD: the figures on the source per edge, and the supporting documents. */
.lean-drawing-dims{margin:14px 0}
.lean-drawing-dims input{font:inherit;width:11em}
.lean-drawing-dims td[data-ok="false"]{color:#b91c1c;font-weight:600}
.lean-drawing-dims td[data-ok="true"]{color:#15803d}
.lean-supporting{margin:14px 0;padding:10px 12px;border:1px solid var(--line);border-radius:8px}
.lean-support-item{margin:8px 0}
.lean-support-item button{margin-left:6px}
.lean-check{display:flex;gap:6px;align-items:flex-start;margin-top:8px}

/* H3.4 Site CAD final UX: measurements first; no Building Development controls; corner tools folded. */
body[data-purpose="site_drawing"] #boundaryEditorHost .road-choice,
body[data-purpose="site_drawing"] #boundaryEditorHost [data-pick-stage],
body[data-purpose="site_drawing"] #boundaryEditorHost [data-road-widths],
body[data-purpose="site_drawing"] #boundaryEditorHost [data-main-access-road],
body[data-purpose="site_drawing"] #boundaryEditorHost [data-fire-access-side],
body[data-purpose="site_drawing"] #boundaryEditorHost [data-sides-are-not-roads],
body[data-purpose="site_drawing"] #boundaryEditorHost [data-side-step-live],
body[data-purpose="site_drawing"] #boundaryEditorHost [data-stop-side-step],
body[data-purpose="site_drawing"] #boundaryEditorHost [data-road-candidate],
body[data-purpose="site_drawing"] #boundaryEditorHost [data-road-trace-status],
body[data-purpose="site_drawing"] #boundaryEditorHost [data-access-frontage-indicator],
body[data-purpose="site_drawing"] #boundaryEditorHost select.act,
body[data-purpose="site_drawing"] #boundaryEditorHost .bnd-editor > .be-warn{display:none !important}
body[data-purpose="site_drawing"]:not([data-advanced-corners="true"]) #boundaryEditorHost .be-grid > div:not(.be-preview),
body[data-purpose="site_drawing"]:not([data-advanced-corners="true"]) #boundaryEditorHost .be-layer-controls,
body[data-purpose="site_drawing"]:not([data-advanced-corners="true"]) #boundaryEditorHost .be-preview > p.be-note{display:none}
.lean-drawing-dims h2{margin:6px 0 8px}
.lean-measure-summary{border:2px solid #f59e0b;background:#fffbeb;border-radius:8px;padding:8px 14px;margin:8px 0 10px}
.lean-measure-summary p{margin:4px 0}
.lean-measure-summary p[data-kind="ok"]{color:#166534}
.lean-measure-summary p[data-kind="attention"]{font-weight:600}
.lean-measure-summary p[data-kind="error"]{color:#b91c1c;font-weight:600}
.lean-drawing-dims tr[data-missing="true"] td{background:#fef3c7}
.lean-drawing-dims tr[data-missing="true"] [data-dim-from]{color:#b45309;font-weight:700}
.lean-fit-proposal[data-fit-proposal="offered"],.lean-fit-proposal[data-fit-proposal="accepted"],
.lean-fit-proposal[data-fit-proposal="conflict"]{border:1px solid var(--line);border-radius:8px;padding:10px 14px;margin:12px 0;background:#f8fafc}
.lean-fit-proposal[data-fit-proposal="accepted"]{border-color:#16a34a;background:#f0fdf4}
.lean-fit-proposal[data-fit-proposal="conflict"]{border-color:#dc2626;background:#fef2f2}
.lean-fit-compare svg{max-width:100%;height:auto;background:#fff;border:1px solid var(--line);border-radius:6px;margin:6px 0}
.lean-ack{display:flex;gap:6px;align-items:flex-start;max-width:640px;font-size:13px}
[data-just-changed="true"]{background:#dcfce7;transition:background .4s}
