/* ── DESIGN TOKENS ── */
:root {
  --accent:       #1E3A6E;
  --accent-hover: #2563EB;
  --accent-soft:  rgba(37, 99, 235, 0.10);
  --accent-glow:  rgba(37, 99, 235, 0.18);

  --bg:        #F7F6F3;
  --surface:   #FFFFFF;
  --surface-2: #F2F1EE;

  --text:   #18181B;
  --text-2: #52525B;
  --text-3: #A1A1AA;

  --good:    #15803D;
  --good-bg: rgba(21, 128, 61, 0.08);
  --bad:     #DC2626;
  --bad-bg:  rgba(220, 38, 38, 0.08);

  --col-cost: #C2410C;
  --col-gain: #15803D;
  --col-adv:  #6D28D9;

  --border:        rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.14);
  --line:          rgba(0, 0, 0, 0.06);

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.07), 0 1px 4px rgba(0,0,0,0.05);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.10), 0 2px 8px rgba(0,0,0,0.06);

  --radius:    14px;
  --radius-sm: 9px;
  --radius-xs: 6px;

  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Noise grain ── */
#grain-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.02;
  mix-blend-mode: overlay;
}

/* ── Bootstrap overrides ── */
.container-lg { --bs-gutter-x: 1rem; }
.row { --bs-gutter-x: 1rem; }
.col-lg-4, .col-lg-8 { display: flex; flex-direction: column; }

/* ── Hero ── */
.hero {
  position: relative;
  z-index: 1;
  overflow: hidden;
  background: #0D1520;
}

.hero-mesh {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.055) 1px, transparent 1px);
  background-size: 22px 22px;
}

.hero-mesh::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 90% at -5% 50%, rgba(30,58,110,0.75) 0%, transparent 60%),
    radial-gradient(ellipse 40% 55% at 100% 0%,  rgba(37,99,235,0.12) 0%, transparent 55%);
}

.hero-grid { display: none; }

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 1300px;
  margin: 0 auto;
  padding: 48px 28px 42px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.hero h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(22px, 2.8vw, 36px);
  font-weight: 700;
  letter-spacing: -0.6px;
  line-height: 1.18;
  color: #EEF2FF;
  margin-bottom: 10px;
}

.hero h1 span { color: #93C5FD; }

.hero p {
  font-size: 13.5px;
  color: rgba(180, 200, 235, 0.58);
  line-height: 1.68;
  max-width: 640px;
}

/* ── Hero stat bar ── */
.hero-bar {
  position: relative;
  z-index: 2;
  background: #FFFFFF;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 0 28px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.22);
}

.hero-bar-inner {
  max-width: 1300px;
  margin: 0 auto;
  display: flex;
  align-items: stretch;
  height: 54px;
  overflow-x: auto;
  scrollbar-width: none;
}

.hero-bar-inner::-webkit-scrollbar { display: none; }

.hero-stat {
  display: flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
  flex-shrink: 0;
  padding: 0 24px;
  border-right: 1px solid rgba(0,0,0,0.07);
}

.hero-stat:first-child { padding-left: 0; }
.hero-stat:last-child  { border-right: none; }

.hero-stat-sep { display: none; }

.hero-stat-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

.hero-stat-value {
  font-family: 'DM Mono', monospace;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
  transition: color 0.25s;
}

.hero-stat-value.good { color: var(--good); font-weight: 600; }
.hero-stat-value.bad  { color: var(--bad);  font-weight: 600; }

/* ── Layout ── */
.wrap {
  position: relative;
  z-index: 1;
  padding: 28px 0 72px;
}

.wrap .container-lg {
  padding-left: 16px;
  padding-right: 16px;
}

/* ── Cards ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 24px;
  transition: box-shadow 0.2s, border-color 0.2s;
}

.card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-lg);
}

.card-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.1px;
  margin-bottom: 4px;
}

.card-sub {
  color: var(--text-2);
  font-size: 12.5px;
  line-height: 1.55;
}

/* ── Section label ── */
.section-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-3);
  margin: 22px 0 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* ── Inputs ── */
.input-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.field label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-3);
  letter-spacing: 0.08em;
  margin-bottom: 5px;
  text-transform: uppercase;
}

.field-help {
  margin-top: 5px;
  color: var(--text-3);
  font-size: 10.5px;
  line-height: 1.45;
}

.field input {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid #E4E4E7;
  border-radius: var(--radius-xs);
  font-size: 13.5px;
  font-family: 'DM Mono', monospace;
  font-weight: 400;
  background: #FAFAFA;
  color: var(--text);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
  -moz-appearance: textfield;
}

.field input::-webkit-inner-spin-button,
.field input::-webkit-outer-spin-button { -webkit-appearance: none; }

.field input:focus {
  border-color: var(--accent-hover);
  box-shadow: 0 0 0 3px var(--accent-soft);
  background: #FFFFFF;
}

.field input:hover:not(:focus) {
  border-color: #C4C4C8;
  background: #FFFFFF;
}

/* ── Intro / info blocks ── */
.intro-block {
  margin-top: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  padding: 14px 16px;
}

.intro-block h4, .guide-block h4, .how-block h4 {
  font-size: 10px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.intro-block p {
  color: var(--text-2);
  font-size: 12px;
  line-height: 1.65;
  margin-bottom: 6px;
}

.intro-block p:last-child { margin-bottom: 0; }

.guide-block {
  margin: 16px 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #FAFAFA;
  padding: 14px 16px;
}

.guide-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 16px;
}

.guide-item {
  color: var(--text-2);
  font-size: 11.5px;
  line-height: 1.6;
}

.guide-item strong { color: var(--text); font-weight: 600; }

/* ── Advanced accordion ── */
details {
  margin-top: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #FAFAFA;
  overflow: hidden;
}

summary {
  cursor: pointer;
  padding: 11px 16px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-2);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background 0.15s;
  user-select: none;
}

summary:hover { background: rgba(0,0,0,0.03); }
summary::-webkit-details-marker { display: none; }

.summary-arrow {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #E4E4E7;
  display: flex; align-items: center; justify-content: center;
  font-size: 8px;
  color: var(--text-2);
  transition: transform 0.22s cubic-bezier(0.4,0,0.2,1), background 0.15s;
  flex-shrink: 0;
}

details[open] .summary-arrow {
  transform: rotate(90deg);
  background: var(--accent-soft);
  color: var(--accent-hover);
}

.adv-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 0 16px 16px;
}

/* ── Toolbar / Buttons ── */
.toolbar {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  flex-wrap: wrap;
}

button {
  border: none;
  border-radius: var(--radius-xs);
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  transition: transform 0.18s cubic-bezier(0.34,1.56,0.64,1),
              box-shadow 0.18s ease,
              background 0.18s ease;
  letter-spacing: 0.01em;
}

.btn-primary {
  background: var(--accent);
  color: #FFFFFF;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.08) inset,
    0 2px 4px rgba(0,0,0,0.20),
    0 4px 14px rgba(30,58,110,0.28);
}

.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.10) inset,
    0 4px 8px rgba(0,0,0,0.14),
    0 8px 24px rgba(37,99,235,0.32);
  transform: translateY(-2px);
}

.btn-primary:active {
  transform: translateY(0px);
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text-2);
  border: 1.5px solid #E4E4E7;
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: #F4F4F5;
  border-color: #C4C4C8;
  color: var(--text);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.btn-secondary:active {
  transform: translateY(0px);
  box-shadow: var(--shadow-sm);
}

/* ── How-to / info blocks ── */
.how-block {
  margin-top: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #FAFAFA;
  padding: 14px 16px;
}

.how-block ul {
  padding-left: 0;
  list-style: none;
  color: var(--text-2);
  font-size: 12px;
  line-height: 1.65;
}

.how-block li {
  display: flex;
  gap: 8px;
  padding: 3px 0;
}

.how-block li::before {
  content: '—';
  color: var(--text-3);
  flex-shrink: 0;
  font-size: 11px;
  margin-top: 2px;
}

.how-block strong { color: var(--text); font-weight: 600; }

/* ── Fix notice ── */
.fix-notice {
  margin-top: 14px;
  background: rgba(120, 53, 15, 0.05);
  border: 1px solid rgba(120, 53, 15, 0.13);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  font-size: 11.5px;
  color: #92400E;
  line-height: 1.6;
}

.fix-notice strong { color: #78350F; font-weight: 600; }

/* ── Metric cards ── */
.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}

.metric {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 18px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  transition: transform 0.18s cubic-bezier(0.34,1.56,0.64,1),
              box-shadow 0.18s ease,
              border-color 0.18s ease;
  animation: fadeUp 0.4s both;
}

.metric:nth-child(1) { animation-delay: 0.05s; }
.metric:nth-child(2) { animation-delay: 0.10s; }
.metric:nth-child(3) { animation-delay: 0.15s; }
.metric:nth-child(4) { animation-delay: 0.20s; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.metric::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-hover));
  opacity: 0;
  transition: opacity 0.2s;
}

.metric:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-lg);
}

.metric:hover::before { opacity: 1; }

.metric .k {
  font-size: 9.5px;
  font-weight: 700;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 10px;
}

.metric .v {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.5px;
  color: var(--text);
  transition: color 0.25s;
}

.metric .hint {
  font-size: 10.5px;
  color: var(--text-3);
  margin-top: 7px;
  line-height: 1.4;
}

.good { color: var(--good) !important; }
.bad  { color: var(--bad)  !important; }

/* ── Table card ── */
.table-card { padding: 0; overflow: hidden; }

.table-head {
  padding: 20px 22px 14px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(0,0,0,0.11) transparent;
}

.table-wrap::-webkit-scrollbar { height: 5px; }
.table-wrap::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.11);
  border-radius: 3px;
}

table {
  width: 100%;
  min-width: 1380px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}

th, td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  text-align: right;
  white-space: nowrap;
  vertical-align: middle;
}

th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #F5F4F1;
  color: var(--text-3);
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  border-bottom: 1px solid rgba(0,0,0,0.09);
}

th:first-child, td:first-child {
  text-align: left;
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--surface);
}

thead th:first-child { z-index: 3; background: #F5F4F1; }

tbody tr { transition: background 0.12s; }

tbody td:first-child {
  background: var(--surface);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 13.5px;
  color: var(--text);
  transition: background 0.12s;
}

tbody tr:hover td { background: rgba(0,0,0,0.025); }
tbody tr:hover td:first-child { background: rgba(0,0,0,0.035); }

.year-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

.year-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: #CBD5E1;
  flex-shrink: 0;
}

/* Column data colors */
.col-cost    { color: var(--col-cost); font-family: 'DM Mono', monospace; font-size: 12.5px; }
.col-gain    { color: var(--col-gain); font-family: 'DM Mono', monospace; font-size: 12.5px; }
.col-adv     { color: var(--col-adv);  font-family: 'DM Mono', monospace; font-size: 12.5px; }
.col-neutral { font-family: 'DM Mono', monospace; font-size: 12.5px; color: var(--text-2); }

.net-positive {
  background: var(--good-bg) !important;
  color: var(--good) !important;
  font-weight: 700;
  font-family: 'DM Mono', monospace;
  font-size: 12.5px;
}

.net-negative {
  background: var(--bad-bg) !important;
  color: var(--bad) !important;
  font-weight: 700;
  font-family: 'DM Mono', monospace;
  font-size: 12.5px;
}

/* ── Info tooltip ── */
.info {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 13px; height: 13px;
  margin-left: 4px;
  border-radius: 50%;
  background: #E4E4E7;
  color: var(--text-3);
  font-size: 7.5px;
  font-weight: 800;
  cursor: help;
  vertical-align: middle;
  font-style: normal;
  transition: background 0.15s, color 0.15s;
  border: 1px solid rgba(0,0,0,0.08);
}

.info:hover { background: #D4D4D8; color: var(--text-2); }

/* ── Column header color groups ── */
.col-group-cost { color: var(--col-cost) !important; }
.col-group-gain { color: var(--col-gain) !important; }
.col-group-adv  { color: var(--col-adv)  !important; }

/* ── Legend ── */
.legend {
  padding: 14px 22px;
  border-top: 1px solid var(--line);
  background: #FAFAFA;
  color: var(--text-3);
  font-size: 11px;
  line-height: 1.6;
}

/* ── Legend color dots ── */
.legend-dots {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.legend-dot {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-2);
}

.legend-dot span {
  width: 7px; height: 7px;
  border-radius: 2px;
  flex-shrink: 0;
}

/* ── Responsive ── */
@media (max-width: 991px) {
  .metrics { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 767px) {
  .input-grid, .adv-grid, .metrics { grid-template-columns: 1fr; }
  .hero h1 { font-size: 21px; }
  .wrap { padding: 14px 0 36px; }
  .wrap .container-lg { padding-left: 10px; padding-right: 10px; }
  .hero-inner { padding: 28px 16px 24px; }
  .card { padding: 16px; }
  .section-label { margin: 16px 0 8px; }
  .table-head { flex-direction: column; gap: 10px; }
  .legend-dots { gap: 10px; }
}

@media (max-width: 575px) {
  .hero-bar { padding: 0 16px; }
  .hero-bar-inner { flex-wrap: wrap; height: auto; padding: 10px 0; gap: 0; }
  .hero-stat { padding: 8px 12px; border-right: none; border-bottom: 1px solid rgba(0,0,0,0.06); width: 50%; }
  .hero-stat:nth-child(odd) { border-right: 1px solid rgba(0,0,0,0.06); }
  .hero-stat:last-child, .hero-stat:nth-last-child(-n+2):nth-child(odd) { border-bottom: none; }
  .metrics { grid-template-columns: 1fr 1fr; }
  .card-title { font-size: 14px; }
  table th, table td { padding: 7px 8px; }
}

/* ── Row fade-in ── */
tbody tr { animation: fadeIn 0.2s both; }

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── Site Navigation ── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 21, 32, 0.97);
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.nav-inner {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  height: 52px;
  gap: 32px;
}

.nav-brand {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: #EEF2FF;
  text-decoration: none;
  letter-spacing: -0.2px;
  flex-shrink: 0;
}

.nav-brand span { color: #93C5FD; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav-links::-webkit-scrollbar { display: none; }

.nav-link {
  font-size: 12.5px;
  font-weight: 500;
  color: rgba(180, 200, 235, 0.65);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: var(--radius-xs);
  white-space: nowrap;
  transition: color 0.15s, background 0.15s;
}

.nav-link:hover {
  color: #EEF2FF;
  background: rgba(255,255,255,0.07);
}

.nav-link.active {
  color: #93C5FD;
  background: rgba(37, 99, 235, 0.14);
  font-weight: 600;
}

/* ── Site Footer ── */
.site-footer {
  background: #0D1520;
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 22px 28px;
  text-align: center;
  color: rgba(180, 200, 235, 0.35);
  font-size: 11.5px;
  line-height: 1.8;
}

.site-footer a {
  color: rgba(180, 200, 235, 0.55);
  text-decoration: none;
  transition: color 0.15s;
}

.site-footer a:hover { color: #93C5FD; }

/* ── Narrower table overrides for amort/affordability ── */
table.table-amort  { min-width: 860px; }
table.table-afford { min-width: 680px; }

/* ── Equity progress bar ── */
.eq-bar-track {
  height: 5px;
  background: rgba(0,0,0,0.08);
  border-radius: 3px;
  overflow: hidden;
}

.eq-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-hover));
  border-radius: 3px;
  transition: width 0.4s ease;
  min-width: 2px;
}

/* ── Scenario badges ── */
.badge-pill {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 3px 8px;
  border-radius: 20px;
}

.badge-conservative {
  background: rgba(21, 128, 61, 0.10);
  color: #15803D;
  border: 1px solid rgba(21, 128, 61, 0.20);
}

.badge-moderate {
  background: rgba(30, 58, 110, 0.10);
  color: #1E3A6E;
  border: 1px solid rgba(30, 58, 110, 0.22);
}

.badge-aggressive {
  background: rgba(220, 38, 38, 0.08);
  color: #DC2626;
  border: 1px solid rgba(220, 38, 38, 0.18);
}

/* ── Payment breakdown card ── */
.breakdown-rows {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.breakdown-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.breakdown-row:last-child { border-bottom: none; }

.breakdown-label { color: var(--text-2); font-size: 12.5px; }

.breakdown-val {
  font-family: 'DM Mono', monospace;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}

.breakdown-row.total-row .breakdown-label {
  font-weight: 700;
  color: var(--text);
  font-family: 'Space Grotesk', sans-serif;
}

.breakdown-row.total-row .breakdown-val {
  font-weight: 700;
  font-size: 14px;
  color: var(--accent);
}

/* ── Guide page: Step list ── */
.step-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.step-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 13px 15px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}

.step-item:hover {
  border-color: var(--border-strong);
  transform: translateX(3px);
  box-shadow: var(--shadow-md);
}

.step-num {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: #93C5FD;
  background: rgba(37, 99, 235, 0.09);
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: 50%;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step-body h4 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 3px;
}

.step-body p {
  font-size: 11.5px;
  color: var(--text-2);
  line-height: 1.6;
  margin: 0;
}

/* ── Guide page: Glossary ── */
.glossary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.glossary-item {
  padding: 11px 13px;
  background: #FAFAFA;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s, background 0.15s;
}

.glossary-item:hover {
  border-color: var(--border-strong);
  background: var(--surface);
}

.glossary-term {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 3px;
}

.glossary-def {
  font-size: 11.5px;
  color: var(--text-2);
  line-height: 1.6;
}

/* ── Guide page: Stat tiles ── */
.stat-tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.stat-tile {
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  text-align: center;
  transition: transform 0.18s, box-shadow 0.18s;
}

.stat-tile:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-tile-val {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--accent-hover);
  line-height: 1.1;
  margin-bottom: 4px;
}

.stat-tile-label {
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-3);
  margin-bottom: 4px;
}

.stat-tile-desc {
  font-size: 11px;
  color: var(--text-2);
  line-height: 1.5;
}

/* ── Guide page: Resource cards ── */
.resource-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.resource-card {
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
}

.resource-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

.resource-card a { text-decoration: none; color: inherit; display: block; }

.resource-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-hover);
  margin-bottom: 5px;
  transition: color 0.15s;
}

.resource-card:hover .resource-name { color: var(--accent); }

.resource-desc {
  font-size: 11.5px;
  color: var(--text-2);
  line-height: 1.6;
}

.resource-tag {
  display: inline-block;
  margin-top: 8px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-3);
  background: var(--surface-2);
  border-radius: 4px;
  padding: 2px 7px;
}

/* ── Guide page: Tips / Mistakes list ── */
.tips-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tips-list li {
  display: flex;
  gap: 10px;
  padding: 10px 12px;
  background: #FAFAFA;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.6;
  transition: border-color 0.15s, background 0.15s;
}

.tips-list li:hover {
  border-color: var(--border-strong);
  background: var(--surface);
}

.tips-list li strong { color: var(--text); font-weight: 600; }

.tip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 6px;
}

.tip-dot-green { background: var(--good); }
.tip-dot-red   { background: var(--bad); }

/* ── Guide page: Calculator CTA cards ── */
.cta-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.cta-card {
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  text-align: center;
  text-decoration: none;
  display: block;
  transition: transform 0.18s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.18s, border-color 0.18s;
}

.cta-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-strong);
}

.cta-card-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--accent-hover);
  margin-bottom: 6px;
}

.cta-card-desc {
  font-size: 11.5px;
  color: var(--text-2);
  line-height: 1.55;
}

/* ── Responsive additions ── */
@media (max-width: 767px) {
  .nav-inner          { padding: 0 16px; gap: 16px; }
  .glossary-grid      { grid-template-columns: 1fr; }
  .resource-grid      { grid-template-columns: 1fr; }
  .stat-tiles         { grid-template-columns: 1fr 1fr; }
  .cta-grid           { grid-template-columns: 1fr; }
}

@media (max-width: 575px) {
  .stat-tiles { grid-template-columns: 1fr 1fr; }
  .site-footer { padding: 18px 16px; }
}
