:root {
  color-scheme: light;
  --ink: #192b3b;
  --muted: #586a7a;
  --line: #dce4ea;
  --surface: #f4f7fa;
  --blue: #165d96;
  --red: #dc343a;
  --positive: #146149;
  --negative: #a62e39;
  font-family:
    Inter,
    system-ui,
    -apple-system,
    sans-serif;
  color: var(--ink);
  background: #fff;
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-size: 1rem;
  line-height: 1.5;
}
a {
  color: var(--blue);
  text-underline-offset: 3px;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid #72b7e9;
  outline-offset: 3px;
}
button:disabled,
input:disabled,
select:disabled {
  cursor: default;
}
.shell {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 40px;
}
.site-header {
  border-bottom: 1px solid var(--line);
}
.header-inner {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.brand-mark {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.11em;
  padding-right: 3px;
}
.brand-mark b {
  color: var(--red);
}
nav {
  display: flex;
  gap: 28px;
  font-size: 0.875rem;
}
nav a {
  color: var(--muted);
  text-decoration: none;
}
nav a:hover {
  color: var(--blue);
}
nav .nav-plus { color: var(--positive); font-weight: 600; white-space: nowrap; }
.preview-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding: 12px 0;
  margin-top: 14px;
  border-bottom: 1px solid var(--line);
  font-size: 0.75rem;
  color: var(--muted);
}
.preview-controls label { margin: 0; font-size: inherit; }
.preview-controls select { padding: 5px 8px; border: 1px solid #bdcad5; border-radius: 4px; background: white; color: var(--ink); }
@media (max-width: 650px) {
  .header-inner { flex-wrap: wrap; padding-top: 14px; padding-bottom: 14px; gap: 12px; }
  .header-inner nav { flex-wrap: wrap; gap: 12px 20px; }
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 36px 0 32px;
}
.eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  margin: 0 0 10px;
  color: var(--blue);
}
h1 {
  font-size: clamp(1.65rem, 2.4vw, 2.15rem);
  line-height: 1.2;
  letter-spacing: -0.045em;
  margin: 0;
}
h2 {
  font-size: 1rem;
  line-height: 1.4;
  margin: 0;
  font-weight: 700;
}
h3 {
  font-size: 0.95rem;
  line-height: 1.4;
  margin: 0;
}
p {
  margin: 0;
}
.intro {
  color: var(--muted);
  margin-top: 10px;
}
.free-label {
  font-size: 0.8125rem;
  font-weight: 600;
  background: #eaf2f8;
  padding: 7px 12px;
  border-radius: 5px;
  color: var(--blue);
  white-space: nowrap;
}
.calculator-layout {
  display: grid;
  grid-template-columns: minmax(330px, 420px) minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}
form {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 24px;
}
.form-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}
.text-button {
  font-size: 0.8125rem;
  color: var(--blue);
  border: 0;
  background: none;
  padding: 8px 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.form-note {
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--muted);
}
fieldset {
  border: 0;
  border-top: 1px solid var(--line);
  padding: 22px 0 0;
  margin: 26px 0 0;
  min-width: 0;
}
legend {
  font-weight: 600;
  font-size: 0.9375rem;
  padding-right: 12px;
}
.section-number {
  font-size: 0.75rem;
  color: var(--blue);
  margin-right: 9px;
}
.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 14px;
}
.field {
  min-width: 0;
  container-type: inline-size;
}
.field-wide {
  grid-column: 1/-1;
}
label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 7px;
}
.field-label {
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  gap: 6px;
  margin-bottom: 7px;
}
.field-label label {
  margin-bottom: 0;
}
.help-toggle {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  padding: 0;
  border: 1px solid #bdcad5;
  border-radius: 50%;
  background: transparent;
  color: var(--blue);
  font-size: 0.625rem;
  font-weight: 600;
  line-height: 14px;
  position: relative;
}
.help-toggle::after {
  content: "";
  position: absolute;
  inset: -4px;
}
.help-toggle:hover,
.help-toggle[aria-expanded="true"] {
  background: #e3eef6;
  border-color: var(--blue);
}
.field-help {
  font-size: 0.8125rem;
  line-height: 1.65;
  color: var(--muted);
  margin-top: 10px;
  padding: 10px 12px;
  border-left: 2px solid #b7d8c4;
  background: #eaf4ee;
  overflow-wrap: anywhere;
}
.stress-panel {
  border-top: 3px solid #6a9e83;
}
.plus-label {
  color: var(--positive);
  background: #eaf4ee;
  border: 1px solid #b7d8c4;
  border-radius: 4px;
  padding: 3px 7px;
  font-size: 0.625rem;
  letter-spacing: 0.08em;
  font-weight: 700;
  flex-shrink: 0;
}
.stress-controls {
  display: grid;
  gap: 16px;
  margin: 22px 0;
}
.stress-controls label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.stress-controls output {
  color: var(--positive);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  white-space: nowrap;
}
.stress-controls input[type="range"] {
  display: block;
  width: 100%;
  height: 22px;
  padding: 0;
  margin: 0;
  accent-color: var(--positive);
}
.stress-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 20px;
  padding: 16px;
  background: #eaf4ee;
  border-radius: 5px;
}
.stress-metrics span {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
}
.stress-metrics strong {
  display: block;
  margin-top: 6px;
  font-size: 1.125rem;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}
.stress-loss { color: var(--negative); }
.stress-combined-row { background: #eaf4ee; font-weight: 600; }
.stress-upgrade { background: #eaf4ee; padding: 18px; border-radius: 5px; }
.stress-upgrade h4 { margin: 0 0 10px; }
.stress-upgrade p { font-size: 0.875rem; }
@media (max-width: 440px) {
  .stress-metrics { grid-template-columns: 1fr; }
}
.input-wrap {
  display: flex;
  align-items: center;
  background: #fff;
  border: 1px solid #bdcad5;
  border-radius: 5px;
  min-height: 44px;
  overflow: hidden;
}
.input-wrap:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 2px #165d9614;
}
input {
  flex: 1 1 0%;
  width: 0;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 10px;
  font-size: 1rem;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  outline: none !important;
}
.input-unit {
  font-size: 0.875rem;
  color: var(--muted);
  padding-right: 10px;
  white-space: nowrap;
}
select {
  border: 0;
  border-left: 1px solid var(--line);
  appearance: none;
  background: #f8fafc
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%23586a7a' stroke-width='1.5'/%3E%3C/svg%3E")
    no-repeat right 10px center;
  padding: 7px 28px 7px 10px;
  font-size: 0.875rem;
  color: var(--muted);
  width: 8.75em;
  max-width: none;
  height: 42px;
  flex-shrink: 0;
}
@container (max-width: 230px) {
  .input-wrap:has(select) {
    flex-direction: column;
    align-items: stretch;
  }
  .input-wrap:has(select) input {
    flex: none;
    width: 100%;
  }
  .input-wrap select {
    width: 100%;
    border-left: 0;
    border-top: 1px solid var(--line);
    height: 36px;
  }
}
input[aria-invalid="true"] {
  box-shadow: inset 0 0 0 1px var(--negative);
  background: #fff4f4;
}
input:disabled {
  color: #687886;
  background: #eef1f4;
}
.field-hint,
.field-error {
  display: block;
  font-size: 0.75rem;
  line-height: 1.5;
  margin-top: 5px;
}
.field-hint:empty,
.field-error:empty {
  display: none;
}
.field-hint {
  color: var(--muted);
}
.field-error {
  color: var(--negative);
}
.loan-summary {
  display: grid;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
  margin-top: 22px;
  font-size: 0.8125rem;
  color: var(--muted);
}
.loan-summary span {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.loan-summary strong {
  color: var(--ink);
  font-weight: 600;
}
.results-heading {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin: 0 0 16px;
}
.results-heading > span,
.panel-heading > span {
  font-size: 0.8125rem;
  color: var(--muted);
}
.summary-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr;
  gap: 12px;
}
.metric {
  padding: 19px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  min-width: 0;
}
.metric-primary {
  background: #eaf3f7;
  border-color: #c5dbe8;
}
.metric h3 {
  font-size: 0.875rem;
  color: #415969;
  font-weight: 500;
  min-height: 2.6em;
}
.metric-value {
  font-size: clamp(1.4rem, 2.2vw, 1.9rem);
  font-weight: 600;
  letter-spacing: -0.045em;
  margin: 7px 0 8px;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.metric > span {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.5;
}
.negative {
  color: var(--negative);
}
.positive {
  color: var(--positive);
}
.result-panel {
  margin-top: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
}
.panel-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.breakdown {
  margin: 0;
}
.breakdown > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  padding: 8px 0;
  font-size: 0.875rem;
}
.breakdown dt {
  color: var(--muted);
}
.breakdown dd {
  margin: 0;
  font-variant-numeric: tabular-nums;
}
.breakdown .subtotal {
  border-top: 1px solid var(--line);
  margin-top: 7px;
  padding-top: 14px;
}
.breakdown .total {
  border-top: 1px solid var(--line);
  margin-top: 9px;
  padding-top: 15px;
  font-weight: 700;
}
.breakdown .total dt {
  color: var(--ink);
}
.table-scroll {
  overflow: auto;
  margin: 18px -4px 12px;
  padding: 0 4px;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
th {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.75rem;
  padding: 10px 9px;
  border-bottom: 1px solid var(--line);
}
td {
  padding: 12px 9px;
  border-bottom: 1px solid #edf1f4;
}
th:first-child,
td:first-child {
  text-align: left;
}
tbody tr:last-child td {
  border-bottom: 0;
}
.chart {
  position: relative;
  width: 100%;
  min-height: 180px;
}
.chart-tooltip {
  position: absolute;
  z-index: 2;
  top: 12px;
  width: 196px;
  max-width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 3px 12px #192b3b14;
  font-size: 0.75rem;
  line-height: 1.6;
  pointer-events: none;
}
.chart-tooltip strong {
  display: block;
  color: var(--ink);
}
.chart-tooltip span {
  display: block;
  color: var(--muted);
}
.chart-hit {
  cursor: crosshair;
}
.chart-hit:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}
.chart svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}
.chart text {
  font-family: Inter, system-ui, sans-serif;
  fill: var(--muted);
  font-size: 12px;
}
.definition-list {
  font-size: 0.875rem;
  margin: 16px 0 20px;
}
.definition-list > div {
  margin: 0 0 16px;
}
.definition-list dt {
  font-weight: 600;
  margin-bottom: 4px;
}
.definition-list dd {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}
.definition-list strong {
  font-weight: 500;
  color: var(--ink);
}
.source-link {
  font-size: 0.875rem;
}
.notice {
  padding: 16px;
  background: #fff5e8;
  border: 1px solid #e9d4b7;
  border-radius: 6px;
  font-size: 0.875rem;
  line-height: 1.6;
  margin: 16px 0;
}
.site-footer {
  margin-top: 56px;
  padding-top: 24px;
  padding-bottom: 32px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 24px;
  color: var(--muted);
  font-size: 0.8125rem;
}
.site-footer p {
  flex: 1;
}
.site-footer > a:last-child {
  margin-left: auto;
  color: var(--muted);
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: absolute;
  top: -80px;
  left: 20px;
  background: #fff;
  padding: 12px;
  z-index: 5;
}
.skip-link:focus {
  top: 10px;
}
[hidden] {
  display: none !important;
}
fieldset > .form-note {
  margin-top: 16px;
}
@media (max-width: 1100px) {
  .shell {
    padding-left: 24px;
    padding-right: 24px;
  }
  .calculator-layout {
    gap: 24px;
    grid-template-columns: minmax(320px, 365px) minmax(0, 1fr);
  }
  .summary-grid {
    grid-template-columns: 1fr 1fr;
  }
  .metric-primary {
    grid-column: 1/-1;
  }
  .metric h3 {
    min-height: 0;
  }
  .metric-primary .metric-value {
    font-size: 2rem;
  }
  .result-panel {
    padding: 20px;
  }
  .metric {
    padding: 16px;
  }
}
@media (max-width: 780px) {
  .shell {
    padding-left: 20px;
    padding-right: 20px;
  }
  .header-inner {
    min-height: 66px;
  }
  .page-heading {
    padding: 26px 0;
    align-items: start;
  }
  .free-label {
    display: none;
  }
  .calculator-layout {
    display: flex;
    flex-direction: column;
    gap: 28px;
  }
  .calculator-layout > form,
  .calculator-layout > .results {
    width: 100%;
  }
  form {
    padding: 20px;
  }
  .summary-grid {
    grid-template-columns: 1fr 1fr 1fr;
  }
  .metric-primary {
    grid-column: auto;
  }
  .metric-primary .metric-value,
  .metric-value {
    font-size: 1.4rem;
  }
  .metric h3 {
    min-height: 2.6em;
  }
  .site-footer {
    flex-wrap: wrap;
    gap: 14px;
  }
  .site-footer p {
    flex-basis: 100%;
    order: 3;
  }
  nav {
    gap: 18px;
  }
  .panel-heading {
    flex-wrap: wrap;
    gap: 6px;
  }
}
@media (max-width: 430px) {
  .brand {
    font-size: 0.8125rem;
    gap: 10px;
  }
  .header-inner {
    gap: 12px;
  }
  nav {
    gap: 12px;
    font-size: 0.8125rem;
  }
  .shell {
    padding-left: 16px;
    padding-right: 16px;
  }
  .summary-grid {
    grid-template-columns: 1fr 1fr;
  }
  .metric-primary {
    grid-column: 1/-1;
  }
  .metric-primary .metric-value {
    font-size: 2rem;
  }
  .metric h3 {
    min-height: 0;
  }
  .field-grid {
    grid-template-columns: 1fr;
  }
  .field-wide {
    grid-column: auto;
  }
  .result-panel {
    padding: 18px;
  }
  .intro {
    font-size: 0.9375rem;
  }
  .panel-heading > span {
    font-size: 0.75rem;
  }
}
@media (prefers-reduced-motion: no-preference) {
  a,
  button {
    transition: color 0.15s;
  }
}
@media print {
  .site-header nav,
  .text-button,
  .free-label,
  .site-footer,
  .source-link {
    display: none;
  }
  .shell {
    max-width: none;
    padding: 0;
  }
  .calculator-layout {
    display: block;
  }
  form {
    break-after: page;
  }
  .results {
    margin-top: 24px;
  }
  .result-panel,
  .summary-grid {
    break-inside: avoid;
  }
  body {
    font-size: 12pt;
  }
}


.equity-panel {
  border-color: #c5dbe8;
}
.equity-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 160px;
  gap: 24px;
  align-items: center;
}
.equity-return {
  border-left: 1px solid var(--line);
  padding-left: 24px;
}
.equity-return span {
  display: block;
  font-size: 0.8125rem;
  color: var(--muted);
  line-height: 1.5;
}
.equity-return strong {
  display: block;
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.04em;
  margin: 6px 0;
  font-variant-numeric: tabular-nums;
}
.equity-panel > .form-note {
  margin-top: 16px;
}
@media (max-width: 1100px) and (min-width: 781px), (max-width: 520px) {
  .equity-layout {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .equity-return {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 16px 0 0;
  }
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 14px;
  border-radius: 5px;
  border: 1px solid var(--blue);
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
  line-height: 1.4;
  white-space: nowrap;
}
.primary-button {
  background: var(--blue);
  color: white;
}
.secondary-button {
  background: white;
  color: var(--blue);
}
button:disabled {
  opacity: 0.55;
}
.account-page {
  padding-top: 12px;
  padding-bottom: 48px;
}
.account-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.inline-status {
  font-size: 0.875rem;
  line-height: 1.6;
  margin: 12px 0;
  color: var(--blue);
}
.inline-status:empty {
  display: none;
}
.plus-offer {
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 40px;
  padding: 28px;
  margin: 24px 0 40px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.plus-offer h2 {
  font-size: 1.2rem;
  margin-bottom: 12px;
}
.calculator-plus-offer { display: block; margin-top: 24px; }
.calculator-plus-offer h3 { margin: 0 0 12px; }
.calculator-plus-offer .plus-price { align-items: flex-start; margin-top: 18px; }
@media (max-width: 780px) {
  .calculator-plus-offer { order: 3; width: 100%; margin-top: 0; }
}
.plus-offer p + p {
  margin-top: 12px;
}
.plus-price {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 16px;
}
.plus-price > strong {
  font-size: 2.5rem;
  font-weight: 600;
}
.plus-price strong span {
  font-size: 1rem;
  font-weight: 400;
  color: var(--muted);
}
.empty-state {
  padding: 40px 24px;
  background: var(--surface);
  border-radius: 8px;
  color: var(--muted);
}
.saved-property {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px 24px;
  margin: 14px 0;
}
.compare-select {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1rem;
  font-weight: 600;
}
.compare-select input {
  width: 18px;
  flex: 0 0 18px;
  height: 18px;
}
.compare-select a {
  overflow-wrap: anywhere;
}
.saved-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: 18px 0 6px;
}
.saved-metrics span {
  display: block;
  font-size: 0.8125rem;
  color: var(--muted);
}
.saved-metrics strong {
  display: block;
  margin-top: 4px;
  font-weight: 600;
}
.property-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.75rem;
}
dialog {
  width: min(480px, calc(100vw - 32px));
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
}
dialog::backdrop {
  background: #192b3b66;
}
dialog form {
  padding: 0;
  border: 0;
  background: transparent;
}
dialog .primary-button {
  margin-top: 16px;
}
.price-line {
  margin-top: 12px;
  font-weight: 600;
}
.legal-copy {
  max-width: 720px;
  line-height: 1.8;
}
.legal-copy p,
.legal-copy h2 {
  margin-bottom: 20px;
}
.legal-copy h2 {
  margin-top: 32px;
}
@media (max-width: 780px) {
  .plus-offer {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .saved-metrics {
    gap: 12px;
  }
  .saved-metrics strong {
    font-size: 0.875rem;
  }
  .results-heading {
    flex-wrap: wrap;
    gap: 12px;
  }
}
@media (max-width: 430px) {
  nav {
    gap: 10px;
    font-size: 0.75rem;
  }
  .brand > span:last-child {
    max-width: 80px;
  }
  .saved-metrics {
    grid-template-columns: 1fr;
  }
  .saved-property {
    padding: 18px;
  }
}

/* Plus purchase-price targets share the calculator's blue and green surfaces. */
.offer-benefits { padding-left: 20px; margin: 16px 0; font-size: .875rem; line-height: 1.6; }
.offer-benefits li + li { margin-top: 8px; }
.offer-panel { border-color: #cfe2d6; }
.offer-form { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; padding: 0; border: 0; margin: 18px 0; background: none; }
.offer-form > div { flex: 1 1 180px; min-width: 0; }
.offer-form .input-wrap > span { padding: 0 14px; color: var(--muted); }
.offer-form button { white-space: normal; }
.offer-prices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 18px 0; }
.offer-prices > div { padding: 18px; background: #f1f6fa; border: 1px solid #d7e4ed; border-radius: 6px; min-width: 0; }
.offer-prices > div:last-child { background: #edf6f0; border-color: #cfe2d6; }
.offer-prices h4 { margin: 0 0 8px; font-size: .875rem; }
.offer-prices strong { display: block; font-size: clamp(1.25rem, 2vw, 1.65rem); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.offer-prices p { font-size: .875rem; line-height: 1.6; margin: 12px 0; }
.offer-prices button { width: 100%; white-space: normal; }
.offer-panel > .form-note:last-child { margin-top: 16px; }
@media (max-width: 1100px) and (min-width: 781px), (max-width: 520px) { .offer-prices { grid-template-columns: 1fr; } }
@media print { .offer-form, .offer-prices button { display: none; } }

.sensitivity-table caption { text-align: left; white-space: normal; color: var(--muted); font-size: .8125rem; line-height: 1.6; padding: 0 0 12px; }
.sensitivity-table td.cash-loss { background: #fbeeed; color: #8a3330; }
.sensitivity-table td.cash-gain { background: #edf6f0; color: #246044; }
.sensitivity-table td.cash-even { background: #f1f4f6; }
.sensitivity-table td { border: 2px solid white; }
.current-financing { background: #eaf2f8; font-weight: 600; }
#stress-results > h4 { margin: 28px 0 8px; font-size: .9375rem; }
#copy-note { margin-bottom: 16px; }
.results-heading { flex-wrap: wrap; }
.member-shortcuts { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 24px; padding: 16px 20px; margin: 0 0 24px; border: 1px solid #cfe2d6; border-radius: 8px; background: #edf6f0; font-size: .875rem; }
.member-shortcuts strong, .member-shortcuts a { color: #246044; }
.member-shortcuts a { text-decoration: underline; text-underline-offset: 3px; }
.member-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.member-actions a { text-align: center; }
.plus-active { background: #edf6f0; border-color: #cfe2d6; }
#calculator-plan.plus-active { color: #246044; }

/* Keep navigation and paid-tool explanations usable during input correction. */
#results-content.inputs-invalid > #core-details { display: none; }
.quick-plus { margin: 16px 0 0; font-size: .875rem; }
.quick-plus a { color: var(--blue, #165d96); }
.method-details { margin-top: 20px; color: #586a7a; font-size: .875rem; }
.method-details summary { cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.investment-links { margin: 12px 0 0; font-size: .875rem; line-height: 1.65; color: var(--muted); }
.investment-links a, .results-heading > span a { text-decoration: underline; text-underline-offset: 3px; }
.investment-panel > summary { cursor: pointer; display: list-item; font-size: 1.0625rem; font-weight: 600; line-height: 1.6; }
.investment-panel > summary .optional-label { display: block; margin-left: 18px; color: var(--muted); font-size: .8125rem; font-weight: 400; }
.investment-panel[open] { border-color: #bfd6c8; }
.investment-panel > p, .investment-panel .method-details p { font-size: .875rem; line-height: 1.7; margin: 14px 0; }
.investment-toggle { display: flex; gap: 10px; align-items: center; margin: 18px 0; font-size: .875rem; line-height: 1.6; }
.investment-toggle input { width: 18px; height: 18px; flex: 0 0 18px; accent-color: #246044; }
.investment-fields { border: 0; padding: 0; margin: 0; background: none; min-width: 0; }
.investment-fields:disabled { opacity: .6; }
.investment-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; margin: 18px 0; }
.investment-grid > div { min-width: 0; }
.investment-grid label { display: block; font-size: .875rem; line-height: 1.5; margin-bottom: 8px; }
.investment-grid input { min-width: 0; width: 100%; }
.investment-grid select { width: 100%; min-height: 50px; padding: 10px; border: 1px solid #b9c8d4; border-radius: 5px; font: inherit; font-size: .875rem; color: var(--ink); background: white; white-space: normal; }
.investment-grid .field-hint { font-size: .8125rem; line-height: 1.6; margin: 8px 0 0; }
.investment-metrics { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin: 20px 0 12px; }
.investment-metrics > div { min-width: 0; padding: 18px; background: #edf6f0; border: 1px solid #cfe2d6; border-radius: 6px; }
.investment-metrics span, .investment-metrics small { display: block; font-size: .8125rem; line-height: 1.6; }
.investment-metrics strong { display: block; margin: 8px 0; font-size: clamp(1.35rem,2vw,1.8rem); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.tax-benefit { background: #f1f6fa; padding: 14px 16px; border-radius: 5px; font-size: .875rem; line-height: 1.7; }
.investment-panel table caption { text-align: left; font-size: .8125rem; line-height: 1.6; padding-bottom: 12px; white-space: normal; }
@media (max-width:1100px) and (min-width:781px), (max-width:520px) { .investment-grid, .investment-metrics { grid-template-columns: 1fr; } }
.table-scroll:focus-visible { outline: 2px solid #165d96; outline-offset: 4px; }
@media (max-width: 780px) { .quick-plus { order: 1; width: 100%; } #draft-note { order: 1; width: 100%; } }
@media (max-width: 600px) { .table-scroll::after { content: 'Swipe or scroll sideways to see all columns'; display: block; margin: 8px 0; font-size: .75rem; color: #586a7a; } }

.tax-plus-prompt { padding: 14px 16px; border-left: 3px solid #246044; background: #edf6f0; font-size: .875rem; line-height: 1.7; }
.advanced-tax-panel > summary .optional-label { color: #165d96; font-weight: 600; }
.advanced-tax-panel .table-scroll { margin-top: 18px; }

/* Compact first view: the numbers lead, with notes below them. */
.page-heading { padding: 22px 0; }
.results-heading { gap: 8px 16px; }
.results-heading .result-basis { flex-basis: 100%; font-size: .875rem; }
#draft-note { font-size: .875rem; }
@media (max-width:780px) {
  .page-heading { padding: 20px 0; }
  .page-heading h1 { font-size: 1.5rem; }
  #property-load-status, #retry-property-load, #sign-in-property { order: 1; }
  #draft-note, #reload-saved-version { order: 2; }
}

/* A summary, editable assumptions and one optional analysis workspace. */
.calculator-layout { display: grid; grid-template-columns: minmax(330px,420px) minmax(0,1fr); grid-template-rows: auto 1fr; gap: 24px 40px; }
.calculator-layout > #rental-form { grid-column: 1; grid-row: 1 / 3; }
.result-overview { grid-column: 2; grid-row: 1; min-width: 0; }
.calculator-layout > .results { display: block; grid-column: 2; grid-row: 2; min-width: 0; }
#results-content:not([hidden]) { display: block; }
.result-overview .results-heading { margin-bottom: 12px; }
.results-heading h2 { font-size: .9375rem; }
.result-basis { color: var(--muted); }
.summary-actions { display: flex; align-items: center; gap: 12px; margin-top: 14px; font-size: .875rem; }
.summary-actions > a { white-space: normal; }
.draft-status { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 14px; margin-top: 10px; color: var(--muted); }
.draft-status:has(#draft-note[hidden]):has(#reload-saved-version[hidden]):has(#copy-property[hidden]) { display: none; }
.core-details, .plus-workspace { border: 1px solid var(--line); border-radius: 8px; margin: 0 0 20px; }
.core-details > summary, .plus-workspace > summary, #price-target-panel > summary { cursor: pointer; padding: 18px 20px; font-size: .9375rem; font-weight: 600; }
.core-details[open] > summary, .plus-workspace[open] > summary { border-bottom: 1px solid var(--line); }
.core-details > .result-panel { border: 0; border-radius: 0; border-bottom: 1px solid var(--line); margin: 0; }
.core-details .legal-note { padding: 16px 20px; font-size: .875rem; color: var(--muted); }
.plus-tag { display: inline-block; color: var(--positive); background: #eaf4ee; border-radius: 4px; padding: 2px 6px; font-size: .8125rem; font-weight: 600; }
.plus-workspace { border-color: #bfd6c8; }
.plus-workspace > summary .plus-tag { float: right; }
.workspace-body { padding: 16px 20px 20px; }
.workspace-tabs { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 4px; padding: 4px; background: #f0f4f7; border-radius: 7px; margin-bottom: 20px; }
.workspace-tabs button { color: var(--muted); font-size: .9375rem; font-weight: 600; padding: 10px 6px; border: 1px solid transparent; background: transparent; border-radius: 5px; }
.workspace-tabs button[aria-selected="true"] { background: white; color: var(--blue); border-color: #d1dde6; box-shadow: 0 1px 3px #192b3b0a; }
.workspace-panel, #view-scenarios > .stress-panel { padding: 0; margin: 0; border: 0; }
.workspace-panel > summary { display: none; }
.workspace-panel > p:first-of-type { margin: 0 0 16px; color: var(--muted); }
#advanced-tax-panel { padding: 16px; margin-top: 24px; }
#advanced-tax-panel > summary { font-size: .9375rem; }
#advanced-tax-panel > p { font-size: .875rem; }
#price-target-panel { padding: 0; margin-top: 24px; }
#price-target-panel > :not(summary) { margin-left: 16px; margin-right: 16px; }
#price-target-panel > .panel-heading { display: none; }
.scenario-details { border: 1px solid var(--line); border-radius: 6px; padding: 14px; margin-top: 16px; }
.scenario-details > summary { cursor: pointer; font-size: .875rem; font-weight: 600; }
.scenario-details[open] > summary { margin-bottom: 14px; }
.scenario-details h4 { margin: 24px 0 8px; font-size: .875rem; }
#view-scenarios .plus-label { display: none; }
.investment-grid .field-label { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.investment-grid .field-label label { margin: 0; }
.investment-grid .field-help { margin: 8px 0 0; }
.investment-metrics span, .investment-metrics small, .form-note, .field-help { font-size: .875rem; }
#plus-offer { padding: 20px; margin: 0 0 20px; }
#plus-offer .offer-benefits { margin: 12px 0; }
#plus-offer .plus-price { margin-top: 16px; }
#plus-offer p { font-size: .875rem; }
#plus-offer h3 { font-size: 1.0625rem; margin-bottom: 8px; }
@media (max-width:1100px) and (min-width:781px) { .calculator-layout { grid-template-columns: minmax(300px,350px) minmax(0,1fr); gap: 24px; } }
@media (max-width:780px) {
  .calculator-layout { display: grid; grid-template-columns: minmax(0,1fr); gap: 20px; }
  .calculator-layout > .result-overview, .calculator-layout > #rental-form, .calculator-layout > .results { grid-column: 1; grid-row: auto; order: initial; }
  .result-overview { grid-row: 1 !important; }
  .calculator-layout > #rental-form { grid-row: 2; }
  .calculator-layout > .results { grid-row: 3; }
  .results-heading { width: 100%; }
  .summary-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .metric-primary { grid-column: 1 / -1; }
  .metric-primary .metric-value { font-size: 2rem; }
  .metric h3 { min-height: 0; }
  .workspace-body { padding: 14px; }
  .result-panel { width: auto; }
  #advanced-tax-panel { padding: 14px; }
  .page-heading { padding: 18px 0; }
  .header-inner { min-height: 62px; gap: 10px 16px; }
  .brand > span:last-child { max-width: none; }
  .header-inner nav { gap: 16px; }
}

#assumptions-fields > summary { display: list-item; cursor: pointer; font-size: .875rem; color: var(--blue); padding: 4px 0; }
#assumptions-fields[open] > summary { margin-bottom: 14px; }
@media (max-width:780px) {
  #rental-form { padding: 16px 18px; }
  .summary-grid .metric { padding: 14px; }
  .metric-value { margin: 5px 0; }
}

.return-results { margin-top: 20px; }
