/* CASE Build Mode — a model table you can play.
   Layout: full-bleed model stage; paper cards float over it like sheets on a
   drafting table: project tab + view cluster (top), brief (left), drawer with
   tool tabs, section key, catalog and title block (bottom). */
:root {
  --studio: #ede8df;
  --studio-deep: #dfd7ca;
  --card: #fbf9f5;
  --paper: #fffdf9;
  --ink: #141210;
  --graphite: #3e3a34;
  --pencil: #6e6860;
  --faint: #a09890;
  --rule: #d8d2c8;
  --rule-strong: #c4bcb0;
  --accent: #c14a28;
  --accent-deep: #9e3a1e;
  --accent-soft: #f5e3da;
  --blueline: #2e5e8c;
  --blueline-soft: #dfe8f1;
  --redline: #d2283c;
  --redline-soft: #f9dfe2;
  --sage: #4f7a5a;
  --sage-soft: #e1ebe3;
  --amber: #b5741d;
  --font-sans: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Space Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --shadow-paper:
    0 1px 0 rgba(255, 255, 255, 0.7) inset, 0 14px 30px -16px rgba(58, 42, 24, 0.38),
    0 2px 5px -2px rgba(58, 42, 24, 0.2);
  --drawer-h: 218px;
  /* Softly rounded: cards and tabs, and a little less on buttons and chips. */
  --radius: 6px;
  --radius-sm: 4px;
  --gutter: 16px;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  background: var(--studio);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border-radius: 0;
}

:focus-visible {
  outline: 2px solid var(--blueline);
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

[hidden] {
  display: none !important;
}

.app {
  position: fixed;
  inset: 0;
  overflow: hidden;
  /* The model looks set their own backdrop. */
  background: var(
    --stage,
    radial-gradient(120% 90% at 50% 30%, #f6f2eb 0%, #ebe5da 55%, #ddd5c7 100%)
  );
  transition: background 0.4s;
}

.stage {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  outline: none;
}

.app[data-tool="room"] .stage,
.app[data-tool="wall"] .stage,
.app[data-tool="place"] .stage {
  cursor: crosshair;
}

.app[data-tool="demolish"] .stage {
  cursor: not-allowed;
}

.app.panning .stage {
  cursor: grabbing;
}

.paper {
  background: var(--card);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow-paper);
}

/* The rest of the chrome, softly rounded to match the cards. */
.tile,
.site-card,
.start-card,
.toast,
.hint {
  border-radius: var(--radius);
}

.tile {
  overflow: hidden;
}

.chip,
.seg button,
.text-btn,
.primary,
.secondary,
.brief-select {
  border-radius: var(--radius-sm);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--pencil);
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

/* ---------------------------------------------------------------- overlay */

.overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

.overlay-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.labels,
.floaters {
  position: absolute;
  inset: 0;
}

.room-label {
  position: absolute;
  transform: translate(-50%, -50%);
  text-align: center;
  white-space: nowrap;
  line-height: 1.15;
  transition: opacity 0.2s;
  text-shadow:
    0 0 3px rgba(251, 249, 245, 0.95),
    0 0 8px rgba(251, 249, 245, 0.75);
}

.room-label b {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
}

.room-label span {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--graphite);
}

.room-label.unassigned b {
  color: var(--accent);
}

.room-label.dim {
  opacity: 0.35;
}

.room-label b i {
  font-style: normal;
}

.room-label .rl-short {
  display: none;
}

/* In the plan, a room short of space is named alone (its number is the drawings'), and a narrow
   one by its name cut short. */
.room-label.tag-only span,
.room-label.short .rl-name {
  display: none;
}

.room-label.short .rl-short {
  display: inline;
}

/* Zoomed in, a room's width × length under its area: a click on either types it. */
.room-label .rl-size {
  display: none;
  margin-top: 1px;
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--graphite);
}

.room-label.sized .rl-size {
  display: block;
}

.room-label .rl-size i {
  margin: 0 3px;
  font-style: normal;
  color: var(--pencil);
}

.room-label .rl-size button {
  pointer-events: auto;
  padding: 0 2px;
  border: 0;
  border-bottom: 1px dotted var(--pencil);
  background: transparent;
  font: inherit;
  color: inherit;
  cursor: text;
}

.room-label .rl-size button:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.room-label .rl-edit {
  pointer-events: auto;
  width: 6ch;
  padding: 0 2px;
  border: 1px solid var(--accent);
  background: var(--paper);
  font: inherit;
  text-align: center;
  color: var(--ink);
}

/* The Issue for quote sheet's plans: each plan's room key under it. */
.a3-key {
  display: flex;
  flex-wrap: wrap;
  gap: 1px 10px;
  padding: 0 12px 8px;
  font-size: 9px;
  color: var(--graphite);
}

.a3-key b {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--ink);
}

.floater {
  position: absolute;
  transform: translate(-50%, -100%);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 13px;
  color: var(--accent);
  white-space: nowrap;
  animation: float-up 1.4s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
  text-shadow:
    0 0 4px var(--paper),
    0 0 10px var(--paper);
}

.floater.down {
  color: var(--graphite);
}

.floater small {
  display: block;
  font-size: 10px;
  font-weight: 400;
  color: var(--pencil);
  text-align: center;
}

@keyframes float-up {
  0% {
    opacity: 0;
    transform: translate(-50%, -60%) scale(0.9);
  }
  12% {
    opacity: 1;
    transform: translate(-50%, -110%) scale(1.06);
  }
  70% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -260%) scale(1);
  }
}

.plan-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  display: none;
}

.app[data-view="plan"] .plan-layer {
  display: block;
}

.plan-layer svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* The hover's outline in the plan (planmarks.js): it comes in quickly, as the 3D views' does. */
.plan-hover > * {
  animation: plan-hover-in 0.1s ease-out;
}

@keyframes plan-hover-in {
  from {
    opacity: 0;
  }
}

/* ----------------------------------------------------------------- controls */

.wordmark {
  display: flex;
  align-items: baseline;
  gap: 0.45ch;
  font-size: 15px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.wordmark b {
  font-weight: 700;
}

.wordmark span {
  color: var(--pencil);
}

.cluster-rule {
  width: 1px;
  align-self: stretch;
  background: var(--rule);
  margin: 9px 0;
}

.project-name {
  border: 0;
  background: transparent;
  font-weight: 500;
  font-size: 14px;
  width: 17ch;
  min-width: 0;
  padding: 6px 4px;
  border-bottom: 1px dashed transparent;
}

.project-name:hover,
.project-name:focus {
  border-bottom-color: var(--rule-strong);
  outline: none;
}

/* The project's details (ui.js `renderProjectCard`): a button beside the name, and a card under the
   project's tab with the name, the client's name, phone and email (Chris, 20 Oct 2026). */
.project-wrap {
  display: flex;
}

.project-more {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-left: -8px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--graphite);
}

.project-more svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
}

.project-more:hover,
.project-more[aria-expanded="true"] {
  background: var(--paper);
  border-color: var(--rule);
}

.project-card {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 30;
  width: 320px;
  max-width: calc(100vw - 2 * var(--gutter));
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.project-card[hidden] {
  display: none;
}

.pc-field {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.pc-field span {
  color: var(--pencil);
}

.pc-field input {
  min-width: 0;
  padding: 6px 8px;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-sm);
  background: var(--paper);
  font: inherit;
  font-size: 13px;
}

.pc-note {
  margin: 0;
  font-size: 11px;
  line-height: 1.4;
  color: var(--pencil);
}

.pc-actions {
  display: flex;
  justify-content: flex-end;
}

.text-btn {
  border: 1px solid var(--rule-strong);
  background: var(--paper);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 8px 10px;
  white-space: nowrap;
}

.text-btn:hover {
  border-color: var(--ink);
}

/* Model look: a swatch of the stock and the look's name, as a select. */
.look-picker {
  position: relative;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 4px;
  cursor: pointer;
}

.look-picker .sw {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex: none;
  box-shadow: inset 0 0 0 1px rgba(20, 18, 16, 0.25);
}

.look-picker select {
  appearance: none;
  border: 0;
  background: transparent
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23141210' stroke-width='1.4'/%3E%3C/svg%3E")
    no-repeat right 2px center / 9px 6px;
  padding: 6px 16px 6px 0;
  font: 600 13px/1.2 var(--sans, "DM Sans", system-ui, sans-serif);
  color: var(--ink);
  cursor: pointer;
}

.look-picker select:focus-visible {
  outline: 2px solid var(--blueline, #2e5e8c);
  outline-offset: 2px;
}

.seg {
  display: flex;
  gap: 2px;
}

.seg button {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid transparent;
  background: transparent;
  font-size: 12px;
  font-weight: 500;
  color: var(--graphite);
}

.seg button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linejoin: round;
}

.seg button:hover {
  background: var(--paper);
  border-color: var(--rule);
}

.seg button[aria-checked="true"] {
  background: var(--ink);
  color: var(--paper);
}

/* A view button's key (js/viewkeys.js; Chris, 4 Oct 2026: "Plan and 3D views should also have short
   cuts"): a small cap after its word, as the tool tabs show theirs. It is the first thing the top
   bar gives up (the `keys` squeeze step), and a finger has no use for it. */
.view-key {
  margin: 0 0 0 2px;
  padding: 0 4px;
  border-bottom-width: 1px;
  font-size: 9px;
  color: var(--pencil);
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--graphite);
  padding: 0;
}

.icon-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-btn:hover {
  border-color: var(--rule);
  background: var(--paper);
}

.icon-btn.small {
  width: 26px;
  height: 26px;
}

.icon-btn[aria-pressed="false"] .wave {
  opacity: 0.15;
}

.sun-icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--amber);
  stroke-width: 1.5;
  stroke-linecap: round;
  margin-left: 6px;
}

#sun {
  width: 120px;
  accent-color: var(--amber);
}

#sun-time {
  font-family: var(--font-mono);
  font-size: 11px;
  width: 8ch;
  color: var(--graphite);
}

/* level datums */
.datum {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border: 1px solid transparent;
  background: transparent;
  text-align: left;
}

.datum:hover {
  border-color: var(--rule);
  background: var(--paper);
}

.datum svg {
  width: 22px;
  height: 14px;
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.3;
}

.datum .tri {
  fill: var(--paper);
}

.datum[aria-pressed="true"] .tri {
  fill: var(--accent);
  stroke: var(--accent);
}

.datum b {
  font-size: 12px;
  font-weight: 600;
}

.datum small {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--pencil);
}

.datum .rl {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--graphite);
}

.datum.add {
  border: 1px dashed var(--rule-strong);
  color: var(--pencil);
  grid-template-columns: 22px 1fr;
}

.datum.add:hover {
  color: var(--ink);
  border-color: var(--ink);
}

/* ------------------------------------------------------------------ corners */

/* Top left (Chris, 20 Oct 2026: "less is more"): the burger, the design's name and the brief's
   chip in a row; under them the brief's card, the focus pill in a room, and Framing's key. The
   menu opens over them. */
.corner {
  position: absolute;
  top: calc(var(--gutter) + env(safe-area-inset-top, 0px));
  left: var(--gutter);
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  max-width: calc(100% - 2 * var(--gutter));
  pointer-events: none;
}

.corner > * {
  pointer-events: auto;
}

.corner-row {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 46px;
  max-width: 100%;
  min-width: 0;
}

/* Three plain lines, no box. */
.burger {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
}

.burger svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.design-name {
  min-width: 0;
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.corner-row[data-squeeze~="name"] .design-name {
  max-width: 13ch;
}

/* The brief's chip: its name, the goals met, a red "!" for an issue, and its card a click away. */
.brief-chip {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 6px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink);
}

.brief-chip:hover,
.brief-chip[aria-expanded="true"] {
  background: var(--paper);
  border-color: var(--rule);
}

.brief-chip .brief-name {
  font-size: 14px;
  color: var(--graphite);
  white-space: nowrap;
}

.corner-row[data-squeeze~="brief"] .brief-name {
  display: none;
}

.brief-chip .brief-count {
  border-radius: var(--radius-sm);
}

.brief-chip .brief-dot {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--redline);
  color: #fff;
  font-size: 13px;
  font-style: normal;
  font-weight: 700;
}

.brief-chip .chev {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

/* The menu: over the top left, the burger's place its Close. */
.menu {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 9;
  width: 372px;
  max-width: calc(100vw - 2 * var(--gutter));
  max-height: calc(100dvh - 2 * var(--gutter));
  overflow-y: auto;
  padding: 0 6px 6px;
}

.menu-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 6px;
}

.menu-head {
  height: 46px;
  gap: 10px;
}

.menu-head .icon-btn {
  background: var(--studio);
}

.menu .wordmark {
  font-size: 16px;
  letter-spacing: 0.1em;
}

.menu .project-name {
  flex: 1;
  width: auto;
  min-width: 0;
  padding: 6px 8px;
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  background: var(--paper);
}

.menu .project-more {
  width: 34px;
  height: 34px;
  margin-left: 0;
}

.menu .site-chip {
  flex: 1;
  max-width: none;
  min-height: 34px;
}

.menu .text-btn {
  min-height: 34px;
}

.menu-rule {
  display: block;
  height: 1px;
  margin: 6px 4px;
  background: var(--rule);
}

.menu-items {
  display: flex;
  flex-direction: column;
}

/* A menu's item: as the drawing set's and the account's were, an icon and a key either side. */
.menuitem {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 36px;
  padding: 0 10px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  text-align: left;
  white-space: nowrap;
}

.menuitem:hover {
  background: var(--studio);
}

.menuitem:disabled {
  opacity: 0.45;
  cursor: default;
}

.menuitem:disabled:hover {
  background: transparent;
}

.menuitem svg {
  flex: none;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--graphite);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.menuitem kbd {
  margin-left: auto;
  border-bottom-width: 1px;
  font-size: 9px;
  padding: 0 4px;
  color: var(--pencil);
}

.menuitem[aria-pressed="false"] .wave {
  opacity: 0.15;
}

#btn-framing[aria-pressed="true"] {
  background: var(--ink);
  color: var(--paper);
}

#btn-framing[aria-pressed="true"] svg {
  stroke: var(--paper);
}

/* Face north: the north point's ring and filled north half. */
.menuitem.north svg {
  stroke-width: 2.4;
}

.menuitem.north .north-half {
  fill: var(--ink);
  stroke: none;
}

/* Top right: Astra (astra.js), and the hint under her while a tool is armed. */
.corner-right {
  position: absolute;
  top: calc(var(--gutter) + env(safe-area-inset-top, 0px));
  right: var(--gutter);
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  max-width: min(460px, calc(100% - 2 * var(--gutter)));
  pointer-events: none;
}

.corner-right > * {
  pointer-events: auto;
}

/* At rest the model shows through her card: 16% paper, a faint white edge, a little blur. */
.astra {
  width: 340px;
  max-width: 100%;
}

/* Beside the top left's row she needs a tablet's width or more: on a narrower screen her corner
   stays empty, and on a phone either way up (layout.js names it), as DESIGN.md says. */
@media (max-width: 760px) {
  .astra {
    display: none;
  }
}

#app[data-fit][data-size="phone"] .astra {
  display: none;
}

.astra-rest {
  padding: 10px 12px;
  background: rgba(251, 249, 245, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: var(--radius);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  cursor: text;
}

.astra-who,
.astra-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.astra-avatar {
  flex: none;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  font-size: 11px;
  font-weight: 700;
}

.astra-ask {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  margin-top: 8px;
  padding: 0 10px;
  border: 1px solid rgba(20, 18, 16, 0.18);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--pencil);
}

.astra-ask svg,
.astra-file svg {
  flex: none;
  width: 17px;
  height: 17px;
  fill: none;
  stroke: var(--graphite);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.astra-head {
  height: 44px;
  padding: 0 6px 0 12px;
  border-bottom: 1px solid var(--rule);
}

.astra-head .mono {
  font-size: 10px;
  color: var(--pencil);
}

.astra-head .icon-btn {
  margin-left: auto;
}

.astra-log {
  display: grid;
  gap: 10px;
  max-height: min(320px, 46vh);
  overflow-y: auto;
  padding: 12px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--graphite);
}

.astra-log p {
  margin: 0;
}

.astra-me {
  justify-self: end;
  max-width: 250px;
  display: grid;
  gap: 6px;
  padding: 8px 10px;
  border-radius: var(--radius);
  background: var(--studio);
  color: var(--ink);
  overflow-wrap: anywhere;
}

.astra-file {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-sm);
  background: var(--paper);
  font-size: 12.5px;
}

.astra-send {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px;
  border-top: 1px solid var(--rule);
}

.astra-send .icon-btn {
  width: 32px;
  height: 32px;
}

#astra-input {
  flex: 1;
  min-width: 0;
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-sm);
  background: var(--paper);
  font-size: 13px;
}

#astra-send {
  border-color: var(--accent-deep);
  background: var(--accent);
  color: var(--paper);
}

#astra-send:disabled,
#astra-upload:disabled {
  opacity: 0.5;
  cursor: progress;
}

/* Signed out, connecting or out of reach: the card says so, and only its Sign in is a link. */
.astra:not([data-state="in"]) .astra-rest {
  cursor: default;
}

.astra:not([data-state="in"]) .astra-ask {
  justify-content: space-between;
}

.astra-signin {
  flex: none;
  color: var(--accent-deep);
  font-weight: 600;
  text-decoration: none;
}

.astra-signin:hover,
.astra-signin:focus-visible {
  text-decoration: underline;
}

/* Her chat: her replies, what she did (sage) or couldn't (redline, with why), and that nothing is
   kept. */
.astra-log .astra-fine,
.astra-log .astra-wait {
  font-size: 11.5px;
  color: var(--pencil);
}

.astra-log .astra-her {
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.astra-log .astra-did,
.astra-log .astra-not {
  position: relative;
  padding-left: 18px;
  font-size: 12px;
}

.astra-log .astra-did::before,
.astra-log .astra-not::before {
  position: absolute;
  left: 2px;
  font-weight: 700;
}

.astra-log .astra-did::before {
  content: "✓";
  color: var(--sage);
}

.astra-log .astra-not {
  color: var(--redline);
}

.astra-log .astra-not::before {
  content: "✕";
}

/* --------------------------------------------------------------- view pill */

/* Over the tabs, 12 px off them: Undo and Redo, the plan or 3D, the roof, the level, the render
   camera. At rest it sits see-through on the model, as Astra's card does; the pointer over it, or
   one of its cards open, fades the tabs' colour up under it (Chris, 21 Oct 2026). */
.view-pill {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 12px);
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 2px;
  height: 40px;
  padding: 0 3px;
  border-color: rgba(255, 255, 255, 0.32);
  background: rgba(241, 236, 227, 0.16);
  box-shadow: none;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  transition:
    background-color 0.2s,
    border-color 0.2s,
    box-shadow 0.2s;
  white-space: nowrap;
}

.view-pill:hover,
.view-pill:focus-within,
.view-pill:has(#level-card:not([hidden]), #render-menu:not([hidden])) {
  border-color: var(--rule-strong);
  background: #f1ece3;
  box-shadow: var(--shadow-paper);
}

.view-pill .icon-btn {
  width: 30px;
  height: 30px;
}

.view-pill .icon-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.view-pill .icon-btn:disabled:hover {
  border-color: transparent;
  background: transparent;
}

.view-pill .cluster-rule {
  margin: 8px 3px;
}

.view-pill .seg button {
  height: 30px;
  padding: 0 7px;
}

.level-ctl {
  position: relative;
  display: flex;
  align-items: center;
}

.level-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 7px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
}

.level-chip:hover,
.level-chip[aria-expanded="true"] {
  border-color: var(--rule);
  background: var(--paper);
}

.level-chip svg {
  width: 20px;
  height: 13px;
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.3;
}

.level-chip .tri {
  fill: var(--accent);
  stroke: var(--accent);
}

.view-pill .level-step {
  width: 24px;
}

.level-tip,
.level-card {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-50%);
  z-index: 2;
}

.level-tip {
  padding: 6px 10px;
  font-size: 11px;
  color: var(--graphite);
  white-space: nowrap;
  pointer-events: none;
}

.level-card {
  display: flex;
  flex-direction: column;
  width: 272px;
  padding: 10px 12px 12px;
  white-space: normal;
}

.level-card .eyebrow {
  padding-bottom: 6px;
}

.level-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 0;
  border-top: 1px solid var(--rule);
}

.level-row .datum {
  flex: 1;
  min-width: 0;
  padding: 5px 2px;
}

.level-row .datum small {
  white-space: nowrap;
}

.lv-walls {
  display: flex;
  align-items: center;
  gap: 4px;
}

.lv-walls span {
  font-size: 10px;
  color: var(--pencil);
}

.lv-walls input {
  width: 56px;
  height: 26px;
  padding: 0 6px;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-sm);
  background: var(--paper);
  font-size: 12px;
  text-align: right;
}

.level-card .datum.add {
  margin-top: 6px;
}

/* The Trace (js/trace.js): the level below or above under the plan, on or off, as Sound is. */
.level-card .lv-trace {
  margin-top: 6px;
  padding: 0 4px;
}

.lv-trace .mono {
  margin-left: auto;
  font-size: 11px;
  color: var(--pencil);
}

.lv-trace kbd {
  margin-left: 6px;
}

.lv-trace[aria-pressed="false"] .under {
  opacity: 0.15;
}

/* On a phone the card and its tooltip stand over the pill's middle, which is the screen's, so
   neither runs off its edge. */
#app[data-fit][data-size="phone"] .level-ctl {
  position: static;
}

.render-wrap {
  position: relative;
  display: grid;
}

.render-cam {
  color: var(--accent);
}

/* The menu over the camera, with a bridge of padding so the pointer can reach it. */
.render-pop {
  position: absolute;
  right: -4px;
  bottom: 100%;
  z-index: 2;
  padding-bottom: 10px;
}

.render-menu {
  display: flex;
  flex-direction: column;
  width: 236px;
  padding: 6px;
}

.render-menu .menuitem .mono {
  margin-left: auto;
  font-size: 11px;
  color: var(--pencil);
}

.render-menu .menuitem kbd {
  margin-left: 6px;
}

.render-menu .render-btn svg {
  stroke: var(--accent);
}

.view-pill[data-squeeze~="words"] .seg button span {
  display: none;
}

.view-pill[data-squeeze~="level"] #level-name {
  font-size: 0;
}

.view-pill[data-squeeze~="level"] #level-name::after {
  content: attr(data-short);
  font-size: 12px;
}

.view-pill[data-squeeze~="arrows"] .level-step,
.view-pill[data-squeeze~="rules"] .cluster-rule {
  display: none;
}

/* The Stairs drawer's levels, beside its stairs. */
.levels-group {
  min-width: 220px;
}

/* ------------------------------------------------------------------- brief */

.brief {
  display: flex;
  flex-direction: column;
  width: 300px;
  max-width: 100%;
  max-height: var(--clear-h, 60vh);
  z-index: 4;
}

.brief-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 10px 10px 14px;
  border-bottom: 1px solid var(--rule);
}

.brief-count {
  font-size: 11px;
  padding: 2px 6px;
  border: 1px solid var(--rule-strong);
  color: var(--graphite);
  white-space: nowrap;
}

.brief-count.done {
  background: var(--sage);
  border-color: var(--sage);
  color: var(--paper);
}

.brief-select {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  font-weight: 600;
  font-size: 14px;
  padding: 2px;
}

.brief-body {
  overflow-y: auto;
  padding: 10px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.goals {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.goal {
  display: grid;
  grid-template-columns: 18px 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 5px 0;
  font-size: 13px;
  border-bottom: 1px dotted var(--rule);
}

.goal:last-child {
  border-bottom: 0;
}

.goal .check {
  width: 15px;
  height: 15px;
  border: 1.4px solid var(--faint);
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.goal.done .check {
  background: var(--sage);
  border-color: var(--sage);
}

.goal.done .check::after {
  content: "";
  width: 6px;
  height: 3px;
  border-left: 1.6px solid var(--paper);
  border-bottom: 1.6px solid var(--paper);
  transform: rotate(-45deg) translate(1px, -1px);
}

.goal.done .label {
  color: var(--graphite);
}

.goal .progress {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--pencil);
}

.goal.pop .check {
  animation: pop 0.5s cubic-bezier(0.3, 1.6, 0.5, 1);
}

@keyframes pop {
  0% {
    transform: scale(0.4);
  }
  100% {
    transform: scale(1);
  }
}

.meters {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.meter {
  display: grid;
  grid-template-columns: 1fr auto;
  row-gap: 4px;
}

.meter .name {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--graphite);
}

.meter .val {
  font-size: 11px;
  color: var(--pencil);
  text-align: right;
}

/* Meters are drawn as scale bars: alternating segments, filled to the value. */
.scale-bar {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  height: 7px;
  border: 1px solid var(--graphite);
}

.scale-bar i {
  border-right: 1px solid var(--graphite);
  background: var(--paper);
  transition: background-color 0.35s;
}

.scale-bar i:last-child {
  border-right: 0;
}

.scale-bar i.on {
  background: var(--meter, var(--sage));
}

.scale-bar i.on:nth-child(even) {
  filter: brightness(1.18);
}

.meter[data-state="warn"] {
  --meter: var(--amber);
}

.meter[data-state="bad"] {
  --meter: var(--redline);
}

.meter[data-state="idle"] {
  --meter: var(--faint);
}

.issues {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.issue {
  display: grid;
  grid-template-columns: 8px 1fr auto;
  gap: 8px;
  align-items: start;
  font-size: 12px;
  line-height: 1.35;
  color: var(--graphite);
}

.issue::before {
  content: "";
  width: 7px;
  height: 7px;
  margin-top: 4px;
  background: var(--redline);
  border-radius: 50%;
}

.issue.note::before {
  background: transparent;
  border: 1.3px solid var(--pencil);
}

.issue button {
  border: 0;
  background: transparent;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--redline);
  padding: 2px 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Findings that say the same: one line, and how many. */
.issue .count {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--pencil);
  white-space: nowrap;
}

/* An issue the app can put right: its fixes under it, as chips. */
.issues .fixes {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 0 0 2px 16px;
}

/* The rest of the list, a click away. */
.issue-more {
  align-self: flex-start;
  border: 0;
  background: transparent;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--graphite);
  padding: 2px 0 2px 16px;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* -------------------------------------------------------------------- hint */

.hint {
  z-index: 4;
  display: block;
  max-width: 100%;
  line-height: 20px;
  padding: 7px 12px;
  background: rgba(251, 249, 245, 0.92);
  border: 1px solid var(--rule-strong);
  font-size: 13px;
  color: var(--graphite);
  pointer-events: none;
  transition: opacity 0.2s;
}

.hint:empty {
  opacity: 0;
}

kbd {
  display: inline-block;
  line-height: 1.35;
  margin: 0 1px;
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 1px 5px;
  border: 1px solid var(--rule-strong);
  border-bottom-width: 2px;
  background: var(--paper);
  color: var(--ink);
}

/* ------------------------------------------------------------------ drawer */

.drawer {
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  bottom: calc(var(--gutter) + env(safe-area-inset-bottom, 0px));
  height: var(--drawer-h);
  display: flex;
  flex-direction: column;
  z-index: 5;
}

.tools {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  padding-left: 14px;
  height: 42px;
  position: relative;
  z-index: 2;
  margin-bottom: -1px;
}

.tool {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--rule-strong);
  border-bottom: 0;
  border-radius: var(--radius) var(--radius) 0 0;
  background: #f1ece3;
  color: var(--graphite);
  font-size: 13px;
  font-weight: 500;
  position: relative;
  top: 1px;
}

.tool svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tool kbd {
  border-bottom-width: 1px;
  font-size: 9px;
  padding: 0 4px;
  color: var(--pencil);
}

.tool:hover {
  background: var(--card);
  color: var(--ink);
}

.tool[aria-pressed="true"] {
  background: var(--card);
  color: var(--ink);
  height: 42px;
  top: 1px;
  box-shadow: inset 0 3px 0 var(--accent);
  z-index: 3;
}

.tool[aria-pressed="true"] svg {
  color: var(--accent);
}

.drawer-body {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 318px;
  /* One row, no taller than the card: the catalog fits itself inside it. */
  grid-template-rows: minmax(0, 1fr);
  position: relative;
  z-index: 1;
}

.catalog {
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 10px 0 10px 14px;
}

.catalog-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding-right: 14px;
  min-height: 24px;
}

.catalog-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
}

.catalog-note {
  margin: 0;
  font-size: 12px;
  color: var(--pencil);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chips {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.chip {
  border: 1px solid var(--rule-strong);
  background: var(--paper);
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 4px 8px;
  white-space: nowrap;
}

.chip:hover {
  border-color: var(--ink);
}

.chip[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.chip:disabled,
.chip[aria-disabled="true"] {
  opacity: 0.4;
  cursor: not-allowed;
}

/* A room's Split, first in its card and kept while it's folded: a button each way, each the room
   with the wall it puts across it in red. */
.split-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.split-way {
  display: inline-grid;
  place-items: center;
  padding: 3px 7px;
}

.split-icon {
  width: 26px;
  height: 16px;
}

.split-icon rect {
  fill: var(--card);
  stroke: currentColor;
  stroke-width: 1.2;
}

.split-icon path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
}

/* Furnish beside Split, in the same row (Chris, 5 Oct 2026, that night: "I can't see the furniture
   room button."): the label over the two ways to split, the button beside them. The row is what a
   folded card keeps and no scroll hides, so the button is in sight open or folded, on any screen. */
.split-row.with-furnish {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 5px 10px;
}

.split-row.with-furnish > .eyebrow {
  grid-column: 1;
  grid-row: 1;
}

.split-row.with-furnish > .chips {
  grid-column: 1;
  grid-row: 2;
}

.split-row .furnish-act {
  grid-column: 2;
  grid-row: 1 / span 2;
  min-height: 44px;
  padding: 0 14px 0 12px;
  white-space: nowrap;
}

.furnish-act svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tiles {
  flex: 1;
  min-height: 0;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 10px 14px 4px 0;
  scrollbar-width: thin;
}

.tile {
  flex: 0 0 auto;
  width: 124px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 2px;
  border: 1px solid var(--rule);
  background: var(--paper);
  padding: 6px 6px 7px;
  text-align: left;
  position: relative;
  transition:
    transform 0.12s,
    border-color 0.12s;
}

.tile:hover {
  border-color: var(--graphite);
  transform: translateY(-2px);
}

.tile[aria-selected="true"] {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.tile[aria-disabled="true"] {
  opacity: 0.5;
}

/* Thumbs give way first when a catalog is short of height, so every name,
   spec and price stays on the card. */
.tile > * {
  flex: none;
}

.tile .thumb {
  flex: 0 1 64px;
  min-height: 22px;
  display: grid;
  place-items: center;
  background: #f7f3ec;
  border-bottom: 1px solid var(--rule);
  margin: -6px -6px 4px;
}

.tile .thumb svg {
  width: 100%;
  height: 100%;
}

.tile .name {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
}

.tile .spec {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--pencil);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tile .price {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--accent);
}

.tile .tag {
  position: absolute;
  top: 4px;
  right: 4px;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--ink);
  color: var(--paper);
  padding: 1px 4px;
}

.tile .tag.concept {
  background: var(--amber);
}

.tile-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 0 0 auto;
  min-height: 0;
  padding-right: 10px;
  margin-right: 2px;
  border-right: 1px solid var(--rule);
}

.tile-group > * {
  flex: none;
}

.tile-group:last-child {
  border-right: 0;
}

.tile-group .eyebrow {
  white-space: nowrap;
}

.tile-group > .tile-row {
  display: flex;
  gap: 8px;
  flex: 0 1 auto;
  min-height: 0;
}

/* The Finishes and Analysis tabs' panes (finishespane.js, analysispane.js), in the drawer's own
   tiles and groups: in the catalog's row they are its groups; anywhere else, a catalog of their own,
   its head and its row. */
.pane {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.pane-row {
  display: contents;
}

.pane-steps .chips {
  max-width: 236px;
}

.pane-look .fine {
  max-width: none;
  white-space: nowrap;
}

.pane-sun-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pane-sun-row .sun-icon {
  flex: none;
  margin-left: 0;
}

.pane-sun-row input {
  width: 170px;
  accent-color: var(--amber);
}

.pane-sun-row output {
  font-family: var(--font-mono);
  font-size: 11px;
  width: 8ch;
  color: var(--graphite);
}

.pane-meters {
  flex: 1 0 490px;
}

.pane-meters .meters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 28px;
}

/* title block */
.title-block {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 28px;
  padding: 12px 16px 14px;
  font-size: 12px;
}

.tb-cell {
  min-width: 0;
}

.tb-price {
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tb-price .eyebrow {
  grid-column: 1 / -1;
  font-size: 9px;
}

.tb-price .amount {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

/* No price to show (D-73): the sentence in DM Sans, not the figure's mono; as a link, a 44 target. */
.tb-price .tb-sign-in {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  max-width: 100%;
  white-space: normal;
  font: 600 15px/1.3 var(--font-sans);
  letter-spacing: 0;
  color: var(--ink);
}

a.tb-sign-in {
  text-decoration: underline;
}

/* While the session is asked: the cell empty, in pencil. */
.tb-price[aria-busy="true"] .amount {
  color: var(--pencil);
}

.tb-price .delta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  text-align: right;
  min-height: 1.2em;
}

.tb-price .delta.down {
  color: var(--graphite);
}

.tb-stat .eyebrow {
  font-size: 8.5px;
  display: block;
}

.tb-stat b {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 20px;
  font-weight: 700;
  white-space: nowrap;
}

.tb-stat b small {
  font-weight: 400;
  font-size: 10px;
  color: var(--pencil);
  margin-left: 1px;
}

.tb-foot {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  margin-left: auto;
}

/* The area, panels, timber and carbon: a row between rules. */
.tb-stats {
  flex: 1 1 340px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.tb-stats .tb-stat {
  padding: 10px 14px;
  border-right: 1px solid var(--rule);
}

.tb-stats .tb-stat:last-child {
  border-right: 0;
}

.tb-meta {
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--pencil);
  line-height: 1.5;
  letter-spacing: 0.04em;
  text-align: right;
}

.primary {
  border: 1px solid var(--accent-deep);
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 13px;
  padding: 10px 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.primary:hover {
  background: var(--accent-deep);
}

.primary.ready {
  animation: ready-pulse 2.2s ease-in-out infinite;
}

@keyframes ready-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(193, 74, 40, 0.45);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(193, 74, 40, 0);
  }
}

.secondary {
  border: 1px solid var(--rule-strong);
  background: var(--paper);
  font-weight: 500;
  font-size: 13px;
  padding: 10px 14px;
}

.secondary:hover {
  border-color: var(--ink);
}

/* ----------------------------------------------------------------- callout */

.callout {
  position: absolute;
  z-index: 6;
  width: 288px;
  padding: 0;
  font-size: 13px;
  animation: callout-in 0.18s ease-out;
}

@keyframes callout-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

.callout-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 8px;
  align-items: start;
  padding: 10px 10px 9px 14px;
  border-bottom: 1px solid var(--rule);
}

.callout-head h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
}

.callout-head .sub {
  grid-column: 1 / -1;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--pencil);
}

/* The card's fold button beside its Close. Folded (ui.js, cardfold.js) it is its head, and a
   room's Split: out of the way until it's wanted. */
.head-btns {
  display: flex;
  gap: 2px;
}

.callout.folded .callout-body > :not(.split-row),
.callout.folded .callout-body:not(:has(> .split-row)) {
  display: none;
}

.callout.folded:not(:has(.split-row)) .callout-head {
  border-bottom-color: transparent;
}

.callout-body {
  padding: 10px 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.row {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.row > .eyebrow {
  font-size: 9px;
}

/* The site's level, first in the site's card (Chris, 28 Oct 2026: "let's make the site level a bit
   more obvious within that menu"): its name and what it does, its stepper across the card with the
   level large, ±0, On its ground and Clear of it under it, and its note. Marked in the site's blue,
   as the board's upright arrow that does the same is. */
.site-level-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 11px 10px 14px;
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  background: var(--paper);
  box-shadow: inset 3px 0 0 var(--blueline);
}

.site-level {
  gap: 8px;
}

.site-level-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.site-level-head b {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
}

.site-level-head span {
  font-size: 12px;
  line-height: 1.35;
  color: var(--pencil);
  text-wrap: balance;
}

.site-level-ctl {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.site-level .stepper {
  grid-template-columns: 36px minmax(0, 1fr) 36px;
  width: auto;
  background: var(--card);
}

.site-level .stepper button {
  font-size: 18px;
}

.site-level .stepper output {
  padding: 6px 8px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}

.stepper {
  display: inline-grid;
  grid-template-columns: 28px minmax(76px, auto) 28px;
  align-items: stretch;
  border: 1px solid var(--rule-strong);
  width: max-content;
}

.stepper button {
  border: 0;
  background: var(--paper);
  font-size: 15px;
  line-height: 1;
}

.stepper button:hover {
  background: var(--accent-soft);
}

.stepper button:disabled {
  opacity: 0.3;
}

.stepper output {
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 5px 8px;
  border-left: 1px solid var(--rule);
  border-right: 1px solid var(--rule);
}

/* A length typed between a stepper's buttons, as its output reads (joinerycard.js). */
.stepper input {
  min-width: 0;
  width: 76px;
  border: 0;
  border-left: 1px solid var(--rule);
  border-right: 1px solid var(--rule);
  padding: 5px 8px;
  background: transparent;
  font-family: var(--font-mono);
  font-size: 12px;
  text-align: center;
  color: var(--ink);
}

.stepper input:focus {
  outline: none;
  background: var(--accent-soft);
}

.steppers {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Sizes to type (planedit.js): a room's width and length, a wall's rooms either side. */
.size-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.size-field {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  border: 1px solid var(--rule-strong);
  background: var(--paper);
}

.size-field span {
  grid-column: 1 / -1;
  padding: 4px 8px 0;
  font-size: 10px;
  color: var(--pencil);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.size-field input {
  min-width: 0;
  border: 0;
  padding: 1px 4px 5px 8px;
  background: transparent;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 14px;
  color: var(--ink);
}

.size-field input:focus {
  outline: none;
}

.size-field:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}

.size-field i {
  padding: 0 8px 5px 0;
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 10px;
  color: var(--pencil);
}

.actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.act {
  border: 1px solid var(--rule-strong);
  background: var(--paper);
  font-size: 12px;
  font-weight: 500;
  padding: 6px 10px;
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.act:hover {
  border-color: var(--ink);
}

.act.primary-act {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.act.danger {
  color: var(--redline);
}

.act.danger:hover {
  border-color: var(--redline);
  background: var(--redline-soft);
}

.act kbd {
  font-size: 9px;
  padding: 0 3px;
}

.fact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--rule);
}

.fact {
  padding: 5px 7px;
  border-right: 1px solid var(--rule);
}

.fact:last-child {
  border-right: 0;
}

.fact .eyebrow {
  font-size: 8.5px;
  display: block;
}

.fact b {
  font-family: var(--font-mono);
  font-size: 12px;
}

.panel-strip {
  display: flex;
  height: 16px;
  border: 1px solid var(--graphite);
}

.panel-strip i {
  border-right: 1px solid var(--graphite);
  display: block;
}

.panel-strip i:nth-child(odd) {
  background: #e7d8bc;
}

.panel-strip i:nth-child(even) {
  background: #d8c3a0;
}

.panel-strip i.half {
  background: repeating-linear-gradient(45deg, #efe6d4 0 3px, #d8c3a0 3px 5px);
}

.panel-strip i:last-child {
  border-right: 0;
}

/* A carport's walls as a small plan, north up: each side a button over its line. */
.cport {
  position: relative;
  flex: none;
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  background: var(--paper);
}

.cport svg {
  display: block;
}

.cport-side {
  position: absolute;
  padding: 0;
  border: 0;
  border-radius: 2px;
  background: transparent;
  cursor: pointer;
}

.cport-side:hover,
.cport-side:focus-visible {
  background: rgba(193, 74, 40, 0.2);
  outline: 1px solid var(--accent);
}

.swatches {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.swatch-btn {
  width: 30px;
  height: 30px;
  border: 1px solid var(--rule-strong);
  padding: 2px;
  background: var(--paper);
}

.swatch-btn span {
  display: block;
  width: 100%;
  height: 100%;
}

.swatch-btn[aria-pressed="true"] {
  border-color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink);
}

/* ------------------------------------------------------------------ toasts */

/* As wide as its widest toast, not the half of the screen right of its left edge: on a phone a
   question ("Modify the site?") came a word a line. */
.toasts {
  position: absolute;
  top: calc(var(--gutter) + 58px + env(safe-area-inset-top, 0px));
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  z-index: 7;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  background: var(--ink);
  color: var(--paper);
  font-size: 13px;
  box-shadow: var(--shadow-paper);
  animation:
    toast-in 0.25s cubic-bezier(0.3, 1.4, 0.5, 1),
    toast-out 0.3s ease-in 3.4s forwards;
  max-width: min(520px, calc(100vw - 32px));
}

.toast.goal {
  background: var(--sage);
}

.toast.bad {
  background: var(--redline);
  color: #fff;
}

.toast.warn {
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--rule-strong);
}

.toast .mark {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.8;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(-10px) scale(0.96);
  }
}

@keyframes toast-out {
  to {
    opacity: 0;
    transform: translateY(-6px);
  }
}

.cursor-tip {
  position: absolute;
  z-index: 8;
  pointer-events: none;
  transform: translate(14px, 14px);
  padding: 4px 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  background: var(--paper);
  border: 1px solid var(--blueline);
  color: var(--blueline);
  white-space: nowrap;
}

.cursor-tip.bad {
  border-color: var(--redline);
  color: var(--redline);
  background: #fff7f7;
}

/* ------------------------------------------------------------------ modals */

.modal {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  padding: 24px var(--gutter);
  background: rgba(62, 50, 36, 0.28);
  backdrop-filter: blur(3px);
  overflow-y: auto;
}

/* A dialog is never wider than the screen: what is in it can't hold it open (a flex item's
   automatic minimum), and the auto margins centre it only while it fits. */
.modal > * {
  margin: auto;
  min-width: 0;
  max-width: 100%;
}

/* The start card fits the screen both ways (Chris, 15 Oct 2026: in a window about 920 px wide
   it ran off both sides): taller than the screen, it scrolls inside itself, up and down only. */
.start-card {
  width: min(1240px, 100%);
  max-height: 100%;
  overflow: hidden auto;
  overscroll-behavior: contain;
  background: var(--paper);
  border: 1px solid var(--ink);
  box-shadow: 0 30px 60px -30px rgba(40, 30, 20, 0.6);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 300px);
}

/* Beside its side column (wider than 860), the card is as tall as its blueprints, up to the
   screen's height: on a shorter screen the blueprints scroll under the question, and the site, the
   brief and Start building stay in view (Chris, 20 Oct 2026, "less is more"). It stood the screen's
   full height while the house types' row was under the blueprints, until 27 Oct 2026. */
@media (min-width: 861px) {
  .start-card {
    grid-template-rows: auto minmax(0, 1fr);
    overflow: hidden;
  }

  .start-main,
  .start-side {
    overflow-y: auto;
    overscroll-behavior: contain;
  }
}

.start-head {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  padding: 22px 26px 18px;
  border-bottom: 1px solid var(--ink);
}

.start-head h1 {
  margin: 4px 0 0;
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 600;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.start-main {
  padding: 18px 26px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.bp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
  gap: 12px;
}

.bp {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--rule-strong);
  background: var(--card);
  padding: 0;
  text-align: left;
  transition:
    border-color 0.15s,
    transform 0.15s;
}

.bp:hover {
  border-color: var(--ink);
  transform: translateY(-2px);
}

.bp[aria-pressed="true"] {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.bp .plan {
  display: block;
  aspect-ratio: 1 / 1;
  min-height: 0;
  overflow: hidden;
  background: #f6f2ea;
  border-bottom: 1px solid var(--rule);
}

.bp .plan svg {
  width: 100%;
  height: 100%;
  display: block;
}

.bp .meta {
  padding: 9px 11px 11px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.bp .meta b {
  font-size: 14px;
}

.bp .meta span {
  font-size: 12px;
  color: var(--pencil);
}

.bp .meta .mono {
  font-size: 11px;
  color: var(--graphite);
  margin-top: 3px;
}

.start-side {
  border-left: 1px solid var(--ink);
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--card);
}

/* The brief: a switch, off by default (Chris, 20 Oct 2026); on, the briefs as radios. */
.brief-switch {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin-top: 12px;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
}

.brief-switch .track {
  position: relative;
  flex: none;
  width: 34px;
  height: 20px;
  border-radius: 10px;
  background: var(--rule-strong);
  transition: background 0.15s;
}

.brief-switch .track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--paper);
  transition: left 0.15s;
}

.brief-switch[aria-checked="true"] .track {
  background: var(--accent);
}

.brief-switch[aria-checked="true"] .track::after {
  left: 17px;
}

.brief-switch .eyebrow,
.brief-switch .sub {
  display: block;
}

.brief-switch .sub {
  margin-top: 2px;
  font-size: 13px;
  color: var(--graphite);
}

#app[data-fit][data-touch="true"] .brief-switch {
  min-height: 44px;
}

.brief-opts {
  display: grid;
  gap: 8px;
}

.brief-opt {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 2px 10px;
  padding: 10px 10px;
  border: 1px solid var(--rule);
  background: var(--paper);
  text-align: left;
  align-items: center;
}

.brief-opt:hover {
  border-color: var(--graphite);
}

.brief-opt[aria-pressed="true"] {
  border-color: var(--ink);
  box-shadow: inset 3px 0 0 var(--accent);
}

.brief-opt .dot {
  width: 14px;
  height: 14px;
  border: 1.4px solid var(--graphite);
  border-radius: 50%;
}

.brief-opt[aria-pressed="true"] .dot {
  background: radial-gradient(circle, var(--accent) 45%, transparent 50%);
  border-color: var(--accent);
}

.brief-opt b {
  font-size: 14px;
}

.start-side .spacer {
  flex: 1;
}

.help-card {
  width: min(720px, 100%);
  background: var(--paper);
  border: 1px solid var(--ink);
  box-shadow: 0 30px 60px -30px rgba(40, 30, 20, 0.6);
}

.help-card header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--ink);
}

.help-card h2 {
  margin: 0;
  font-size: 18px;
}

.help-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0;
}

.help-grid section {
  padding: 14px 20px 18px;
  border-right: 1px solid var(--rule);
}

.help-grid dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 12px;
  margin: 8px 0 0;
  font-size: 13px;
}

.help-grid dt {
  white-space: nowrap;
}

.help-grid dd {
  margin: 0;
  color: var(--graphite);
}

.help-view dl {
  grid-template-columns: 96px 1fr;
}

/* View and what the keys do in focus share a column, one over the other, until there is room for
   three: with the views' keys in them (Chris, 4 Oct 2026) two columns ran past a laptop's height. */
.help-views section + section {
  padding-top: 0;
}

@media (min-width: 900px) {
  #help .help-card {
    width: min(1040px, 100%);
  }

  .help-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .help-views {
    display: contents;
  }

  .help-views section + section {
    padding-top: 14px;
  }
}

/* ------------------------------------------------------------ drawing set */

.dw-tab .mono {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--pencil);
}

/* The drawings' tabs wrap to the window, so none is cut off (the sheets never do). */
.dw-tabs {
  width: 100%;
  flex: none;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.dw-tab {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius) var(--radius) 0 0;
  background: #efe9df;
  font-size: 13px;
  white-space: nowrap;
}

.dw-tab[aria-selected="true"] {
  background: #fffefb;
  box-shadow: inset 0 3px 0 var(--accent);
}

.a3-frame.dw-frame {
  grid-template-columns: minmax(0, 1fr) 300px;
  grid-template-rows: minmax(0, 1fr);
}

.dw-main {
  display: grid;
  grid-auto-rows: minmax(0, 1fr);
  border-right: 1px solid var(--ink);
  min-width: 0;
  min-height: 0;
}

/* A cell holds its drawing: the scale chooser sizes it to fit (sheet.js), and the cell clips what
   might still reach past it, as a last guard. Nothing in a sheet scrolls. */
.dw-cell {
  position: relative;
  padding: 10px 12px;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-right: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

.dw-cell svg,
.dw-cell img {
  flex: 1;
  min-height: 0;
  width: 100%;
  object-fit: contain;
}

/* A drawing at its scale: its own size in px of the sheet, in the middle of its cell. Its own style
   holds that size (sheet.js `pxSize`): the `auto` here would leave an SVG to the browser's sizing
   from its attributes, which Safari at a page zoom leaves un-zoomed (Chris, 20 Oct 2026). */
.dw-cell .at-scale,
.a3-cell .at-scale {
  flex: none;
  width: auto;
  height: auto;
  min-height: 0;
  margin: auto;
}

.dw-pending,
.dw-empty {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  color: var(--pencil);
  font-size: 13px;
}

.dw-spinner {
  width: 26px;
  height: 26px;
  border: 2px solid var(--rule);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: dw-spin 0.9s linear infinite;
}

@keyframes dw-spin {
  to {
    transform: rotate(360deg);
  }
}

.dw-side {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.dw-title {
  font-size: 20px;
  font-weight: 700;
  margin-top: 2px;
}

.dw-notes {
  font-size: 12px;
  line-height: 1.5;
  color: var(--graphite);
  overflow: hidden;
}

.dw-notes .schedule {
  margin: 6px 0 10px;
}

.dw-notes .fine {
  font-size: 10px;
  color: var(--pencil);
}

/* The materials and finishes schedule (A-200, and the roof's rows on A-101): each key, what it is
   and its profile, its colour with a swatch as the model paints it, and who supplies it. */
/* Its columns are set, so a description wraps in its column, never word by word. */
.dw-finishes {
  font-size: 10.5px;
  table-layout: fixed;
}

.dw-finishes th:nth-child(1) {
  width: 36px;
}

.dw-finishes th:nth-child(3) {
  width: 30%;
}

.dw-finishes th:nth-child(4) {
  width: 64px;
}

.dw-finishes td {
  vertical-align: top;
  line-height: 1.3;
}

.dw-finishes .fine {
  font-size: 9px;
}

.dw-finishes th,
.dw-finishes td {
  padding: 3px 4px;
}

.dw-finishes td:first-child,
.dw-finishes td:last-child {
  font-weight: 700;
  white-space: nowrap;
}

.dw-finishes td:last-child {
  font-weight: 400;
  white-space: normal;
}

.dw-swatch {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 5px;
  border: 1px solid var(--ink);
  vertical-align: -1px;
}

.dw-days {
  margin-top: 10px;
}

.dw-areas {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  padding: 18px 20px;
  overflow: hidden;
  align-content: start;
}

.schedule tr.group td {
  padding-top: 12px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--pencil);
  border-bottom: 1px solid var(--ink);
}

/* The Interiors drawing (FOCUS.md 7.1): a room's chips over its sheets. The first has the
   elevations, each at the size its scale makes it, and a side column of key plan, finishes and
   notes; the second the fittings and tapware in full and the set-down detail. */

.dw-rooms {
  width: 100%;
}

.dw-rooms .chip .mono {
  color: var(--pencil);
}

.dw-rooms .chip[aria-pressed="true"] .mono {
  color: inherit;
}

/* The joists' turns over the Structure drawings (FRAMING.md §20): a chip a room or floor plate,
   its arrow the way its joists span; a turned one in the sheets' orange. */

.dw-joists {
  width: 100%;
  flex: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
}

.dw-joists .fine {
  flex-basis: 100%;
  margin: 0;
  font-size: 11px;
  color: var(--pencil);
}

.dw-joists .dw-arrow {
  font-family: system-ui, sans-serif;
  font-size: 13px;
  line-height: 1;
}

.dw-joists .chip[aria-pressed="true"] {
  background: #b4531f;
  border-color: #b4531f;
  color: var(--paper);
}

.sheet-page + .sheet-page {
  margin-top: 18px;
}

.dw-cell.int-cell {
  padding: 6px;
}

.int-cell .a3-caption {
  height: 18px;
}

.int-cell .a3-caption .num,
.int-block .a3-caption .num {
  width: 16px;
  height: 16px;
  font-size: 9px;
}

.int-draw {
  flex: 1;
  min-height: 0;
  display: grid;
  place-items: center;
}

.dw-cell .int-draw svg,
.int-block .int-draw svg {
  flex: none;
  width: auto;
  height: auto;
  min-height: 0;
}

.int-frame .dw-side {
  overflow: hidden;
}

.int-block {
  padding: 7px 12px;
}

.int-key .int-draw {
  margin-top: 4px;
}

.int-sched {
  min-height: 0;
  overflow: hidden;
}

.int-sched .eyebrow {
  display: block;
  font-size: 8.5px;
}

.int-table {
  margin: 2px 0 6px;
}

.int-table td {
  padding: 2px 3px;
  font-size: 9.5px;
  line-height: 1.3;
  vertical-align: top;
  color: var(--graphite);
}

.int-table td b {
  color: var(--ink);
}

.int-tagc {
  width: 32px;
}

.int-tag {
  display: block;
  width: fit-content;
  margin-bottom: 2px;
  min-width: 22px;
  padding: 0 4px;
  border: 1px solid var(--ink);
  border-radius: 7px;
  font-family: var(--font-mono);
  font-size: 7.5px;
  font-weight: 700;
  line-height: 11px;
  text-align: center;
  color: var(--ink);
}

.int-notes ul {
  margin: 0;
  padding-left: 12px;
  font-size: 9px;
  line-height: 1.35;
  color: var(--graphite);
}

.int-flag {
  margin: 0 0 4px;
  font-size: 9px;
  font-weight: 700;
  color: #d2283c;
}

.int-frame .dw-title {
  font-size: 16px;
}

.int-frame .a3-title div {
  padding: 3px 10px;
}

.int-frame .a3-title .big {
  font-size: 15px;
}

/* The second sheet: the schedules across the top, set in fixed columns, and the detail under. */

.dw-cell.int-fit {
  padding: 6px 14px 12px;
  border-right: 0;
}

.int-wide {
  table-layout: fixed;
  margin: 6px 0 10px;
}

.int-wide caption {
  caption-side: top;
  padding-bottom: 2px;
  font-size: 8.5px;
  text-align: left;
}

.int-wide th {
  padding: 3px 6px;
  font-size: 8px;
}

.int-wide td {
  padding: 4px 6px;
  font-size: 10px;
}

.int-wide th:nth-child(1) {
  width: 48px;
}

.int-wide th:nth-child(2) {
  width: 140px;
}

.int-wide th:nth-child(3) {
  width: 100px;
}

.int-wide th:nth-child(4) {
  width: 210px;
}

.int-wide th:nth-child(6) {
  width: 72px;
}

.int-wide .int-tag {
  font-size: 8.5px;
  line-height: 13px;
  border-radius: 8px;
}

.int-by {
  white-space: nowrap;
}

.dw-cell.int-detail {
  border-right: 0;
  border-bottom: 0;
}

.int-detail .int-draw {
  place-items: start center;
  padding-top: 14px;
}

/* ------------------------------------------------------------ drawing sheet */

.sheet-modal {
  position: absolute;
  inset: 0;
  z-index: 25;
  background: #d9d1c3;
  overflow: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px var(--gutter) 32px;
  gap: 14px;
}

.sheet-bar {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.sheet-bar .grow {
  flex: 1;
}

.sheet-bar h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

/* The sheets, a page each (sheetview.js): the page's box is the sheet scaled whole to the window
   or the zoom, and the sheet inside it keeps its own size, A2 at 1 980 × 1 400 px (sheet.js),
   scaled by a transform. The pages pan sideways here and down in the modal. */
.sheet-scroll {
  align-self: stretch;
  flex: none;
  overflow-x: auto;
  overflow-y: hidden;
}

.sheet-page {
  position: relative;
  margin: 0 auto;
  overflow: hidden;
  box-shadow: 0 24px 50px -24px rgba(40, 30, 20, 0.55);
}

/* The sheet. Its class names (.a3, .a3-frame, .a3-*) are kept from the A3 sheets: they mean "the
   sheet", which is A2 now (Chris, 15 Oct 2026). */
.a3 {
  position: absolute;
  top: 0;
  left: 0;
  width: 1980px;
  height: 1400px;
  padding: 18px;
  background: #fffefb;
  transform-origin: 0 0;
}

/* The side column's notes and schedules (Chris, 15 Oct 2026: "the text on the side here needs to be
   smaller because a PDF can't scroll, obviously"): a fixed size in mm of paper, capitals 2.1 mm
   (10 px of the sheet) and the small print 1.9 mm (9 px). Where they won't fit the column, one
   step down to the floor, 1.8 mm (8.6 px) for all (sheetview.js `fitSides`); still over, their
   last parts continue on a sheet of their own. The head and the title block keep theirs. */
.a3 .dw-side,
.a3 .a3-side {
  --note: 10px;
  --small: 9px;
}

.a3 .dw-side.type-floor,
.a3 .a3-side.type-floor {
  --note: 8.6px;
  --small: 8.6px;
}

.a3 .dw-side > .a3-block:not(:first-child),
.a3 .dw-side > .a3-block:not(:first-child) :is(p, li, td, ul, ol, table, div, b, strong),
.a3 .a3-side > .a3-block,
.a3 .a3-side > .a3-block :is(p, li, td, ul, ol, table, div, b, strong),
.dw-continued-body,
.dw-continued-body :is(p, li, td, ul, ol, table, div, b, strong) {
  font-size: var(--note, 10px) !important;
}

.a3
  .dw-side
  > .a3-block:not(:first-child)
  :is(.fine, .disclaimer, th, .eyebrow, .es-status, caption),
.a3 .a3-side > .a3-block :is(.fine, .disclaimer, th, .eyebrow, .es-status, caption),
.dw-continued-body :is(.fine, .disclaimer, th, .eyebrow, .es-status, caption) {
  font-size: var(--small, 9px) !important;
}

/* A side column's notes continued on a sheet of their own: in columns across its main area. */
.dw-continued-body {
  columns: 3;
  column-gap: 28px;
  line-height: 1.45;
  color: var(--graphite);
}

.dw-continued-body > * {
  break-inside: avoid;
}

/* Printed, each sheet is A2 landscape at its true size, a page each: the open drawing set's or Issue
   sheet's pages alone. The sheet is 1 980 × 1 400 px at 10/3 px a mm; a printed px is 1/96 in, so it
   is scaled by (594 mm / 1 980 px) / (25.4 mm / 96 px) = 1.133858 to 594 × 420 mm. */
@page {
  size: 594mm 420mm;
  margin: 0;
}

@media print {
  html,
  body {
    height: auto;
    overflow: visible;
    background: #fff;
  }

  .app {
    position: static;
    overflow: visible;
    background: none;
  }

  .app > :not(.sheet-modal),
  .sheet-modal > :not(.sheet-scroll) {
    display: none !important;
  }

  .sheet-modal {
    position: static;
    display: block;
    padding: 0;
    overflow: visible;
    background: none;
  }

  .sheet-scroll {
    overflow: visible;
  }

  .sheet-page {
    width: 594mm !important;
    height: 420mm !important;
    margin: 0 !important;
    box-shadow: none;
    break-after: page;
    page-break-after: always;
  }

  .sheet-page > .a3 {
    transform: scale(1.133858) !important;
  }
}

/* The zoom: fit the window, 100%, and a step either way. */
.sheet-zoom {
  display: flex;
  align-items: center;
  gap: 4px;
}

.sheet-zoom .chip {
  min-width: 36px;
  justify-content: center;
}

.sheet-zoom-at {
  min-width: 44px;
  font-size: 11px;
  text-align: right;
  color: var(--pencil);
}

/* Download PDF (sheetpdf.js): the sets as chips, as the zoom is; while one is drawn, its chip says
   which sheet, with Cancel beside it; what went wrong, under them. */
.sheet-pdf {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}

.sheet-pdf > .eyebrow {
  margin-right: 2px;
}

.sheet-pdf-note {
  flex-basis: 100%;
  font-size: 12px;
  color: var(--redline);
}

/* A-010's side column (siteplan.js): its lettering the sheet's, fixed in mm of paper (.a3 .dw-side),
   its setbacks running on to a sheet of their own where they must (sheetview.js `fitSides`). */
.sp-side {
  line-height: 1.4;
  color: var(--graphite);
}

.sp-side .schedule {
  margin: 4px 0 10px;
}

.sp-side .schedule td {
  vertical-align: top;
}

.sp-side .fine {
  color: var(--pencil);
}

.sp-side .sp-facts td:first-child {
  width: 30%;
  color: var(--pencil);
}

.sp-side .sp-ok {
  color: #2f6b45;
  font-weight: 700;
}

.sp-side .sp-no {
  color: #d2283c;
  font-weight: 700;
}

.sp-survey {
  margin: 0;
  padding: 6px 8px;
  border: 1px solid var(--ink);
  line-height: 1.4;
  color: var(--ink);
}

.a3-frame {
  position: absolute;
  inset: 18px;
  border: 1.5px solid var(--ink);
  display: grid;
  grid-template-columns: 1fr 1fr 330px;
  grid-template-rows: 1fr 1fr;
}

.a3-cell {
  border-right: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  position: relative;
  padding: 10px 12px;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.a3-cell svg,
.a3-cell img {
  flex: 1;
  min-height: 0;
  width: 100%;
  object-fit: contain;
}

.a3-caption {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.a3-caption .num {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  font-size: 10px;
  letter-spacing: 0;
}

.a3-caption .scale {
  margin-left: auto;
  color: var(--pencil);
}

.a3-side {
  grid-column: 3;
  grid-row: 1 / 3;
  border-bottom: 0;
  border-right: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.schedule {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.schedule th {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--pencil);
  text-align: left;
  padding: 4px 6px;
  border-bottom: 1px solid var(--ink);
}

.schedule td {
  padding: 3px 6px;
  border-bottom: 1px solid var(--rule);
  font-variant-numeric: tabular-nums;
}

.schedule td.num,
.schedule th.num {
  text-align: right;
  font-family: var(--font-mono);
}

.schedule tr.total td {
  border-top: 1px solid var(--ink);
  border-bottom: 0;
  font-weight: 700;
}

.a3-block {
  padding: 10px 12px;
  border-bottom: 1px solid var(--ink);
}

.a3-block:last-child {
  border-bottom: 0;
}

.a3-title {
  margin-top: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1.5px solid var(--ink);
}

.a3-title div {
  padding: 6px 10px;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  font-size: 11px;
}

.a3-title div:nth-child(2n) {
  border-right: 0;
}

.a3-title .big,
.a3-title .wide {
  grid-column: 1 / -1;
  font-size: 18px;
  font-weight: 700;
  border-right: 0;
}

.a3-title .eyebrow {
  display: block;
  font-size: 8.5px;
}

/* The title block's client and site (js/titleblock.js; Chris, 20 Oct 2026: "Let's also add the site
   address and client details to all of these pages"): across the block in its cells' lettering,
   the main line a weight up and the small print under it. Long words step down a size, and every
   word wraps inside the box, never past it. Without a client, a line to write the name on. */
.a3-title .tb-row {
  font-size: 11px;
  font-weight: 400;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.a3-title .tb-main {
  display: block;
  font-weight: 600;
}

.a3-title .tb-fine {
  display: block;
  font-size: 9.5px;
  color: var(--pencil);
}

.a3-title .tb-row.long {
  font-size: 10px;
}

.a3-title .tb-row.longer {
  font-size: 9px;
}

.a3-title .tb-row.long .tb-fine,
.a3-title .tb-row.longer .tb-fine {
  font-size: 8.6px;
}

.a3-title .tb-blank {
  height: 13px;
  margin-right: 30%;
  border-bottom: 1px solid var(--graphite);
}

.a3-title .tb-unset .tb-main {
  font-weight: 400;
  color: var(--pencil);
}

.disclaimer {
  font-size: 9.5px;
  line-height: 1.45;
  color: var(--pencil);
}

/* The Issue sheet's axonometric, over the schedule when two plans take the cells. */
.a3-axo {
  height: 230px;
  display: flex;
  flex-direction: column;
}

.a3-axo img {
  flex: 1;
  min-height: 0;
  width: 100%;
  object-fit: contain;
}

/* A crowded side column tightens to keep its title block on the sheet: closer rows and smaller
   notes first, then the axonometric takes only the room that's left. It is measured as each step
   lands, so its blocks keep their height and nothing in it eases (reduced motion would otherwise
   give it a 0.01 ms transition). */
.a3-side,
.a3-side * {
  transition: none !important;
}

.a3-side > * {
  flex-shrink: 0;
}

.a3-side.tight .a3-block {
  padding: 7px 12px;
}

.a3-side.tight .schedule {
  font-size: 10.5px;
}

.a3-side.tight .schedule th {
  padding: 2px 6px;
}

.a3-side.tight .schedule td {
  padding: 1.5px 6px;
}

.a3-side.tight .disclaimer {
  margin: 5px 0 0;
  font-size: 9px;
  line-height: 1.35;
}

.a3-side.tight .a3-axo {
  height: 170px;
}

.a3-side.tight .a3-title div {
  padding: 4px 10px;
}

.a3-side.tighter .a3-axo {
  flex: 1 1 0;
  height: auto;
  min-height: 0;
}

.a3-side.tightest .a3-axo {
  display: none;
}

/* The fittings in the Issue sheet's schedule: a line of words across the table. */
.schedule td.fit-cell {
  line-height: 1.4;
}

/* The Issue sheet's second page, BM-02 (FOCUS.md 8.4): the kit rooms' fit-out, by others. A block
   per room, two across as the area schedule sets its levels, each with its finishes, fittings and
   tapware and what the brief notes. */

.fit-main {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: 22px 28px;
  padding: 16px 20px;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border-right: 1px solid var(--ink);
}

.fit-room {
  min-width: 0;
}

.fit-table {
  margin-top: 6px;
}

.fit-table td {
  padding: 3px 5px;
  font-size: 10px;
  line-height: 1.3;
  vertical-align: top;
  color: var(--graphite);
}

.fit-table tr.group td {
  padding-top: 9px;
  font-size: 8.5px;
}

.fit-table td b {
  color: var(--ink);
  font-weight: 600;
}

.fit-table .sub {
  display: block;
  font-size: 9px;
  color: var(--pencil);
}

.fit-table .int-tagc {
  width: 38px;
}

/* What the brief notes of the room: a red dot for an issue, a ring for a note, as the brief has. */
.fit-findings {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: grid;
  gap: 3px;
}

.fit-findings li {
  display: grid;
  grid-template-columns: 7px 1fr;
  gap: 6px;
  font-size: 10px;
  line-height: 1.35;
  color: var(--graphite);
}

.fit-findings li::before {
  content: "";
  width: 6px;
  height: 6px;
  margin-top: 4px;
  border-radius: 50%;
  background: var(--redline);
}

.fit-findings li.note::before {
  background: transparent;
  border: 1.2px solid var(--pencil);
}

.fit-notes .disclaimer {
  margin: 0 0 8px;
  font-size: 10px;
  color: var(--graphite);
}

.sent-note {
  width: 100%;
  padding: 12px 14px;
  background: var(--sage-soft);
  border: 1px solid var(--sage);
  color: #24402c;
  font-size: 13px;
}

/* --------------------------------------------------------------- booting */

.app[data-booting="true"] .corner,
.app[data-booting="true"] .corner-right,
.app[data-booting="true"] .drawer {
  opacity: 0;
}

.corner,
.corner-right,
.drawer {
  transition: opacity 0.4s;
}

.app[data-view="plan"] .brief {
  opacity: 0.96;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ------------------------------------------------------------ responsive */

@media (max-width: 1280px) {
  .drawer-body {
    grid-template-columns: minmax(0, 1fr) 290px;
  }
}

@media (max-width: 860px) {
  :root {
    --drawer-h: 252px;
    --gutter: 10px;
  }
  .drawer-body {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
  }
  .catalog {
    order: 3;
    padding-top: 6px;
  }
  .catalog-head {
    display: none;
  }
  .primary {
    padding: 8px 10px;
    font-size: 12px;
  }
  .tools {
    padding-left: 0;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .tool {
    padding: 0 9px;
  }
  .tool span,
  .tool kbd {
    display: none;
  }
  .tile {
    width: 108px;
  }
  .tile .thumb {
    flex-basis: 52px;
  }
  .drawer .demolish-card {
    gap: 10px;
    padding: 4px 2px;
    font-size: 12px;
    line-height: 1.35;
  }
  .drawer .demolish-card svg {
    width: 32px;
    height: 32px;
  }
  .drawer .tile-group .fine {
    line-height: 1.25;
  }
  .callout {
    width: min(300px, calc(100% - 2 * var(--gutter)));
  }
  .start-card {
    grid-template-columns: 1fr;
  }
  .start-side {
    border-left: 0;
    border-top: 1px solid var(--ink);
  }
}

@media (max-width: 560px) {
  .hint {
    display: none;
  }
}

/* ------------------------------------------------------------ round two */

@media (max-width: 1400px) {
  .tool kbd {
    display: none;
  }
}

@media (max-width: 1220px) {
  .tool span {
    display: none;
  }
  .tool {
    padding: 0 11px;
  }
}

.demolish-card {
  display: flex;
  gap: 16px;
  align-items: center;
  max-width: 620px;
  padding: 10px 4px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--graphite);
}

.demolish-card svg {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  fill: none;
  stroke: var(--redline);
  stroke-width: 1.3;
}

.demolish-card b {
  display: block;
  color: var(--ink);
  margin-bottom: 4px;
}

/* The site, first in the Landscape drawer: a card the width of two tiles. */
.site-card {
  flex: 0 0 auto;
  width: 256px;
  max-width: none;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--rule);
  background: var(--paper);
  text-align: left;
  font-size: 12px;
  line-height: 1.4;
  cursor: pointer;
}

.site-card svg {
  width: 34px;
  height: 34px;
  stroke: var(--blueline);
}

.site-card:hover,
.site-card[aria-pressed="true"] {
  border-color: var(--blueline);
}

.callout-note,
.hint-inline {
  font-size: 12px;
  line-height: 1.4;
  color: var(--pencil);
}

.hint-inline {
  margin-right: auto;
}

.eave-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 14px;
}

.tile-group .fine {
  max-width: 200px;
  font-size: 11px;
  line-height: 1.35;
  color: var(--pencil);
}

.a3-empty {
  display: grid;
  place-items: center;
  border: 1px dashed var(--rule-strong);
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 12px;
}

/* ------------------------------------------------------- fitted to screen */

/* The chrome fitted to the screen it's on (js/layout.js; Chris, 2 Oct 2026: "the cards are
   getting in the way"). layout.js names the screen on #app (data-size: phone, narrow or desk;
   data-short, data-tiny, data-touch), squeezes the view pill, the top left's row and the drawer
   a step at a time (their data-squeeze), folds the brief and the drawer (the brief's hidden,
   data-drawer), and measures how far the chrome reaches in: --hud-top, --hud-bottom,
   --brief-top and --clear-h. Every rule here is scoped to #app[data-fit], which
   layout.js sets as it starts: it outranks the width breakpoints above, which it takes over. */

@supports (height: 100dvh) {
  #app[data-fit] {
    bottom: auto;
    height: 100dvh;
  }
}

/* The words the chrome keeps where the narrow screens' rules above would drop them. */
#app[data-fit] .wordmark span,
#app[data-fit] #site-chip-label,
#app[data-fit] #sun-time,
#app[data-fit] .sun-icon {
  display: inline;
}

#app[data-fit] .cluster-rule {
  display: block;
}

/* The view pill gives up its key first as it is squeezed (layout.js), and a finger has no use for
   a key. The render camera's menu keeps its P, as the menu keeps its keys. */
#app[data-fit] .view-pill[data-squeeze~="keys"] .seg .view-key,
#app[data-fit][data-touch="true"] .view-key {
  display: none;
}

/* The focus pill: under the top left's row, in its column. */
#app[data-fit] .focus-pill {
  position: relative;
  top: auto;
  left: auto;
  height: 44px;
}

/* The hint: under Astra's corner while it has something to say, then it fades. */
#app[data-fit] .hint {
  transition: opacity 0.6s;
}

#app[data-fit] .hint.faded,
#app[data-fit].drafting .hint,
#app[data-fit].inspecting .hint {
  opacity: 0;
}

/* The drawer: its tabs, the estimate's last, the view pill over them, and its catalog (or a pane,
   or the estimate) when it's open. */

#app[data-fit] .drawer {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: end;
  height: auto;
  right: var(--gutter);
  pointer-events: none;
}

#app[data-fit] .drawer > *,
#app[data-fit] .tools > * {
  pointer-events: auto;
}

#app[data-fit] .tools {
  grid-column: 1;
  grid-row: 1;
  gap: 2px;
  min-width: 0;
  height: auto;
  min-height: 42px;
  padding-left: 14px;
  overflow-x: auto;
  scrollbar-width: none;
  pointer-events: none;
}

#app[data-fit] .tools::-webkit-scrollbar {
  display: none;
}

#app[data-fit] .tool {
  flex: none;
  gap: 6px;
  padding: 0 9px;
}

#app[data-fit] .tool span,
#app[data-fit] .tool kbd {
  display: inline;
}

#app[data-fit] .drawer[data-squeeze~="kbd"] .tool kbd,
#app[data-fit][data-touch="true"] .tool kbd,
#app[data-fit] .drawer[data-squeeze~="labels"] .tool:not(.price-tab) span {
  display: none;
}

#app[data-fit] .drawer[data-squeeze~="labels"] .tool:not(.price-tab) {
  padding: 0 11px;
}

#app[data-fit] .drawer-body {
  grid-column: 1 / -1;
  grid-row: 2;
  display: block;
  max-height: min(46vh, 300px);
  overflow-y: auto;
}

#app[data-fit][data-drawer="closed"] .drawer-body {
  display: none;
}

/* Folded to its tabs, each tab stands as a card of its own. */
#app[data-fit][data-drawer="closed"] .tools {
  margin-bottom: 0;
}

#app[data-fit][data-drawer="closed"] .tool:not(.ghost) {
  height: 40px;
  top: 0;
  border-bottom: 1px solid var(--rule-strong);
  border-radius: var(--radius);
}

#app[data-fit][data-drawer="closed"] .tool[aria-pressed="true"] {
  height: 40px;
}

#app[data-fit] .catalog {
  padding: 10px 0 10px 14px;
}

#app[data-fit] .catalog-head {
  display: flex;
}

#app[data-fit][data-size="narrow"] .catalog-note {
  white-space: normal;
}

/* On a short screen the catalog is a single row of compact tiles: the note goes (the hint says
   it), the drawings shrink, every name and size stays. */
#app[data-fit][data-short="true"] .catalog-head {
  display: none;
}

#app[data-fit][data-short="true"] .catalog {
  padding: 8px 0 8px 10px;
}

#app[data-fit][data-short="true"] .tiles {
  padding: 2px 10px 2px 0;
}

#app[data-fit][data-short="true"] .tile {
  width: 116px;
  padding: 5px 6px 6px;
}

#app[data-fit][data-short="true"] .tile .thumb {
  flex: 0 0 40px;
  margin: -5px -6px 3px;
}

#app[data-fit][data-short="true"] .tile-group {
  gap: 4px;
}

/* The estimate's tab: its figure, at the row's end. */
#app[data-fit] .tool.price-tab {
  margin-left: auto;
}

.price-tab .mono {
  font-weight: 700;
  color: var(--ink);
}

/* The inspect callout: off the work and the chrome (layout.js places it), no taller than the room
   it has. While a drag drafts the design it stands back, and comes back where the work isn't. */
#app[data-fit] .callout {
  max-height: var(--clear-h, 70%);
  overflow-y: auto;
  overscroll-behavior: contain;
  transition: opacity 0.12s;
}

#app[data-fit][data-touch="false"] .callout-head {
  cursor: grab;
}

#app[data-fit].drafting .callout,
#app[data-fit].drafting .floaters {
  opacity: 0;
  pointer-events: none;
}

/* On a phone the callout is a sheet over the drawer. It is no taller than the room between the
   bar (and the focus pill) and the drawer, down to 96: held sideways, with the price card open,
   there's less than the 120 `--clear-h` keeps, and the sheet rode up over the pill. With less room
   than 96 (on its side, the drawer open: 15 Oct 2026, it stood over the bar's view buttons) its
   foot comes down over the drawer, so its head stays under the bar. */
#app[data-fit] .callout.sheet {
  left: var(--gutter);
  right: var(--gutter);
  top: auto;
  bottom: max(
    8px,
    min(calc(var(--hud-bottom, 0px) + 8px), calc(100% - var(--brief-top, 0px) - 104px))
  );
  width: auto;
  max-height: min(
    46svh,
    max(96px, calc(100% - var(--brief-top, 0px) - var(--hud-bottom, 0px) - 16px))
  );
  animation: none;
}

/* Toasts under the bar (and the focus pill), or over the drawer while the work is up there; the
   elevation's tag over the drawer; the cursor's tip where layout.js puts it, beside the work. */
#app[data-fit] .toasts {
  top: var(--toast-top, var(--brief-top, 70px));
  max-width: calc(100% - 2 * var(--gutter));
}

#app[data-fit].toasts-low .toasts {
  top: auto;
  bottom: calc(var(--hud-bottom, 0px) + 12px);
  flex-direction: column-reverse;
}

#app[data-fit] .cursor-tip {
  transform: none;
}

#app[data-fit] .eye-tag {
  top: auto;
  bottom: calc(var(--hud-bottom, 0px) + 10px);
}

/* A finger needs more than a mouse: targets of 44 px, the keys' hints gone. */
#app[data-fit][data-touch="true"] .icon-btn,
#app[data-fit][data-touch="true"] .seg button,
#app[data-fit][data-touch="true"] .burger,
#app[data-fit][data-touch="true"] .level-chip {
  min-width: 44px;
  height: 44px;
}

#app[data-fit][data-touch="true"] .view-pill {
  height: auto;
  padding: 3px;
}

#app[data-fit][data-touch="true"] .menuitem,
#app[data-fit][data-touch="true"] .brief-chip {
  min-height: 44px;
}

#app[data-fit][data-touch="true"] .text-btn,
#app[data-fit][data-touch="true"] .site-chip,
#app[data-fit][data-touch="true"] .look-picker,
#app[data-fit][data-touch="true"] .fp-leave,
#app[data-fit][data-touch="true"] .datum,
#app[data-fit][data-touch="true"] .primary,
#app[data-fit][data-touch="true"] .secondary,
#app[data-fit][data-touch="true"] .ss-back {
  min-height: 44px;
}

/* Blueprints and the site chip, down to their icons, are as wide as they are tall. */
#app[data-fit][data-touch="true"] #btn-blueprints,
#app[data-fit][data-touch="true"] .site-chip {
  min-width: 44px;
  justify-content: center;
}

/* The drawings' tabs grow to 44; the text links' targets grow round them, so the words stay where
   they were. */
#app[data-fit][data-touch="true"] .dw-tab {
  padding-block: 13px;
}

#app[data-fit][data-touch="true"] .ss-link,
#app[data-fit][data-touch="true"] .fp-issues {
  padding-block: 14px;
  margin-block: -14px;
}

#app[data-fit][data-touch="true"] .tool {
  min-width: 44px;
  height: 44px;
}

#app[data-fit][data-touch="true"] .tool[aria-pressed="true"] {
  height: 48px;
}

#app[data-fit][data-touch="true"][data-drawer="closed"] .tool:not(.ghost),
#app[data-fit][data-touch="true"][data-drawer="closed"] .tool[aria-pressed="true"] {
  height: 44px;
}

#app[data-fit][data-touch="true"] .callout .act,
#app[data-fit][data-touch="true"] .callout .chip,
#app[data-fit][data-touch="true"] .stepper button,
#app[data-fit][data-touch="true"] .issue button,
#app[data-fit][data-touch="true"] .issues .fixes .chip,
#app[data-fit][data-touch="true"] .issue-more,
#app[data-fit][data-touch="true"] .drawer .chip,
#app[data-fit][data-touch="true"] .fitout-card button {
  min-height: 40px;
}

#app[data-fit][data-touch="true"] .lot-pad {
  grid-template-columns: repeat(3, 44px);
  grid-template-rows: repeat(3, 44px);
}

/* Try again on the price card keeps its size; its target runs 10 px past it, top and bottom. */
#app[data-fit][data-touch="true"] #cloud-price-now {
  position: relative;
}

#app[data-fit][data-touch="true"] #cloud-price-now::after {
  content: "";
  position: absolute;
  inset: -10px -4px;
}

#app[data-fit][data-touch="true"] .callout .split-row.with-furnish .chip,
#app[data-fit][data-touch="true"] .callout .split-row .furnish-act {
  min-height: 44px;
}

#app[data-fit][data-touch="true"] .stepper {
  grid-template-columns: 40px minmax(76px, auto) 40px;
}

#app[data-fit][data-touch="true"] .site-level .stepper {
  grid-template-columns: 48px minmax(0, 1fr) 48px;
}

#app[data-fit][data-touch="true"] .handle {
  width: 44px;
  height: 44px;
  margin: -22px 0 0 -22px;
}

/* A phone: two lines of bar, the drawer folded to its tabs over the price, the callout a sheet,
   no hint, and a word once on what works here. */
#app[data-fit][data-size="phone"] .hint,
#app[data-fit][data-size="phone"][data-focus="true"] .brief {
  display: none;
}

/* Held sideways, the drawer's tabs stop under the brief's pill (15 Oct 2026: with Furniture open
   they stood over it), the catalog down to 96 tall. */
#app[data-fit][data-size="phone"] .drawer-body {
  max-height: min(42svh, 260px, max(96px, calc(100svh - var(--toast-top, 0px) - 64px)));
}

#app[data-fit][data-size="phone"] .catalog-head {
  display: none;
}

/* The start screen on a phone: smaller blueprints, two to a row held upright. */
#app[data-fit][data-size="phone"] .start-main {
  padding: 14px 14px 18px;
}

#app[data-fit][data-size="phone"] .bp-grid {
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
}

#app[data-fit] .fit-note {
  position: absolute;
  top: var(--toast-top, 110px);
  left: var(--gutter);
  right: var(--gutter);
  z-index: 8;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.4;
}

#app[data-fit] .fit-note p {
  flex: 1;
  margin: 0;
}

#app[data-fit] .fit-note button {
  flex: none;
  min-height: 44px;
}

/* The drawings: the tabs keep their height, and the page scrolls past them (the sheets keep
   theirs at any size: .sheet-scroll). */
#app[data-fit] .drawings-modal > .dw-tabs {
  flex: none;
}

#app[data-fit] .drawings-modal .sheet-bar .grow {
  min-width: 0;
}

#app[data-fit][data-size="phone"] .drawings-modal .sheet-bar h2 {
  font-size: 16px;
}

/* -------------------------------------------------------------------- site */

/* The site chip: the address, in the menu. */
.site-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  max-width: 230px;
  padding: 6px 10px 6px 8px;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-sm);
  background: var(--paper);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

.site-chip:hover {
  border-color: var(--ink);
}

.site-chip.empty {
  border-style: dashed;
  color: var(--graphite);
}

.site-chip svg {
  flex: none;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
}

.site-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.site-chip .dot {
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--sage);
}

.site-chip .dot.bad {
  background: var(--redline);
}

/* The white sheet: one question on it. */
.site-modal {
  position: absolute;
  inset: 0;
  z-index: 30;
  overflow: auto;
  background-color: var(--paper);
  background-image:
    linear-gradient(rgba(20, 18, 16, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 18, 16, 0.03) 1px, transparent 1px);
  background-size: 30px 30px;
  animation: sheet-in 0.28s ease-out;
}

@keyframes sheet-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

.site-sheet {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

.ss-bar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  background: rgba(255, 253, 249, 0.92);
  backdrop-filter: blur(4px);
}

.ss-bar .grow {
  flex: 1;
}

.ss-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 0;
  background: none;
  padding: 6px 8px 6px 2px;
  font-weight: 500;
}

.ss-back svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.ss-back:hover {
  color: var(--accent);
}

.ss-find {
  width: min(680px, 100%);
  margin: 5vh auto 48px;
  padding: 0 var(--gutter);
  display: flex;
  flex-direction: column;
}

.ss-mark {
  width: 60px;
  height: 60px;
}

.ss-find h1,
.ss-facts h1 {
  margin: 10px 0 0;
  font-size: clamp(32px, 5.4vw, 50px);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.02;
  text-wrap: balance;
}

.ss-lede {
  margin: 12px 0 0;
  max-width: 52ch;
  font-size: 16px;
  line-height: 1.5;
  color: var(--pencil);
}

.ss-field {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 26px;
  padding: 8px 2px;
  border-bottom: 2px solid var(--ink);
}

.ss-field:focus-within {
  border-bottom-color: var(--accent);
}

.ss-field svg {
  flex: none;
  width: 26px;
  height: 26px;
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.5;
}

.ss-field input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 4px 0;
  font-size: clamp(20px, 3vw, 26px);
  outline: none;
}

.ss-field input::placeholder {
  color: var(--faint);
}

.ss-results {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  max-height: 46vh;
  overflow: auto;
}

.ss-results [role="option"] {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 10px;
  border-bottom: 1px solid var(--rule);
  cursor: pointer;
}

.ss-results [role="option"] > svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--faint);
  stroke-width: 1.5;
}

.ss-results [role="option"]:hover,
.ss-results [aria-selected="true"] {
  background: var(--card);
}

.ss-results [aria-selected="true"] {
  box-shadow: inset 3px 0 0 var(--accent);
}

.ss-results [aria-selected="true"] > svg {
  stroke: var(--accent);
}

.ss-results .a b {
  display: block;
  font-size: 16px;
  font-weight: 600;
}

.ss-results .a span {
  display: block;
  font-size: 13px;
  color: var(--pencil);
}

.ss-results .c {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--pencil);
  text-align: right;
}

.ss-results mark {
  background: none;
  color: inherit;
  text-decoration: underline 2px var(--accent);
  text-underline-offset: 3px;
}

.ss-cap {
  padding: 16px 10px 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--pencil);
}

.ss-none {
  padding: 16px 10px;
  color: var(--pencil);
}

.ss-alt {
  margin-top: 18px;
}

.ss-link {
  border: 0;
  background: none;
  padding: 0;
  color: var(--blueline);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.ss-link:hover {
  color: var(--ink);
}

.ss-fine {
  margin: 24px 0 0;
  max-width: 62ch;
  font-size: 12px;
  line-height: 1.5;
  color: var(--pencil);
}

/* By hand: frontage, depth, which way the street lies, the state. */
.ss-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 28px;
  margin-top: 28px;
  align-items: start;
}

.ss-num {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ss-num > span:last-child {
  display: flex;
  align-items: baseline;
  gap: 6px;
  border-bottom: 2px solid var(--ink);
}

.ss-num input,
.ss-num select {
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 4px 0;
  font-size: 22px;
  outline: none;
}

.ss-num select {
  font-size: 16px;
  border-bottom: 2px solid var(--ink);
  padding: 8px 0;
}

.ss-num i {
  font-style: normal;
  color: var(--pencil);
}

.ss-dial {
  grid-row: span 2;
  border: 0;
  margin: 0;
  padding: 0;
}

.ss-dial legend {
  padding: 0;
  margin-bottom: 8px;
}

.ss-dial > div {
  display: grid;
  grid-template-columns: repeat(3, 46px);
  grid-template-rows: repeat(3, 46px);
  gap: 4px;
}

.ss-dir {
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-sm);
  background: var(--paper);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
}

.ss-dir:hover {
  border-color: var(--ink);
}

.ss-dir[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.ss-dial-lot {
  border: 1.5px dashed var(--redline);
  margin: 8px;
}

.ss-actions {
  display: flex;
  gap: 10px;
  margin-top: 30px;
}

/* The report: the lot's plan beside what it means. */
.ss-report {
  width: min(1200px, 100%);
  margin: 1vh auto 48px;
  padding: 0 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 44px;
  align-items: start;
}

.ss-plan {
  position: sticky;
  top: 62px;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--ink);
  background: var(--paper);
  box-shadow: 0 24px 40px -30px rgba(40, 30, 20, 0.5);
}

.ss-plan #ss-plan {
  min-height: 200px;
}

.lot-plan {
  letter-spacing: normal;
  display: block;
  width: 100%;
  height: auto;
  max-height: 70vh;
}

.ss-plan figcaption {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--rule);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.03em;
  color: var(--graphite);
}

.lot-plan .lp-road {
  fill: #eee8dd;
}

.lot-plan .lp-kerb,
.lot-plan .lp-contour,
.lot-plan .lp-dim,
.lot-plan .lp-title {
  fill: none;
}

.lot-plan .lp-kerb {
  stroke: #8f877c;
}

.lot-plan .lp-street {
  font-family: var(--font-mono);
  font-weight: 700;
  fill: #6e6860;
  letter-spacing: 0.2em;
  text-anchor: middle;
}

.lot-plan .lp-wait {
  font-family: var(--font-sans);
  fill: var(--faint);
}

.lot-plan .lp-next {
  font-family: var(--font-mono);
  fill: var(--faint);
  text-anchor: middle;
}

.lot-plan .lp-lot {
  fill: #fffefb;
}

.lot-plan .lp-contour {
  stroke: #b8ad9c;
}

.lot-plan .lp-rl {
  font-family: var(--font-mono);
  fill: #9a9185;
}

.lot-plan .lp-zone {
  fill: rgba(46, 94, 140, 0.07);
  stroke: var(--blueline);
}

.lot-plan .lp-dim {
  stroke: var(--blueline);
}

.lot-plan .lp-dimt {
  font-family: var(--font-mono);
  fill: var(--blueline);
}

.lot-plan .lp-house {
  fill: var(--graphite);
}

.lot-plan .lp-deck {
  fill: #cdc4b5;
}

.lot-plan .lp-pv {
  fill: #8f8a82;
  stroke: var(--card);
}

.lot-plan .lp-over {
  fill: var(--redline);
  opacity: 0.85;
}

.lot-plan .lp-title {
  stroke: var(--redline);
  stroke-linecap: round;
}

.lot-plan .lp-len {
  font-family: var(--font-mono);
  fill: var(--ink);
}

.lot-plan .lp-north circle {
  fill: var(--paper);
  stroke: var(--ink);
}

.lot-plan .lp-north path,
.lot-plan .lp-north text {
  fill: var(--ink);
}

.lot-plan .lp-north text {
  font-family: var(--font-mono);
  font-weight: 700;
}

.lot-plan .lp-sun circle {
  fill: #f2c14e;
}

.lot-plan .lp-sun path {
  stroke: #d49b1a;
  stroke-linecap: round;
}

.ss-facts {
  min-width: 0;
  padding-top: 4px;
}

.ss-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--pencil);
}

.ss-tag {
  padding: 2px 6px;
  border: 1px solid var(--amber);
  border-radius: 3px;
  color: var(--amber);
}

.ss-facts h1 {
  font-size: clamp(28px, 4vw, 42px);
}

.ss-sub {
  margin: 6px 0 20px;
  font-size: 16px;
  color: var(--pencil);
}

.ss-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--ink);
}

.ss-step {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: baseline;
  padding: 9px 0;
  border-bottom: 1px solid var(--rule);
}

.ss-step .k {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--pencil);
}

.ss-step .k::before {
  content: "";
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: 1.2px solid var(--faint);
}

.ss-step[data-state="done"] .k::before {
  background: var(--sage);
  border-color: var(--sage);
}

.ss-step .v {
  font-size: 14px;
  line-height: 1.4;
}

.ss-step[data-state="wait"] .v {
  color: var(--faint);
  animation: reading 1.1s ease-in-out infinite;
}

.ss-steps.live .ss-step[data-state="done"] {
  animation: landed 0.9s ease-out;
}

@keyframes reading {
  50% {
    opacity: 0.4;
  }
}

@keyframes landed {
  from {
    background: var(--accent-soft);
  }
}

.ss-step .src {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
  white-space: nowrap;
}

.ss-means[data-ready="false"] {
  display: none;
}

.ss-means {
  animation: sheet-in 0.4s ease-out;
}

.ss-means h2 {
  margin: 26px 0 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--ink);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--graphite);
}

.ss-means p {
  margin: 8px 0;
  font-size: 14px;
  line-height: 1.55;
}

.ss-code {
  display: inline-block;
  padding: 1px 5px;
  border: 1px solid var(--ink);
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.ss-zone {
  display: flex;
  gap: 10px;
  align-items: baseline;
}

.ss-rules {
  width: 100%;
  border-collapse: collapse;
}

.ss-rules thead th {
  padding: 0 0 4px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--pencil);
  text-align: left;
}

.ss-rules thead th:last-child,
.ss-rules td:last-child {
  text-align: right;
}

.ss-rules tbody th {
  width: 28%;
  padding: 9px 10px 9px 0;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--rule);
}

.ss-rules td {
  padding: 9px 0;
  vertical-align: top;
  border-bottom: 1px solid var(--rule);
}

.ss-rules td b {
  display: block;
  font-size: 14px;
  font-weight: 600;
}

.ss-rules td span {
  display: block;
  font-size: 12px;
  line-height: 1.4;
  color: var(--pencil);
}

.ss-rules td:last-child {
  white-space: nowrap;
  padding-left: 10px;
}

.ss-st {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
}

.ss-st.ok {
  color: var(--sage);
}

.ss-st.bad {
  color: var(--redline);
}

.ss-off {
  padding: 12px 14px;
  border-left: 3px solid var(--amber);
  background: var(--card);
}

.ss-overlays {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ss-overlays li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: baseline;
  padding: 10px 0;
  border-bottom: 1px solid var(--rule);
}

.ss-overlays b {
  display: block;
  font-size: 14px;
}

.ss-overlays div span {
  display: block;
  font-size: 13px;
  line-height: 1.45;
  color: var(--pencil);
}

.ss-build {
  margin: 8px 0;
  padding-left: 18px;
  font-size: 13px;
  line-height: 1.55;
}

.ss-ext {
  display: inline-block;
  margin-top: 14px;
  color: var(--blueline);
  font-weight: 500;
}

.ss-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--ink);
}

.ss-foot .primary:disabled {
  opacity: 0.45;
  cursor: default;
}

.secondary.danger {
  color: var(--redline);
}

.secondary.danger:hover {
  border-color: var(--redline);
}

/* The brief's planning checks. */
.planning {
  margin: 12px 0 2px;
}

.planning-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 4px;
}

.plan-site {
  border: 0;
  background: none;
  padding: 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--blueline);
}

.plan-site:hover {
  color: var(--ink);
}

.pchecks {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 14px;
}

.pcheck {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
  padding: 4px 0;
  border-bottom: 1px dotted var(--rule-strong);
  font-size: 12px;
  cursor: default;
}

.pcheck .mark {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1.3px solid var(--sage);
  background: var(--sage-soft);
}

.pcheck.bad .mark {
  border-color: var(--redline);
  background: var(--redline);
}

.pcheck .label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pcheck .val {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--graphite);
}

.pcheck.bad .val {
  color: var(--redline);
  font-weight: 700;
}

/* A stair's checks: each rule with its value and a tick, the limit under it. */
.stair-checks {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 172px;
  overflow-y: auto;
  border-top: 1px solid var(--rule);
}

.stair-checks li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 14px;
  gap: 0 8px;
  align-items: baseline;
  padding: 3px 0;
  border-bottom: 1px dotted var(--rule-strong);
  font-size: 11.5px;
}

.stair-checks span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stair-checks b {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 400;
  color: var(--graphite);
  white-space: nowrap;
}

.stair-checks i {
  grid-column: 1 / -1;
  grid-row: 2;
  font-family: var(--font-mono);
  font-size: 9px;
  font-style: normal;
  color: var(--faint);
}

.stair-checks em {
  font-style: normal;
  color: var(--sage);
  text-align: right;
}

/* A value too long to sit beside its label goes under it, as the limit does. */
.stair-checks li.wrap b {
  grid-column: 1 / 3;
  grid-row: 2;
  white-space: normal;
}

.stair-checks li.wrap i {
  grid-row: 3;
}

.stair-checks li.wrap em {
  grid-column: 3;
  grid-row: 1;
}

.stair-checks li.bad span,
.stair-checks li.bad b,
.stair-checks li.bad em {
  color: var(--redline);
  font-weight: 700;
}

/* The start screen: the site before the blueprint. */
.site-pick,
.site-picked {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  gap: 2px 10px;
  align-items: center;
  padding: 11px 12px;
  border: 1px dashed var(--ink);
  border-radius: var(--radius-sm);
  background: var(--paper);
  text-align: left;
}

.site-pick:hover {
  border-style: solid;
  background: var(--accent-soft);
}

.site-picked {
  border-style: solid;
  box-shadow: inset 3px 0 0 var(--sage);
}

.site-pick svg,
.site-picked svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.6;
}

.site-pick b,
.site-picked b {
  display: block;
  font-size: 14px;
}

.site-pick span span,
.site-picked span span {
  display: block;
  font-size: 12px;
  color: var(--pencil);
}

.bp .fit {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  margin-top: 4px;
}

.bp .fit.ok {
  color: var(--sage);
}

.bp .fit.over {
  color: var(--redline);
}

/* Moving the house on its lot, from the site's callout. */
.lot-pad {
  display: grid;
  grid-template-columns: repeat(3, 36px);
  grid-template-rows: repeat(3, 30px);
  gap: 4px;
}

.lot-pad .act {
  padding: 0;
  justify-content: center;
}

.lot-row {
  display: flex;
  gap: 14px;
  align-items: center;
}

@media (max-width: 900px) {
  .ss-report {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    padding: 0 var(--gutter);
  }

  .ss-plan {
    position: static;
  }

  .lot-plan {
    max-height: 56vh;
  }
}

@media (max-width: 700px) {
  #site-chip-label {
    display: none;
  }

  .site-chip {
    padding: 6px 7px;
  }

  .ss-form {
    grid-template-columns: minmax(0, 1fr);
  }

  .ss-dial {
    grid-row: auto;
  }

  .ss-step {
    grid-template-columns: 84px minmax(0, 1fr);
  }

  .ss-step .src {
    display: none;
  }

  .pchecks {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-modal,
  .ss-means,
  .ss-steps.live .ss-step[data-state="done"],
  .ss-step[data-state="wait"] .v {
    animation: none;
  }
}

/* ------------------------------------------------------------------- focus */

/*
 * The pill: which room is in focus, how far it's fitted, and the way out. It stands under the
 * project tab, where the brief's card was (the brief folds and steps down in focus): beside the
 * tab it would meet the view controls on any screen under 1 800 wide.
 */
.focus-pill {
  position: absolute;
  z-index: 1;
  top: 58px;
  left: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 46px;
  padding: 0 6px 0 14px;
  max-width: calc(100vw - 2 * var(--gutter));
  animation: pill-in 0.28s cubic-bezier(0.3, 1.3, 0.5, 1);
}

/*
 * The way out stands over every card, never under one (5 October 2026: testers were stuck in
 * focus): in focus the bar, and the pill's Leave with it, is over the callout, the toasts, a note
 * and the drawer. Only a modal (20 and up) is over it; the bar's own menus start under the pill
 * (layout.js `menusClearPill`).
 */
.app[data-focus="true"] .corner {
  z-index: 10;
}

/* layout.js `menusClearPill` pushes them down by a margin and reads where they then stand: a
   transition on it (reduced motion gives everything a 0.01 ms one) would show the old place. */
#menu,
#cloud-menu {
  transition: none !important;
}

.app[data-focus="true"] .toasts {
  top: calc(var(--gutter) + 116px + env(safe-area-inset-top, 0px));
}

.app[data-focus="true"] .datum.add {
  display: none;
}

@keyframes pill-in {
  from {
    opacity: 0;
    transform: translateX(-14px);
  }
}

.fp-dot {
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  box-shadow: inset 0 0 0 2px var(--card);
  background: var(--accent);
}

.fp-name {
  min-width: 0;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fp-meta {
  font-size: 11px;
  color: var(--graphite);
  white-space: nowrap;
}

.fp-fitted {
  font-size: 12px;
  color: var(--pencil);
  white-space: nowrap;
}

.fp-fitted.done {
  color: var(--sage);
  font-weight: 600;
}

/* The first time the room is fitted, the tick pops. */
.fp-fitted.pop {
  display: inline-block;
  animation: fitted-pop 0.5s cubic-bezier(0.3, 1.6, 0.5, 1);
}

@keyframes fitted-pop {
  0% {
    transform: scale(1);
  }
  40% {
    transform: scale(1.35);
  }
  100% {
    transform: scale(1);
  }
}

.fp-issues {
  border: 0;
  background: transparent;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--amber);
  text-decoration: underline;
  text-underline-offset: 2px;
  padding: 4px 2px;
  white-space: nowrap;
}

.fp-issues.bad {
  color: var(--redline);
}

.fp-leave {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 10px 0 6px;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-sm);
  background: var(--paper);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

.fp-leave:hover {
  border-color: var(--ink);
}

/* "Back to the house" in full where there is room, "House" with its arrow on a phone. */
.fp-back {
  flex: none;
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.fp-short {
  display: none;
}

/* A finger has no Esc. */
#app[data-fit][data-touch="true"] .fp-leave kbd {
  display: none;
}

.fp-leave.nudge {
  animation: nudge 0.6s ease-out;
}

@keyframes nudge {
  0%,
  100% {
    transform: none;
  }
  20%,
  60% {
    transform: translateX(-3px);
    border-color: var(--accent);
  }
  40%,
  80% {
    transform: translateX(3px);
    border-color: var(--accent);
  }
}

/*
 * The room's view (js/focuslook.js), at the pill's end: Cutaway | Eye level, back to the corner,
 * Labels and Save image. Their words go where the screen is narrower, their icons stay.
 */
.fp-tools {
  display: flex;
  flex: none;
  align-items: center;
  gap: 6px;
}

.fp-tools[hidden] {
  display: none;
}

.fp-rule {
  width: 1px;
  height: 22px;
  background: var(--rule);
  margin: 0 2px 0 0;
}

.fp-views button[aria-checked="true"] {
  background: var(--ink);
  color: var(--paper);
}

.fp-tool {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 6px;
  height: 34px;
  min-width: 34px;
  justify-content: center;
  padding: 0 8px;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-sm);
  background: var(--paper);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

.fp-tool:hover:not(:disabled) {
  border-color: var(--ink);
}

.fp-tool:disabled {
  opacity: 0.4;
}

.fp-tool[aria-pressed="true"] {
  border-color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink);
}

.fp-tools svg {
  flex: none;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* The cutaway's labels (js/focuslook.js), over the view: crisp at any size. */
.focus-labels {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.focus-labels .sub {
  font-size: 10.5px;
  font-weight: 500;
  fill: #857868;
}

@media (max-width: 1240px) {
  .fp-tools .fp-tool span {
    display: none;
  }
  .fp-tool {
    padding: 0;
  }
}

/* The room's issues and notes, dropped from the pill. */
.fp-list {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: min(360px, calc(100vw - 2 * var(--gutter)));
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 8;
}

.fp-list .issue {
  font-size: 12px;
}

.fp-list .fixes {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 2px 0 4px 12px;
}

/* At eye level: the elevation you face, in the corner. */
.eye-tag {
  position: absolute;
  left: var(--gutter);
  bottom: calc(var(--drawer-h) + var(--gutter) + 14px + env(safe-area-inset-bottom, 0px));
  z-index: 4;
  padding: 7px 12px;
  font-size: 12px;
  letter-spacing: 0.04em;
  pointer-events: none;
}

/* The Furniture tab's card: the rooms there are to fit out. */
.fitout-card {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 236px;
  padding: 8px 10px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--paper);
  font-size: 12px;
}

.fitout-card button {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 4px 8px;
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  background: var(--card);
  text-align: left;
}

.fitout-card button:hover {
  border-color: var(--blueline);
}

.fitout-card .dot {
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1.5px solid var(--graphite);
}

.fitout-card .dot.done {
  border-color: var(--sage);
  background: var(--sage);
}

.fitout-card .mono {
  margin-left: auto;
  font-size: 10px;
  color: var(--pencil);
}

/* A kit piece's facts in its callout: two to a row, the product across both. */
.fact-grid.kit-facts {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.fact-grid.kit-facts .fact {
  border-right: 0;
  border-top: 1px solid var(--rule);
}

.fact-grid.kit-facts .fact:first-child {
  border-top: 0;
}

.fact-grid.kit-facts .fact.wide {
  grid-column: 1 / -1;
}

/* A kit piece with no drawing of its own yet: its size at the height it stands. */
.tile .thumb .kit-fallback {
  fill: #f4f0e8;
  stroke: #3e3a34;
}

/* The dial on the tile of a room being placed (Chris, 5 Oct 2026): a hand with a grip, turned a
   quarter when the room is. The whole drawing turns, an HTML element, not a part of it, so every
   browser turns it about the same middle. */
.tile .turn-dial {
  position: absolute;
  top: 5px;
  left: 5px;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--paper);
  box-shadow:
    0 0 0 1px var(--accent),
    0 1px 3px rgba(40, 30, 20, 0.3);
  cursor: pointer;
}

.tile .turn-dial svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.5;
  stroke-linecap: round;
  transition: transform 0.28s cubic-bezier(0.3, 1.4, 0.5, 1);
}

.tile .turn-dial.turned svg {
  transform: rotate(90deg);
}

.tile .turn-dial .grip {
  fill: var(--accent);
  stroke: var(--paper);
  stroke-width: 1;
}

.tile .turn-dial:hover {
  background: #fbeee8;
}

/* A finger needs more than a mouse: the dial's target runs 9 px past its edge all round, to 44. */
#app[data-fit][data-touch="true"] .tile .turn-dial::after {
  content: "";
  position: absolute;
  inset: -9px;
  border-radius: 50%;
}

@media (prefers-reduced-motion: reduce) {
  .tile .turn-dial svg {
    transition: none;
  }
}

/* A tile that has an icon for its picture, not a drawing: the Furniture drawer's Fit out (a kit
   room's pieces are placed in focus). */
.tile .thumb .icon-thumb {
  fill: none;
  stroke: var(--graphite);
  stroke-width: 1.1;
  stroke-linecap: round;
  stroke-linejoin: round;
  padding: 6px 0;
}

/* The Finishes drawer in focus: the tile's chips, a column of rows beside the tiles. */
.finish-chips {
  gap: 4px;
  max-width: 250px;
}

.finish-chips .chips {
  margin-bottom: 4px;
}

/* A face's finish in its callout: a label beside each row of chips. */
.finish-grid {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 6px 8px;
  align-items: center;
}

.finish-grid > .eyebrow {
  font-size: 9px;
  white-space: nowrap;
}

.finish-grid .chip {
  padding: 3px 6px;
  font-size: 10px;
}

.swatches.sm {
  gap: 4px;
}

.swatches.sm .swatch-btn {
  width: 24px;
  height: 24px;
}

.callout-note.bad {
  color: var(--redline);
}

.callout .act[aria-pressed="true"] {
  border-color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink);
}

.app[data-focus="true"] .room-label {
  display: none;
}

@media (max-width: 860px) {
  .focus-pill {
    top: 50px;
    height: 42px;
    gap: 8px;
  }
  .fp-meta,
  .fp-fitted,
  .fp-leave kbd {
    display: none;
  }
  .eye-tag {
    bottom: auto;
    top: calc(var(--gutter) + 100px + env(safe-area-inset-top, 0px));
  }
  .app[data-focus="true"] .toasts {
    top: calc(var(--gutter) + 100px + env(safe-area-inset-top, 0px));
  }
}

@media (max-width: 560px) {
  /* The pill takes the project tab's row. */
  .focus-pill {
    position: relative;
    top: auto;
    height: 40px;
  }
  .app[data-focus="true"] .toasts {
    top: calc(var(--gutter) + 150px + env(safe-area-inset-top, 0px));
  }
  .fp-name {
    flex: 1;
  }
  .fp-long {
    display: none;
  }
  .fp-short {
    display: inline;
  }
  .fp-leave {
    min-height: 40px;
    min-width: 72px;
    justify-content: center;
  }
  /* The room's view on a row of its own under the pill, its icons only. */
  .fp-tools {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    padding: 4px;
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: var(--shadow-paper);
  }
  .fp-rule,
  #app[data-fit] .fp-views button span {
    display: none;
  }
  .fp-tool {
    min-height: 40px;
    min-width: 40px;
  }
  .eye-tag {
    top: calc(var(--gutter) + 98px + env(safe-area-inset-top, 0px));
  }
  .app[data-focus="true"] .callout .act,
  .app[data-focus="true"] .tile,
  .app[data-focus="true"] .tool,
  .callout .act.focus-act {
    min-height: 40px;
  }
  /* An issue's Show and its fixes, in the brief and the pill, and the rest of the list. */
  .issue button,
  .issues .fixes .chip,
  .fp-list .fixes .chip,
  .issue-more {
    min-height: 40px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .focus-pill,
  .fp-leave.nudge,
  .fp-fitted.pop {
    animation: none;
  }
}

/* The engineering set (js/engset.js, js/engdetails.js): its side column, the notes under each
   plan, site data, corners and set-out tables, and the typical details with their keys. */

.es-notes {
  font-size: 11px;
  line-height: 1.42;
}

.es-notes p {
  margin: 0 0 8px;
}

.es-notes p.fine {
  font-size: 9.5px;
  line-height: 1.38;
  color: var(--pencil);
  margin-bottom: 5px;
}

.es-status {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.04em;
  color: #8e422c;
}

.es-notes .es-status {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--ink);
}

.dw-cell.es-strip {
  padding: 6px 12px 8px;
  gap: 4px;
}

.es-general {
  columns: 3;
  column-gap: 18px;
  font-size: 9.5px;
  line-height: 1.36;
  color: var(--pencil);
}

.es-general p {
  margin: 0 0 4px;
  break-inside: avoid;
}

.es-site {
  margin-bottom: 10px;
  padding: 6px 8px;
  border: 1px dashed var(--pencil);
}

.es-site .schedule {
  margin: 2px 0;
}

.es-site .schedule td {
  font-size: 10px;
  padding: 1px 4px;
}

.es-site .fine {
  margin: 0;
}

.es-schedule td {
  font-size: 11px;
  padding: 2px 4px;
}

.es-schedule td .fine {
  display: inline-block;
  margin-top: 1px;
  font-size: 9.5px;
}

.dw-cell.es-cell {
  overflow: hidden;
  font-size: 12px;
}

.es-corners .schedule td,
.es-setout td {
  font-size: 11px;
  padding: 3px 6px;
}

.es-openings td {
  font-size: 11px;
  padding: 3px 6px;
}

.es-openings td.fine {
  font-size: 9.5px;
  color: var(--pencil);
}

.es-openings td.es-made {
  font-weight: 700;
  color: #8e422c;
}

/* The drawing set's door and window schedule, A-600 on (js/doorschedule.js). */
.dw-cell.dw-doors-cell {
  overflow: hidden;
  gap: 6px;
}

.dw-doors {
  table-layout: fixed;
}

.dw-doors th,
.dw-doors td {
  font-size: 10.5px;
  padding: 3px 5px;
  vertical-align: top;
}

.dw-doors th {
  font-size: 8.5px;
}

.dw-doors td.dw-mark {
  font-weight: 700;
  white-space: nowrap;
}

.dw-doors td.num {
  white-space: nowrap;
}

.dw-doors td.fine {
  font-size: 9.5px;
  color: var(--pencil);
}

.es-corners tr.first td {
  border-top: 1px solid var(--ink);
}

.es-setout td.fine {
  font-size: 9.5px;
  color: var(--pencil);
  overflow-wrap: anywhere;
}

.es-notes.ed-side {
  font-size: 10.5px;
  line-height: 1.38;
}

.es-notes.ed-side p {
  margin-bottom: 6px;
}

.es-notes .ed-vent {
  margin: 0 0 8px;
  padding-left: 14px;
  font-size: 9.5px;
  line-height: 1.35;
}

.dw-cell.ed-cell {
  gap: 8px;
}

.ed-cell .ed-draw {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 0;
}

/* A detail at its true scale: the scale chooser (engdetails.js `fit`) keeps it inside its cell. */
.dw-cell .ed-draw svg {
  flex: none;
  width: auto;
  height: auto;
}

.ed-section .ed-draw {
  flex: 1;
  align-items: center;
}

.ed-keys {
  margin: 0;
  padding-left: 24px;
  font-size: 10px;
  line-height: 1.34;
  color: var(--graphite);
}

.ed-keys li {
  margin-bottom: 2px;
}

.ed-keys li::marker {
  font-family: var(--font-mono);
  font-weight: 700;
}

.ed-foot {
  margin: 0;
  font-size: 9.5px;
  line-height: 1.35;
  color: var(--pencil);
}

/* ------------------------------------------------- a piece of joinery's card (JOINERY.md 1.2) */

/* Its title, and on the right its tag and sheet: a link to the piece's sheet. */
.jn-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.jn-sheet {
  border: 0;
  background: none;
  padding: 2px 0;
  font-size: 11px;
  color: var(--accent-deep);
  text-decoration: underline;
  text-decoration-color: var(--accent-soft);
  text-underline-offset: 3px;
  white-space: nowrap;
}

.jn-sheet:hover {
  color: var(--accent);
  text-decoration-color: currentColor;
}

.jn-body {
  gap: 9px;
}

.jn-mixed,
.jn-sep {
  align-self: center;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--pencil);
}

.jn-follow {
  text-transform: none;
  letter-spacing: 0;
  color: var(--pencil);
}

/* The bays: a little elevation of the piece, each bay a button as wide as it is on the piece; a
   long piece scrolls sideways (9.4). */
.jn-bays {
  display: flex;
  gap: 2px;
  height: 48px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 1px 4px;
  scrollbar-width: thin;
  overscroll-behavior-x: contain;
}

.jn-bays.tall {
  height: 78px;
}

.jn-bay {
  position: relative;
  flex: var(--w, 1) 1 0px;
  min-width: 30px;
  padding: 0;
  border: 1px solid var(--rule-strong);
  background: var(--paper);
  cursor: pointer;
}

.jn-bay:hover {
  border-color: var(--ink);
}

.jn-bay[aria-pressed="true"] {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
  z-index: 1;
}

.jn-bay svg {
  display: block;
  width: 100%;
  height: 100%;
}

.jn-bay svg * {
  vector-effect: non-scaling-stroke;
}

.jb-kick,
.jb-open,
.jb-oven {
  stroke: none;
}

.jb-kick {
  fill: #2a2622;
}

.jb-open {
  fill: #6a645c;
}

.jb-oven {
  fill: #1e1d1c;
}

.jb-door,
.jb-drawer,
.jb-false,
.jb-panel,
.jb-fixed {
  fill: var(--paper);
  stroke: var(--ink);
  stroke-width: 0.8;
}

.jb-panel,
.jb-fixed {
  fill: #efe9df;
}

.jb-top {
  fill: var(--faint);
  stroke: none;
}

.jb-shelves {
  fill: #f3eee6;
  stroke: var(--ink);
  stroke-width: 0.8;
}

.jb-blind {
  fill: #e8e2d8;
  stroke: var(--pencil);
  stroke-width: 0.8;
  stroke-dasharray: 3 2;
}

.jb-chev,
.jb-cross,
.jb-line {
  fill: none;
  stroke: var(--pencil);
  stroke-width: 0.8;
}

.jb-chev {
  stroke-dasharray: 3 2;
}

.jb-mark {
  position: absolute;
  left: 2px;
  top: 2px;
  padding: 0 2px;
  font-family: var(--font-mono);
  font-size: 9px;
  line-height: 12px;
  background: var(--paper);
  color: var(--graphite);
  pointer-events: none;
}

.jb-own {
  position: absolute;
  right: 3px;
  top: 3px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  pointer-events: none;
}

/* The bay chosen: what it is, and its chips. */
.jn-bayline {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 7px 8px;
  background: var(--card);
  border: 1px solid var(--rule);
}

.jn-baytitle {
  font-size: 12px;
  font-weight: 600;
}

/* Finishes and tops grouped by family (1.2): Timber, Painted, Stone, Stainless. */
.jn-fams {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 8px;
}

.jn-fam {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.jn-fam-label {
  font-family: var(--font-mono);
  font-size: 8.5px;
  line-height: 1.2;
  text-transform: uppercase;
  color: var(--pencil);
  white-space: nowrap;
}

/* A piece of joinery's card is a little wider than the others: its top's swatches on one line. */
.callout:has(.jn-body) {
  width: 300px;
}

.jn-fam .swatches {
  gap: 3px;
}

.jn-fam .swatch-btn {
  width: 24px;
  height: 24px;
}

.jn-own {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.jn-own .chip {
  padding: 2px 7px;
}

.jn-actions .jn-same {
  width: 100%;
  justify-content: center;
}

/* On a touch screen every bay and swatch is a finger's 44 px (9.4); on a phone the bays are drawn
   evenly, not to scale, and scroll sideways inside the sheet. */
#app[data-fit][data-touch="true"] .jn-bays {
  height: 60px;
}

#app[data-fit][data-touch="true"] .jn-bays.tall {
  height: 84px;
}

#app[data-fit][data-touch="true"] .jn-bay {
  min-width: 44px;
}

#app[data-fit][data-touch="true"] .jn-fam .swatch-btn,
#app[data-fit][data-touch="true"] .callout .swatch-btn {
  width: 44px;
  height: 44px;
}

#app[data-fit][data-touch="true"] .jn-sheet {
  min-height: 44px;
}

#app[data-fit][data-size="phone"] .jn-bay {
  flex: 1 0 44px;
}

/* The quote sheet: joinery isn't in the price (8.2); a sheet's number on one line. */
.nowrap {
  white-space: nowrap;
}

.schedule tr.jn-unpriced td {
  font-size: 10px;
  color: var(--pencil);
  border-top: 0;
}

/* ---------------------------------------------------------------------------
   The site sheet's address search and street side (D-146, 10 Nov 2026). Signed in with a Maps
   key, Google's address search takes the field's place (sitesheet.js `liveFind`); a looked-up lot
   asks which of its sides faces the street before it can be built on (`streetPicker`). Build
   Mode's tokens; the chosen side is ink, the rest of the title redline as it always is. */

.ss-field gmp-place-autocomplete {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  color-scheme: light;
  font-family: var(--font-sans);
  font-size: clamp(20px, 3vw, 26px);
  background: transparent;
}

.ss-field[data-live="loading"] {
  border-bottom-style: dashed;
}

.ss-live-note {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--pencil);
}

.ss-missing .ss-link {
  min-height: 44px;
}

.ss-street p {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--graphite);
}

.ss-sides {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
}

.ss-side {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-sm);
  background: var(--paper);
  color: var(--ink);
  font: 500 14px/1.2 var(--font-sans);
  text-align: left;
  cursor: pointer;
}

.ss-side span {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--pencil);
}

.ss-side:hover {
  border-color: var(--ink);
}

.ss-side[aria-checked="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.ss-side[aria-checked="true"] span {
  color: #fff;
}

.lot-plan .lp-street-on {
  fill: none;
  stroke: var(--ink);
  stroke-linecap: round;
}

@media (max-width: 560px) {
  .ss-sides {
    grid-template-columns: 1fr 1fr;
  }
}
