/* ============================================================
   TECTO GROUP — Wilshire / Fairfax Assemblage · Interactive Web Package
   Conforms to TECTO Design System v2 (260424). GROUP mode.
============================================================ */
:root {
  --ink: #1a1a1a;
  --dark: #1B2838;
  --paper: #fafaf8;
  --paper-card: #ffffff;
  --accent: #1a5276;
  --accent-light: #e8f0f6;
  --accent-hover: #1f6a94;
  --border: #dde1e6;
  --muted: #5a6570;
  --tag-bg: #edf0f3;
  --positive: #1a7a5c;
  --positive-bg: #e1f5ee;
  --caution: #a67c28;
  --caution-bg: #fef3e0;
  --negative: #8b3a3a;
  --negative-bg: #fdf2f2;
  --negative-border: #d4a0a0;
  --header-h: 60px;
  --kpi-h: 56px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "tnum";
  overflow-x: hidden;
}

/* ─────────── TYPOGRAPHY ─────────── */
h1, h2, h3, h4 { font-weight: 400; }
.serif { font-family: 'DM Serif Display', serif; }
.mono { font-family: 'JetBrains Mono', monospace; font-feature-settings: "tnum"; }

.label {
  font-family: 'DM Sans', sans-serif;
  font-size: 10px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}
.label-ink { color: var(--ink); }
.label-accent { color: var(--accent); }
.label-positive { color: var(--positive); }
.label-caution { color: var(--caution); }
.label-negative { color: var(--negative); }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

/* ─────────── HEADER ─────────── */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--paper);
  border-bottom: 2px solid var(--ink);
  height: var(--header-h);
  display: flex;
  align-items: center;
  padding: 0 32px;
  justify-content: space-between;
  gap: 16px;
}
.app-header-l { display: flex; align-items: baseline; gap: 10px; }
.tecto-name {
  font-family: 'DM Sans', sans-serif;
  font-size: 18px;
  letter-spacing: 3px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1;
}
.tecto-suffix {
  font-family: 'DM Sans', sans-serif;
  font-size: 18px;
  letter-spacing: 3px;
  font-weight: 400;
  color: var(--muted);
  line-height: 1;
}
.tecto-tag {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.5px;
}
.app-header-r {
  font-size: 11px;
  color: var(--muted);
  text-align: right;
  line-height: 1.4;
}
.app-header-r b { color: var(--ink); font-weight: 600; }
.hamburger {
  display: none;
  background: none;
  border: 1px solid var(--ink);
  padding: 6px 9px;
  cursor: pointer;
  font-size: 14px;
  letter-spacing: 1px;
  font-family: inherit;
}

/* ─────────── KPI BAR ─────────── */
.kpi-bar {
  position: sticky;
  top: var(--header-h);
  z-index: 99;
  background: var(--paper);
  border-bottom: 1px solid var(--border);
  height: var(--kpi-h);
  display: grid;
  grid-template-columns: 260px repeat(5, 1fr);
  align-items: stretch;
}
.kpi-mode .mode-toggle-mini {
  display: flex;
  gap: 0;
  margin-top: 1px;
}
.kpi-mode .mode-toggle-mini button {
  flex: 1;
  background: transparent;
  border: 1px solid var(--ink);
  padding: 3px 6px;
  font-family: inherit;
  font-size: 9.5px;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  margin-right: -1px;
}
.kpi-mode .mode-toggle-mini button.on {
  background: var(--ink);
  color: var(--paper);
}
.kpi-bar-option {
  display: flex;
  align-items: center;
  padding: 0 20px;
  border-right: 1px solid var(--border);
  font-size: 11px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  gap: 8px;
}
.kpi-bar-option-active {
  color: var(--accent);
  font-weight: 700;
}
.kpi-cell {
  padding: 8px 18px;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}
.kpi-cell:last-child { border-right: none; }
.kpi-cell .k {
  font-size: 9.5px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: 2px;
}
.kpi-cell .v {
  font-family: 'JetBrains Mono', monospace;
  font-size: 16px;
  font-weight: 500;
  font-feature-settings: "tnum";
  color: var(--ink);
}
.kpi-cell .v.positive { color: var(--positive); }
.kpi-cell .v.negative { color: var(--negative); }
.kpi-cell .v.caution { color: var(--caution); }

/* ─────────── LAYOUT ─────────── */
.layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: calc(100vh - var(--header-h) - var(--kpi-h));
}
.sidebar {
  position: sticky;
  top: calc(var(--header-h) + var(--kpi-h));
  height: calc(100vh - var(--header-h) - var(--kpi-h));
  border-right: 1px solid var(--border);
  background: var(--paper);
  overflow-y: auto;
  padding: 24px 16px 40px 24px;
}
.sidebar-section { margin-bottom: 22px; }
.sidebar-section-title {
  font-size: 10px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--ink);
  padding: 6px 0 6px 10px;
  margin-left: -10px;
  cursor: pointer;
  border-left: 2px solid transparent;
  transition: color .15s, border-color .15s;
}
.sidebar-link:hover { color: var(--accent); }
.sidebar-link:hover .ic { color: var(--accent); opacity: 1; }
.sidebar-link.active {
  color: var(--accent);
  font-weight: 600;
  border-left-color: var(--accent);
}
.sidebar-link .ic {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  opacity: 0.78;
  transition: color .15s, opacity .15s;
}
.sidebar-link .ic svg { width: 100%; height: 100%; display: block; }
.sidebar-link.active .ic { color: var(--accent); opacity: 1; }
.sidebar-link .num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  flex: 0 0 auto;
}
.sidebar-link.active .num { color: var(--accent); }
.sidebar-link .lbl { flex: 1 1 auto; min-width: 0; }

.main {
  padding: 0;
  max-width: 100%;
  overflow-x: hidden;
}
.section {
  padding: 48px 64px 80px;
  border-bottom: 1px solid var(--border);
  scroll-margin-top: calc(var(--header-h) + var(--kpi-h) + 12px);
}
.section-inner { max-width: 1100px; margin: 0 auto; }
.section-narrow { max-width: 820px; margin: 0 auto; }

/* ─────────── COVER / HERO ─────────── */
.cover-section {
  background: var(--dark);
  color: var(--paper);
  min-height: calc(100vh - var(--header-h) - var(--kpi-h));
  padding: 80px 64px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  scroll-margin-top: calc(var(--header-h) + var(--kpi-h));
}
.cover-section .eyebrow {
  font-size: 11px;
  letter-spacing: 2.4px;
  text-transform: uppercase;
  color: rgba(250, 250, 248, 0.55);
  margin-bottom: 18px;
  font-weight: 500;
}
.cover-title {
  font-family: 'DM Serif Display', serif;
  font-size: 84px;
  line-height: 0.95;
  letter-spacing: -1.5px;
  color: var(--paper);
  margin-bottom: 16px;
}
.cover-sub {
  font-family: 'DM Serif Display', serif;
  font-size: 26px;
  color: rgba(250, 250, 248, 0.65);
  letter-spacing: -0.3px;
  margin-bottom: 8px;
}
.cover-addr {
  font-size: 14px;
  color: rgba(250, 250, 248, 0.55);
  letter-spacing: 0.5px;
  margin-bottom: 36px;
}
.cover-lede {
  max-width: 720px;
  font-size: 17px;
  line-height: 1.6;
  color: rgba(250, 250, 248, 0.85);
  margin-bottom: 48px;
}
.cover-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: rgba(250, 250, 248, 0.15);
  border: 1px solid rgba(250, 250, 248, 0.15);
  margin-bottom: 36px;
  max-width: 900px;
}
.cover-stat {
  background: var(--dark);
  padding: 16px 18px;
}
.cover-stat .k {
  font-size: 9.5px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: rgba(250, 250, 248, 0.5);
  font-weight: 500;
  margin-bottom: 6px;
}
.cover-stat .v {
  font-family: 'JetBrains Mono', monospace;
  font-size: 17px;
  font-weight: 500;
  color: var(--paper);
}
.cover-stat .s {
  font-size: 10.5px;
  color: rgba(250, 250, 248, 0.55);
  margin-top: 2px;
}
.cover-meta {
  position: absolute;
  bottom: 36px;
  right: 64px;
  font-size: 11px;
  color: rgba(250, 250, 248, 0.45);
  text-align: right;
  line-height: 1.6;
}
.cover-watermark {
  position: absolute;
  bottom: 36px;
  left: 64px;
  font-size: 11px;
  color: rgba(250, 250, 248, 0.35);
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 600;
}

/* ─────────── SHEET HEADER ─────────── */
.sheet-num {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 6px;
}
.sheet-title {
  font-family: 'DM Serif Display', serif;
  font-size: 38px;
  font-weight: 400;
  letter-spacing: -0.6px;
  line-height: 1.05;
  color: var(--ink);
  margin-bottom: 10px;
}
.sheet-sub {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
  max-width: 820px;
  margin-bottom: 8px;
}
.sheet-meta {
  display: flex;
  gap: 24px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.sheet-meta-item { font-size: 12px; color: var(--muted); }
.sheet-meta-item b { color: var(--ink); font-weight: 600; }
.sheet-divider {
  margin: 24px 0 28px;
  border: none;
  height: 2px;
  background: var(--ink);
}

/* ─────────── LAYER BANNER ─────────── */
.layer-banner {
  font-family: 'DM Sans', sans-serif;
  font-size: 10px;
  letter-spacing: 2.4px;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
  padding: 6px 0;
  margin-bottom: 18px;
  border-bottom: 1px dashed var(--border);
}

/* ─────────── KPI ROW (sheet-level) ─────────── */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border: 1px solid var(--border);
  background: var(--border);
  gap: 1px;
  margin-bottom: 28px;
}
.kpi-row > div {
  background: var(--paper);
  padding: 14px 16px;
}
.kpi-row .k {
  font-size: 9.5px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: 6px;
}
.kpi-row .v {
  font-family: 'JetBrains Mono', monospace;
  font-size: 19px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 3px;
}
.kpi-row .v.positive { color: var(--positive); }
.kpi-row .v.negative { color: var(--negative); }
.kpi-row .v.caution { color: var(--caution); }
.kpi-row .s { font-size: 10.5px; color: var(--muted); }

/* ─────────── TABLE ─────────── */
.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  margin-bottom: 18px;
  font-feature-settings: "tnum";
}
.tbl th {
  text-align: left;
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  padding: 9px 12px;
  border-bottom: 2px solid var(--ink);
  background: var(--paper);
}
.tbl td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.tbl tr.section-row td {
  font-size: 10px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
  background: var(--accent-light);
  padding-top: 12px;
  padding-bottom: 8px;
}
.tbl tr.total-row td {
  font-weight: 700;
  border-top: 1.5px solid var(--ink);
  border-bottom-color: var(--ink);
}
.tbl tr.neg td { background: var(--negative-bg); }
.tbl tr.pos td { background: var(--positive-bg); }
.tbl tr.warn td { background: var(--caution-bg); }
.tbl .num { font-family: 'JetBrains Mono', monospace; text-align: right; white-space: nowrap; }
.tbl .num.positive { color: var(--positive); }
.tbl .num.negative { color: var(--negative); }
.tbl .num.caution { color: var(--caution); }

/* ─────────── TAG / BADGE ─────────── */
.tag {
  display: inline-block;
  font-size: 9.5px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-weight: 600;
  padding: 3px 7px;
  background: var(--tag-bg);
  color: var(--ink);
  white-space: nowrap;
  border: 1px solid transparent;
}
.tag.positive { background: var(--positive-bg); color: var(--positive); }
.tag.caution { background: var(--caution-bg); color: var(--caution); }
.tag.negative { background: var(--negative-bg); color: var(--negative); }
.tag.accent { background: var(--accent-light); color: var(--accent); }
.tag.outline { background: transparent; border: 1px solid var(--ink); }
.tag.lg { font-size: 11px; padding: 5px 10px; letter-spacing: 1.2px; }

/* ─────────── CALLOUT ─────────── */
.callout {
  padding: 14px 18px;
  border-left: 3px solid var(--accent);
  background: var(--accent-light);
  font-size: 13px;
  line-height: 1.55;
  margin: 18px 0;
}
.callout.positive { border-left-color: var(--positive); background: var(--positive-bg); }
.callout.caution { border-left-color: var(--caution); background: var(--caution-bg); }
.callout.negative { border-left-color: var(--negative); background: var(--negative-bg); }
.callout .lbl {
  display: inline-block;
  font-size: 9.5px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  font-weight: 700;
  margin-right: 6px;
  color: var(--accent);
}
.callout.positive .lbl { color: var(--positive); }
.callout.caution .lbl { color: var(--caution); }
.callout.negative .lbl { color: var(--negative); }

/* ─────────── CARDS / GRID ─────────── */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 20px 0; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin: 20px 0; }
.card {
  border: 1px solid var(--border);
  padding: 18px 20px;
  background: var(--paper);
}
.card.accent-bg { background: var(--accent-light); border-color: var(--accent); }
.card .eyebrow {
  font-size: 9.5px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 10px;
}
.card .title {
  font-family: 'DM Serif Display', serif;
  font-size: 22px;
  line-height: 1.1;
  margin-bottom: 6px;
  color: var(--ink);
}
.card .sub {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 14px;
  line-height: 1.45;
}
.card .stats { font-size: 12px; }
.card .stats-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  font-family: 'JetBrains Mono', monospace;
}
.card .stats-row:last-child { border-bottom: none; }
.card .stats-row .k { color: var(--muted); font-family: 'DM Sans', sans-serif; }
.card .stats-row .v { color: var(--ink); font-weight: 500; }
.card-foot { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.card-foot li { list-style: none; font-size: 11.5px; color: var(--muted); padding: 3px 0; }

/* ─────────── OPTION TOGGLE ─────────── */
.option-toggle {
  display: flex;
  border: 1px solid var(--ink);
  background: var(--paper);
  align-self: stretch;
}
.option-toggle button {
  flex: 1;
  background: transparent;
  border: none;
  border-right: 1px solid var(--ink);
  padding: 9px 14px;
  font-family: inherit;
  font-size: 11px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  transition: all .15s;
}
.option-toggle button:last-child { border-right: none; }
.option-toggle button:hover { background: var(--tag-bg); }
.option-toggle button.active {
  background: var(--ink);
  color: var(--paper);
}

.option-toggle-large {
  display: flex;
  border: 2px solid var(--ink);
  background: var(--paper);
  margin: 20px 0 24px;
}
.option-toggle-large button {
  flex: 1;
  background: transparent;
  border: none;
  border-right: 2px solid var(--ink);
  padding: 16px 20px;
  font-family: inherit;
  font-size: 13px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  text-align: center;
  position: relative;
}
.option-toggle-large button:last-child { border-right: none; }
.option-toggle-large button .sub {
  display: block;
  font-size: 10px;
  letter-spacing: 0.8px;
  font-weight: 500;
  color: var(--muted);
  margin-top: 4px;
  text-transform: none;
}
.option-toggle-large button:hover { background: var(--accent-light); }
.option-toggle-large button.active { background: var(--ink); color: var(--paper); }
.option-toggle-large button.active .sub { color: rgba(250, 250, 248, 0.7); }

/* ─────────── SLIDERS ─────────── */
.slider-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin: 24px 0;
  padding: 18px 20px;
  background: var(--paper-card);
  border: 1px solid var(--border);
}
.slider-cell .head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}
.slider-cell .head .label {
  font-size: 10.5px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}
.slider-cell .head .value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 18px;
  font-weight: 500;
  color: var(--accent);
}
.slider-cell input[type="range"] {
  width: 100%;
  height: 4px;
  -webkit-appearance: none;
  background: var(--border);
  outline: none;
  margin: 8px 0;
}
.slider-cell input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px; height: 18px;
  background: var(--ink);
  cursor: pointer;
  border-radius: 0;
  border: 2px solid var(--paper);
  box-shadow: 0 0 0 1px var(--ink);
}
.slider-cell input[type="range"]::-moz-range-thumb {
  width: 14px; height: 14px;
  background: var(--ink);
  cursor: pointer;
  border-radius: 0;
  border: 2px solid var(--paper);
  box-shadow: 0 0 0 1px var(--ink);
}
.slider-cell .ticks {
  display: flex;
  justify-content: space-between;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--muted);
  margin-top: 4px;
}
.slider-cell .resetbtn {
  background: none; border: none; padding: 0;
  font-size: 10px;
  color: var(--muted);
  cursor: pointer;
  text-decoration: underline;
  font-family: inherit;
  margin-left: 8px;
}
.slider-cell .resetbtn:hover { color: var(--accent); }

/* ─────────── HEATMAP ─────────── */
.heatmap-wrap {
  margin: 18px 0;
}
.heatmap {
  display: grid;
  grid-template-columns: 110px repeat(5, 1fr);
  border: 1px solid var(--ink);
  font-feature-settings: "tnum";
}
.heatmap .corner,
.heatmap .colhdr,
.heatmap .rowhdr,
.heatmap .cell {
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 10px 8px;
  text-align: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  cursor: default;
  position: relative;
}
.heatmap .corner {
  background: var(--ink);
  color: var(--paper);
  font-size: 9.5px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  line-height: 1.25;
}
.heatmap .colhdr,
.heatmap .rowhdr {
  background: var(--paper-card);
  font-weight: 600;
  color: var(--muted);
  font-size: 10.5px;
}
.heatmap .cell {
  cursor: pointer;
  font-weight: 500;
  transition: filter .12s;
}
.heatmap .cell:hover { filter: brightness(0.88); }
.heatmap .cell.base {
  border: 2px solid var(--accent);
  font-weight: 700;
  z-index: 1;
}
.heatmap .cell .sub {
  font-size: 9px;
  color: var(--muted);
  font-family: 'DM Sans', sans-serif;
  margin-top: 2px;
  display: block;
}
.heatmap-tooltip {
  position: fixed;
  background: var(--ink);
  color: var(--paper);
  padding: 8px 10px;
  font-size: 11px;
  font-family: 'JetBrains Mono', monospace;
  z-index: 1000;
  pointer-events: none;
  white-space: nowrap;
}
.heatmap-tooltip .lbl {
  font-family: 'DM Sans', sans-serif;
  font-size: 9px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(250, 250, 248, 0.6);
  margin-bottom: 2px;
}

/* ─────────── MASSING / 3D ─────────── */
.massing-wrap {
  position: relative;
  width: 100%;
  height: 540px;
  background: #f4f4f1;
  border: 1px solid var(--border);
  overflow: hidden;
  margin: 16px 0;
}
.massing-canvas { width: 100%; height: 100%; display: block; }
.massing-toolbar {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--paper);
  border: 1px solid var(--ink);
  padding: 8px 12px;
  font-size: 11px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 5;
}
.massing-toolbar label {
  display: flex; align-items: center; gap: 8px;
  font-size: 10.5px;
  letter-spacing: 0.4px;
  cursor: pointer;
}
.massing-toolbar input[type="checkbox"] { accent-color: var(--accent); }
.massing-toolbar .floor-slider { width: 140px; }
.massing-toolbar .floor-slider input { width: 100%; }
.massing-labels {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.massing-label {
  position: absolute;
  font-size: 10px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  background: var(--paper);
  padding: 2px 6px;
}
.massing-hint {
  position: absolute;
  bottom: 12px;
  right: 12px;
  font-size: 10.5px;
  color: var(--muted);
  background: var(--paper);
  padding: 4px 8px;
  border: 1px solid var(--border);
}

/* ─────────── TIMELINE ─────────── */
.timeline {
  margin: 20px 0;
  font-feature-settings: "tnum";
}
.timeline-track {
  margin: 14px 0 8px;
  position: relative;
  height: 38px;
}
.timeline-row {
  display: grid;
  grid-template-columns: 180px 1fr 80px;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}
.timeline-row .name {
  font-size: 12px;
  font-weight: 600;
}
.timeline-row .total {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 600;
  text-align: right;
}
.timeline-bar {
  display: flex;
  height: 30px;
  border: 1px solid var(--ink);
  background: var(--paper);
  position: relative;
}
.timeline-seg {
  height: 100%;
  font-size: 9.5px;
  letter-spacing: 0.4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--paper);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-right: 1px solid var(--paper);
}
.timeline-seg:last-child { border-right: none; }
.timeline-axis {
  display: flex;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--muted);
  margin-top: 6px;
  padding-left: 194px;
}
.timeline-axis .tick {
  flex: 1;
  text-align: left;
  border-left: 1px solid var(--border);
  padding-left: 4px;
}

/* ─────────── WATERFALL ─────────── */
.waterfall-wrap {
  background: var(--paper-card);
  border: 1px solid var(--border);
  padding: 24px 18px;
  margin: 18px 0;
}
.waterfall {
  width: 100%;
  height: 300px;
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  padding-top: 22px;
}
.waterfall-bar {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-feature-settings: "tnum";
  min-width: 0;
  height: 100%;
  justify-content: flex-end;
  position: relative;
}
.waterfall-bar .rect {
  width: 100%;
  background: var(--accent);
  transition: height .3s ease, transform .3s ease;
}
.waterfall-bar.pos .rect { background: var(--positive); }
.waterfall-bar.neg .rect { background: var(--negative); }
.waterfall-bar.subtotal .rect { background: var(--ink); }
.waterfall-bar .val {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  margin-top: 6px;
  font-weight: 600;
}
.waterfall-bar .label {
  font-size: 9.5px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  margin-top: 4px;
  text-align: center;
}

/* ─────────── COMPLIANCE TABLE ─────────── */
.compliance-row {
  cursor: pointer;
}
.compliance-row:hover td { background: var(--accent-light); }
.compliance-expand {
  background: var(--paper-card);
  border-left: 3px solid var(--accent);
  padding: 14px 18px;
  font-size: 12.5px;
  line-height: 1.55;
}
.compliance-expand p { margin-bottom: 8px; }
.compliance-expand p:last-child { margin-bottom: 0; }
.compliance-expand .lbl {
  font-size: 9.5px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  margin-right: 6px;
}
.filter-row {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.filter-row button {
  background: var(--paper);
  border: 1px solid var(--border);
  padding: 5px 12px;
  font-family: inherit;
  font-size: 10.5px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
}
.filter-row button.active {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

/* ─────────── RISK MATRIX ─────────── */
.risk-row { cursor: pointer; }
.risk-row:hover td { background: var(--accent-light); }
.risk-row.expanded td { background: var(--accent-light); }
.risk-expand {
  background: var(--paper-card);
  padding: 16px 22px;
  border-left: 3px solid var(--accent);
  font-size: 12.5px;
  line-height: 1.6;
}
.risk-expand p { margin-bottom: 8px; }
.risk-expand .lbl {
  font-size: 9.5px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  margin-right: 6px;
}
.severity-h { background: var(--negative-bg); color: var(--negative); font-weight: 700; }
.severity-m { background: var(--caution-bg); color: var(--caution); font-weight: 700; }
.severity-l { background: var(--positive-bg); color: var(--positive); font-weight: 700; }

/* ─────────── DECISION MATRIX ─────────── */
.decision-matrix {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  font-feature-settings: "tnum";
  margin: 18px 0;
}
.decision-matrix th, .decision-matrix td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  text-align: left;
}
.decision-matrix th:first-child, .decision-matrix td:first-child {
  font-weight: 600;
  width: 24%;
}
.decision-matrix .rec-col { background: var(--accent-light); }
.decision-matrix tr.group-header td {
  font-size: 10px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
  background: var(--ink);
  color: var(--paper);
  padding-top: 10px;
  padding-bottom: 8px;
}
.decision-matrix tr.group-header td.rec-col { background: var(--accent); }
.decision-matrix thead th {
  font-size: 11px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  font-weight: 700;
  background: var(--paper);
  border-bottom: 2px solid var(--ink);
  padding-top: 14px;
  padding-bottom: 12px;
  text-align: left;
}
.decision-matrix thead th.rec-col { background: var(--accent-light); }
.decision-matrix thead .tag-line { margin-top: 6px; }

/* ─────────── PATHWAY TREE ─────────── */
.pathway-tree {
  margin: 18px 0;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
}
.pathway-card {
  border-left: 4px solid var(--accent);
  padding: 16px 18px;
  background: var(--paper-card);
}
.pathway-card.positive { border-left-color: var(--positive); background: var(--positive-bg); }
.pathway-card.caution { border-left-color: var(--caution); background: var(--caution-bg); }
.pathway-card.recommended { border-left-color: var(--ink); background: var(--accent-light); border: 2px solid var(--accent); border-left-width: 4px; }
.pathway-card .head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 8px;
}
.pathway-card .title {
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.4px;
}
.pathway-card ul {
  list-style: none;
  font-size: 11.5px;
  padding-left: 0;
  margin-top: 6px;
}
.pathway-card li {
  padding: 3px 0;
  border-bottom: 1px dashed var(--border);
  color: var(--ink);
}
.pathway-card li:last-child { border-bottom: none; }
.pathway-card .foot {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  font-weight: 600;
}

/* ─────────── FOOTER ─────────── */
.app-footer {
  background: var(--ink);
  color: var(--paper);
  padding: 48px 64px 36px;
  border-top: 2px solid var(--ink);
}
.app-footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  flex-wrap: wrap;
}
.app-footer .tecto-name { color: var(--paper); }
.app-footer .tecto-suffix { color: rgba(250, 250, 248, 0.55); }
.app-footer .tecto-tag { color: rgba(250, 250, 248, 0.55); margin-top: 4px; }
.app-footer .who {
  font-size: 12px;
  color: rgba(250, 250, 248, 0.7);
  line-height: 1.6;
}
.app-footer .who b { color: var(--paper); font-weight: 600; }
.app-footer .disclaim {
  font-style: italic;
  font-size: 11px;
  color: rgba(250, 250, 248, 0.5);
  margin-top: 22px;
  border-top: 1px solid rgba(250, 250, 248, 0.15);
  padding-top: 16px;
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}

/* ─────────── BIG HEADLINE ─────────── */
.big-headline {
  font-family: 'DM Serif Display', serif;
  font-size: 26px;
  line-height: 1.2;
  color: var(--ink);
  margin: 28px 0 18px;
}

/* ─────────── DETAILS / EXPANDABLE ─────────── */
details {
  border: 1px solid var(--border);
  margin-bottom: 10px;
}
details > summary {
  padding: 12px 16px;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--paper);
  font-size: 13px;
}
details > summary::-webkit-details-marker { display: none; }
details > summary::after {
  content: '+';
  font-family: 'JetBrains Mono', monospace;
  font-size: 18px;
  font-weight: 400;
  color: var(--muted);
}
details[open] > summary { background: var(--accent-light); border-bottom: 1px solid var(--border); }
details[open] > summary::after { content: '−'; }
details > div { padding: 14px 18px; font-size: 12.5px; line-height: 1.6; }

/* ─────────── RESPONSIVE ─────────── */
@media (max-width: 1024px) {
  .sidebar { display: none; }
  .layout { grid-template-columns: 1fr; }
  .section { padding: 36px 32px 60px; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .pathway-tree { grid-template-columns: 1fr; }
  .kpi-bar { grid-template-columns: 140px repeat(2, 1fr); height: auto; padding-bottom: 6px; }
  .kpi-bar .kpi-cell:nth-child(n+5) { display: none; }
  .kpi-bar .kpi-mode { display: none; }
  .hamburger { display: block; }
  .cover-title { font-size: 56px; }
  .cover-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .section { padding: 28px 20px 48px; }
  .cover-section { padding: 60px 24px 100px; }
  .cover-title { font-size: 42px; }
  .cover-sub { font-size: 19px; }
  .cover-lede { font-size: 15px; }
  .kpi-row { grid-template-columns: 1fr 1fr; }
  .kpi-bar { grid-template-columns: 1fr 1fr; padding: 8px; gap: 0; height: auto; }
  .kpi-bar-option { grid-column: 1 / -1; border-right: none; border-bottom: 1px solid var(--border); padding: 8px 0; justify-content: center; }
  .slider-group { grid-template-columns: 1fr; }
  .heatmap { grid-template-columns: 80px repeat(5, 1fr); font-size: 9.5px; }
  .heatmap .corner, .heatmap .colhdr, .heatmap .rowhdr, .heatmap .cell { padding: 6px 4px; font-size: 9.5px; }
  .decision-matrix { font-size: 11px; }
  .decision-matrix th, .decision-matrix td { padding: 6px 8px; }
  .app-header { padding: 0 16px; }
  .app-footer { padding: 30px 20px 24px; }
  .timeline-row { grid-template-columns: 1fr; gap: 6px; }
  .timeline-axis { padding-left: 0; }
}

/* ─────────── PRINT ─────────── */
@media print {
  @page { size: letter portrait; margin: 0.5in; }
  .app-header, .kpi-bar, .sidebar, .massing-wrap, .filter-row, .option-toggle-large, .mode-toggle, .massing-toolbar, .massing-hint, .hamburger { display: none !important; }
  .layout { grid-template-columns: 1fr; display: block; }
  .main { display: block; }
  .section { padding: 18px 0; border-bottom: 1px solid var(--border) !important; page-break-inside: auto; break-inside: auto; }
  .section-inner { max-width: 100%; padding: 0; }
  body { background: white; font-size: 10pt; }
  .sheet-title { font-size: 24pt; }
  .big-headline { font-size: 17pt; }

  /* Cover — keep dark hero but render on its own page */
  .cover-section {
    color: var(--paper);
    background: var(--dark) !important;
    min-height: auto;
    padding: 60px 50px;
    page-break-after: always;
    break-after: page;
  }
  .cover-section, .cover-section * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; color-adjust: exact !important; }
  .cover-section .cover-title { font-size: 56pt; color: var(--paper) !important; }
  .cover-section .cover-sub { color: rgba(250, 250, 248, 0.7) !important; }
  .cover-section .cover-addr,
  .cover-section .cover-lede,
  .cover-section .cover-stat .k,
  .cover-section .cover-stat .v,
  .cover-section .cover-stat .s,
  .cover-section .cover-meta,
  .cover-section .cover-watermark,
  .cover-section .cover-headline,
  .cover-section .eyebrow { color: rgba(250, 250, 248, 0.85) !important; }
  .cover-section .cover-stats { background: rgba(250, 250, 248, 0.15) !important; border-color: rgba(250, 250, 248, 0.2) !important; }
  .cover-section .cover-stat { background: var(--dark) !important; }

  /* Financial intro banner */
  #financial-intro { background: var(--accent-light) !important; -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }

  /* Heatmap cells — keep their fill colors */
  .heatmap .cell, .heatmap .colhdr, .heatmap .rowhdr, .heatmap .corner,
  .callout, .callout *, .tag, .pathway-card,
  .kpi-row > div, .decision-matrix .rec-col,
  .timeline-seg,
  table.tbl tr.section-row td, table.tbl tr.neg td, table.tbl tr.pos td, table.tbl tr.warn td {
    -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; color-adjust: exact !important;
  }

  /* Sticky elements release for print */
  .kpi-bar, .sidebar, .app-header { position: static !important; }

  a { color: var(--ink); text-decoration: none; }

  details > div { display: block !important; padding: 8px 12px; }
  details { border: 1px solid var(--border); break-inside: avoid; }
  details > summary::after { content: '' !important; }

  /* Add a discreet page footer with deck identity */
  .app-footer { background: white; color: var(--ink); border-top: 2px solid var(--ink); padding: 24px 0 0; }
  .app-footer * { color: var(--ink) !important; }
}

/* ============================================================
   FLOOR PLAN — Sheet 05 schematic plan view
   ============================================================ */
.floor-plan-frame {
  margin: 24px 0 32px;
  padding: 24px 24px 18px;
  background: #fbfaf7;
  border: 1px solid var(--border);
}
.fp-eyebrow {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2.2px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}
.floor-plan-svg {
  display: block;
  width: 100%;
  height: auto;
  max-width: 880px;
  margin: 0 auto;
  font-family: 'DM Sans', sans-serif;
}
.floor-plan-svg .fp-outer {
  fill: rgba(26, 82, 118, 0.06);
  stroke: var(--ink);
  stroke-width: 1.4;
}
.floor-plan-svg .fp-courtyard {
  fill: #fbfaf7;
  stroke: var(--ink);
  stroke-width: 1.2;
  stroke-dasharray: 6 3;
}
.floor-plan-svg .fp-courtyard-label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2.6px;
  fill: var(--muted);
}
.floor-plan-svg .fp-courtyard-sub {
  font-size: 9px;
  letter-spacing: 0.4px;
  fill: var(--muted);
}
.floor-plan-svg .fp-corridor {
  fill: none;
  stroke: rgba(26, 82, 118, 0.4);
  stroke-width: 0.8;
  stroke-dasharray: 2 2;
}
.floor-plan-svg .fp-corridor-label {
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 1.5px;
  fill: rgba(26, 82, 118, 0.65);
  text-transform: uppercase;
}
.floor-plan-svg .fp-unit-line line {
  stroke: rgba(14, 22, 32, 0.55);
  stroke-width: 0.8;
}
.floor-plan-svg .fp-unit-tag {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.6px;
  fill: rgba(14, 22, 32, 0.55);
  text-anchor: middle;
}
.floor-plan-svg .fp-shaft rect {
  fill: var(--accent);
  fill-opacity: 0.85;
  stroke: var(--accent);
  stroke-width: 0.8;
}
.floor-plan-svg .fp-shaft text {
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.4px;
  fill: #ffffff;
}
.floor-plan-svg .fp-dim-label {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 1.2px;
  fill: var(--muted);
}
.fp-caption {
  font-size: 12px;
  line-height: 1.55;
  color: var(--muted);
  margin-top: 14px;
  max-width: 880px;
}

/* Floor plan image from the source package */
.floor-plan-img {
  display: block;
  width: 100%;
  max-width: 880px;
  height: auto;
  margin: 0 auto;
  border: 1px solid var(--border);
}
