/* ============================================================
   PropReturn — real estate ROI calculator
   ============================================================ */

:root {
  --bg:            #f6f7f5;
  --surface:       #ffffff;
  --surface-2:     #fbfbfa;
  --border:        #e3e5e0;
  --border-strong: #cfd3cb;
  --text:          #1c1f1b;
  --text-2:        #5c635a;
  --text-3:        #888f85;
  --accent:        #1f6f4a;
  --accent-fg:     #ffffff;
  --accent-soft:   #e8f2ec;
  --accent-text:   #1a5c3e;
  --good:          #1f7a4d;
  --ok:            #8a6d1f;
  --bad:           #a33a2c;
  --good-bg:       #e7f3ec;
  --ok-bg:         #fbf2dd;
  --bad-bg:        #fbeae7;
  --radius:        10px;
  --radius-lg:     16px;
  --shadow:        0 1px 2px rgba(20,30,20,.05), 0 8px 24px -12px rgba(20,30,20,.12);
  --maxw:          1180px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:            #12140f;
    --surface:       #1a1d18;
    --surface-2:     #1f231d;
    --border:        #2c312a;
    --border-strong: #3d443a;
    --text:          #eef0ea;
    --text-2:        #a7ad9f;
    --text-3:        #7d8478;
    --accent:        #4fbb84;
    --accent-soft:   #1c2f25;
    --accent-text:   #7fd3a6;
    --good:          #56c48a;
    --ok:            #d3ad4e;
    --bad:           #e3796a;
    --good-bg:       #16281e;
    --ok-bg:         #2b2415;
    --bad-bg:        #2e1a17;
    --shadow:        0 1px 2px rgba(0,0,0,.3), 0 8px 24px -12px rgba(0,0,0,.6);
  }
}

:root[data-theme="dark"] {
  --bg:            #12140f;
  --surface:       #1a1d18;
  --surface-2:     #1f231d;
  --border:        #2c312a;
  --border-strong: #3d443a;
  --text:          #eef0ea;
  --text-2:        #a7ad9f;
  --text-3:        #7d8478;
  --accent:        #4fbb84;
  --accent-fg:     #0d1410;
  --accent-soft:   #1c2f25;
  --accent-text:   #7fd3a6;
  --good:          #56c48a;
  --ok:            #d3ad4e;
  --bad:           #e3796a;
  --good-bg:       #16281e;
  --ok-bg:         #2b2415;
  --bad-bg:        #2e1a17;
  --shadow:        0 1px 2px rgba(0,0,0,.3), 0 8px 24px -12px rgba(0,0,0,.6);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -.02em; margin: 0; font-weight: 640; }
p { margin: 0; }
a { color: inherit; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------------------------------- header ---------------------------------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: 24px; height: 62px; }
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; font-size: 17px; letter-spacing: -.02em; }
.brand-mark { color: var(--accent); font-size: 19px; }
.brand-text strong { font-weight: 680; }
.header-nav { display: flex; gap: 26px; margin-left: auto; font-size: 14.5px; color: var(--text-2); }
.header-nav a { text-decoration: none; }
.header-nav a:hover { color: var(--text); }

/* ---------------------------------- buttons ---------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 11px 20px;
  border-radius: var(--radius); border: 1px solid transparent;
  font: inherit; font-size: 15px; font-weight: 550;
  cursor: pointer; text-decoration: none;
  transition: background .15s, border-color .15s, color .15s, transform .05s;
}
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); color: var(--accent-fg); }
.btn.primary:hover { background: color-mix(in srgb, var(--accent) 86%, var(--text)); }
.btn.ghost { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn.ghost:hover { background: var(--surface-2); border-color: var(--text-3); }
.btn.small { padding: 8px 14px; font-size: 14px; }

/* ---------------------------------- hero ---------------------------------- */

.hero { padding: 76px 0 60px; border-bottom: 1px solid var(--border); }
.eyebrow {
  font-size: 12.5px; letter-spacing: .11em; text-transform: uppercase;
  color: var(--accent-text); font-weight: 620; margin-bottom: 16px;
}
.hero h1 { font-size: clamp(32px, 5.2vw, 54px); max-width: 17ch; }
.hero-tagline {
  margin-top: 14px; font-size: clamp(19px, 2.6vw, 26px); font-weight: 500;
  letter-spacing: -.015em; line-height: 1.25; max-width: 22ch; color: var(--text);
}
.hero-tagline .accent { color: var(--accent); }
.lede { margin-top: 20px; max-width: 62ch; color: var(--text-2); font-size: 17.5px; }
.hero-actions { display: flex; gap: 12px; margin-top: 30px; flex-wrap: wrap; }
.hero-stats {
  display: grid; grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 1px; margin: 52px 0 0; background: var(--border);
  border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden;
}
.hero-stats > div { background: var(--bg); padding: 16px 20px; }
.hero-stats dt { font-weight: 660; font-size: 15px; }
.hero-stats dd { margin: 3px 0 0; color: var(--text-2); font-size: 14px; }

/* ---------------------------------- sections ---------------------------------- */

.section { padding: 72px 0; }
.section.alt { background: var(--surface-2); border-block: 1px solid var(--border); }
.section-head { margin-bottom: 30px; }
.section-head h2 { font-size: clamp(24px, 3.2vw, 32px); }
.section-head p { color: var(--text-2); margin-top: 8px; }

/* ---------------------------------- tabs ---------------------------------- */

.tabs {
  display: flex; gap: 4px; padding: 4px; margin-bottom: 22px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 12px; width: fit-content; max-width: 100%; overflow-x: auto;
}
.tab {
  border: 0; background: transparent; color: var(--text-2);
  font: inherit; font-size: 14.5px; font-weight: 550;
  padding: 9px 18px; border-radius: 9px; cursor: pointer; white-space: nowrap;
  transition: background .15s, color .15s;
}
.tab:hover { color: var(--text); }
.tab.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }

.panel { display: none; }
.panel.active { display: block; animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ---------------------------------- calculator layout ---------------------------------- */

.calc { display: grid; grid-template-columns: minmax(0,1.32fr) minmax(0,1fr); gap: 24px; align-items: start; }

.inputs {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 6px 22px 20px;
}
fieldset { border: 0; margin: 0; padding: 16px 0 0; }
fieldset + fieldset { border-top: 1px solid var(--border); margin-top: 16px; }
legend {
  padding: 0; font-size: 12.5px; font-weight: 640;
  letter-spacing: .08em; text-transform: uppercase; color: var(--text-3);
}
.legend-note { font-style: normal; text-transform: none; letter-spacing: 0; font-weight: 450; }

/* Fields flow into as many columns as the panel width allows (3 → 2 → 1). */
.fields {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
  gap: 12px 16px; margin-top: 12px;
}
.field { display: grid; grid-template-rows: auto 1fr; gap: 5px; align-content: start; padding: 0; }
.field > span:first-child { font-size: 13.6px; line-height: 1.3; color: var(--text-2); }
.field em { display: block; font-style: normal; font-size: 12px; color: var(--text-3); margin-top: 1px; }

.input {
  display: flex; align-items: center;
  border: 1px solid var(--border-strong); border-radius: var(--radius);
  background: var(--surface-2); overflow: hidden;
  transition: border-color .15s, box-shadow .15s;
}
.input:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input i {
  font-style: normal; color: var(--text-3); font-size: 14px;
  padding: 0 2px 0 11px; user-select: none;
}
.input.pct i { padding: 0 11px 0 2px; }
.input { align-self: end; }
.input input {
  width: 100%; border: 0; background: transparent; color: var(--text);
  font: inherit; font-size: 15px; font-variant-numeric: tabular-nums;
  padding: 9px 8px; min-width: 0; outline: none;
}
.input.pct input { text-align: right; }
.input input::-webkit-outer-spin-button,
.input input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.input input[type=number] { -moz-appearance: textfield; }

/* ---------------------------------- results ---------------------------------- */

.results {
  position: sticky; top: 82px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 22px; box-shadow: var(--shadow);
}

.verdict {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 13px 6px 10px; border-radius: 999px;
  font-size: 13.5px; font-weight: 600; margin-bottom: 18px;
  background: var(--surface-2); color: var(--text-2);
}
.verdict .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.verdict.good { background: var(--good-bg); color: var(--good); }
.verdict.ok   { background: var(--ok-bg);   color: var(--ok); }
.verdict.bad  { background: var(--bad-bg);  color: var(--bad); }

.headline { display: flex; flex-direction: column; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.headline-label { font-size: 13.5px; color: var(--text-2); font-weight: 550; }
.headline-value {
  font-size: clamp(38px, 6vw, 50px); font-weight: 660; letter-spacing: -.035em;
  line-height: 1.05; margin: 6px 0 4px; font-variant-numeric: tabular-nums;
}
.headline-value.neg { color: var(--bad); }
.headline-sub { font-size: 13px; color: var(--text-3); }

.metric-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--border); margin: 20px 0 0; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.metric { background: var(--surface); padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.metric span { font-size: 12.8px; color: var(--text-2); }
.metric span em { font-style: normal; color: var(--text-3); }
.metric b { font-size: 17px; font-weight: 620; font-variant-numeric: tabular-nums; letter-spacing: -.015em; }
.metric b.neg { color: var(--bad); }
.metric b.pos { color: var(--good); }

.rule70 { margin-top: 16px; border: 1px solid var(--border); border-radius: var(--radius); padding: 13px 14px; background: var(--surface-2); }
.rule70-head { font-size: 12.8px; color: var(--text-2); font-weight: 560; }
.rule70-head em { font-style: normal; color: var(--text-3); font-weight: 400; }
.rule70-body { display: flex; align-items: baseline; gap: 10px; margin-top: 4px; flex-wrap: wrap; }
.rule70-body b { font-size: 19px; font-variant-numeric: tabular-nums; }
.rule70-body span { font-size: 13px; }
.rule70.pass .rule70-body span { color: var(--good); }
.rule70.fail .rule70-body span { color: var(--bad); }

.breakdown { margin-top: 16px; border-top: 1px solid var(--border); padding-top: 12px; }
.breakdown summary { cursor: pointer; font-size: 14px; color: var(--text-2); font-weight: 550; list-style: none; display: flex; align-items: center; gap: 7px; }
.breakdown summary::-webkit-details-marker { display: none; }
.breakdown summary::before { content: "▸"; color: var(--text-3); transition: transform .15s; }
.breakdown[open] summary::before { transform: rotate(90deg); }
.breakdown summary:hover { color: var(--text); }

table.mini { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 13.8px; }
table.mini th { text-align: left; font-weight: 600; color: var(--text-3); font-size: 12.5px; text-transform: uppercase; letter-spacing: .05em; padding: 6px 0; }
table.mini td { padding: 6px 0; border-top: 1px solid var(--border); font-variant-numeric: tabular-nums; }
table.mini td:last-child, table.mini th:last-child { text-align: right; }
table.mini tr.total td { font-weight: 660; border-top: 1.5px solid var(--border-strong); }
table.mini tr.sub td { color: var(--text-2); padding-left: 12px; }
table.mini .neg { color: var(--bad); }
.mini.scroll { display: block; max-height: 280px; overflow-y: auto; }

.result-actions { display: flex; gap: 8px; margin-top: 18px; flex-wrap: wrap; }

/* ---------------------------------- chart ---------------------------------- */

.chart-wrap { margin-top: 20px; }
.chart-legend { display: flex; gap: 16px; font-size: 12.5px; color: var(--text-2); margin-bottom: 8px; flex-wrap: wrap; }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.swatch { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.swatch.v { background: var(--accent); }
.swatch.e { background: color-mix(in srgb, var(--accent) 45%, var(--bg)); }
.swatch.d { background: var(--border-strong); }
.chart svg { width: 100%; height: auto; display: block; }
.chart .axis-label { font-size: 10px; fill: var(--text-3); }
.chart .grid-line { stroke: var(--border); stroke-width: 1; }

/* ---------------------------------- compare ---------------------------------- */

.empty {
  border: 1px dashed var(--border-strong); border-radius: var(--radius-lg);
  padding: 34px; text-align: center; color: var(--text-2); background: var(--surface);
}
.table-scroll { overflow-x: auto; }
.compare-table {
  width: 100%; border-collapse: collapse; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; font-size: 14.5px;
}
.compare-table th {
  text-align: left; font-size: 12.5px; text-transform: uppercase; letter-spacing: .05em;
  color: var(--text-3); font-weight: 620; padding: 12px 16px; background: var(--surface-2);
  border-bottom: 1px solid var(--border); white-space: nowrap;
}
.compare-table td { padding: 13px 16px; border-bottom: 1px solid var(--border); font-variant-numeric: tabular-nums; white-space: nowrap; }
.compare-table tr:last-child td { border-bottom: 0; }
.compare-table td:first-child { font-weight: 560; white-space: normal; min-width: 180px; }
.compare-table .pill { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 12.5px; font-weight: 600; }
.compare-table .pill.good { background: var(--good-bg); color: var(--good); }
.compare-table .pill.ok   { background: var(--ok-bg);   color: var(--ok); }
.compare-table .pill.bad  { background: var(--bad-bg);  color: var(--bad); }
.compare-table .neg { color: var(--bad); }
.row-del { border: 0; background: transparent; color: var(--text-3); cursor: pointer; font-size: 16px; padding: 2px 6px; border-radius: 6px; }
.row-del:hover { color: var(--bad); background: var(--bad-bg); }
.compare-actions { margin-top: 16px; }

/* ---------------------------------- learn ---------------------------------- */

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 22px; }
.card h3 { font-size: 17px; }
.card p { color: var(--text-2); font-size: 14.6px; margin-top: 10px; }
.card strong { color: var(--text); }
.formula {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 13.4px !important; color: var(--accent-text) !important;
  background: var(--accent-soft); padding: 9px 12px; border-radius: 8px; margin-top: 12px !important;
}
.callout {
  margin-top: 24px; padding: 20px 22px; border-radius: var(--radius-lg);
  border: 1px solid var(--border); border-left: 3px solid var(--accent);
  background: var(--surface); color: var(--text-2); font-size: 14.8px;
}
.callout strong { color: var(--text); }

/* ---------------------------------- faq ---------------------------------- */

.faq {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
}
.faq details + details { border-top: 1px solid var(--border); }
.faq summary {
  display: flex; align-items: center; gap: 12px;
  padding: 17px 22px; cursor: pointer; list-style: none;
  transition: background .15s;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { background: var(--surface-2); }
.faq summary::after {
  content: "+"; margin-left: auto; flex: 0 0 auto;
  color: var(--text-3); font-size: 20px; line-height: 1;
  transition: transform .18s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary h3 { font-size: 16.2px; font-weight: 580; margin: 0; }
.faq details p {
  padding: 0 22px 20px; margin: 0; max-width: 82ch;
  color: var(--text-2); font-size: 15px;
}
.faq details p strong { color: var(--text); font-weight: 620; }
.faq details p a { color: var(--accent-text); text-decoration: none; font-weight: 550; }
.faq details p a:hover { text-decoration: underline; }

/* ---------------------------------- roadmap ---------------------------------- */

.roadmap { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 16px; }
.roadmap li { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; }
.tag {
  display: inline-block; font-size: 11.5px; font-weight: 640; letter-spacing: .06em;
  text-transform: uppercase; color: var(--accent-text); background: var(--accent-soft);
  padding: 3px 9px; border-radius: 999px; margin-bottom: 11px;
}
.roadmap h4 { font-size: 16px; }
.roadmap p { color: var(--text-2); font-size: 14.4px; margin-top: 7px; }

/* ---------------------------------- about / founder ---------------------------------- */

.founder { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 24px; align-items: start; }

.founder-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px; text-align: center;
  position: sticky; top: 82px; box-shadow: var(--shadow);
}
.founder-photo {
  width: 132px; height: 132px; border-radius: 50%; object-fit: cover;
  display: block; margin: 0 auto 16px;
  border: 3px solid var(--surface); outline: 1px solid var(--border);
  box-shadow: 0 6px 20px -8px rgba(20, 30, 20, .35);
}
.founder-card h3 { font-size: 20px; }
.founder-role { font-size: 14.4px; color: var(--accent-text); font-weight: 560; margin-top: 4px; }
.founder-meta { font-size: 13.6px; color: var(--text-3); margin-top: 2px; }
.founder-contact { display: flex; gap: 8px; justify-content: center; margin-top: 18px; flex-wrap: wrap; }
.founder-email { margin-top: 12px; font-size: 13.4px; }
.founder-email a { color: var(--text-3); text-decoration: none; word-break: break-all; }
.founder-email a:hover { color: var(--accent-text); }

.founder-intro { font-size: 16.5px; color: var(--text-2); max-width: 68ch; }

.founder-facts {
  list-style: none; margin: 22px 0 0; padding: 0;
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
  background: var(--surface);
}
.founder-facts li { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 14px; padding: 12px 16px; font-size: 14.6px; }
.founder-facts li + li { border-top: 1px solid var(--border); }
.founder-facts span { color: var(--text-3); font-size: 12.6px; text-transform: uppercase; letter-spacing: .06em; font-weight: 620; padding-top: 2px; }
.founder-facts b { font-weight: 560; }

.founder-highlights { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; margin-top: 22px; }
.founder-highlights article { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; }
.founder-highlights h4 { font-size: 16px; }
.founder-highlights p { color: var(--text-2); font-size: 14.4px; margin-top: 8px; }

.founder-body .callout { margin-top: 22px; }
.founder-body .callout a { color: var(--accent-text); font-weight: 560; text-decoration: none; white-space: nowrap; }
.founder-body .callout a:hover { text-decoration: underline; }

/* ---------------------------------- footer ---------------------------------- */

.site-footer { border-top: 1px solid var(--border); padding: 34px 0; background: var(--bg); }
.footer-inner { color: var(--text-2); font-size: 14.4px; display: flex; flex-direction: column; gap: 6px; }
.footer-inner strong { color: var(--text); }
.footer-inner a { color: var(--accent-text); text-decoration: none; }
.footer-inner a:hover { text-decoration: underline; }
.fine { font-size: 13px; color: var(--text-3); }

/* ---------------------------------- modal dialog ---------------------------------- */

.modal {
  width: min(512px, calc(100vw - 32px));
  padding: 0; border: 0; background: transparent;
  color: var(--text); overflow: visible;
}
.modal::backdrop {
  background: rgba(12, 18, 14, .55);
  backdrop-filter: blur(3px);
  animation: modal-fade .18s ease-out;
}
.modal[open] .modal-panel { animation: modal-pop .2s cubic-bezier(.16, 1, .3, 1); }
@keyframes modal-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-pop {
  from { opacity: 0; transform: translateY(10px) scale(.97); }
  to   { opacity: 1; transform: none; }
}

.modal-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 24px 48px -12px rgba(10, 20, 12, .45), 0 0 0 1px rgba(10, 20, 12, .04);
  text-align: left;
}

.modal-body { display: flex; gap: 16px; padding: 24px 24px 20px; }

.modal-icon {
  flex: 0 0 40px; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-text);
}
.modal-icon svg { width: 21px; height: 21px; }
.modal.danger .modal-icon { background: var(--bad-bg); color: var(--bad); }

.modal-copy { flex: 1 1 auto; min-width: 0; }
.modal-title { font-size: 17px; font-weight: 640; }
.modal-message { margin-top: 7px; font-size: 14.4px; color: var(--text-2); }

.modal-field { display: block; margin-top: 16px; }
.modal-field[hidden] { display: none; }
.modal-field span { display: block; font-size: 13px; font-weight: 560; color: var(--text-2); margin-bottom: 6px; }
.modal-field input {
  width: 100%; font: inherit; font-size: 15px; color: var(--text);
  padding: 9px 12px; border-radius: var(--radius);
  border: 1px solid var(--border-strong); background: var(--surface-2);
  outline: none; transition: border-color .15s, box-shadow .15s;
}
.modal-field input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.modal-footer {
  display: flex; flex-direction: row-reverse; gap: 10px;
  padding: 14px 24px; background: var(--surface-2);
  border-top: 1px solid var(--border);
}
.modal-footer .btn { padding: 9px 18px; font-size: 14.5px; }
.modal.danger .modal-footer .btn.primary { background: var(--bad); color: #fff; }
.modal.danger .modal-footer .btn.primary:hover { background: color-mix(in srgb, var(--bad) 86%, #000); }

@media (max-width: 480px) {
  .modal-body { flex-direction: column; gap: 14px; }
  .modal-footer { flex-direction: column-reverse; }
  .modal-footer .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .modal::backdrop, .modal[open] .modal-panel { animation: none; }
}

/* ---------------------------------- responsive ---------------------------------- */

@media (max-width: 940px) {
  .calc { grid-template-columns: 1fr; }
  .results { position: static; }
  .header-nav { display: none; }
  .hero-stats { grid-template-columns: 1fr 1fr; }
  .founder { grid-template-columns: 1fr; }
  .founder-card { position: static; display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 0 22px; text-align: left; align-items: center; }
  .founder-photo { margin: 0; grid-row: span 5; }
  .founder-contact { justify-content: flex-start; margin-top: 14px; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  .hero { padding: 48px 0 40px; }
  .section { padding: 52px 0; }
  .fields { grid-template-columns: 1fr 1fr; gap: 10px 12px; }
  .metric-grid { grid-template-columns: 1fr; }
  .inputs { padding: 4px 16px 18px; }
  .founder-card { grid-template-columns: 1fr; text-align: center; }
  .founder-photo { margin: 0 auto 14px; grid-row: auto; }
  .founder-contact { justify-content: center; }
  .founder-facts li { grid-template-columns: 1fr; gap: 2px; }
}

/* ---------------------------------- print ---------------------------------- */

@media print {
  .site-header, .hero, .tabs, .result-actions, #roadmap, #compare, #about, .site-footer, .btn { display: none !important; }
  .panel { display: none !important; }
  .panel.active { display: block !important; }
  body { background: #fff; color: #000; font-size: 12px; }
  .section { padding: 0; }
  .calc { grid-template-columns: 1fr 1fr; gap: 16px; }
  .results, .inputs, .card { box-shadow: none; border: 1px solid #ccc; break-inside: avoid; }
  .breakdown summary { list-style: none; color: #444; }
}
