/* RPW Portfolio Stress Tester — RPW brand (navy / gold, Cormorant + Montserrat) */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@500;600;700&family=Montserrat:wght@400;500;600;700&display=swap');
:root {
  --ink: #14192C;          /* RPW navy */
  --navy: #14192C;
  --charcoal: #2A2F45;     /* RPW charcoal */
  --paper: #F5F1E8;        /* RPW cream */
  --paper-deep: #EDE7DA;
  --accent: #B7A567;       /* RPW gold (used as primary accent/CTA) */
  --gold: #B7A567;
  --green: #3A7D44;
  --amber: #D4912A;
  --red: #B83232;
  --teal: #2A7B7B;
  --text: #2A2F45;
  --text-muted: #6B7280;
  --text-faint: #9AA5AE;
  --rule: #D5CDBF;
  --radius: 8px;
  --shadow: 0 2px 12px rgba(20,25,44,0.10);
  --heading-font: 'Cormorant Garamond', Georgia, serif;
  --body-font: 'Montserrat', Calibri, system-ui, -apple-system, sans-serif;
}

* { margin:0; padding:0; box-sizing:border-box; }
html { font-size:16px; -webkit-text-size-adjust:100%; }
body { font-family: var(--body-font); background: var(--paper); color: var(--text); min-height:100vh; }

#app { max-width:640px; margin:0 auto; padding:16px 16px 80px; }

/* Header */
.header { text-align:center; padding:20px 0 12px; border-bottom:2px solid var(--gold); margin-bottom:24px; }
.header__logo { font-family:var(--heading-font); font-size:1.6rem; font-weight:700; color:var(--navy); letter-spacing:0.5px; }
.header__subtitle { font-size:0.8rem; color:var(--text-muted); margin-top:2px; letter-spacing:1.5px; text-transform:uppercase; }

/* Hero */
.hero h1 { font-family:var(--heading-font); font-size:2rem; font-weight:600; color:var(--navy); line-height:1.2; margin-bottom:8px; }
.hero p { font-size:0.95rem; color:var(--text-muted); line-height:1.5; margin-bottom:20px; }

/* Progress */
.progress-bar { height:4px; background:var(--rule); border-radius:2px; margin-bottom:8px; }
.progress-bar__fill { height:100%; background:var(--gold); border-radius:2px; width:33%; transition:width 0.3s; }
.step-label { font-size:0.8rem; color:var(--text-faint); margin-bottom:20px; font-weight:600; letter-spacing:0.5px; text-transform:uppercase; }

/* Form sections */
.form-section { display:none; }
.form-section.active { display:block; }
.field { margin-bottom:18px; }
.field label { display:block; font-size:0.85rem; font-weight:600; color:var(--ink); margin-bottom:6px; }
.field .optional { font-weight:400; color:var(--text-faint); font-size:0.8rem; }
.field select, .field input { width:100%; padding:12px 14px; font-size:1rem; border:1.5px solid var(--rule); border-radius:var(--radius); background:#fff; color:var(--text); appearance:none; -webkit-appearance:none; }
.field select { background-image:url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%236B7B8A' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat:no-repeat; background-position:right 14px center; padding-right:36px; }
.field select:focus, .field input:focus { outline:none; border-color:var(--accent); box-shadow:0 0 0 3px rgba(179,74,42,0.12); }

/* Toggle buttons */
.toggle-group { display:flex; gap:8px; }
.toggle-btn { flex:1; padding:10px; border:1.5px solid var(--rule); border-radius:var(--radius); background:#fff; font-size:0.9rem; font-weight:600; color:var(--text-muted); cursor:pointer; transition:all 0.15s; }
.toggle-btn.active { background:var(--ink); color:#fff; border-color:var(--ink); }

/* Nav buttons */
.form-nav { display:flex; gap:12px; margin-top:24px; }
.btn { padding:14px 28px; border:none; border-radius:var(--radius); font-size:1rem; font-weight:600; cursor:pointer; transition:all 0.15s; }
.btn--primary { background:var(--accent); color:#fff; flex:1; }
.btn--primary:hover { background:#9A3D22; }
.btn--secondary { background:var(--paper-deep); color:var(--text-muted); border:1.5px solid var(--rule); }
.btn--secondary:disabled { opacity:0.4; cursor:not-allowed; }
.btn--cta { display:inline-block; background:var(--gold); color:var(--ink); padding:16px 32px; text-decoration:none; border-radius:var(--radius); font-weight:700; font-size:1.05rem; text-align:center; }
.btn--cta:hover { background:#B3923E; }
.btn--restart { margin-top:24px; width:100%; }

/* Loading */
.hidden { display:none !important; }
#loading-view { text-align:center; padding:80px 0; }
.loader-ring { width:48px; height:48px; border:4px solid var(--rule); border-top-color:var(--accent); border-radius:50%; animation:spin 0.8s linear infinite; margin:0 auto 20px; }
@keyframes spin { to { transform:rotate(360deg); } }
#loading-view p { font-size:0.95rem; color:var(--text-muted); }

/* Dashboard — Score Hero */
.score-hero { display:flex; gap:24px; align-items:center; padding:24px; background:var(--ink); border-radius:var(--radius); margin-bottom:28px; }
.score-ring { position:relative; width:110px; height:110px; flex-shrink:0; }
.score-ring svg { width:100%; height:100%; transform:rotate(-90deg); }
.ring-bg { fill:none; stroke:#2A3D50; stroke-width:8; }
.ring-fill { fill:none; stroke:var(--gold); stroke-width:8; stroke-linecap:round; stroke-dasharray:326.73; stroke-dashoffset:326.73; transition:stroke-dashoffset 1.5s ease; }
.score-number { position:absolute; top:50%; left:50%; transform:translate(-50%,-50%); font-size:2rem; font-weight:700; color:#1C2A3A; }
.score-meta h2 { font-size:1.15rem; color:#1C2A3A; font-weight:700; line-height:1.3; margin-bottom:6px; }
.score-meta p { font-size:0.85rem; color:#6B7B8A; line-height:1.5; }

/* Factors grid */
.section-title { font-size:1rem; font-weight:700; color:var(--ink); margin-bottom:14px; letter-spacing:0.5px; text-transform:uppercase; }
.factors-grid { display:grid; grid-template-columns:1fr; gap:12px; margin-bottom:28px; }
@media(min-width:480px) { .factors-grid { grid-template-columns:1fr 1fr; } }

.factor-card { background:#fff; border-radius:var(--radius); padding:16px; border-left:4px solid var(--rule); box-shadow:var(--shadow); cursor:pointer; }
.factor-card[data-band="LOW"] { border-left-color:var(--green); }
.factor-card[data-band="MODERATE"] { border-left-color:var(--teal); }
.factor-card[data-band="ELEVATED"] { border-left-color:var(--amber); }
.factor-card[data-band="HIGH"] { border-left-color:var(--red); }
.factor-card[data-band="CRITICAL"] { border-left-color:#8B1A1A; }
.factor-card__label { font-size:0.75rem; font-weight:600; color:var(--text-faint); text-transform:uppercase; letter-spacing:0.5px; margin-bottom:4px; }
.factor-card__score { font-size:1.6rem; font-weight:700; margin-bottom:2px; }
.factor-card__headline { font-size:0.82rem; color:var(--text-muted); line-height:1.4; }
.factor-card__detail { display:none; margin-top:12px; padding-top:12px; border-top:1px solid var(--rule); font-size:0.82rem; color:var(--text); line-height:1.5; }
.factor-card__detail.open { display:block; }
.factor-card__actions { margin-top:8px; padding-left:16px; }
.factor-card__actions li { font-size:0.8rem; color:var(--text-muted); margin-bottom:4px; }

/* Scenarios */
.scenarios-list { display:flex; flex-direction:column; gap:10px; margin-bottom:28px; }
.scenario-row { display:flex; align-items:center; gap:12px; padding:14px 16px; background:#fff; border-radius:var(--radius); box-shadow:var(--shadow); }
.scenario-row__icon { width:28px; height:28px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:1rem; flex-shrink:0; }
.scenario-row__icon--pass { background:#E8F5E9; color:var(--green); }
.scenario-row__icon--fail { background:#FFEBEE; color:var(--red); }
.scenario-row__label { font-size:0.9rem; font-weight:600; color:var(--ink); flex:1; }
.scenario-row__tag { font-size:0.75rem; font-weight:700; padding:4px 10px; border-radius:20px; text-transform:uppercase; letter-spacing:0.5px; }
.scenario-row__tag--pass { background:#E8F5E9; color:var(--green); }
.scenario-row__tag--fail { background:#FFEBEE; color:var(--red); }

/* CTA */
.cta-box { background:var(--paper-deep); border:2px solid var(--gold); border-radius:var(--radius); padding:24px; text-align:center; margin-bottom:16px; }
.cta-box p { font-size:0.9rem; color:var(--text); line-height:1.6; margin-bottom:16px; }

/* ════ V4.0 — VERDICT BANNER & TWO-LAYER ARCHITECTURE ════ */

.verdict-banner {
  margin: 0 -20px 32px;
  padding: 32px 24px;
  background: #B34A2A;
  color: #FFF8E1;
  border-radius: 0 0 14px 14px;
  box-shadow: 0 4px 18px rgba(0,0,0,0.18);
}
.verdict-banner__label {
  font-size: 0.7rem;
  letter-spacing: 2px;
  opacity: 0.75;
  font-weight: 700;
  margin-bottom: 10px;
}
.verdict-banner__headline {
  font-family: Cambria, Georgia, serif;
  font-size: 1.8rem;
  margin: 0 0 8px;
  line-height: 1.2;
  color: #FFF;
}
.verdict-banner__action {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 16px;
  opacity: 0.95;
}
.verdict-banner__explanation {
  font-size: 0.95rem;
  line-height: 1.55;
  margin: 0;
  opacity: 0.92;
}

/* Layer sections */
.layer-section {
  margin: 32px 0;
  padding: 24px 20px;
  background: #FFFBF3;
  border-radius: 10px;
  border: 1px solid #E8DECF;
}
.layer-section--survival {
  border-top: 4px solid #B34A2A;
}
.layer-section--strategic {
  border-top: 4px solid #5A7A8A;
  background: #F7F5F1;
}
.layer-header h2 {
  font-family: Cambria, Georgia, serif;
  color: #1C2A3A;
  font-size: 1.4rem;
  margin: 0 0 6px;
}
.layer-header p {
  color: #6B7B8A;
  font-size: 0.92rem;
  margin: 0 0 20px;
  line-height: 1.5;
}

/* Score row (ring + meta side by side) */
.score-row {
  display: flex;
  align-items: center;
  gap: 24px;
  margin: 20px 0;
  padding: 16px;
  background: #FFF;
  border-radius: 8px;
  border: 1px solid #E8DECF;
}
.score-ring--strategic .ring-fill {
  stroke: #5A7A8A;
}
.score-meta__label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #6B7B8A;
  font-weight: 600;
  margin-bottom: 4px;
}
.score-meta__band {
  font-family: Cambria, Georgia, serif;
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 6px;
}
.score-meta__scenarios {
  font-size: 0.88rem;
  color: #6B7B8A;
}

/* Section titles within layers */
.section-title {
  font-family: Cambria, Georgia, serif;
  color: #1C2A3A;
  font-size: 1.1rem;
  margin: 24px 0 4px;
}
.section-subtitle {
  font-size: 0.85rem;
  color: #6B7B8A;
  margin: 0 0 14px;
  line-height: 1.5;
}

/* Enhanced scenario rows with plain descriptions */
.scenario-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px;
  background: #FFF;
  margin-bottom: 8px;
  border-radius: 8px;
  border: 1px solid #E8DECF;
  border-left: 4px solid #C5A55A;
}
.scenario-row--pass { border-left-color: #3A7D44; }
.scenario-row--fail { border-left-color: #B83232; background: #FFF6F4; }
.scenario-row__icon {
  font-size: 1.3rem;
  font-weight: 700;
  width: 28px;
  text-align: center;
  flex-shrink: 0;
}
.scenario-row__icon--pass { color: #3A7D44; }
.scenario-row__icon--fail { color: #B83232; }
.scenario-row__body { flex: 1; }
.scenario-row__label {
  font-weight: 700;
  color: #1C2A3A;
  margin-bottom: 4px;
  font-size: 1rem;
}
.scenario-row__description {
  font-size: 0.86rem;
  color: #4A5A6A;
  line-height: 1.5;
}
.scenario-row__tag {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  flex-shrink: 0;
  align-self: center;
}
.scenario-row__tag--pass { background: #E8F5EC; color: #2D5E36; }
.scenario-row__tag--fail { background: #FCE8E5; color: #8B1A1A; }

/* ════ CGT / EXIT LAYER ════ */

.layer-section--cgt {
  border-top: 4px solid #2A5A7B;
  background: #F0F4F7;
}

.cgt-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 20px 0;
}
@media (max-width: 600px) { .cgt-summary { grid-template-columns: 1fr; } }
.cgt-summary__item {
  padding: 18px;
  background: #FFF;
  border-radius: 8px;
  border: 1px solid #D5DEE5;
}
.cgt-summary__label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #6B7B8A;
  font-weight: 600;
  margin-bottom: 6px;
}
.cgt-summary__value {
  font-family: Cambria, Georgia, serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: #1C2A3A;
  margin-bottom: 4px;
}
.cgt-summary__sub {
  font-size: 0.78rem;
  color: #6B7B8A;
}

.exit-positions { display: flex; flex-direction: column; gap: 12px; }
.exit-position-card {
  background: #FFF;
  border: 1px solid #D5DEE5;
  border-left: 4px solid #2A5A7B;
  border-radius: 8px;
  padding: 16px;
}
.exit-card__header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 12px;
}
.exit-card__scenario {
  font-weight: 700;
  font-size: 1.05rem;
  color: #1C2A3A;
}
.exit-card__year {
  font-size: 0.8rem;
  color: #6B7B8A;
  background: #EFF3F6;
  padding: 3px 10px;
  border-radius: 12px;
}
.exit-card__metrics { margin: 10px 0; }
.exit-card__metric {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 0.92rem;
  border-bottom: 1px dashed #E8DECF;
}
.exit-card__metric:last-child { border-bottom: none; }
.exit-card__metric .label { color: #4A5A6A; }
.exit-card__metric .value { font-weight: 600; color: #1C2A3A; font-variant-numeric: tabular-nums; }
.exit-card__metric .value.cgt { color: #8B1A1A; }
.exit-card__metric--total {
  border-top: 2px solid #1C2A3A;
  padding-top: 8px;
  margin-top: 6px;
  font-weight: 700;
}
.exit-card__metric--total .value {
  font-family: Cambria, Georgia, serif;
  font-size: 1.1rem;
  color: #2A5A7B;
}
.exit-card__method {
  font-size: 0.85rem;
  color: #2A5A7B;
  background: #EFF3F6;
  padding: 8px 12px;
  border-radius: 6px;
  margin-top: 10px;
}
.exit-card__detail {
  font-size: 0.82rem;
  color: #6B7B8A;
  margin-top: 8px;
  line-height: 1.5;
}
.exit-card__regime {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 0.88rem;
}
.exit-card__regime--cost { background: #FCE8E5; color: #8B1A1A; }
.exit-card__regime--save { background: #E8F5EC; color: #2D5E36; }

/* ════ TIER-2: PROPERTY-LEVEL MODE ════ */

.mode-toggle {
  background: #F7F1E8;
  border: 1px solid #E8DECF;
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 18px;
}
.mode-toggle__label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #1C2A3A;
  margin: 0 0 8px;
}
.mode-toggle__hint {
  font-size: 0.78rem;
  color: #6B7B8A;
  margin: 8px 0 0;
  line-height: 1.4;
}

.property-card {
  background: #FFFBF3;
  border: 1px solid #E8DECF;
  border-left: 4px solid #B34A2A;
  border-radius: 8px;
  margin-bottom: 14px;
  overflow: hidden;
}
.property-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #1C2A3A;
  color: #FFF;
  padding: 10px 14px;
}
.property-card__header h4 {
  font-family: Cambria, Georgia, serif;
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}
.btn-remove-property {
  background: rgba(255,255,255,0.2);
  border: none;
  color: #FFF;
  border-radius: 50%;
  width: 26px;
  height: 26px;
  font-size: 1.1rem;
  cursor: pointer;
  line-height: 1;
}
.btn-remove-property:hover { background: #B83232; }
.property-card__body {
  padding: 12px 14px;
}
.property-card__body .field {
  margin-bottom: 8px;
}
.property-card__body label {
  font-size: 0.82rem;
}

.btn--add-property {
  width: 100%;
  margin-top: 8px;
  padding: 12px;
  font-size: 0.95rem;
}

/* Helper text under labels */
.helper-text {
  display: block;
  font-size: 0.76rem;
  color: #6B7B8A;
  font-weight: 400;
  margin-top: 2px;
  font-style: italic;
}

/* ════ INSURANCE & CLIMATE RISK LAYER (V5.2) ════ */

.layer-section--insurance {
  border-top: 4px solid #2A7B7B;
  background: #F0F6F6;
}

.insurance-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 20px 0;
}
@media (max-width: 600px) { .insurance-summary { grid-template-columns: 1fr; } }
.insurance-summary__item {
  padding: 18px;
  background: #FFF;
  border-radius: 8px;
  border: 1px solid #C8D6D6;
}
.insurance-summary__label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #6B7B8A;
  font-weight: 600;
  margin-bottom: 6px;
}
.insurance-summary__value {
  font-family: Cambria, Georgia, serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: #1C2A3A;
  margin-bottom: 4px;
}
.insurance-summary__sub {
  font-size: 0.78rem;
  color: #6B7B8A;
}

.coverage-flag {
  padding: 14px 18px;
  border-radius: 8px;
  margin: 16px 0;
  color: #FFF;
}
.coverage-flag__level {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  margin-bottom: 4px;
}
.coverage-flag__message {
  font-size: 0.9rem;
  opacity: 0.95;
}

.insurance-flags {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
}
.insurance-flag {
  background: #FFF;
  border: 1px solid #E0D0BF;
  border-left: 3px solid #D4912A;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 0.88rem;
  color: #4A5A6A;
}
.insurance-flag--critical {
  border-left-color: #8B1A1A;
  background: #FFF6F4;
  color: #8B1A1A;
  font-weight: 600;
}
.insurance-flag--ok {
  border-left-color: #3A7D44;
  background: #F4F9F5;
  color: #2D5E36;
}

/* ════ DISCLAIMER BLOCK ════ */
.disclaimer {
  margin: 32px 0 16px;
  padding: 20px 24px;
  background: #F7F1E8;
  border: 1px solid #E0D0BF;
  border-left: 4px solid #6B7B8A;
  border-radius: 8px;
  font-size: 0.82rem;
  line-height: 1.55;
  color: #4A5A6A;
}
.disclaimer h4 {
  font-family: Cambria, Georgia, serif;
  font-size: 0.95rem;
  color: #1C2A3A;
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  font-weight: 700;
}
.disclaimer p {
  margin: 0 0 10px;
}
.disclaimer p:last-child {
  margin-bottom: 0;
}
.disclaimer strong {
  color: #1C2A3A;
}

.scenario-row__timing {
  font-size: 0.82rem;
  color: #8B1A1A;
  margin-top: 6px;
  padding: 6px 10px;
  background: #FCE8E5;
  border-radius: 4px;
  font-weight: 500;
}

/* ═══════════ FINAL LAUNCH — RPW branding + new components ═══════════ */

/* Headings use Cormorant across the dashboard */
.section-title { font-family:var(--heading-font); font-weight:600; color:var(--navy); }
.verdict-banner__headline, .layer-header h2, .cgt-summary__value { font-family:var(--heading-font); }
.layer-header h2 { font-family:var(--heading-font); font-weight:600; color:var(--navy); }

/* Section intro labels (replaces the old red caps) */
.section-intro { font-family:var(--heading-font); font-size:1.15rem; font-weight:600; color:var(--navy); margin-bottom:12px; }

/* State multi-select chips */
.multi-select { display:flex; flex-wrap:wrap; gap:8px; margin-top:4px; }
.state-chip { font-family:var(--body-font); font-size:0.85rem; font-weight:600; padding:8px 14px;
  border:1.5px solid var(--rule); background:#fff; color:var(--text); border-radius:20px; cursor:pointer;
  transition:all 0.15s; }
.state-chip:hover { border-color:var(--gold); }
.state-chip.active { background:var(--navy); color:#fff; border-color:var(--navy); }

/* Contact gating error */
.contact-error { color:var(--red); font-size:0.85rem; font-weight:600; margin-top:8px; padding:10px 12px;
  background:rgba(184,50,50,0.08); border-left:3px solid var(--red); border-radius:4px; }

/* Exit card — key result lead */
.exit-card__keyresult { display:flex; justify-content:space-between; align-items:baseline;
  padding:12px 0; border-bottom:2px solid var(--gold); margin-bottom:10px; }
.exit-card__keylabel { font-size:0.8rem; text-transform:uppercase; letter-spacing:1px; color:var(--text-muted); font-weight:600; }
.exit-card__keyvalue { font-family:var(--heading-font); font-size:1.7rem; font-weight:700; color:var(--navy); }
.exit-card__pool { font-size:0.85rem; color:var(--green); font-weight:600; margin:6px 0; }
.exit-card__alt { font-size:0.82rem; color:var(--text-muted); font-style:italic; margin:6px 0; }
.exit-card__breakdown { margin-top:10px; }
.exit-card__breakdown summary { font-size:0.82rem; color:var(--gold); font-weight:600; cursor:pointer; padding:4px 0; }
.exit-card__breakdown[open] summary { margin-bottom:8px; }

/* Scenario assumptions audit panel */
.scenario-assumptions { display:flex; flex-direction:column; gap:14px; }
.assumption-card { background:#fff; border:1px solid var(--rule); border-radius:var(--radius); padding:16px; box-shadow:var(--shadow); }
.assumption-card__head { font-family:var(--heading-font); font-size:1.25rem; font-weight:600; color:var(--navy); }
.assumption-card__src { font-size:0.75rem; color:var(--text-faint); margin-bottom:10px; font-style:italic; }
.assumption-table { width:100%; border-collapse:collapse; font-size:0.85rem; }
.assumption-table th { text-align:left; padding:5px 8px 5px 0; color:var(--text-muted); font-weight:600; width:48%; vertical-align:top; }
.assumption-table td { padding:5px 0; color:var(--text); }
.assumption-card__overlays { margin-top:10px; padding-top:10px; border-top:1px solid var(--rule); font-size:0.82rem; color:var(--text); }
.assumption-card__overlays ul { margin:6px 0 0 18px; }
.assumption-card__overlays li { margin-bottom:3px; }

/* CTA subtext */
.cta-subtext { font-size:0.82rem; color:var(--text-muted); margin-top:10px; line-height:1.45; }

/* Buttons in brand */
.btn--cta { background:var(--gold); color:var(--navy); font-weight:700; }
.btn--primary { background:var(--navy); }

/* Equity comparison */
.equity-comparison { margin:8px 0 18px; }
.equity-grid { display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.equity-col { flex:1; min-width:240px; background:#fff; border:1px solid var(--rule); border-radius:var(--radius); padding:14px; box-shadow:var(--shadow); }
.equity-col__head { font-family:var(--heading-font); font-size:1.1rem; font-weight:600; color:var(--navy); margin-bottom:8px; padding-bottom:6px; border-bottom:2px solid var(--gold); }
.equity-row { display:flex; justify-content:space-between; gap:10px; font-size:0.85rem; padding:5px 0; color:var(--text); }
.equity-row span:last-child { font-weight:600; white-space:nowrap; }
.equity-row--total { border-top:1px solid var(--rule); margin-top:4px; padding-top:8px; font-weight:700; }
.equity-row--total span { color:var(--navy); }
.equity-arrow { font-size:1.6rem; color:var(--gold); font-weight:700; }
.equity-uplift { margin-top:12px; padding:10px 14px; background:var(--cream); border-left:3px solid var(--gold); border-radius:4px; font-size:0.9rem; color:var(--navy); }
@media (max-width:560px){ .equity-arrow { transform:rotate(90deg); width:100%; text-align:center; } }

/* Factor card chevron + expand affordance */
.factor-card { cursor:pointer; position:relative; }
.factor-card__label { display:flex; justify-content:space-between; align-items:center; }
.factor-card__chevron { color:var(--gold); font-size:0.9rem; transition:transform 0.2s; }
.factor-card.expanded .factor-card__chevron { transform:rotate(180deg); }
.factor-card__detail { display:none; }
.factor-card__detail.open { display:block; margin-top:8px; }

/* After-tax proceeds definition */
.exit-card__define { font-size:0.78rem; color:var(--text-muted); font-style:italic; margin:2px 0 8px; }

/* Equity comparison — 'if sold' sub-row */
.equity-row--sub { font-size:0.78rem; color:var(--text-muted); padding-top:0; margin-top:-2px; }
.equity-row--sub span:last-child { font-weight:500; }

/* Per-property table */
.property-table-block { margin:12px 0 16px; }
.ptable-label { display:block; font-weight:600; color:var(--navy); margin-bottom:8px; }
.property-table { width:100%; border-collapse:collapse; font-size:0.85rem; }
.property-table th { background:var(--navy); color:#fff; padding:6px 8px; text-align:left; font-weight:600; font-size:0.78rem; }
.property-table td { border:1px solid var(--rule); padding:4px; }
.property-table input, .property-table select { width:100%; border:1px solid var(--rule); border-radius:4px; padding:5px; font-size:0.82rem; box-sizing:border-box; }
.pt-remove { background:none; border:none; color:#C0392B; font-size:1.2rem; cursor:pointer; line-height:1; padding:0 6px; }
.ptable-add { margin-top:8px; background:var(--cream); border:1px solid var(--gold); color:var(--navy); border-radius:6px; padding:7px 14px; cursor:pointer; font-weight:600; font-size:0.85rem; }
.ptable-add:hover { background:var(--gold); color:#fff; }
.banded-fallback { margin:8px 0 12px; padding:8px 0; }
.banded-fallback summary { cursor:pointer; color:var(--gold-dark,#8a7a3f); font-weight:600; font-size:0.88rem; }
.banded-fallback[open] summary { margin-bottom:10px; }
/* Growth basis + equity section labels */
.growth-basis-note { background:var(--cream); border-left:3px solid var(--gold); border-radius:4px; padding:8px 12px; font-size:0.82rem; color:var(--navy); margin-bottom:12px; }
.equity-section-label { font-size:0.72rem; text-transform:uppercase; letter-spacing:0.04em; color:var(--text-muted); font-weight:700; margin-top:8px; padding-top:6px; border-top:1px dashed var(--rule); }
.equity-section-label:first-of-type { border-top:none; padding-top:0; }

/* Section 3 redesign — property table primary, banded fallback visible */
.ptable-heading { font-size:1rem; font-weight:700; color:var(--navy); margin-bottom:4px; }
.ptable-badge { display:inline-block; background:var(--gold); color:#fff; font-size:0.68rem; font-weight:700; text-transform:uppercase; letter-spacing:0.04em; padding:2px 8px; border-radius:10px; margin-left:8px; vertical-align:middle; }
.ptable-intro { font-size:0.85rem; color:var(--text-muted); margin:0 0 10px; }
.fallback-divider { display:flex; align-items:center; text-align:center; margin:22px 0 16px; color:var(--text-muted); font-size:0.85rem; }
.fallback-divider::before, .fallback-divider::after { content:''; flex:1; border-bottom:1px solid var(--rule); }
.fallback-divider span { padding:0 14px; text-transform:uppercase; letter-spacing:0.08em; font-size:0.72rem; }
.banded-box { border:1px solid var(--rule); border-radius:8px; padding:16px; background:#FBFAF6; margin-bottom:16px; }
.banded-box__head { font-weight:700; color:var(--navy); font-size:0.92rem; margin-bottom:4px; }
.banded-box__note { font-size:0.82rem; color:var(--text-muted); margin:0 0 12px; }

/* Property table next-step instruction */
.ptable-next { font-size:0.82rem; color:var(--navy); background:var(--cream); border-radius:6px; padding:10px 12px; margin-top:10px; line-height:1.4; }

/* Cost-base accuracy caveat */
.cost-base-caveat { background:#FDF3E7; border-left:3px solid #C0392B; border-radius:4px; padding:10px 12px; font-size:0.82rem; color:#7A2E1E; margin-top:10px; line-height:1.45; }
.cost-base-caveat.hidden { display:none; }

/* Negative-gearing panel */
.ng-panel { margin-bottom:24px; }
.ng-panel.hidden { display:none; }
.ng-explanation { font-size:0.86rem; color:var(--text-muted); margin-top:10px; line-height:1.5; }

/* When running inside the native app wrapper (?embed=app), the app supplies its own
   header/navigation, so hide the web header to avoid a doubled-up chrome. */
html.in-native-app .header { display: none; }
html.in-native-app #app { padding-top: 8px; }
/* Respect iOS safe areas (notch / home indicator) when embedded full-screen. */
html.in-native-app #app {
  padding-left: max(16px, env(safe-area-inset-left));
  padding-right: max(16px, env(safe-area-inset-right));
  padding-bottom: max(80px, env(safe-area-inset-bottom));
}
