:root {
  color-scheme: light;
  --paper: #f4f0e7;
  --paper-deep: #ebe5d9;
  --surface: #fffdf8;
  --surface-strong: #ffffff;
  --ink: #14231e;
  --ink-soft: #394942;
  --muted: #66736d;
  --faint: #5f6c66;
  --line: #d9d4c9;
  --line-strong: #b9b5ab;
  --buy: #087d70;
  --buy-dark: #055a52;
  --buy-pale: #d9f0e9;
  --rent: #7657a6;
  --rent-dark: #52367d;
  --rent-pale: #eee8f7;
  --accent: #315cdb;
  --accent-pale: #e7ecff;
  --warning: #a75f00;
  --warning-pale: #fff0cc;
  --critical: #b42318;
  --critical-pale: #fee4e2;
  --body-grid: rgba(20, 35, 30, 0.024);
  --focus-ring: rgba(49, 92, 219, 0.42);
  --topbar-border: rgba(185, 181, 171, 0.8);
  --topbar-bg: rgba(244, 240, 231, 0.9);
  --glass-bg: rgba(255, 253, 248, 0.7);
  --surface-soft: rgba(255, 255, 255, 0.45);
  --surface-translucent: rgba(255, 253, 248, 0.86);
  --surface-card-glass: rgba(255, 253, 248, 0.68);
  --surface-hover-wash: rgba(255, 255, 255, 0.54);
  --surface-muted-wash: rgba(235, 229, 217, 0.26);
  --surface-nested: rgba(255, 253, 248, 0.72);
  --surface-hover: #ffffff;
  --threshold-bg: #f8f6f0;
  --action-bg: #14231e;
  --action-hover: #23352e;
  --action-text: #ffffff;
  --action-shadow: 0 6px 18px rgba(20, 35, 30, 0.15);
  --action-shadow-hover: 0 8px 24px rgba(20, 35, 30, 0.2);
  --status-ring: rgba(8, 125, 112, 0.12);
  --buy-ring: rgba(8, 125, 112, 0.18);
  --accent-ring: rgba(49, 92, 219, 0.12);
  --thumb-shadow: 0 2px 8px rgba(20, 35, 30, 0.2);
  --overlay-border: rgba(255, 255, 255, 0.16);
  --overlay-shadow: 0 12px 32px rgba(20, 35, 30, 0.24);
  --fact-border: #b9ddd4;
  --fact-bg: #edf8f4;
  --fact-text: #315d53;
  --assumption-border: #ecd59a;
  --assumption-bg: #fff9e9;
  --assumption-text: #6f5826;
  --warning-border: #e8c56e;
  --warning-text: #754400;
  --warning-text-strong: #684000;
  --critical-border: #f1aaa4;
  --critical-text: #8f1d15;
  --accent-text: #344b95;
  --accent-text-strong: #243c8a;
  --accent-tag-text: #2746a8;
  --neutral-accent-text: #2c4aa3;
  --capital-note-text: #30467f;
  --switch-off: #c8cdc9;
  --switch-knob: #ffffff;
  --buy-gradient-end: #66b5a8;
  --chart-wash: rgba(244, 249, 246, 0.66);
  --chart-clear: rgba(255, 253, 248, 0);
  --chart-glow: rgba(8, 125, 112, 0.05);
  --chart-bg: #fbfaf6;
  --chart-grid: #dedbd3;
  --chart-zero: #9fa7a2;
  --chart-selection: #8f9893;
  --allocation-spent: #d28c62;
  --allocation-liquid: #83a4f4;
  --subtract-text: #a54b39;
  --track-bg: rgba(20, 35, 30, 0.07);
  --disclosure-hover: rgba(235, 229, 217, 0.46);
  --assumption-section-start: rgba(255, 240, 204, 0.38);
  --assumption-section-end: rgba(255, 253, 248, 0.6);
  --dock-border: rgba(255, 255, 255, 0.18);
  --dock-bg: rgba(20, 35, 30, 0.96);
  --dock-text: #ffffff;
  --dock-muted: rgba(255, 255, 255, 0.68);
  --dock-shadow: 0 18px 48px rgba(20, 35, 30, 0.28);
  --shadow-small: 0 1px 2px rgba(20, 35, 30, 0.05), 0 8px 24px rgba(20, 35, 30, 0.04);
  --shadow-large: 0 2px 4px rgba(20, 35, 30, 0.04), 0 24px 70px rgba(20, 35, 30, 0.08);
  --radius-small: 10px;
  --radius: 16px;
  --radius-large: 24px;
  --desktop-topbar-height: 76px;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --display: Georgia, "Times New Roman", serif;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --paper: #0d1714;
  --paper-deep: #17231f;
  --surface: #14211d;
  --surface-strong: #1a2924;
  --ink: #edf5f1;
  --ink-soft: #c8d5cf;
  --muted: #a9b7b0;
  --faint: #96a69e;
  --line: #30423a;
  --line-strong: #53655d;
  --buy: #4ad1bd;
  --buy-dark: #8ce7d7;
  --buy-pale: #173a34;
  --rent: #c19bec;
  --rent-dark: #d9bafa;
  --rent-pale: #352a43;
  --accent: #8aa7ff;
  --accent-pale: #243154;
  --warning: #f7b955;
  --warning-pale: #3a2e18;
  --critical: #ff8f87;
  --critical-pale: #40201f;
  --body-grid: rgba(237, 245, 241, 0.035);
  --focus-ring: rgba(138, 167, 255, 0.56);
  --topbar-border: rgba(83, 101, 93, 0.76);
  --topbar-bg: rgba(13, 23, 20, 0.92);
  --glass-bg: rgba(20, 33, 29, 0.78);
  --surface-soft: rgba(255, 255, 255, 0.035);
  --surface-translucent: rgba(20, 33, 29, 0.88);
  --surface-card-glass: rgba(20, 33, 29, 0.78);
  --surface-hover-wash: rgba(255, 255, 255, 0.055);
  --surface-muted-wash: rgba(255, 255, 255, 0.025);
  --surface-nested: rgba(20, 33, 29, 0.82);
  --surface-hover: #21342d;
  --threshold-bg: #111d19;
  --action-bg: #e2efe9;
  --action-hover: #f5fbf8;
  --action-text: #10201a;
  --action-shadow: 0 6px 20px rgba(0, 0, 0, 0.28);
  --action-shadow-hover: 0 8px 28px rgba(0, 0, 0, 0.36);
  --status-ring: rgba(74, 209, 189, 0.17);
  --buy-ring: rgba(74, 209, 189, 0.24);
  --accent-ring: rgba(138, 167, 255, 0.22);
  --thumb-shadow: 0 2px 10px rgba(0, 0, 0, 0.46);
  --overlay-border: rgba(16, 32, 26, 0.16);
  --overlay-shadow: 0 14px 38px rgba(0, 0, 0, 0.42);
  --fact-border: #397a6d;
  --fact-bg: #17342f;
  --fact-text: #a5ded2;
  --assumption-border: #806532;
  --assumption-bg: #332a18;
  --assumption-text: #f1d08a;
  --warning-border: #8c6727;
  --warning-text: #ffd384;
  --warning-text-strong: #ffdc94;
  --critical-border: #8a514d;
  --critical-text: #ffaca6;
  --accent-text: #bccaff;
  --accent-text-strong: #d0d9ff;
  --accent-tag-text: #b8c7ff;
  --neutral-accent-text: #b8c7ff;
  --capital-note-text: #c1cdfd;
  --switch-off: #53645c;
  --switch-knob: #edf5f1;
  --buy-gradient-end: #81d9ca;
  --chart-wash: rgba(74, 209, 189, 0.055);
  --chart-clear: rgba(13, 23, 20, 0);
  --chart-glow: rgba(74, 209, 189, 0.08);
  --chart-bg: #101d19;
  --chart-grid: #31443b;
  --chart-zero: #6d7f76;
  --chart-selection: #8a9a92;
  --allocation-spent: #dd9c72;
  --allocation-liquid: #90adf7;
  --subtract-text: #ff9e94;
  --track-bg: rgba(237, 245, 241, 0.09);
  --disclosure-hover: rgba(255, 255, 255, 0.045);
  --assumption-section-start: rgba(247, 185, 85, 0.09);
  --assumption-section-end: rgba(20, 33, 29, 0.74);
  --dock-border: rgba(16, 32, 26, 0.18);
  --dock-bg: rgba(226, 239, 233, 0.96);
  --dock-text: #10201a;
  --dock-muted: rgba(16, 32, 26, 0.66);
  --dock-shadow: 0 18px 52px rgba(0, 0, 0, 0.42);
  --shadow-small: 0 1px 2px rgba(0, 0, 0, 0.22), 0 10px 28px rgba(0, 0, 0, 0.14);
  --shadow-large: 0 2px 4px rgba(0, 0, 0, 0.22), 0 28px 78px rgba(0, 0, 0, 0.28);
}

html[data-theme="dark"] .select-shell select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23a9b7b0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E");
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--desktop-topbar-height);
}

body {
  margin: 0;
  background:
    linear-gradient(var(--body-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--body-grid) 1px, transparent 1px),
    var(--paper);
  background-size: 32px 32px;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font: inherit;
}

button,
select,
summary,
input[type="range"],
input[type="checkbox"] {
  cursor: pointer;
}

button {
  color: inherit;
}

a {
  color: inherit;
}

svg {
  display: block;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--action-bg);
  color: var(--action-text);
  text-decoration: none;
  transform: translateY(-150%);
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
}

.shell {
  width: min(1480px, calc(100% - 48px));
  margin-inline: auto;
}

.topbar {
  position: sticky;
  z-index: 50;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  padding: 12px max(24px, calc((100vw - 1480px) / 2));
  border-bottom: 1px solid var(--topbar-border);
  background: var(--topbar-bg);
  backdrop-filter: blur(16px) saturate(1.1);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: var(--surface);
}

.brand-mark svg {
  width: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.brand > span:last-child {
  display: grid;
  line-height: 1.15;
}

.brand strong {
  font-family: var(--display);
  font-size: 21px;
  letter-spacing: -0.02em;
}

.brand small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.02em;
}

.topbar-actions,
.topbar-actions .button {
  display: flex;
  align-items: center;
}

.topbar-actions {
  gap: 9px;
}

.snapshot-chip,
.live-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.snapshot-chip {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--glass-bg);
}

.status-dot,
.live-label span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--buy);
  box-shadow: 0 0 0 4px var(--status-ring);
}

.button {
  min-height: 40px;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 750;
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.button svg {
  width: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.button-quiet {
  border-color: var(--line);
  background: var(--surface);
}

.button-quiet:hover {
  border-color: var(--line-strong);
  background: var(--surface-hover);
}

.button-dark {
  background: var(--action-bg);
  color: var(--action-text);
  box-shadow: var(--action-shadow);
}

.button-dark:hover {
  background: var(--action-hover);
  box-shadow: var(--action-shadow-hover);
}

.language-button {
  min-width: 58px;
  text-decoration: none;
}

.theme-switcher {
  display: inline-grid;
  flex: 0 0 auto;
  grid-template-columns: repeat(2, 42px);
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--glass-bg);
}

.theme-option {
  display: grid;
  min-width: 42px;
  min-height: 40px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  transition: background 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.theme-option:hover {
  background: var(--surface-hover-wash);
  color: var(--ink);
}

.theme-option[aria-pressed="true"] {
  background: var(--action-bg);
  color: var(--action-text);
  box-shadow: var(--action-shadow);
}

.theme-option svg {
  width: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(360px, 0.65fr);
  gap: 48px;
  align-items: end;
  padding-block: 42px 34px;
}

.eyebrow,
.section-index {
  margin: 0 0 10px;
  color: var(--buy-dark);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 760px;
  margin: 0;
  font-family: var(--display);
  font-size: clamp(40px, 4.4vw, 64px);
  font-weight: 500;
  letter-spacing: -0.052em;
  line-height: 0.98;
  text-wrap: balance;
}

.hero-lede {
  max-width: 760px;
  margin: 18px 0 0;
  color: var(--ink-soft);
  font-size: clamp(16px, 1.35vw, 18px);
  line-height: 1.55;
}

.hero-principles {
  display: grid;
  border-top: 1px solid var(--line-strong);
}

.hero-principles > div {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 14px;
  align-items: baseline;
  padding-block: 16px;
  border-bottom: 1px solid var(--line);
}

.hero-principles span {
  color: var(--faint);
  font-family: var(--display);
  font-size: 15px;
}

.hero-principles p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.hero-principles strong {
  color: var(--ink);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(390px, 470px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  padding-bottom: 72px;
}

.controls,
.panel,
.verdict-card {
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-small);
}

.controls {
  overflow: hidden;
  border-radius: var(--radius-large);
}

.controls-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  padding: 28px 28px 20px;
}

.controls-heading h2,
.panel-heading h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 27px;
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.1;
}

.live-label {
  margin-top: 4px;
  color: var(--buy-dark);
}

.preset-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 0 28px 22px;
}

.preset-button,
.financing-buttons button,
.rate-buttons button,
.rent-cap-strip button,
.horizon-buttons button,
.segmented-control button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease;
}

.preset-button:hover,
.financing-buttons button:hover,
.rate-buttons button:hover,
.rent-cap-strip button:hover,
.horizon-buttons button:hover,
.segmented-control button:hover {
  border-color: var(--line-strong);
  background: var(--paper);
  color: var(--ink);
}

.preset-button.is-active,
.financing-buttons button.is-active,
.horizon-buttons button.is-active,
.segmented-control button.is-active {
  border-color: var(--action-bg);
  background: var(--action-bg);
  color: var(--action-text);
}

.form-section {
  padding: 24px 28px 28px;
  border-top: 1px solid var(--line);
}

.essentials {
  background: var(--surface-soft);
}

.form-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.form-section-heading {
  margin-bottom: 18px;
}

.form-section-heading h3 {
  margin: 0;
  font-size: 14px;
  letter-spacing: -0.01em;
}

.type-tag {
  display: inline-flex;
  width: max-content;
  align-items: center;
  min-height: 23px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.type-tag.fact {
  background: var(--buy-pale);
  color: var(--buy-dark);
}

.type-tag.assumption {
  background: var(--warning-pale);
  color: var(--warning-text);
}

.type-tag.estimate {
  background: var(--accent-pale);
  color: var(--accent-tag-text);
}

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

.field-grid.three-columns {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.field {
  display: grid;
  gap: 7px;
}

.field-label {
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.005em;
}

.term-help {
  display: inline-flex;
  position: relative;
  z-index: 1;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  margin-block: -6px;
  margin-inline-start: 1px;
  margin-inline-end: -6px;
  color: var(--muted);
  font-family: var(--body);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
  text-transform: none;
  vertical-align: 0.08em;
}

.term-help-trigger {
  display: inline-grid;
  position: relative;
  z-index: 1;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  place-items: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  cursor: help;
  font-size: 0;
  line-height: 1;
  transition: color 160ms ease;
}

.term-help-trigger::before {
  display: grid;
  position: absolute;
  inset: 6px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  background: var(--surface-translucent);
  content: "!";
  font-size: 10px;
  font-weight: 850;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.term-help-trigger:hover,
.term-help-trigger:focus-visible,
.term-help.is-open .term-help-trigger {
  color: var(--buy-dark);
}

.term-help-trigger:hover::before,
.term-help-trigger:focus-visible::before,
.term-help.is-open .term-help-trigger::before {
  background: var(--buy-pale);
}

.term-help-trigger:focus-visible {
  outline: 0;
}

.term-help-trigger:focus-visible::before {
  box-shadow: 0 0 0 3px var(--buy-ring);
}

.term-tooltip {
  position: fixed;
  z-index: 220;
  top: 0;
  left: 0;
  max-width: calc(100vw - 24px);
  padding: 10px 12px;
  border: 1px solid var(--overlay-border);
  border-radius: 10px;
  background: var(--action-bg);
  color: var(--action-text);
  box-shadow: var(--overlay-shadow);
  font-family: var(--body);
  font-size: 12px;
  font-weight: 550;
  letter-spacing: 0;
  line-height: 1.5;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 150ms ease, transform 150ms ease, visibility 150ms ease;
  visibility: hidden;
  white-space: normal;
}

.term-tooltip[data-side="above"] {
  transform: translateY(4px);
}

.term-help:not(.is-dismissed):hover .term-tooltip,
.term-help:not(.is-dismissed):focus-within .term-tooltip,
.term-help.is-open .term-tooltip {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
}

.input-shell,
.select-shell {
  display: flex;
  min-height: 45px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: var(--surface-strong);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.input-shell:focus-within,
.select-shell:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-ring);
}

.input-shell input,
.select-shell select {
  width: 100%;
  min-width: 0;
  height: 43px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.input-shell input {
  padding: 0 12px;
}

.input-shell .input-prefix + input {
  padding-left: 5px;
}

.select-shell select {
  appearance: none;
  padding: 0 38px 0 12px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2366736d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E");
  background-position: right 12px center;
  background-repeat: no-repeat;
}

.input-prefix,
.input-suffix {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.input-prefix {
  padding-left: 12px;
}

.input-suffix {
  padding-right: 12px;
}

.input-suffix-shell input {
  padding-right: 5px;
}

.horizon-control {
  margin-top: 20px;
  padding: 17px 0 4px;
  border-top: 1px solid var(--line);
}

.horizon-control output {
  color: var(--ink);
  font-family: var(--display);
  font-size: 17px;
  font-weight: 600;
}

.range-input {
  width: 100%;
  height: 24px;
  margin: 10px 0 0;
  appearance: none;
  background: transparent;
}

.range-input::-webkit-slider-runnable-track {
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--buy), var(--buy-gradient-end));
}

.range-input::-moz-range-track {
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--buy), var(--buy-gradient-end));
}

.range-input::-webkit-slider-thumb {
  width: 18px;
  height: 18px;
  margin-top: -6px;
  appearance: none;
  border: 3px solid var(--surface);
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 0 0 1px var(--ink), var(--thumb-shadow);
}

.range-input::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border: 3px solid var(--surface);
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 0 0 1px var(--ink), var(--thumb-shadow);
}

.range-scale {
  display: flex;
  justify-content: space-between;
  color: var(--faint);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
}

.financing-quickset {
  margin-top: 18px;
  padding-top: 17px;
  border-top: 1px solid var(--line);
}

.financing-quickset output {
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 750;
  text-align: right;
}

.financing-buttons {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
  margin-top: 10px;
}

.financing-buttons button {
  min-width: 0;
  min-height: 34px;
  padding-inline: 6px;
  font-size: 10px;
}

.policy-inline {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  overflow: hidden;
  margin-top: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: var(--line);
}

.policy-inline > div {
  display: grid;
  gap: 2px;
  padding: 10px;
  background: var(--paper);
}

.policy-inline span {
  color: var(--faint);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.policy-inline strong {
  font-size: 12px;
}

.form-disclosure {
  border-top: 1px solid var(--line);
}

.form-disclosure summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 19px 28px;
  list-style: none;
  transition: background 180ms ease;
}

.form-disclosure summary::-webkit-details-marker {
  display: none;
}

.form-disclosure summary:hover {
  background: var(--disclosure-hover);
}

.form-disclosure summary > span {
  display: flex;
  align-items: center;
  gap: 12px;
}

.form-disclosure summary > span > span:last-child {
  display: grid;
  gap: 2px;
}

.form-disclosure summary strong {
  font-size: 13px;
}

.form-disclosure summary small {
  color: var(--muted);
  font-size: 10px;
}

.summary-icon {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 9px;
  background: var(--paper);
  color: var(--ink-soft);
}

.summary-icon svg,
.chevron {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.summary-icon svg {
  width: 18px;
}

.chevron {
  width: 18px;
  color: var(--muted);
  transition: transform 180ms ease;
}

.form-disclosure[open] .chevron {
  transform: rotate(180deg);
}

.disclosure-content {
  display: grid;
  gap: 18px;
  padding: 4px 28px 28px;
}

.fact-callout,
.assumption-callout,
.tax-note {
  padding: 13px 14px;
  border-radius: var(--radius-small);
  font-size: 11px;
  line-height: 1.55;
}

.fact-callout {
  border: 1px solid var(--fact-border);
  background: var(--fact-bg);
  color: var(--fact-text);
}

.fact-callout.subdued {
  border-color: var(--line);
  background: var(--paper);
  color: var(--muted);
}

.assumption-callout {
  border: 1px solid var(--assumption-border);
  background: var(--assumption-bg);
  color: var(--assumption-text);
}

.fact-callout .type-tag,
.assumption-callout .type-tag {
  margin-right: 5px;
  vertical-align: middle;
}

.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: var(--surface-strong);
}

.switch-row > span:first-child {
  display: grid;
  gap: 3px;
}

.switch-row strong {
  font-size: 12px;
}

.switch-row small {
  color: var(--muted);
  font-size: 10px;
}

.switch {
  position: relative;
  display: inline-flex;
  width: 43px;
  height: 24px;
  flex: 0 0 auto;
}

.switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.switch > span {
  width: 100%;
  border-radius: 999px;
  background: var(--switch-off);
  transition: background 180ms ease;
}

.switch > span::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--switch-knob);
  box-shadow: var(--thumb-shadow);
  content: "";
  transition: transform 180ms ease;
}

.switch input:checked + span {
  background: var(--buy);
}

.switch input:checked + span::after {
  transform: translateX(19px);
}

.switch input:focus-visible + span {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
}

.rate-snapshot,
.rent-cap-strip {
  display: grid;
  gap: 11px;
  padding: 14px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-small);
  background: var(--paper);
}

.rate-snapshot p,
.rent-cap-strip p {
  margin: 7px 0 0;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 650;
}

.rate-snapshot > small {
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.5;
}

.rate-buttons,
.rent-cap-strip > div:last-child {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.rate-buttons button,
.rent-cap-strip button {
  min-height: 32px;
  padding: 0 9px;
  background: var(--surface);
  font-size: 10px;
}

.tax-note {
  border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0;
  background: var(--accent-pale);
  color: var(--accent-text);
}

.tax-note strong {
  color: var(--accent-text-strong);
  font-size: 11px;
}

.tax-note p {
  margin: 3px 0 0;
}

.results {
  display: grid;
  min-width: 0;
  gap: 24px;
}

.results > * {
  width: 100%;
  min-width: 0;
}

@media screen and (min-width: 901px) {
  .workspace {
    position: sticky;
    top: var(--desktop-topbar-height);
    height: calc(100vh - var(--desktop-topbar-height));
    height: calc(100dvh - var(--desktop-topbar-height));
    min-height: 0;
    align-items: stretch;
    padding-bottom: 0;
  }

  .workspace > .controls,
  .workspace > .results {
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    scroll-padding-block: 16px;
    scrollbar-color: var(--line-strong) transparent;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
  }

  .workspace > .results {
    align-content: start;
    grid-auto-rows: max-content;
  }

  .workspace > .controls::-webkit-scrollbar,
  .workspace > .results::-webkit-scrollbar {
    width: 8px;
  }

  .workspace > .controls::-webkit-scrollbar-track,
  .workspace > .results::-webkit-scrollbar-track {
    background: transparent;
  }

  .workspace > .controls::-webkit-scrollbar-thumb,
  .workspace > .results::-webkit-scrollbar-thumb {
    border: 2px solid transparent;
    border-radius: 999px;
    background: var(--line-strong);
    background-clip: padding-box;
  }
}

.result-jump {
  display: none;
}

.verdict-card,
.panel {
  border-radius: var(--radius-large);
}

.verdict-card {
  overflow: hidden;
  box-shadow: var(--shadow-large);
}

.verdict-topline,
.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.verdict-topline {
  padding: 28px 30px 20px;
  border-bottom: 1px solid var(--line);
}

.verdict-kicker {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.decision-grid {
  display: grid;
  grid-template-columns: minmax(270px, 0.72fr) minmax(0, 1.28fr);
  min-width: 0;
}

.decision-summary {
  display: grid;
  min-width: 0;
  align-content: start;
  gap: 24px;
  padding: 30px;
  border-right: 1px solid var(--line);
}

.decision-chart {
  min-width: 0;
  padding: 28px;
  background: linear-gradient(180deg, var(--chart-wash), var(--chart-clear));
}

.decision-chart .chart-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.decision-chart .chart-heading h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 24px;
  font-weight: 550;
  letter-spacing: -0.035em;
}

.horizon-buttons,
.segmented-control {
  display: inline-grid;
  grid-auto-flow: column;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
}

.horizon-buttons button,
.segmented-control button {
  min-width: 46px;
  min-height: 32px;
  border: 0;
}

.verdict-content {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.75fr);
  gap: 34px;
  align-items: end;
  padding: 34px 30px 36px;
}

.verdict-copy h2 {
  max-width: 560px;
  margin: 0;
  font-family: var(--display);
  font-size: clamp(30px, 3.2vw, 46px);
  font-weight: 500;
  letter-spacing: -0.046em;
  line-height: 1;
  text-wrap: balance;
}

.verdict-copy > p {
  max-width: 680px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.stability-pill {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  padding: 8px 11px;
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 700;
}

.stability-pill::before {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--warning);
  content: "";
}

.stability-pill.stable::before {
  background: var(--buy);
}

.verdict-number {
  display: grid;
  justify-items: end;
  text-align: right;
}

.decision-summary .verdict-number {
  justify-items: start;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  text-align: left;
}

.verdict-number > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.verdict-number strong {
  margin-top: 4px;
  font-family: var(--display);
  font-size: clamp(38px, 4.2vw, 58px);
  font-weight: 500;
  letter-spacing: -0.05em;
  line-height: 1;
}

.verdict-number strong.buy-value {
  color: var(--buy-dark);
}

.verdict-number strong.rent-value {
  color: var(--rent-dark);
}

.verdict-number small {
  margin-top: 7px;
  color: var(--faint);
  font-size: 10px;
}

.endpoint-comparison {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.endpoint-card {
  display: grid;
  min-width: 0;
  align-content: start;
  gap: 4px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.endpoint-card.buy {
  background: var(--buy-pale);
}

.endpoint-card.rent {
  background: var(--rent-pale);
}

.endpoint-card > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.endpoint-card > strong {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 650;
  letter-spacing: -0.035em;
}

.endpoint-card > small {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.4;
}

.assumption-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.assumption-strip > span,
.assumption-strip > strong {
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--paper);
  color: var(--muted);
  font-size: 9px;
}

.assumption-strip > span {
  background: var(--action-bg);
  color: var(--action-text);
  font-weight: 800;
  text-transform: uppercase;
}

.assumption-strip > strong {
  font-weight: 750;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  border-top: 1px solid var(--line);
  background: var(--line);
}

.metric-grid article {
  display: grid;
  min-width: 0;
  padding: 20px;
  background: var(--paper);
}

.metric-grid article.is-warning {
  background: var(--warning-pale);
  box-shadow: inset 0 0 0 1px var(--warning-border);
}

.metric-icon {
  display: grid;
  width: 31px;
  height: 31px;
  margin-bottom: 15px;
  place-items: center;
  border-radius: 9px;
}

.metric-icon svg {
  width: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.metric-icon.buy {
  background: var(--buy-pale);
  color: var(--buy-dark);
}

.metric-icon.rent {
  background: var(--rent-pale);
  color: var(--rent-dark);
}

.metric-icon.neutral {
  background: var(--accent-pale);
  color: var(--neutral-accent-text);
}

.metric-grid article > span {
  overflow: visible;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  white-space: normal;
}

.metric-grid article > strong {
  margin-top: 4px;
  font-family: var(--display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.metric-grid article > small {
  margin-top: 4px;
  color: var(--faint);
  font-size: 11px;
  line-height: 1.4;
}

.financing-comparison-panel {
  background:
    linear-gradient(145deg, var(--accent-pale), transparent 42%),
    var(--surface);
}

.financing-comparison-summary {
  display: grid;
  gap: 7px;
  margin: -6px 0 20px;
  padding: 14px 16px;
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-small) var(--radius-small) 0;
  background: var(--surface-translucent);
}

.financing-comparison-summary strong {
  font-size: 14px;
  line-height: 1.45;
}

.financing-comparison-summary p,
.comparison-boundary {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

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

.financing-strategy-card {
  display: grid;
  min-width: 0;
  gap: 14px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}

.financing-strategy-card.is-best {
  border-color: var(--buy);
  box-shadow: inset 0 0 0 1px var(--buy), 0 0 0 4px var(--buy-ring);
}

.financing-strategy-card.is-current:not(.is-best) {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.financing-strategy-card header {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.financing-strategy-card header strong {
  font-size: 13px;
}

.financing-strategy-card header span {
  flex: 0 0 auto;
  padding: 4px 7px;
  border-radius: 999px;
  background: var(--track-bg);
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.financing-strategy-card.is-best header span {
  background: var(--buy-pale);
  color: var(--buy-dark);
}

.financing-strategy-wealth {
  display: grid;
  gap: 2px;
  color: var(--ink);
  font-family: var(--display);
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 600;
  letter-spacing: -0.035em;
}

.financing-strategy-wealth small {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0;
}

.financing-strategy-card dl {
  display: grid;
  gap: 0;
  margin: 0;
  border-top: 1px solid var(--line);
}

.financing-strategy-card dl > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(120px, auto);
  gap: 12px;
  align-items: start;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

.financing-strategy-card dt,
.financing-strategy-card dd {
  margin: 0;
  font-size: 11px;
  line-height: 1.45;
}

.financing-strategy-card dt {
  color: var(--muted);
}

.financing-strategy-card dd {
  font-weight: 750;
  text-align: right;
  overflow-wrap: anywhere;
}

.status-critical {
  color: var(--critical-text);
}

.status-review {
  color: var(--warning-text-strong);
}

.status-clear {
  color: var(--buy-dark);
}

.financing-strategy-card button {
  min-height: 44px;
  padding: 9px 12px;
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  font-size: 11px;
  font-weight: 800;
}

.financing-strategy-card button:hover {
  border-color: var(--accent);
  background: var(--surface-hover);
}

.financing-strategy-card button[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--accent-pale);
  color: var(--accent-text-strong);
}

.comparison-boundary {
  margin-top: 15px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
}

.warning-stack:empty {
  display: none;
}

.warning-list {
  display: grid;
  gap: 8px;
}

.warning-item {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 10px;
  align-items: start;
  padding: 12px 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-translucent);
  color: var(--ink-soft);
  font-size: 11px;
}

.warning-item svg {
  width: 18px;
  margin-top: 1px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.warning-item.critical {
  border-color: var(--critical-border);
  background: var(--critical-pale);
  color: var(--critical-text);
}

.warning-item.warning {
  border-color: var(--warning-border);
  background: var(--warning-pale);
  color: var(--warning-text);
}

.warning-item.info {
  color: var(--muted);
}

.panel {
  padding: 30px;
}

.panel-heading {
  margin-bottom: 26px;
}

.panel-note {
  max-width: 240px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
  text-align: right;
}

.chart-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
}

.segmented-control button {
  min-width: 78px;
}

.compact-switch {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.compact-switch input {
  width: 15px;
  height: 15px;
  accent-color: var(--buy);
}

.chart-legend {
  display: flex;
  gap: 18px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.legend-line {
  display: inline-block;
  width: 24px;
  height: 0;
  border-top: 3px solid;
}

.legend-line.buy {
  border-color: var(--buy);
}

.legend-line.rent {
  border-color: var(--rent);
  border-top-style: dashed;
}

.chart-wrap {
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 15px;
  background:
    radial-gradient(circle at 50% 0%, var(--chart-glow), transparent 48%),
    var(--chart-bg);
}

#wealth-chart {
  width: 100%;
  min-height: 300px;
}

#wealth-chart .grid-line {
  stroke: var(--chart-grid);
  stroke-width: 1;
}

#wealth-chart .zero-line {
  stroke: var(--chart-zero);
  stroke-width: 1.2;
}

#wealth-chart .axis-label {
  fill: var(--ink-soft);
  font-family: var(--sans);
  font-size: 12px;
}

#wealth-chart .series-buy,
#wealth-chart .series-rent {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3.5;
  vector-effect: non-scaling-stroke;
}

#wealth-chart .series-buy {
  stroke: var(--buy);
}

#wealth-chart .series-rent {
  stroke: var(--rent);
  stroke-dasharray: 8 6;
}

#wealth-chart .selection-line {
  stroke: var(--chart-selection);
  stroke-dasharray: 3 4;
}

#wealth-chart .selection-dot-buy {
  fill: var(--surface);
  stroke: var(--buy);
  stroke-width: 3;
}

#wealth-chart .selection-dot-rent {
  fill: var(--surface);
  stroke: var(--rent);
  stroke-width: 3;
}

.chart-scrubber {
  display: grid;
  grid-template-columns: minmax(130px, 0.32fr) minmax(170px, 0.68fr);
  gap: 16px;
  align-items: center;
  margin-top: 18px;
}

.chart-scrubber .chart-readout {
  display: grid;
}

.chart-scrubber .chart-readout span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  text-transform: uppercase;
}

.chart-scrubber .chart-readout strong {
  margin-top: 3px;
  font-family: var(--display);
  font-size: 17px;
  font-weight: 600;
}

.chart-caption,
.sources-footnote {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.65;
}

.decision-breakdown-grid {
  display: grid;
  width: 100%;
  min-width: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.decision-breakdown-grid > .panel,
.deep-dive-content > .panel {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.decision-breakdown-grid .panel-heading > *,
.allocation-path,
.allocation-legend,
.allocation-legend > div,
.exit-bridge,
.exit-bridge > div,
.exit-bridge span {
  min-width: 0;
}

.allocation-path header span,
.exit-bridge span {
  overflow-wrap: anywhere;
}

.panel-intro {
  margin: -12px 0 20px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.capital-basis {
  display: grid;
  justify-items: end;
  gap: 2px;
}

.capital-basis span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 750;
  text-transform: uppercase;
}

.capital-basis strong {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 650;
}

.allocation-path + .allocation-path {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.allocation-path header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.allocation-path header strong {
  font-family: var(--display);
  font-size: 19px;
  font-weight: 650;
}

.allocation-path header span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
}

.allocation-bar {
  display: flex;
  width: 100%;
  height: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper-deep);
}

.allocation-segment {
  display: block;
  width: 0;
  min-width: 0;
  transition: width 220ms ease;
}

.allocation-segment.locked {
  background: var(--buy);
}

.allocation-segment.spent {
  background: var(--allocation-spent);
}

.allocation-segment.liquid {
  background: var(--allocation-liquid);
}

.allocation-segment.liquid.rent {
  background: var(--rent);
}

.allocation-legend {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 9px;
  margin: 12px 0 0;
}

.allocation-legend div {
  position: relative;
  display: grid;
  gap: 3px;
  padding-left: 12px;
}

.allocation-legend div::before {
  position: absolute;
  top: 4px;
  left: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--buy);
  content: "";
}

.allocation-legend div.spent::before {
  background: var(--allocation-spent);
}

.allocation-legend div.liquid::before {
  background: var(--allocation-liquid);
}

.allocation-path.rent .allocation-legend div.liquid::before {
  background: var(--rent);
}

.allocation-legend dt {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
}

.allocation-legend dd {
  margin: 0;
  font-size: 12px;
  font-weight: 800;
}

.capital-note {
  margin: 24px 0 0;
  padding: 13px 14px;
  border-left: 3px solid var(--accent);
  border-radius: 0 10px 10px 0;
  background: var(--accent-pale);
  color: var(--capital-note-text);
  font-size: 10px;
  line-height: 1.55;
}

.exit-bridge-panel {
  display: grid;
  align-content: start;
}

.exit-bridge {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
}

.exit-bridge + .exit-bridge {
  margin-top: 14px;
}

.exit-bridge > div {
  display: flex;
  min-height: 43px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 13px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.exit-bridge > div:last-child {
  border-bottom: 0;
}

.exit-bridge span {
  color: var(--muted);
  font-size: 11px;
}

.exit-bridge strong {
  font-size: 12px;
  text-align: right;
}

.exit-bridge .subtract strong {
  color: var(--subtract-text);
}

.exit-bridge .add strong {
  color: var(--buy-dark);
}

.exit-bridge .total {
  background: var(--buy-pale);
}

.exit-bridge.rent .total {
  background: var(--rent-pale);
}

.exit-bridge .total span {
  color: var(--ink);
  font-weight: 800;
}

.exit-bridge .total strong {
  font-family: var(--display);
  font-size: 20px;
}

.exit-bridge-panel > .panel-intro {
  margin: 16px 0 0;
}

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

.scenario-card {
  display: grid;
  min-height: 174px;
  align-content: space-between;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}

.scenario-card.base {
  border-color: var(--ink);
  background: var(--surface-strong);
  box-shadow: inset 0 0 0 1px var(--ink);
}

.scenario-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.scenario-card header strong {
  font-size: 12px;
}

.scenario-card header span {
  padding: 4px 7px;
  border-radius: 999px;
  background: var(--track-bg);
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.scenario-card .scenario-result {
  margin: 18px 0 5px;
  font-family: var(--display);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.035em;
}

.scenario-card .scenario-result.buy {
  color: var(--buy-dark);
}

.scenario-card .scenario-result.rent {
  color: var(--rent-dark);
}

.scenario-card p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.driver-list {
  display: grid;
  gap: 14px;
}

.driver-row {
  display: grid;
  grid-template-columns: minmax(130px, 0.26fr) minmax(200px, 0.54fr) minmax(110px, 0.2fr);
  gap: 18px;
  align-items: center;
}

.driver-label {
  display: grid;
  gap: 2px;
}

.driver-label strong {
  font-size: 12px;
}

.driver-label small {
  color: var(--muted);
  font-size: 11px;
}

.driver-track {
  position: relative;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--paper-deep);
}

.driver-fill {
  position: absolute;
  inset: 0 auto 0 0;
  min-width: 3px;
  border-radius: inherit;
  background: var(--accent);
}

.driver-impact {
  display: grid;
  justify-items: end;
}

.driver-impact strong {
  font-family: var(--display);
  font-size: 16px;
}

.driver-impact small {
  color: var(--muted);
  font-size: 8px;
  text-transform: uppercase;
}

.ledger-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.ledger-column {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.ledger-column header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.ledger-column.buy header {
  background: var(--buy-pale);
}

.ledger-column.rent header {
  background: var(--rent-pale);
}

.ledger-column header span {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.ledger-column header strong {
  font-family: var(--display);
  font-size: 22px;
}

.ledger-column dl {
  margin: 0;
}

.ledger-column dl div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  min-height: 43px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
}

.ledger-column dl div:last-child {
  border-bottom: 0;
}

.ledger-column dt {
  color: var(--muted);
  font-size: 12px;
}

.ledger-column dd {
  margin: 0;
  font-size: 12px;
  font-weight: 750;
  text-align: right;
}

.ledger-column .subdued-row {
  background: var(--paper);
}

.ledger-column .subdued-row dt,
.ledger-column .subdued-row dd {
  color: var(--faint);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

th,
td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  text-align: right;
  white-space: nowrap;
}

th:first-child,
td:first-child {
  text-align: left;
}

th {
  background: var(--paper);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

td {
  font-size: 12px;
  font-weight: 650;
}

tr:last-child td {
  border-bottom: 0;
}

td.positive {
  color: var(--buy-dark);
}

td.negative {
  color: var(--rent-dark);
}

.method-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

.method-grid article {
  padding-top: 14px;
  border-top: 2px solid var(--ink);
}

.method-number {
  color: var(--faint);
  font-family: var(--display);
  font-size: 13px;
}

.method-grid h3 {
  margin: 18px 0 8px;
  font-family: var(--display);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.method-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.65;
}

.sources-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.sources-grid a {
  position: relative;
  display: grid;
  gap: 3px;
  min-height: 77px;
  align-content: center;
  padding: 14px 45px 14px 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  text-decoration: none;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.sources-grid a:hover {
  border-color: var(--line-strong);
  background: var(--surface-hover);
  transform: translateY(-1px);
}

.sources-grid a span {
  color: var(--buy-dark);
  font-size: 8px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sources-grid a strong {
  font-size: 11px;
}

.sources-grid a svg {
  position: absolute;
  top: 50%;
  right: 16px;
  width: 17px;
  fill: none;
  stroke: var(--muted);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
  transform: translateY(-50%);
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding-block: 28px 46px;
  border-top: 1px solid var(--line-strong);
  color: var(--muted);
  font-size: 10px;
}

.footer p {
  margin: 0;
}

.footer strong {
  color: var(--ink);
  font-family: var(--display);
  font-size: 13px;
}

.toast {
  position: fixed;
  z-index: 80;
  right: 24px;
  bottom: 24px;
  max-width: min(360px, calc(100vw - 48px));
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--action-bg);
  color: var(--action-text);
  box-shadow: var(--action-shadow-hover);
  font-size: 12px;
  font-weight: 650;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1240px) {
  .hero {
    grid-template-columns: minmax(0, 1.15fr) minmax(330px, 0.85fr);
    gap: 44px;
  }

  .workspace {
    grid-template-columns: minmax(360px, 420px) minmax(0, 1fr);
  }

  .metric-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .decision-breakdown-grid {
    grid-template-columns: 1fr;
  }

  .decision-grid {
    grid-template-columns: 1fr;
  }

  .decision-summary {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .method-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 1040px) {
  .shell {
    width: min(100% - 32px, 900px);
  }

  .topbar {
    padding-inline: 16px;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 24px;
    padding-block: 34px 28px;
  }

  .hero-principles {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    border-bottom: 1px solid var(--line-strong);
  }

  .hero-principles > div {
    display: block;
    border-bottom: 0;
  }

  .hero-principles p {
    margin-top: 8px;
  }

}

@media (max-width: 900px) {
  .workspace {
    grid-template-columns: minmax(0, 1fr);
  }

  .controls {
    max-width: none;
  }

  .result-jump {
    display: block;
    margin: 14px 28px 0;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--paper);
    color: var(--buy-dark);
    font-size: 12px;
    font-weight: 800;
    text-align: center;
    text-decoration: none;
  }
}

@media (max-width: 760px) {
  .topbar {
    align-items: flex-start;
  }

  .brand small,
  .snapshot-chip {
    display: none;
  }

  .button-dark {
    min-width: 42px;
    padding-inline: 12px;
  }

  .button-dark svg {
    width: 18px;
  }

  .button-dark {
    font-size: 0;
  }

  .hero h1 {
    font-size: clamp(42px, 13vw, 62px);
  }

  .hero-principles {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .hero-principles > div {
    display: grid;
    border-bottom: 1px solid var(--line);
  }

  .hero-principles > div:last-child {
    border-bottom: 0;
  }

  .hero-principles p {
    margin-top: 0;
  }

  .field-grid,
  .field-grid.three-columns {
    grid-template-columns: 1fr;
  }

  .verdict-topline,
  .panel-heading,
  .chart-heading {
    display: grid;
  }

  .decision-chart .chart-heading {
    display: grid;
  }

  .horizon-buttons {
    width: 100%;
    grid-template-columns: repeat(4, 1fr);
  }

  .verdict-content {
    grid-template-columns: 1fr;
  }

  .verdict-number {
    justify-items: start;
    text-align: left;
  }

  .financing-buttons {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .chart-toolbar {
    flex-wrap: wrap;
  }

  .scenario-grid,
  .ledger-grid,
  .sources-grid {
    grid-template-columns: 1fr;
  }

  .chart-scrubber {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .driver-row {
    grid-template-columns: 1fr auto;
    gap: 8px 16px;
  }

  .driver-track {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .driver-impact {
    grid-column: 2;
    grid-row: 1;
  }

  .footer {
    display: grid;
  }
}

@media (max-width: 520px) {
  .shell {
    width: calc(100% - 20px);
  }

  .topbar {
    min-height: 66px;
    padding-inline: 10px;
  }

  .language-button {
    width: 42px;
    min-width: 42px;
    padding-inline: 0;
    font-size: 0;
  }

  .language-button::after {
    content: attr(data-short-label);
    font-size: 12px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .brand > span:last-child {
    display: none;
  }

  .topbar-actions {
    gap: 6px;
  }

  .topbar-actions .button {
    flex-shrink: 0;
    white-space: nowrap;
  }

  .hero {
    padding-block: 40px 32px;
  }

  .hero-lede {
    font-size: 16px;
  }

  .controls-heading,
  .form-section,
  .disclosure-content,
  .verdict-topline,
  .verdict-content,
  .decision-summary,
  .decision-chart,
  .panel {
    padding-right: 18px;
    padding-left: 18px;
  }

  .preset-row {
    padding-right: 18px;
    padding-left: 18px;
  }

  .result-jump {
    margin-right: 18px;
    margin-left: 18px;
  }

  .form-disclosure summary {
    padding-right: 18px;
    padding-left: 18px;
  }

  .policy-inline {
    grid-template-columns: 1fr;
  }

  .policy-inline > div {
    grid-template-columns: 1fr auto;
    align-items: center;
  }

  .metric-grid {
    grid-template-columns: 1fr;
  }

  .metric-grid article {
    grid-template-columns: 40px 1fr;
    align-items: center;
  }

  .metric-icon {
    grid-row: 1 / span 3;
    margin: 0;
  }

  .metric-grid article > span,
  .metric-grid article > strong,
  .metric-grid article > small {
    grid-column: 2;
  }

  .endpoint-comparison {
    grid-template-columns: 1fr;
  }

  .capital-basis {
    justify-items: start;
  }

  .allocation-path header {
    display: grid;
  }

  .method-grid {
    grid-template-columns: 1fr;
  }

  #wealth-chart {
    min-height: 300px;
  }

  #wealth-chart .axis-label {
    font-size: 30px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media print {
  html[data-theme="dark"] {
    color-scheme: light;
    --paper: #ffffff;
    --paper-deep: #ebe5d9;
    --surface: #ffffff;
    --surface-strong: #ffffff;
    --ink: #14231e;
    --ink-soft: #394942;
    --muted: #5f6c66;
    --faint: #5f6c66;
    --line: #d9d4c9;
    --line-strong: #b9b5ab;
    --buy: #087d70;
    --buy-dark: #055a52;
    --buy-pale: #d9f0e9;
    --rent: #7657a6;
    --rent-dark: #52367d;
    --rent-pale: #eee8f7;
    --accent: #315cdb;
    --accent-pale: #e7ecff;
    --warning: #a75f00;
    --warning-pale: #fff0cc;
    --critical: #b42318;
    --critical-pale: #fee4e2;
    --surface-soft: #ffffff;
    --surface-translucent: #ffffff;
    --surface-card-glass: #ffffff;
    --surface-hover-wash: #ffffff;
    --surface-muted-wash: #f8f6f0;
    --surface-nested: #ffffff;
    --surface-hover: #ffffff;
    --threshold-bg: #f8f6f0;
    --fact-border: #b9ddd4;
    --fact-bg: #edf8f4;
    --fact-text: #315d53;
    --assumption-border: #ecd59a;
    --assumption-bg: #fff9e9;
    --assumption-text: #6f5826;
    --warning-border: #e8c56e;
    --warning-text: #754400;
    --warning-text-strong: #684000;
    --critical-border: #f1aaa4;
    --critical-text: #8f1d15;
    --accent-text: #344b95;
    --accent-text-strong: #243c8a;
    --accent-tag-text: #2746a8;
    --neutral-accent-text: #2c4aa3;
    --capital-note-text: #30467f;
    --chart-wash: #ffffff;
    --chart-clear: rgba(255, 255, 255, 0);
    --chart-glow: rgba(8, 125, 112, 0.05);
    --chart-bg: #ffffff;
    --chart-grid: #dedbd3;
    --chart-zero: #7b8580;
    --chart-selection: #6f7a74;
    --allocation-spent: #b9683f;
    --allocation-liquid: #315cdb;
    --subtract-text: #a54b39;
    --track-bg: rgba(20, 35, 30, 0.07);
    --disclosure-hover: #f8f6f0;
    --assumption-section-start: #fff7e3;
    --assumption-section-end: #ffffff;
    --shadow-small: none;
    --shadow-large: none;
  }

  body {
    background: white;
  }

  .topbar,
  .controls,
  .chart-scrubber,
  .toast,
  .footer {
    display: none !important;
  }

  .shell {
    width: 100%;
  }

  .hero {
    padding-block: 20px;
  }

  .workspace {
    display: block;
  }

  .results {
    gap: 14px;
  }

  .panel,
  .verdict-card {
    break-inside: avoid;
    box-shadow: none;
  }
}

/* Paired model controls and three-tier disclosure surface */
.global-preset-row,
.group-preset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.global-preset-row {
  padding: 0 28px 10px;
}

.global-preset-row button,
.group-preset-row button {
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 750;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease, transform 160ms ease;
}

.global-preset-row button:hover,
.group-preset-row button:hover {
  border-color: var(--line-strong);
  background: var(--surface-hover);
  color: var(--ink);
}

.global-preset-row button:active,
.group-preset-row button:active {
  transform: translateY(1px);
}

.preset-status {
  min-height: 18px;
  margin: 0;
  padding: 0 28px 12px;
  color: var(--buy-dark);
  font-size: 10px;
  font-weight: 700;
}

.tier-one {
  display: grid;
  gap: 20px;
}

.tier-one .form-section-heading {
  margin-bottom: 0;
}

.control-kind-group {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.control-kind-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.control-kind-heading h4 {
  margin: 5px 0 0;
  color: var(--ink);
  font-family: var(--display);
  font-size: 20px;
  font-weight: 550;
  letter-spacing: -0.025em;
}

.control-kind-heading small {
  max-width: 150px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.4;
  text-align: right;
}

.slider-field-grid {
  align-items: start;
  gap: 14px 16px;
}

.model-control {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.model-control .field {
  gap: 4px;
  min-width: 0;
}

.model-control .field > .field-label {
  display: flex;
  min-height: 28px;
  align-items: center;
  line-height: 1.3;
}

.model-control .input-shell {
  min-height: 41px;
  border-radius: 10px;
}

.model-control .input-shell input {
  height: 39px;
  font-size: 13px;
}

.paired-slider {
  display: grid;
  order: 2;
  gap: 0;
  min-width: 0;
  padding-top: 0;
}

.slider-track-stack {
  position: relative;
  min-width: 0;
  padding: 0 1px;
}

.model-range,
.range-input.model-range {
  display: block;
  width: 100%;
  height: 24px;
  margin: 0;
  padding: 0;
  appearance: none;
  background: transparent;
}

.model-range::-webkit-slider-runnable-track {
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--buy) 0 var(--range-progress, 0%), var(--track-bg) var(--range-progress, 0%) 100%);
}

.model-range::-moz-range-track {
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--buy) 0 var(--range-progress, 0%), var(--track-bg) var(--range-progress, 0%) 100%);
}

.model-range::-webkit-slider-thumb {
  width: 18px;
  height: 18px;
  margin-top: -6px;
  appearance: none;
  border: 3px solid var(--surface);
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 0 0 1px var(--ink), var(--thumb-shadow);
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.model-range::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border: 3px solid var(--surface);
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 0 0 1px var(--ink), var(--thumb-shadow);
}

.model-range:hover::-webkit-slider-thumb,
.model-range:focus-visible::-webkit-slider-thumb {
  transform: scale(1.14);
}

.model-range:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 5px;
}

.model-range.is-outside-range {
  opacity: 0.55;
}

.model-range.is-outside-range::-webkit-slider-runnable-track,
.model-range.is-outside-range::-moz-range-track {
  background: var(--track-bg);
}

.range-scale {
  margin-top: 0;
  font-size: 9px;
  font-weight: 700;
}

.costs-timing-disclosure,
.costs-timing-disclosure > summary,
.diligence-disclosure,
.diligence-disclosure > summary {
  border-top: 1px solid var(--line);
}

.costs-timing-disclosure,
.diligence-disclosure {
  background: var(--surface-soft);
}

.costs-timing-disclosure > summary,
.diligence-disclosure > summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  min-height: 72px;
  padding: 15px 28px;
  list-style: none;
  transition: background 180ms ease;
}

.costs-timing-disclosure > summary::-webkit-details-marker,
.diligence-disclosure > summary::-webkit-details-marker {
  display: none;
}

.costs-timing-disclosure > summary:hover,
.diligence-disclosure > summary:hover {
  background: var(--surface-hover-wash);
}

.costs-timing-disclosure > summary > span:first-child,
.diligence-disclosure > summary > span:first-child {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.costs-timing-disclosure > summary strong,
.diligence-disclosure > summary strong {
  color: var(--ink);
  font-size: 13px;
}

.costs-timing-disclosure > summary small,
.diligence-disclosure > summary small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.costs-timing-content {
  display: grid;
  gap: 18px;
  padding: 4px 28px 28px;
}

.diligence-content {
  display: grid;
  gap: 18px;
  padding: 4px 28px 28px;
}

.diligence-takeaways {
  display: grid;
  gap: 10px;
}

.diligence-takeaways article {
  display: grid;
  gap: 7px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-nested);
}

.diligence-takeaways article strong {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.35;
}

.diligence-takeaways article p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.diligence-field-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.diligence-result {
  display: grid;
  gap: 13px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-nested);
}

.diligence-result > div {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
}

.diligence-result > div strong {
  font-size: 12px;
}

#diligence-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.diligence-item {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 10px;
  border: 1px solid var(--line);
  border-left-width: 3px;
  border-radius: 9px;
  background: var(--paper);
}

.diligence-item.status-open {
  border-left-color: var(--warning);
}

.diligence-item.status-review {
  border-left-color: var(--critical);
}

.diligence-item.status-clear {
  border-left-color: var(--buy);
}

.diligence-item.status-context {
  border-left-color: var(--accent);
}

.diligence-status {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.diligence-item > span:last-child {
  display: grid;
  gap: 3px;
}

.diligence-item strong {
  font-size: 12px;
}

.diligence-item > span:last-child > span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.advanced-settings-content .form-disclosure > summary {
  grid-template-columns: minmax(0, 1fr) auto auto;
  min-height: 66px;
  padding: 13px 20px;
}

.advanced-settings-content .disclosure-content {
  padding: 3px 20px 22px;
}

.advanced-settings-content .slider-field-grid {
  gap: 14px 16px;
}

.edited-badge {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  padding: 0 8px;
  border: 1px solid var(--warning-border);
  border-radius: 999px;
  background: var(--warning-pale);
  color: var(--warning-text);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.05em;
}

.edited-badge[hidden] {
  display: none !important;
}

.group-preset-row {
  justify-content: flex-end;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--line);
}

.group-preset-row button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.switch-row {
  min-height: 54px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-nested);
}

@media (max-width: 900px) {
  body {
    padding-bottom: calc(76px + env(safe-area-inset-bottom));
  }

  .mobile-result-dock {
    bottom: calc(12px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 760px) {
  .control-kind-heading {
    display: grid;
    gap: 5px;
  }

  .control-kind-heading small {
    max-width: none;
    text-align: left;
  }

  .costs-timing-disclosure > summary,
  .diligence-disclosure > summary {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .costs-timing-disclosure > summary .advanced-count,
  .diligence-disclosure > summary .advanced-count {
    display: none;
  }

  .financing-comparison-grid,
  .diligence-field-grid {
    grid-template-columns: 1fr;
  }

  .advanced-settings-content .form-disclosure > summary {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .advanced-settings-content .form-disclosure > summary .edited-badge {
    grid-column: 2;
    grid-row: 1;
  }

  .advanced-settings-content .form-disclosure > summary .chevron {
    grid-column: 2;
    grid-row: 2;
  }
}

@media (max-width: 520px) {
  .global-preset-row,
  .preset-status {
    padding-right: 18px;
    padding-left: 18px;
  }

  .global-preset-row button {
    flex: 1 1 140px;
  }

  .costs-timing-disclosure > summary,
  .costs-timing-content,
  .diligence-disclosure > summary,
  .diligence-content {
    padding-right: 18px;
    padding-left: 18px;
  }

  .financing-strategy-card header {
    align-items: flex-start;
  }

  .financing-strategy-card header span {
    max-width: 62%;
    line-height: 1.35;
    text-align: right;
  }

  .financing-strategy-card dl > div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .financing-strategy-card dd {
    text-align: left;
  }

  .diligence-item {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .advanced-settings-content .form-disclosure > summary,
  .advanced-settings-content .disclosure-content {
    padding-right: 14px;
    padding-left: 14px;
  }

  .advanced-settings-content .form-disclosure > summary {
    min-height: 72px;
  }

  .slider-field-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .model-control {
    gap: 4px;
    padding: 9px 0;
    border-bottom: 1px solid var(--line);
  }

  .model-control:last-child {
    border-bottom: 0;
  }

  .model-control .field {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(108px, 38%);
    gap: 8px;
    align-items: center;
  }

  .model-control .field > .field-label {
    min-width: 0;
  }

  .model-control .field > .input-shell {
    min-width: 0;
  }

  .paired-slider {
    grid-column: 1 / -1;
    padding-top: 0;
  }

  .slider-track-stack {
    padding-top: 0;
  }

  .group-preset-row {
    justify-content: stretch;
  }

  .group-preset-row button {
    flex: 1 1 140px;
  }

  .switch-row {
    gap: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .model-range::-webkit-slider-thumb,
  .model-range::-moz-range-thumb {
    transition: none;
  }

  .global-preset-row button,
  .group-preset-row button {
    transition: none;
  }
}

@media print {
  .paired-slider,
  .global-preset-row,
  .group-preset-row,
  .preset-status,
  .edited-badge {
    display: none !important;
  }

  .costs-timing-disclosure,
  .diligence-disclosure,
  .advanced-settings,
  .policy-group {
    display: block;
  }

  .costs-timing-disclosure > summary,
  .diligence-disclosure > summary,
  .advanced-settings > summary,
  .policy-group > summary {
    display: none;
  }
}

/* Decision-first information architecture */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  margin: -1px;
  padding: 0;
  border: 0;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.hero {
  align-items: center;
  padding-block: 30px 24px;
}

.hero h1 {
  font-size: clamp(38px, 3.8vw, 56px);
  line-height: 1.02;
}

.hero-principles {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  border: 0;
}

.hero-principles > div {
  display: block;
  min-height: 86px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-card-glass);
}

.hero-principles p {
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.45;
}

.controls-intro {
  max-width: 310px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.preset-disclosure,
.key-assumptions-disclosure,
.advanced-settings {
  border-top: 1px solid var(--line);
}

.preset-disclosure > summary,
.key-assumptions-disclosure > summary,
.advanced-settings > summary,
.analysis-deep-dive > summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  list-style: none;
  transition: background 180ms ease, border-color 180ms ease;
}

.preset-disclosure > summary::-webkit-details-marker,
.key-assumptions-disclosure > summary::-webkit-details-marker,
.advanced-settings > summary::-webkit-details-marker,
.analysis-deep-dive > summary::-webkit-details-marker {
  display: none;
}

.preset-disclosure > summary {
  padding: 13px 28px;
  color: var(--ink-soft);
}

.preset-disclosure > summary:hover,
.key-assumptions-disclosure > summary:hover,
.advanced-settings > summary:hover,
.analysis-deep-dive > summary:hover {
  background: var(--surface-hover-wash);
}

.preset-disclosure > summary > span,
.key-assumptions-disclosure > summary > span:first-child,
.advanced-settings > summary > span:first-child,
.analysis-deep-dive > summary > span:first-child {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.preset-disclosure > summary > span {
  display: grid;
  gap: 1px;
}

.preset-disclosure summary strong,
.key-assumptions-disclosure summary strong,
.advanced-settings summary strong,
.analysis-deep-dive summary strong {
  color: var(--ink);
  font-size: 13px;
}

.preset-disclosure summary small,
.key-assumptions-disclosure summary small,
.advanced-settings summary small,
.analysis-deep-dive summary small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 550;
}

.preset-disclosure .chevron,
.key-assumptions-disclosure .chevron,
.advanced-settings .chevron,
.analysis-deep-dive .chevron {
  width: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  transition: transform 180ms ease;
}

.preset-disclosure[open] > summary .chevron,
.key-assumptions-disclosure[open] > summary .chevron,
.advanced-settings[open] > summary .chevron,
.analysis-deep-dive[open] > summary .chevron {
  transform: rotate(180deg);
}

.preset-disclosure .preset-row {
  padding-top: 4px;
}

.essentials .field-grid > .field:last-child {
  grid-column: 1 / -1;
}

.compact-form-disclosure {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--paper);
}

.compact-form-disclosure > summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-height: 54px;
  padding: 10px 13px;
  list-style: none;
}

.compact-form-disclosure > summary::-webkit-details-marker {
  display: none;
}

.compact-form-disclosure > summary > span {
  display: grid;
}

.compact-form-disclosure > summary strong {
  font-size: 12px;
}

.compact-form-disclosure > summary small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.compact-form-disclosure > summary output {
  max-width: 190px;
  color: var(--buy-dark);
  font-size: 10px;
  font-weight: 800;
  text-align: right;
}

.compact-disclosure-content {
  display: grid;
  gap: 16px;
  padding: 4px 13px 14px;
  border-top: 1px solid var(--line);
}

.financing-quickset {
  margin: 0;
  padding: 0;
  border: 0;
}

.financing-ltv-control {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
}

.financing-ltv-heading {
  display: flex;
  min-width: 0;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.financing-ltv-heading .field-label {
  min-width: 0;
  line-height: 1.35;
}

.financing-ltv-heading #mortgage-ltv-output {
  flex: none;
  color: var(--ink);
  font-size: 20px;
  font-variant-numeric: tabular-nums;
  font-weight: 850;
  line-height: 1;
}

.financing-ltv-track {
  min-width: 0;
}

.mortgage-ltv-range,
.range-input.mortgage-ltv-range {
  height: 44px;
}

.mortgage-ltv-range::-webkit-slider-thumb {
  width: 24px;
  height: 24px;
  margin-top: -9.5px;
}

.mortgage-ltv-range::-moz-range-thumb {
  width: 20px;
  height: 20px;
}

.financing-quickset .financing-ltv-summary {
  margin: 0;
  min-height: 17px;
  color: var(--ink-soft);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  font-weight: 750;
  line-height: 1.5;
  text-align: left;
}

.financing-ltv-note {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.financing-preset-label {
  display: block;
  margin-top: 14px;
}

.financing-buttons button,
.preset-button {
  min-height: 44px;
}

.key-assumptions-disclosure > summary,
.advanced-settings > summary {
  min-height: 72px;
  padding: 15px 28px;
}

.key-assumptions-disclosure {
  background: linear-gradient(135deg, var(--assumption-section-start), var(--assumption-section-end));
}

.key-assumptions-content {
  display: grid;
  gap: 18px;
  padding: 4px 28px 26px;
}

.assumption-preview {
  display: flex;
  gap: 5px;
}

.assumption-preview b,
.advanced-count,
.deep-dive-count {
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--paper-deep);
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}

.assumption-result-link,
.assumption-edit-link {
  width: max-content;
  color: var(--buy-dark);
  font-size: 11px;
  font-weight: 800;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.advanced-settings {
  background: var(--surface-muted-wash);
}

.advanced-settings-content {
  border-top: 1px solid var(--line);
}

.advanced-settings-content .form-disclosure {
  background: var(--surface-nested);
}

.stability-pill {
  width: 100%;
  margin-top: 18px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 11px;
  line-height: 1.45;
}

.stability-pill.fragile {
  border-color: var(--warning-border);
  background: var(--warning-pale);
  color: var(--warning-text-strong);
}

/* The results column is narrower than the page viewport because the controls
   remain beside it. Keep the answer and chart stacked so neither is squeezed
   into a misleadingly narrow desktop column. */
.decision-grid {
  grid-template-columns: minmax(0, 1fr);
}

.decision-summary {
  border-right: 0;
  border-bottom: 1px solid var(--line);
}

@media (min-width: 761px) {
  .decision-summary {
    grid-template-columns: minmax(170px, 0.8fr) minmax(300px, 1.2fr);
  }

  .decision-summary .verdict-copy {
    grid-column: 1 / -1;
  }

  .decision-summary .verdict-number {
    grid-column: 1;
    align-self: stretch;
  }

  .decision-summary .endpoint-comparison {
    grid-column: 2;
    align-self: stretch;
  }
}

.decision-thresholds {
  padding: 23px 30px 26px;
  border-top: 1px solid var(--line);
  background: var(--threshold-bg);
}

.thresholds-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.thresholds-heading h3 {
  margin: 0;
  font-family: var(--display);
  font-size: 23px;
  font-weight: 550;
  letter-spacing: -0.035em;
}

.threshold-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.threshold-grid article {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.threshold-grid span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
}

.threshold-grid strong {
  font-family: var(--display);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.threshold-grid small,
.thresholds-note {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.thresholds-note {
  margin: 12px 0 0;
}

.analysis-deep-dive {
  min-width: 0;
}

.analysis-deep-dive > summary {
  min-height: 86px;
  padding: 18px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-small);
}

.analysis-deep-dive[open] > summary {
  border-color: var(--line-strong);
}

.deep-dive-content {
  display: grid;
  min-width: 0;
  gap: 24px;
  margin-top: 24px;
}

.mobile-result-dock {
  display: none;
}

@media (max-width: 1040px) {
  .hero-principles {
    gap: 8px;
    border: 0;
  }

  .hero-principles > div {
    border: 1px solid var(--line);
  }
}

@media (max-width: 900px) {
  body {
    padding-bottom: 76px;
  }

  .mobile-result-dock {
    display: grid;
    position: fixed;
    z-index: 80;
    right: 12px;
    bottom: 12px;
    left: 12px;
    grid-template-columns: auto minmax(0, 1fr) 22px;
    gap: 10px;
    align-items: center;
    min-height: 54px;
    padding: 8px 14px;
    border: 1px solid var(--dock-border);
    border-radius: 15px;
    background: var(--dock-bg);
    color: var(--dock-text);
    box-shadow: var(--dock-shadow);
    text-decoration: none;
    backdrop-filter: blur(14px);
  }

  .mobile-result-dock span {
    color: var(--dock-muted);
    font-size: 10px;
    font-weight: 750;
    text-transform: uppercase;
  }

  .mobile-result-dock strong {
    overflow: hidden;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-result-dock svg {
    width: 20px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
  }
}

@media (max-width: 760px) {
  .hero-principles {
    grid-template-columns: 1fr;
  }

  .hero-principles > div {
    min-height: 0;
  }

  .horizon-buttons {
    grid-template-columns: repeat(5, 1fr);
  }

  .thresholds-heading {
    display: grid;
  }

  .threshold-grid {
    grid-template-columns: 1fr;
  }

  .preset-disclosure > summary,
  .key-assumptions-disclosure > summary,
  .advanced-settings > summary,
  .analysis-deep-dive > summary {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .assumption-preview,
  .advanced-count,
  .deep-dive-count {
    display: none;
  }
}

@media (max-width: 520px) {
  .hero-principles {
    display: none;
  }

  .preset-disclosure > summary,
  .key-assumptions-disclosure > summary,
  .advanced-settings > summary,
  .key-assumptions-content {
    padding-right: 18px;
    padding-left: 18px;
  }

  .decision-thresholds {
    padding: 20px 18px 22px;
  }

  .compact-form-disclosure > summary {
    grid-template-columns: 1fr;
  }

  .compact-form-disclosure > summary output {
    max-width: none;
    text-align: left;
  }
}

@media (max-width: 360px) {
  #reset-button {
    width: 42px;
    min-width: 42px;
    padding-inline: 0;
    font-size: 0;
  }

  #reset-button svg {
    width: 18px;
  }
}

@media print {
  .analysis-deep-dive > summary,
  .mobile-result-dock {
    display: none !important;
  }

  .analysis-deep-dive > .deep-dive-content {
    display: grid !important;
  }
}
