:root {
  --bg: #f6f7f5;
  --surface: #fffefb;
  --surface-2: #f7f9f2;
  --soft: #f1f4ee;
  --line: #d8d9d2;
  --line-soft: #e8e9e2;
  --ink: #3E3F3C;
  --muted: #615B56;
  --subtle: #7d7771;
  --navy: #050E3D;
  --cyan: #05C3F9;
  --green: #719F13;
  --green-dark: #4f730b;
  --green-soft: #edf5dd;
  --blue: #05C3F9;
  --amber: #a26a19;
  --amber-soft: #fff1d6;
  --red: #a6372e;
  --red-soft: #fff0ec;
  --radius: 8px;
  --shadow: 0 22px 55px rgba(5, 14, 61, .11);
  --shadow-soft: 0 10px 30px rgba(5, 14, 61, .07);
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background:
    linear-gradient(90deg, rgba(5, 195, 249, .08) 0 1px, transparent 1px) 0 0 / 46px 46px,
    linear-gradient(180deg, #fbfcfb 0%, var(--bg) 45%, #eef2e9 100%);
  color: var(--ink);
  line-height: 1.35;
}
button, input, select { font: inherit; }
button { border: 0; }
h1, h2, p, span, strong, small, button, label { overflow-wrap: break-word; }

.shell { min-height: 100vh; display: grid; grid-template-columns: 168px minmax(0, 1fr); }
.dashboard-shell { grid-template-columns: 168px minmax(260px, 306px) minmax(0, 1fr); }
.everything-shell {
  grid-template-columns: 168px minmax(270px, 320px) minmax(0, 1fr);
  grid-template-areas:
    "rail inputs main";
}
.rail {
  position: sticky;
  top: 0;
  z-index: 10;
  height: 100vh;
  padding: 18px 12px;
  border-right: 1px solid rgba(255,255,255,.1);
  background: linear-gradient(180deg, var(--navy) 0%, #020725 100%);
  color: rgba(255,255,255,.9);
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 12px 0 35px rgba(5, 14, 61, .22);
}
.brand-lockup { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 2px 6px 18px; border-bottom: 1px solid rgba(255,255,255,.12); }
.brand-lockup > div:last-child { display: grid; gap: 1px; min-width: 0; }
.brand-lockup strong { font-size: 18px; letter-spacing: .04em; line-height: 1; }
.brand-lockup span { max-width: 86px; color: rgba(255,255,255,.58); font-size: 8px; font-weight: 800; line-height: 1.15; letter-spacing: .08em; text-transform: uppercase; }
.brand { width: 34px; height: 34px; display: block; flex: 0 0 34px; border-radius: 8px; box-shadow: 0 10px 22px rgba(0,0,0,.18); }
.nav-group { display: grid; gap: 7px; }
.nav {
  width: 100%;
  min-height: 38px;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  border-radius: 7px;
  background: transparent;
  color: rgba(255,255,255,.72);
  cursor: pointer;
  position: relative;
  font-size: 13px;
  text-align: left;
  padding: 0 10px;
}
.nav b { display: grid; place-items: center; width: 22px; height: 22px; font-size: 13px; font-weight: 850; color: rgba(255,255,255,.72); }
.nav span { font-size: 12px; font-weight: 750; white-space: normal; opacity: 1; pointer-events: auto; position: static; background: transparent; color: inherit; padding: 0; border-radius: 0; }
.nav:hover { background: rgba(5,195,249,.12); color: #fff; }
.nav.active { background: rgba(5,195,249,.16); color: #fff; box-shadow: inset 3px 0 0 var(--cyan); }
.rail-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.12); }
.nav.ghost { color: rgba(255,255,255,.62); }
.everything-shell .rail { grid-area: rail; }

.page-main, .main { min-width: 0; padding: 28px 32px; }
.inputs { position: sticky; top: 0; z-index: 40; height: 100vh; overflow: visible auto; border-right: 1px solid var(--line); background: rgba(255,254,250,.88); backdrop-filter: blur(14px); padding: 18px; }
.everything-shell .inputs {
  grid-area: inputs;
  top: 0;
  height: 100vh;
  background: rgba(255,254,250,.9);
  border-right: 1px solid var(--line);
  box-shadow: 8px 0 24px rgba(55, 45, 28, .04);
}
.everything-shell .main {
  grid-area: main;
  padding: 28px 32px 36px;
  background: transparent;
}
.pane-head { display: flex; justify-content: space-between; align-items: start; gap: 12px; padding-bottom: 12px; }
.pane-head h1 { margin: 0; font-size: 15px; }
.pane-head span, .fine-print { color: var(--muted); font-size: 12px; }
.text-btn { color: var(--navy); background: transparent; font-size: 12px; font-weight: 800; cursor: pointer; }

.input-section { border-top: 1px solid var(--line-soft); padding: 12px 0; }
.input-section summary, .section-title { color: var(--ink); font-size: 11px; font-weight: 850; letter-spacing: .02em; text-transform: uppercase; margin-bottom: 8px; cursor: pointer; }
.input-section summary span { float: right; color: var(--subtle); font-weight: 760; }
.field { min-height: 32px; display: grid; grid-template-columns: minmax(108px, 1fr) minmax(116px, 128px); align-items: center; gap: 8px; margin: 6px 0; color: var(--ink); font-size: 12px; font-weight: 640; }
.field > span { min-width: 0; display: inline-flex; align-items: center; gap: 6px; line-height: 1.2; }
.field b { height: 30px; display: grid; grid-template-columns: 1fr auto; border: 1px solid var(--line); background: var(--soft); border-radius: 6px; overflow: hidden; font-weight: 680; }
.field input, .field select { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; padding: 0 8px; color: var(--ink); font-size: 12px; font-weight: 680; text-align: right; }
.field select { text-align: left; border: 1px solid var(--line); background: var(--soft); border-radius: 6px; height: 30px; }
.field em { display: grid; place-items: center; min-width: 35px; border-left: 1px solid var(--line); background: white; color: var(--subtle); font-style: normal; font-size: 11px; }
.field.check { display: flex; justify-content: space-between; }
.field.check input { width: 38px; height: 20px; accent-color: var(--green); }

.home-grid, .properties-page, .everything-page { max-width: 1220px; margin: 0 auto; display: grid; gap: 16px; }
.home-grid { grid-template-columns: minmax(0, 1.4fr) minmax(280px, .6fr); }
.hero, .page-header { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 420px); gap: 24px; align-items: stretch; padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(120deg, #fff 0%, #fff 56%, rgba(5,195,249,.08) 100%); box-shadow: var(--shadow); }
.page-header {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  padding: 8px 0 4px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.kicker { margin: 0 0 8px; color: var(--green-dark); font-size: 12px; font-weight: 850; letter-spacing: .03em; text-transform: uppercase; }
h1 { margin: 0; font-size: clamp(34px, 4.4vw, 54px); line-height: 1; max-width: 760px; }
.page-header h1 {
  max-width: 700px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(34px, 4.7vw, 50px);
  font-weight: 500;
  letter-spacing: 0;
  line-height: .98;
}
.lede, .page-header p { margin: 12px 0 0; max-width: 620px; color: var(--muted); font-size: 15px; font-weight: 610; line-height: 1.55; }
.hero-card { display: grid; align-content: space-between; gap: 18px; border: 1px solid rgba(5,195,249,.25); background: rgba(255,255,255,.82); border-radius: var(--radius); padding: 20px; }
.hero-card strong { font-size: 18px; }
.hero-card span { color: var(--muted); font-size: 13px; }
.mini-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mini-kpis div, .summary-card, .metric, .mini-card { border: 1px solid var(--line-soft); border-radius: 8px; background: var(--surface); padding: 11px; min-width: 0; }
.mini-kpis span, .summary-card span, .metric span, .mini-card span { display: block; color: var(--muted); font-size: 11px; font-weight: 730; }
.mini-kpis strong, .summary-card strong, .metric strong, .mini-card strong { display: block; margin: 4px 0 2px; font-size: 18px; line-height: 1; }
.good strong, .good-text, .pos { color: var(--green-dark) !important; }
.warn strong { color: var(--amber) !important; }
.bad strong, .bad-text, .neg { color: var(--red) !important; }

.panel { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255,254,250,.94); box-shadow: var(--shadow-soft); overflow: hidden; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 18px 20px 12px; }
.panel-head h2 { margin: 0; font-size: 16px; font-weight: 700; font-family: Georgia, "Times New Roman", serif; text-transform: none; letter-spacing: 0; }
.panel-head span { color: var(--subtle); font-size: 12px; font-weight: 680; }
.quick-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 0 16px 16px; }
.quick-form label { display: grid; gap: 6px; color: var(--ink); font-size: 12px; font-weight: 720; }
.quick-form input { height: 38px; border: 1px solid var(--line); border-radius: 6px; background: var(--soft); padding: 0 10px; color: var(--ink); font-size: 13px; font-weight: 680; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; padding: 0 20px 20px; }
.btn {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  padding: 0 15px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(255,255,255,.72) inset;
}
.btn:hover { border-color: var(--cyan); background: #fff; }
.btn.primary { border-color: var(--navy); background: linear-gradient(180deg, var(--navy) 0%, #020725 100%); color: white; box-shadow: 0 10px 24px rgba(5, 14, 61, .22); }
.side-stack { display: grid; gap: 14px; }
.note-panel { padding: 16px; }
.note-panel h2 { margin: 0 0 12px; font-size: 14px; text-transform: uppercase; }
.note-panel p { margin: 10px 0; color: var(--muted); font-size: 13px; font-weight: 620; }

.guided-page, .result-page { width: 100%; max-width: 1180px; min-width: 0; margin: 0 auto; display: grid; gap: 18px; }
.guided-page.narrow { max-width: 760px; }
.guided-hero { min-width: 0; min-height: 220px; display: grid; align-items: end; padding: 34px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.guided-hero h1 { max-width: 780px; font-size: clamp(38px, 5vw, 64px); line-height: .98; }
.editorial-page-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 22px;
  min-width: 0;
  padding: 8px 0 4px;
}
.editorial-page-head h1 {
  max-width: 660px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(34px, 4.7vw, 50px);
  font-weight: 500;
  letter-spacing: 0;
  line-height: .98;
}
.editorial-page-head .lede { max-width: 560px; margin-top: 10px; font-size: 14px; }
.page-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; padding-top: 6px; }
.guided-workspace { display: grid; grid-template-columns: minmax(360px, .92fr) minmax(460px, 1.08fr); gap: 18px; align-items: start; }
.guided-header { display: flex; justify-content: space-between; align-items: center; gap: 14px; color: var(--muted); font-size: 13px; font-weight: 760; }
.choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.choice-card { min-width: 0; min-height: 210px; display: grid; align-content: start; gap: 14px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); text-align: left; cursor: pointer; box-shadow: 0 5px 24px rgba(32,35,31,.04); transition: border-color 140ms ease, transform 140ms ease, box-shadow 140ms ease; }
.choice-card:hover { border-color: var(--cyan); transform: translateY(-2px); box-shadow: var(--shadow); }
.choice-card span { width: fit-content; border-radius: 999px; background: var(--green-soft); color: var(--green-dark); padding: 5px 8px; font-size: 11px; font-weight: 850; }
.choice-card strong { max-width: 320px; font-size: 29px; line-height: 1.02; }
.choice-card small { max-width: 420px; color: var(--muted); font-size: 14px; line-height: 1.45; font-weight: 650; }
.formula-note { min-width: 0; display: grid; gap: 6px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255,254,250,.76); color: var(--muted); font-size: 13px; font-weight: 650; }
.formula-note strong { color: var(--ink); font-size: 14px; }
.formula-note small { color: var(--subtle); font-size: 12px; font-weight: 660; }
.formula-note.compact { background: var(--soft); }

.guided-form-panel { overflow: visible; }
.guided-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding: 0 20px 18px; }
.guided-form label { display: grid; gap: 7px; color: var(--ink); font-size: 12px; font-weight: 760; }
.guided-form label > span,
.scenario-input-card label > span,
.guided-detail-grid label > span {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  line-height: 1.2;
}
.guided-form input { height: 44px; border: 1px solid var(--line); border-radius: 6px; background: #fff; padding: 0 12px; color: var(--ink); font-size: 14px; font-weight: 730; }
.guided-form label:first-child { grid-column: 1 / -1; }
.guided-form-panel .actions { padding: 0 20px 20px; }
.scenario-input-grid { display: grid; grid-template-columns: 1fr; gap: 12px; padding: 0 20px 18px; }
.scenario-input-card { min-width: 0; display: grid; align-content: start; gap: 12px; padding: 16px; border: 1px solid var(--line-soft); border-radius: var(--radius); background: var(--surface-2); }
.scenario-input-card:nth-child(2) { background: var(--green-soft); }
.scenario-card-head { display: grid; gap: 5px; padding-bottom: 4px; }
.scenario-card-head span { width: fit-content; border-radius: 4px; background: var(--green-soft); color: var(--green-dark); padding: 4px 8px; font-size: 10px; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; }
.scenario-card-head h3 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 21px; font-weight: 600; line-height: 1.08; }
.scenario-card-head p { margin: 0; color: var(--muted); font-size: 13px; font-weight: 640; line-height: 1.45; }
.scenario-input-card label { display: grid; gap: 7px; color: var(--ink); font-size: 12px; font-weight: 760; }
.scenario-input-card input { width: 100%; height: 42px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); padding: 0 12px; color: var(--ink); font-size: 14px; font-weight: 730; }
.scenario-input-card input.calculated-input {
  border-style: dashed;
  background: var(--soft);
  color: var(--muted);
  cursor: default;
}
.guided-detail-section {
  margin: 0 20px 18px;
  padding: 16px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: #fffdf8;
}
.guided-detail-section.assumption-section { background: var(--green-soft); }
.guided-detail-section.financing-section { background: var(--green-soft); }
.guided-detail-section.advanced-tax-section { background: #fffaf0; }
.guided-detail-section.sale-tax-section { background: #fffaf5; }
.financing-off-callout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  border: 1px solid rgba(5,195,249,.24);
  border-radius: 8px;
  background: rgba(255,255,255,.72);
  padding: 12px;
}
.financing-off-callout strong,
.financing-off-callout span {
  display: block;
}
.financing-off-callout strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
}
.financing-off-callout span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
}
.financing-off-callout .btn {
  min-height: 36px;
  padding-inline: 12px;
  white-space: nowrap;
}
.detail-section-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.detail-section-head h3 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.08;
}
.detail-section-head span {
  color: var(--subtle);
  font-size: 11px;
  font-weight: 850;
  text-align: right;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.guided-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
}
.guided-detail-grid label {
  min-width: 0;
  display: grid;
  gap: 6px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 760;
}
.guided-detail-grid b {
  height: 40px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  overflow: hidden;
  font-weight: 730;
}
.guided-detail-grid input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 0 10px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 730;
}
.guided-detail-grid em {
  min-width: 54px;
  display: grid;
  place-items: center;
  border-left: 1px solid var(--line);
  background: var(--soft);
  color: var(--subtle);
  font-size: 10px;
  font-style: normal;
  font-weight: 850;
  text-transform: uppercase;
}
.guided-check b {
  grid-template-columns: auto 1fr;
  align-items: center;
  padding-left: 10px;
}
.guided-check input {
  width: 18px;
  height: 18px;
  padding: 0;
  accent-color: var(--green);
}
.guided-toggle-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 9px;
}
.guided-toggle {
  min-height: 54px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(82px, auto);
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  padding: 10px 12px;
  color: var(--ink);
  cursor: pointer;
}
.guided-toggle input {
  appearance: none;
  width: 34px;
  height: 20px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #ddd6ca;
  position: relative;
}
.guided-toggle input::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  left: 2px;
  top: 2px;
  border-radius: 999px;
  background: white;
  box-shadow: 0 1px 3px rgba(30, 25, 18, .18);
  transition: transform 140ms ease;
}
.guided-toggle input:checked {
  border-color: var(--green);
  background: var(--green);
}
.guided-toggle input:checked::after { transform: translateX(14px); }
.guided-toggle span {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.2;
  font-weight: 800;
  overflow-wrap: normal;
}
.help-bubble {
  position: relative;
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(5,195,249,.45);
  border-radius: 999px;
  background: rgba(5,195,249,.10);
  color: var(--navy);
  padding: 0;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  cursor: help;
}
.help-bubble::after {
  content: attr(data-help);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  z-index: 500;
  width: min(250px, 68vw);
  transform: translateX(-50%) translateY(4px);
  border: 1px solid rgba(5,14,61,.18);
  border-radius: 8px;
  background: var(--navy);
  box-shadow: 0 14px 30px rgba(5,14,61,.22);
  color: #fff;
  padding: 9px 10px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
  text-align: left;
  text-transform: none;
  letter-spacing: 0;
  white-space: normal;
  opacity: 0;
  pointer-events: none;
  transition: opacity 130ms ease, transform 130ms ease;
}
.help-bubble::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: calc(100% + 3px);
  z-index: 501;
  width: 9px;
  height: 9px;
  transform: translateX(-50%) rotate(45deg);
  background: var(--navy);
  opacity: 0;
  pointer-events: none;
  transition: opacity 130ms ease;
}
.help-bubble:hover,
.help-bubble:focus-visible {
  border-color: var(--cyan);
  background: rgba(5,195,249,.18);
  outline: 0;
}
.help-bubble:hover::after,
.help-bubble:focus-visible::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.help-bubble:hover::before,
.help-bubble:focus-visible::before {
  opacity: 1;
}
.inputs .help-bubble::after {
  left: calc(100% + 10px);
  top: 50%;
  bottom: auto;
  width: min(280px, calc(100vw - 360px));
  transform: translateY(-50%) translateX(-4px);
}
.inputs .help-bubble::before {
  left: calc(100% + 6px);
  top: 50%;
  bottom: auto;
  transform: translateY(-50%) rotate(45deg);
}
.inputs .help-bubble:hover::after,
.inputs .help-bubble:focus-visible::after {
  transform: translateY(-50%) translateX(0);
}
.guided-toggle b {
  border: 0;
  background: var(--soft);
  border-radius: 999px;
  min-height: 26px;
  display: grid;
  place-items: center;
  padding: 0 10px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
  text-transform: uppercase;
}
.guided-toggle.on {
  border-color: rgba(113,159,19,.34);
  background: #fbfdf8;
}
.guided-toggle.on b {
  background: var(--green-soft);
  color: var(--green-dark);
}
.snapshot-panel { position: sticky; top: 28px; }
.snapshot-table { margin: 0 20px 16px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; }
.snapshot-row { display: grid; grid-template-columns: 1.15fr 1fr 1fr; align-items: center; min-height: 48px; border-top: 1px solid var(--line-soft); }
.snapshot-row:first-child { border-top: 0; }
.snapshot-row span, .snapshot-row b { padding: 11px 13px; font-size: 12px; }
.snapshot-row span { color: var(--muted); font-weight: 750; }
.snapshot-row b { min-height: 100%; display: grid; align-items: center; border-left: 1px solid var(--line-soft); color: var(--ink); font-size: 14px; font-weight: 800; text-align: right; }
.snapshot-header { min-height: 38px; background: var(--soft); }
.snapshot-header b { color: var(--green-dark); font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: .06em; text-align: center; }
.snapshot-strong b { font-size: 18px; }
.snapshot-note { display: grid; gap: 8px; margin: 0 20px 16px; padding: 15px; border: 1px solid var(--line-soft); border-radius: var(--radius); background: var(--surface-2); }
.snapshot-note strong { font-family: Georgia, "Times New Roman", serif; font-size: 18px; font-weight: 600; }
.snapshot-note p { margin: 0; color: var(--muted); font-size: 13px; font-weight: 620; line-height: 1.55; }
.snapshot-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 0 20px 20px; }
.snapshot-actions .btn { padding: 0 8px; }
.financing-preview,
.tax-preview {
  margin: 0 20px 16px;
  padding: 15px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--green-soft);
}
.tax-preview { background: #fffaf0; }
.sale-tax-preview { background: #fffaf5; }
.financing-kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.financing-kpis div {
  min-width: 0;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  background: var(--surface);
  padding: 10px;
}
.financing-kpis span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.financing-kpis strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 18px;
  line-height: 1;
}
.guided-financing-result { padding-bottom: 16px; }
.guided-tax-result, .guided-sale-result { background: #fffdf8; }
.guided-financing-result .panel-head { padding-bottom: 8px; }
.result-financing-kpis {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 0 18px;
}
.guided-financing-result p {
  margin: 12px 18px 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.5;
}

.result-page { max-width: 1120px; }
.result-hero { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 18px; align-items: stretch; padding: 26px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.result-hero h1 { font-size: clamp(36px, 5vw, 58px); line-height: .98; }
.result-hero p { max-width: 680px; color: var(--muted); font-size: 15px; font-weight: 650; line-height: 1.55; }
.result-context { display: inline-block; margin-bottom: 10px; color: var(--muted); font-size: 12px; font-weight: 850; text-transform: uppercase; letter-spacing: .03em; }
.result-hero.strong { border-color: rgba(113,159,19,.45); background: linear-gradient(120deg, #fff 0%, #fff 64%, var(--green-soft) 100%); }
.result-hero.okay, .result-hero.caution { border-color: #e5c17e; background: linear-gradient(120deg, #fff 0%, #fff 64%, var(--amber-soft) 100%); }
.result-hero.risk { border-color: #e2a09c; background: linear-gradient(120deg, #fff 0%, #fff 64%, var(--red-soft) 100%); }
.result-hero.strong h1, .result-hero.strong .cap-card strong { color: var(--green-dark); }
.result-hero.okay h1, .result-hero.okay .cap-card strong, .result-hero.caution h1, .result-hero.caution .cap-card strong { color: var(--amber); }
.result-hero.risk h1, .result-hero.risk .cap-card strong { color: var(--red); }
.cap-card { display: grid; align-content: center; gap: 5px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255,255,255,.82); padding: 20px; }
.cap-card span, .cap-card small { color: var(--muted); font-size: 12px; font-weight: 760; }
.cap-card strong { font-size: 44px; line-height: 1; }
.result-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.result-metric { padding: 16px; }
.result-metric strong { font-size: 28px; }
.scenario-results { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.scenario-result { min-width: 0; display: grid; gap: 14px; align-content: start; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 5px 24px rgba(32,35,31,.04); }
.scenario-result.active { border-color: rgba(113,159,19,.45); box-shadow: var(--shadow); }
.scenario-result-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.scenario-result-head span { color: var(--muted); font-size: 11px; font-weight: 850; text-transform: uppercase; letter-spacing: .03em; }
.scenario-result h2 { margin: 0; font-size: clamp(34px, 5vw, 50px); line-height: .95; }
.scenario-result.strong h2 { color: var(--green-dark); }
.scenario-result.okay h2, .scenario-result.caution h2 { color: var(--amber); }
.scenario-result.risk h2 { color: var(--red); }
.scenario-result.empty { background: var(--soft); }
.scenario-result.empty h2 { font-size: 26px; line-height: 1.05; }
.scenario-kpis, .scenario-breakdown { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.scenario-result .result-metric { background: var(--soft); }
.scenario-result .result-metric strong { font-size: 24px; }
.scenario-result p { margin: 0; color: var(--muted); font-size: 13px; font-weight: 640; line-height: 1.5; }
.meaning-panel { padding: 18px; }
.meaning-panel .panel-head { padding: 0 0 12px; }
.meaning-panel p { margin: 8px 0; max-width: 860px; color: var(--muted); font-size: 14px; font-weight: 650; line-height: 1.55; }
.meaning-panel .actions { padding: 12px 0 0; }

.layer-summary { display: grid; gap: 12px; margin-bottom: 14px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 5px 24px rgba(32,35,31,.04); }
.layer-summary > div:first-child { display: grid; gap: 4px; }
.layer-summary strong { font-size: 15px; }
.layer-summary span { color: var(--muted); font-size: 13px; font-weight: 650; line-height: 1.45; }
.layer-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.layer-cards article { border: 1px solid var(--line-soft); border-radius: 8px; background: var(--soft); padding: 11px; }
.layer-cards article span, .layer-cards article small { display: block; color: var(--muted); font-size: 11px; font-weight: 730; }
.layer-cards article b { display: block; margin: 4px 0 2px; font-size: 18px; line-height: 1; }

.topbar { display: grid; grid-template-columns: minmax(260px, 1fr) auto; gap: 16px; align-items: center; margin-bottom: 16px; }
.property-chip { display: flex; align-items: center; gap: 12px; max-width: 430px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 9px 12px; }
.property-chip.large { max-width: none; background: var(--soft); }
.thumb { width: 36px; height: 36px; border-radius: 7px; border: 1px solid rgba(5,195,249,.34); background: linear-gradient(135deg, rgba(5,195,249,.18), rgba(113,159,19,.18)), linear-gradient(90deg, #b98c58 0 22%, #e3d3b8 22% 34%, #76644f 34% 55%, #d8c09a 55% 72%, #8a9ab0 72%); }
.property-chip strong, .property-chip span { display: block; }
.property-chip span { color: var(--muted); font-size: 12px; margin-top: 2px; }
.top-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; flex-wrap: wrap; }
.top-actions span { color: var(--muted); font-size: 12px; font-weight: 720; }

.metrics, .summary-row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.summary-row { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 0; }
.dashboard-grid, .properties-layout { display: grid; grid-template-columns: minmax(420px, .95fr) minmax(520px, 1.2fr); gap: 14px; align-items: start; margin-bottom: 14px; }
.dashboard-grid.lower { grid-template-columns: 1fr 1fr; }
table { width: 100%; border-collapse: collapse; }
td { border-top: 1px solid var(--line-soft); padding: 9px 12px; font-size: 12px; font-weight: 650; text-align: right; }
td:first-child { text-align: left; color: var(--ink); }
tr.total td { background: #f1f4ee; font-weight: 850; }
tr.final td { background: var(--green-soft); color: var(--green-dark); font-weight: 880; }
.projection { display: grid; grid-template-columns: repeat(10, 1fr); align-items: end; gap: 8px; padding: 10px 14px 16px; min-height: 300px; }
.projection div { display: grid; align-items: end; gap: 6px; text-align: center; }
.projection em { display: block; width: 18px; justify-self: center; border-radius: 3px 3px 0 0; background: rgba(113,159,19,.24); }
.projection span, .projection small { color: var(--muted); font-size: 10px; font-weight: 700; }
.projection b { color: var(--green-dark); font-size: 11px; }
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 0 14px 14px; }

.property-list { display: grid; gap: 10px; padding: 0 14px 14px; }
.property-card-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto auto; align-items: center; gap: 10px; width: 100%; padding: 13px; border: 1px solid var(--line-soft); border-radius: 8px; background: var(--soft); color: var(--ink); text-align: left; cursor: pointer; }
.property-card-row.selected { border-color: rgba(113,159,19,.45); background: var(--green-soft); }
.property-card-row strong, .property-card-row small { display: block; }
.property-card-row small { color: var(--muted); font-size: 11px; font-weight: 680; }
.property-card-row em { padding: 4px 7px; border-radius: 999px; background: white; color: var(--green-dark); font-size: 10px; font-style: normal; font-weight: 820; }
.property-card-row b { font-size: 12px; white-space: nowrap; }
.detail-body { display: grid; gap: 14px; padding: 0 16px 16px; }

.toast { position: fixed; right: 24px; bottom: 24px; padding: 11px 14px; border-radius: 8px; background: var(--ink); color: white; font-size: 12px; font-weight: 750; opacity: 0; transform: translateY(12px); transition: 160ms ease; }
.toast.show { opacity: 1; transform: translateY(0); }

.everything-hero { align-items: start; }
.everything-page {
  max-width: 1180px;
  gap: 18px;
}
.everything-page .page-header { border: 0; background: transparent; box-shadow: none; }
.everything-page .kicker { color: var(--green-dark); }
.everything-page h1 {
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(34px, 4.7vw, 50px);
  font-weight: 500;
  letter-spacing: 0;
  line-height: .98;
}
.everything-page .page-header p { color: var(--muted); font-weight: 610; }
.everything-summary { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.everything-summary .summary-card {
  border-color: var(--line-soft);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}
.everything-summary .summary-card strong {
  font-size: clamp(21px, 2.2vw, 28px);
  overflow-wrap: normal;
  word-break: normal;
}
.everything-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}
.everything-panel { min-height: 100%; }
.everything-panel,
.everything-page .panel {
  border-color: var(--line);
  background: rgba(255,254,250,.94);
  box-shadow: var(--shadow-soft);
}
.everything-page .panel-head {
  border-bottom: 1px solid var(--line-soft);
  padding-bottom: 14px;
}
.everything-page .panel-head h2 {
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}
.everything-panel.wide { grid-column: 1 / -1; }
.everything-table { margin-bottom: 20px; }
.option-pill-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 0 18px 18px;
}
.option-pill {
  min-width: 0;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  background: var(--soft);
  padding: 11px;
}
.option-pill.active {
  border-color: rgba(113,159,19,.34);
  background: var(--green-soft);
}
.option-pill span, .detail-rows span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.option-pill strong {
  display: block;
  margin-top: 5px;
  color: var(--ink);
  font-size: 14px;
}
.option-pill.active strong { color: var(--green-dark); }
.detail-rows {
  display: grid;
  gap: 0;
  padding: 0 18px 18px;
}
.detail-rows div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(120px, auto);
  gap: 12px;
  align-items: center;
  min-height: 39px;
  border-top: 1px solid var(--line-soft);
}
.detail-rows div:first-child { border-top: 0; }
.detail-rows strong {
  min-width: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 820;
  text-align: right;
}
.everything-card-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.everything-shell .input-section {
  border-top-color: var(--line-soft);
}
.everything-shell .input-section summary,
.everything-shell .section-title {
  color: var(--ink);
}
.everything-shell .field {
  color: var(--ink);
}
.everything-shell .field b,
.everything-shell .field select {
  border-color: var(--line);
  background: var(--soft);
}
.everything-shell .field em {
  background: #fff;
  color: var(--subtle);
}

@media (max-width: 1100px) {
  .dashboard-shell, .shell, .everything-shell { grid-template-columns: 1fr; grid-template-areas: none; }
  .rail { position: relative; height: auto; flex-direction: row; align-items: center; border-right: 0; border-bottom: 1px solid var(--line); padding: 10px 14px; }
  .everything-shell .rail { grid-area: auto; height: auto; padding: 10px 14px; }
  .brand-lockup { width: auto; padding: 0 12px 0 0; border-bottom: 0; border-right: 1px solid rgba(255,255,255,.12); }
  .brand-lockup span { max-width: 150px; }
  .brand { margin: 0; }
  .nav-group { display: flex; gap: 6px; }
  .rail-foot { margin-top: 0; margin-left: auto; padding-top: 0; border-top: 0; }
  .nav { width: auto; padding: 0 12px; grid-auto-flow: column; gap: 6px; font-size: 16px; }
  .nav span { position: static; opacity: 1; background: transparent; color: inherit; padding: 0; }
  .inputs { position: relative; height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .everything-shell .inputs {
    grid-area: auto;
    top: auto;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line-soft);
  }
  .everything-shell .main { grid-area: auto; padding: 18px; }
  .home-grid, .hero, .page-header, .dashboard-grid, .dashboard-grid.lower, .properties-layout, .topbar, .result-hero, .everything-grid, .everything-summary { grid-template-columns: 1fr; }
  .guided-workspace { grid-template-columns: 1fr; }
  .snapshot-panel { position: static; }
  .top-actions { justify-content: flex-start; }
  .layer-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .page-main, .main { padding: 16px; }
  .hero, .page-header, .guided-hero, .result-hero { padding: 18px; }
  h1 { font-size: 34px; }
  .editorial-page-head { display: grid; gap: 12px; }
  .editorial-page-head h1 { font-size: 34px; line-height: 1.02; }
  .page-actions { justify-content: flex-start; padding-top: 0; }
  .guided-hero h1 { font-size: 30px; line-height: 1.04; }
  .guided-hero .lede { font-size: 14px; line-height: 1.45; }
  .guided-header { align-items: flex-start; flex-direction: column; }
  .choice-card { min-height: 0; }
  .choice-card strong { font-size: 25px; }
  .snapshot-row { grid-template-columns: 1fr; }
  .snapshot-row b { border-left: 0; border-top: 1px solid var(--line-soft); text-align: left; }
  .snapshot-header { display: none; }
  .snapshot-actions { grid-template-columns: 1fr; }
  .financing-off-callout { grid-template-columns: 1fr; }
  .scenario-input-card { grid-template-columns: 1fr; }
  .guided-detail-grid, .guided-toggle-grid, .financing-kpis, .result-financing-kpis { grid-template-columns: 1fr; }
  .detail-section-head { display: grid; }
  .detail-section-head span { text-align: left; }
  .quick-form, .guided-form, .scenario-input-grid, .choice-grid, .metrics, .summary-row, .mini-kpis, .card-grid, .result-grid, .scenario-results, .scenario-kpis, .scenario-breakdown, .layer-cards, .option-pill-grid, .everything-card-grid { grid-template-columns: 1fr; }
  .field { grid-template-columns: 1fr; }
  .detail-rows div { grid-template-columns: 1fr; gap: 2px; padding: 9px 0; }
  .detail-rows strong { text-align: left; }
  .property-card-row { grid-template-columns: 1fr; }
  .projection { grid-template-columns: repeat(5, 1fr); }
  .cap-card strong { font-size: 36px; }
}

@media (max-width: 520px) {
  html, body, #app { width: 100vw; max-width: 100vw; overflow-x: hidden; }
  .shell { width: min(390px, 100vw); max-width: 100vw; grid-template-columns: minmax(0, min(390px, 100vw)); overflow-x: hidden; }
  .page-main, .main { width: min(390px, 100vw); max-width: 100vw; overflow-x: hidden; }
  .guided-page, .result-page, .properties-page, .everything-page { width: calc(min(390px, 100vw) - 32px); max-width: calc(min(390px, 100vw) - 32px); }
  .guided-hero, .choice-card, .scenario-input-card, .scenario-result, .formula-note, .panel { max-width: 100%; }
  .rail { width: min(390px, 100vw); max-width: 100vw; justify-content: space-between; gap: 4px; }
  .brand-lockup { padding-right: 0; border-right: 0; }
  .brand-lockup > div:last-child, .rail-foot { display: none; }
  .brand { margin: 0; }
  .nav { width: 44px; padding: 0; }
  .nav span { display: none; }
}

@media print {
  .rail, .inputs, .top-actions, .toast { display: none; }
  .dashboard-shell { display: block; }
  body { background: white; }
}
