/* ============================================================
   RentCalculator.us — style.css
   Theme: Forest Green Financial / Dark-first with Light toggle
   Accent: Emerald (#10b981) + Mint (#34d399)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,400&display=swap');

/* ── CSS VARIABLES ── */
:root {
  --font-head: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;

  /* Dark theme (default) — Forest Green */
  --bg:       #0a1a0f;
  --bg2:      #0f2218;
  --surface:  #122a1a;
  --surface2: #1a3a24;
  --border:   rgba(16,185,129,0.18);
  --text:     #e8f5e9;
  --text2:    #a8d8b8;
  --muted:    #6aac88;
  --accent:   #10b981;
  --accent2:  #34d399;
  --accent3:  #6ee7b7;
  --danger:   #ef4444;
  --warning:  #f59e0b;
  --success:  #10b981;
  --shadow:   0 4px 32px rgba(16,185,129,0.12);
  --shadow2:  0 8px 48px rgba(16,185,129,0.18);
  --glow:     0 0 24px rgba(16,185,129,0.25);
}

[data-theme="light"] {
  --bg:       #f0faf4;
  --bg2:      #e0f5ea;
  --surface:  #ffffff;
  --surface2: #f2faf6;
  --border:   rgba(16,185,129,0.18);
  --text:     #0a1a0f;
  --text2:    #1a4a2a;
  --muted:    #4d8c66;
  --shadow:   0 4px 24px rgba(16,185,129,0.08);
  --shadow2:  0 8px 40px rgba(16,185,129,0.13);
  --glow:     0 0 20px rgba(16,185,129,0.18);
}

/* ── RESET & BASE ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  transition: background 0.3s, color 0.3s;
  overflow-x: hidden;
}

/* ── BG PATTERN ── */
body::before {
  content: '';
  position: fixed; inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 20% 10%, rgba(16,185,129,0.08) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 90%, rgba(52,211,153,0.06) 0%, transparent 60%);
  pointer-events: none; z-index: 0;
}

/* ── TYPOGRAPHY ── */
h1,h2,h3,h4,h5 { font-family: var(--font-head); font-weight: 700; line-height: 1.25; color: var(--text); }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 800; }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.35rem); }
p  { color: var(--text2); }
a  { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent2); }
strong { color: var(--text); }

/* ── LAYOUT ── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 48px); position: relative; z-index: 1; }
section { padding: 64px 0; }

/* ── HEADER ── */
.site-header {
  position: sticky; top: 0; z-index: 999;
  background: rgba(6,13,26,0.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0 clamp(16px,4vw,48px);
  transition: background 0.3s;
}
[data-theme="light"] .site-header {
  background: rgba(240,245,255,0.92);
}

.nav-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center;
  height: 64px; gap: 16px;
  overflow: hidden;
  min-width: 0;
}

.brand-logo {
  display: flex; align-items: center; gap: 8px;
  text-decoration: none; flex-shrink: 0;
  min-width: 0;
}
.brand-icon {
  width: 36px; height: 36px; border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 900; color: #fff;
  font-family: var(--font-head);
  box-shadow: var(--glow);
}
.brand-name {
  font-family: var(--font-head); font-weight: 800;
  font-size: 1.05rem; color: var(--text);
}
.brand-name span { color: var(--accent); }

.nav-links {
  display: flex; align-items: center; gap: 4px;
  list-style: none;
}
.nav-links a {
  color: var(--text2); font-size: 0.9rem; font-weight: 500;
  padding: 6px 14px; border-radius: 8px;
  transition: all 0.2s;
}
.nav-links a:hover, .nav-links a.active {
  color: var(--accent); background: rgba(16,185,129,0.1);
}

.nav-right { flex-shrink: 0; display: flex; align-items: center; gap: 10px; }

/* Theme Toggle */
.theme-toggle { position: relative; width: 56px; height: 28px; cursor: pointer; flex-shrink: 0; }
.theme-toggle input { display: none; }
.toggle-track {
  width: 100%; height: 100%;
  background: var(--surface2);
  border-radius: 99px;
  display: flex; align-items: center; padding: 3px;
  transition: background 0.3s;
  border: 1px solid rgba(16,185,129,0.25);
}
.toggle-thumb {
  width: 22px; height: 22px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  transition: transform 0.35s cubic-bezier(.34,1.56,.64,1);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; box-shadow: 0 2px 8px rgba(16,185,129,0.4);
}
[data-theme="light"] .toggle-thumb { transform: translateX(28px); }

/* Hamburger */
.hamburger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 4px;
}
.hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--text2); border-radius: 2px;
  transition: all 0.3s;
}
.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

.mobile-nav {
  display: none; flex-direction: column;
  background: var(--bg2); border-top: 1px solid var(--border);
  padding: 16px clamp(16px,4vw,48px);
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  color: var(--text2); font-size: 0.95rem; padding: 10px 0;
  border-bottom: 1px solid var(--border); font-weight: 500;
}
.mobile-nav a:last-child { border-bottom: none; }

/* ── HERO ── */
.hero {
  padding: 72px 0 56px;
  text-align: center;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(16,185,129,0.12); border: 1px solid rgba(16,185,129,0.25);
  color: var(--accent2); font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.07em; text-transform: uppercase;
  padding: 5px 14px; border-radius: 99px; margin-bottom: 20px;
}
.hero h1 { margin-bottom: 16px; }
.hero h1 .highlight {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub { font-size: 1.05rem; max-width: 600px; margin: 0 auto 32px; color: var(--text2); }
.hero-stats {
  display: flex; justify-content: center; gap: 32px;
  flex-wrap: wrap; margin-top: 36px;
}
.hero-stat { text-align: center; }
.hero-stat .num { font-family: var(--font-head); font-size: 1.5rem; font-weight: 800; color: var(--accent2); }
.hero-stat .lbl { font-size: 0.78rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }

/* ── TOOL SECTION ── */
.tool-section { padding: 0 0 64px; }

.tool-wrapper {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow2);
  overflow: hidden;
}

/* Tab Nav */
.tool-tabs {
  display: flex; gap: 0;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  overflow-x: auto; scrollbar-width: none;
}
.tool-tabs::-webkit-scrollbar { display: none; }
.tab-btn {
  flex: 1; min-width: 140px;
  padding: 16px 20px;
  background: none; border: none;
  color: var(--text2); font-family: var(--font-body);
  font-size: 0.88rem; font-weight: 600;
  cursor: pointer; transition: all 0.25s;
  display: flex; align-items: center; justify-content: center;
  gap: 7px; border-bottom: 3px solid transparent;
  white-space: nowrap;
}
.tab-btn + .tab-btn { border-left: 1px solid var(--border); }
.tab-btn:hover { color: var(--text); background: rgba(16,185,129,0.06); }
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); background: rgba(16,185,129,0.05); }

/* Tab short/full text */
.tab-short { display: none; }
.tab-full  { display: inline; }

/* Tab Panels */
.tab-panel { display: none; }
.tab-panel.active { display: block; }

.tool-body { padding: clamp(20px,4vw,40px); }

/* Two-col layout inside tool */
.tool-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}

/* Input group */
.input-group { margin-bottom: 20px; }
.input-group label {
  display: block; font-size: 0.84rem; font-weight: 600;
  color: var(--text2); margin-bottom: 7px; letter-spacing: 0.03em;
}
.input-group label span { color: var(--muted); font-weight: 400; }
.input-wrap { position: relative; }
.input-prefix, .input-suffix {
  position: absolute; top: 50%; transform: translateY(-50%);
  color: var(--muted); font-size: 0.9rem; font-weight: 600; pointer-events: none;
}
.input-prefix { left: 14px; }
.input-suffix { right: 14px; }

.input-wrap input, .input-wrap select, .input-wrap input[type="date"] {
  width: 100%; padding: 12px 14px;
  background: var(--surface2); border: 1.5px solid var(--border);
  border-radius: 10px; color: var(--text);
  font-family: var(--font-body); font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
}
.input-wrap input[type="number"] { padding-left: 32px; }
.input-wrap input:focus, .input-wrap select:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(16,185,129,0.15);
}
.input-wrap select option { background: var(--bg2); }

.input-hint { font-size: 0.78rem; color: var(--muted); margin-top: 5px; }

/* Checkbox */
.check-row {
  display: flex; align-items: center; gap: 9px;
  cursor: pointer; font-size: 0.88rem; color: var(--text2);
  margin-bottom: 20px;
}
.check-row input[type="checkbox"] { accent-color: var(--accent); width: 16px; height: 16px; }

/* Calc Button */
.btn-calc {
  width: 100%; padding: 15px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border: none; border-radius: 12px;
  color: #fff; font-family: var(--font-head); font-size: 1rem; font-weight: 700;
  cursor: pointer; transition: all 0.25s;
  box-shadow: 0 4px 20px rgba(16,185,129,0.35);
  letter-spacing: 0.02em;
}
.btn-calc:hover { transform: translateY(-2px); box-shadow: 0 6px 28px rgba(16,185,129,0.45); }
.btn-calc:active { transform: translateY(0); }

.btn-secondary {
  padding: 10px 20px; background: var(--surface2);
  border: 1.5px solid var(--border); border-radius: 10px;
  color: var(--text2); font-family: var(--font-body); font-size: 0.88rem; font-weight: 600;
  cursor: pointer; transition: all 0.2s;
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

/* ── RESULTS PANEL ── */
.results-panel {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: clamp(16px,3vw,28px);
  min-height: 300px;
  overflow: hidden;
  min-width: 0;
}
.results-empty {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  min-height: 280px; text-align: center; gap: 12px;
}
.results-empty .empty-icon { font-size: 2.5rem; opacity: 0.35; }
.results-empty p { color: var(--muted); font-size: 0.88rem; }

.result-title {
  font-family: var(--font-head); font-size: 0.75rem;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--muted); margin-bottom: 16px;
}

/* Result card */
.result-big {
  text-align: center; margin-bottom: 20px;
  padding: 20px; background: var(--surface);
  border-radius: 12px; border: 1px solid var(--border);
  overflow: hidden; max-width: 100%;
}
.result-big .amount {
  font-family: var(--font-head); font-size: clamp(1.1rem,4.5vw,2.8rem);
  font-weight: 800; color: var(--accent2); line-height: 1.2;
  word-break: break-word; overflow-wrap: anywhere;
  max-width: 100%; display: block;
}
.result-big .label { font-size: 0.82rem; color: var(--muted); margin-top: 4px; }

/* Gauge / Meter */
.affordability-meter { margin-bottom: 20px; }
.meter-bar {
  height: 10px; border-radius: 99px;
  background: linear-gradient(to right, var(--success) 0%, var(--success) 33%, var(--warning) 33%, var(--warning) 66%, var(--danger) 66%);
  position: relative; margin-bottom: 6px;
}
.meter-bar .meter-indicator {
  position: absolute; top: -4px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--text); border: 3px solid var(--bg2);
  transform: translateX(-50%);
  transition: left 0.5s cubic-bezier(.34,1.56,.64,1);
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.meter-labels {
  display: flex; justify-content: space-between;
  font-size: 0.72rem; color: var(--muted);
}

/* Meter zone badge */
.zone-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 99px; font-size: 0.8rem; font-weight: 600;
  margin-bottom: 16px;
}
.zone-safe   { background: rgba(16,185,129,0.12); color: var(--success); border: 1px solid rgba(16,185,129,0.25); }
.zone-ok     { background: rgba(245,158,11,0.12); color: var(--warning); border: 1px solid rgba(245,158,11,0.25); }
.zone-danger { background: rgba(239,68,68,0.12);  color: var(--danger);  border: 1px solid rgba(239,68,68,0.25); }

/* Stats grid */
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.stat-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 12px 14px;
}
.stat-card .s-val {
  font-family: var(--font-head); font-size: 1.1rem;
  font-weight: 700; color: var(--text);
}
.stat-card .s-lbl { font-size: 0.72rem; color: var(--muted); margin-top: 2px; }

/* Budget donut chart container */
.chart-wrap { position: relative; max-width: 200px; margin: 0 auto 16px; }
.chart-legend { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.chart-legend li {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.82rem; color: var(--text2);
}
.legend-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.legend-val { margin-left: auto; font-weight: 600; color: var(--text); font-family: var(--font-head); }

/* Rule cards */
.rule-pills { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.rule-pill {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px;
}
.rule-pill .rp-name { font-size: 0.82rem; color: var(--text2); }
.rule-pill .rp-val { font-family: var(--font-head); font-weight: 700; color: var(--accent2); }

/* PDF button row */
.result-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.btn-pdf {
  flex: 1; min-width: 120px;
  padding: 10px 14px; border-radius: 10px;
  background: rgba(16,185,129,0.1); border: 1px solid rgba(16,185,129,0.25);
  color: var(--accent); font-size: 0.85rem; font-weight: 600;
  cursor: pointer; font-family: var(--font-body); transition: all 0.2s;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.btn-pdf:hover { background: rgba(16,185,129,0.18); border-color: var(--accent); }
.btn-reset { flex: 0 0 auto; }

/* Forecast table */
.forecast-table {
  width: 100%; border-collapse: collapse;
  font-size: 0.84rem; margin-bottom: 16px;
}
.forecast-table th {
  text-align: left; padding: 8px 10px;
  color: var(--muted); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em;
  border-bottom: 1px solid var(--border);
}
.forecast-table td {
  padding: 8px 10px; border-bottom: 1px solid rgba(16,185,129,0.06);
  color: var(--text2);
}
.forecast-table tr:last-child td { border-bottom: none; }
.forecast-table .t-year { color: var(--text); font-weight: 600; }
.forecast-table .t-rent { color: var(--accent2); font-weight: 600; font-family: var(--font-head); }

/* Co-applicant section */
.co-app-section { display: none; }
.co-app-section.visible { display: block; }

/* ── HOW-IT-WORKS SECTION ── */
.how-section { background: var(--bg2); border-radius: 20px; padding: 48px clamp(20px,4vw,48px); margin-bottom: 64px; }
.section-label {
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent2); margin-bottom: 10px;
}
.how-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 24px; margin-top: 32px; }
.how-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 24px;
  transition: transform 0.2s, box-shadow 0.2s;
}
.how-card:hover { transform: translateY(-3px); box-shadow: var(--shadow2); }
.how-num {
  font-family: var(--font-head); font-size: 2rem; font-weight: 800;
  color: var(--accent); opacity: 0.25; line-height: 1; margin-bottom: 8px;
}
.how-card h3 { font-size: 0.95rem; margin-bottom: 8px; }
.how-card p  { font-size: 0.83rem; color: var(--text2); line-height: 1.6; }

/* ── RULES / EXPLAINER SECTION ── */
.rules-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px,1fr)); gap: 20px; }
.rule-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 28px;
  position: relative; overflow: hidden;
}
.rule-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(to right, var(--accent), var(--accent2));
}
.rule-card .rc-emoji { font-size: 2rem; margin-bottom: 12px; display: block; }
.rule-card h3 { margin-bottom: 8px; }
.rule-card p { font-size: 0.85rem; line-height: 1.65; }
.rule-formula {
  display: inline-block; margin-top: 14px;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 8px; padding: 8px 14px;
  font-family: monospace; font-size: 0.82rem; color: var(--accent2);
}

/* City averages table */
.city-table-wrap { overflow-x: auto; margin-top: 24px; }
.city-table {
  width: 100%; border-collapse: collapse;
  font-size: 0.88rem; min-width: 540px;
}
.city-table thead tr {
  background: var(--bg2);
}
.city-table th {
  padding: 12px 16px; text-align: left;
  color: var(--muted); font-size: 0.75rem;
  text-transform: uppercase; letter-spacing: 0.08em;
  border-bottom: 2px solid var(--border);
}
.city-table td {
  padding: 12px 16px; border-bottom: 1px solid var(--border);
  color: var(--text2);
}
.city-table tbody tr:hover td { background: rgba(16,185,129,0.04); }
.city-table .city-name { color: var(--text); font-weight: 600; }
.city-table .price { color: var(--accent2); font-weight: 600; font-family: var(--font-head); }

/* ── ARTICLE / GUIDE ── */
.guide-section { max-width: 820px; margin: 0 auto; }
.guide-section h2 { margin-bottom: 12px; }
.guide-section h3 { margin: 28px 0 10px; color: var(--accent2); }
.guide-section p { margin-bottom: 14px; line-height: 1.75; }
.guide-section ul, .guide-section ol {
  padding-left: 22px; margin-bottom: 14px;
}
.guide-section li { color: var(--text2); margin-bottom: 7px; line-height: 1.65; }
.guide-section hr { border: none; border-top: 1px solid var(--border); margin: 32px 0; }
.formula-box {
  background: var(--bg2); border-left: 3px solid var(--accent);
  border-radius: 0 10px 10px 0; padding: 14px 18px; margin: 14px 0;
  font-size: 0.88rem;
}
.formula-box .f-title { font-weight: 700; color: var(--accent); margin-bottom: 4px; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; }
.formula-box .f-formula { font-family: monospace; color: var(--accent2); font-size: 0.95rem; }
.formula-box .f-example { color: var(--muted); font-size: 0.82rem; margin-top: 4px; }

/* Hidden cost cards */
.cost-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px,1fr)); gap: 14px; margin: 20px 0; }
.cost-card {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 12px; padding: 18px;
}
.cost-card .cc-icon { font-size: 1.4rem; margin-bottom: 8px; }
.cost-card h4 { font-size: 0.88rem; margin-bottom: 5px; }
.cost-card p  { font-size: 0.78rem; color: var(--muted); }

/* ── FAQ ── */
.faq-list { max-width: 760px; margin: 0 auto; }
.faq-item {
  border-bottom: 1px solid var(--border); overflow: hidden;
}
.faq-q {
  width: 100%; background: none; border: none;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 0; gap: 16px;
  color: var(--text); font-family: var(--font-body);
  font-size: 0.95rem; font-weight: 600; text-align: left;
  cursor: pointer; transition: color 0.2s;
}
.faq-q:hover { color: var(--accent); }
.faq-arrow {
  flex-shrink: 0; width: 22px; height: 22px;
  background: var(--surface2); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; transition: transform 0.3s, background 0.2s;
  color: var(--muted);
}
.faq-item.open .faq-arrow { transform: rotate(180deg); background: rgba(16,185,129,0.1); color: var(--accent); }
.faq-a {
  max-height: 0; overflow: hidden;
  transition: max-height 0.35s ease, padding 0.25s;
}
.faq-item.open .faq-a { max-height: 300px; }
.faq-a p { padding: 0 0 18px; color: var(--text2); font-size: 0.88rem; line-height: 1.7; }

/* ── ADSENSE PLACEHOLDER ── */
.ad-slot {
  background: var(--surface); border: 1px dashed var(--border);
  border-radius: 10px; padding: 24px;
  text-align: center; margin: 32px 0;
  min-height: 100px; display: flex; align-items: center; justify-content: center;
}

/* ── FOOTER ── */
.site-footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 60px clamp(16px,4vw,48px) 0;
  margin-top: 80px;
  font-family: var(--font-body);
}
.footer-top {
  max-width: 1200px; margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
}
.footer-brand .brand-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-bottom: 16px; }
.footer-brand .brand-icon {
  width: 38px; height: 38px; border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 900; color: #fff;
  font-family: var(--font-head);
}
.footer-brand .brand-name { font-family: var(--font-head); font-weight: 800; font-size: 1.05rem; color: var(--text); }
.footer-brand .brand-name span { color: var(--accent); }
.footer-brand p { color: var(--text2); font-size: 0.88rem; line-height: 1.7; margin-bottom: 20px; }
.footer-social { display: flex; gap: 12px; flex-wrap: wrap; }
.social-btn {
  width: 44px; height: 44px; border-radius: 10px;
  background: var(--surface2); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; text-decoration: none;
  transition: all 0.25s; cursor: pointer; color: var(--text2);
}
.social-btn:hover { background: rgba(16,185,129,0.1); border-color: rgba(16,185,129,0.35); transform: translateY(-3px); }
.footer-col h4 {
  font-family: var(--font-head); font-size: 0.76rem;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 18px;
}
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul a { color: var(--text2); text-decoration: none; font-size: 0.88rem; transition: color 0.2s; }
.footer-col ul a:hover { color: var(--accent); }
.footer-bottom-bar {
  max-width: 1200px; margin: 0 auto;
  border-top: 1px solid var(--border);
  padding: 20px 0;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px;
}
.footer-bottom-bar p { color: var(--muted); font-size: 0.82rem; }
.footer-bottom-bar a { color: var(--accent); text-decoration: none; }
.footer-bottom-links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-bottom-links a { color: var(--muted); text-decoration: none; font-size: 0.82rem; transition: color 0.2s; }
.footer-bottom-links a:hover { color: var(--accent); }
.footer-privacy-note { max-width: 1200px; margin: 0 auto; padding: 16px 0 24px; border-top: 1px solid var(--border); }
.footer-privacy-note p { color: var(--muted); font-size: 0.78rem; line-height: 1.65; text-align: center; }
.footer-privacy-note strong { color: var(--text2); }

/* ── REVEAL ANIMATION ── */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.55s ease, transform 0.55s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ── UTILITIES ── */
.text-accent  { color: var(--accent); }
.text-accent2 { color: var(--accent2); }
.text-muted   { color: var(--muted); }
.text-center  { text-align: center; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-16 { margin-bottom: 16px; }
.mb-32 { margin-bottom: 32px; }
.divider { border: none; border-top: 1px solid var(--border); margin: 32px 0; }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .tool-cols { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .nav-links { display: none; }
  .hamburger { display: flex; }
}
@media (max-width: 600px) {
  .footer-top { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom-bar { flex-direction: column; text-align: center; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  /* Tool tabs — 2 row wrap on mobile */
  .tool-tabs {
    flex-wrap: wrap;
    overflow-x: visible;
    gap: 0;
  }
  .tool-tabs::-webkit-scrollbar { display: none; }
  /* Header mobile fix */
  .nav-inner { height: 56px; gap: 8px; padding: 0 12px; }
  .brand-name { font-size: 0.82rem; letter-spacing: -0.01em; }
  .brand-icon { width: 28px; height: 28px; font-size: 14px; border-radius: 7px; }
  /* Tool body mobile */
  .tool-body { padding: 16px; }
  .result-big .amount { font-size: clamp(1.2rem, 7vw, 2rem); }
  .rule-pill { flex-direction: column; align-items: flex-start; gap: 2px; }
  .rule-pill .rp-val { font-size: 1rem; }
  /* Stats 2-col on mobile */
  .stats-grid { grid-template-columns: 1fr 1fr; }
  /* Result actions stack */
  .result-actions { flex-direction: column; }
  .result-actions .btn-pdf,
  .result-actions .btn-secondary { width: 100%; }
  /* Hero stats 2-col */
  .hero-stats { gap: 20px; }
  /* How grid 1-col */
  .how-grid { grid-template-columns: 1fr; }
  /* Rules grid 1-col */
  .rules-grid { grid-template-columns: 1fr; }
  /* Tab buttons — horizontal scroll, show emoji + short text */
  .tab-btn {
    flex: 1 1 33%;
    font-size: 0.78rem;
    padding: 11px 8px;
    min-width: 0;
    max-width: none;
    white-space: nowrap;
    gap: 5px;
    border-left: none;
    border-bottom: 1px solid var(--border);
    border-right: 1px solid var(--border);
  }
  .tab-btn + .tab-btn { border-left: none; }
  .tab-btn:last-child { border-right: none; }
  .tab-short { display: inline; }
  .tab-full  { display: none; }
  /* City table scroll */
  .city-table-wrap { -webkit-overflow-scrolling: touch; }
  /* Formula box */
  .formula-box { font-size: 0.82rem; padding: 10px 12px; }
  /* Guide section */
  .guide-section h2 { font-size: 1.2rem; }
  /* Cost grid */
  .cost-grid { grid-template-columns: 1fr 1fr; }
  /* Rvb proscons */
  .rvb-proscons { grid-template-columns: 1fr; }
}
@media (max-width: 400px) {
  .stats-grid { grid-template-columns: 1fr; }
  .cost-grid { grid-template-columns: 1fr; }
  .result-big .amount { font-size: clamp(1rem, 7vw, 1.5rem); }
  .tab-btn { flex: 1 1 33%; font-size: 0.74rem; padding: 10px 6px; }
  .brand-name { font-size: 0.75rem; }
  .brand-icon { width: 26px; height: 26px; font-size: 13px; }
}

/* ── INNER PAGE HERO (about, contact etc) ── */
.inner-hero {
  padding: 56px 0 40px; text-align: center;
}
.inner-hero h1 { margin-bottom: 12px; }
.inner-hero p { max-width: 520px; margin: 0 auto; }

/* ── CONTACT FORM ── */
.contact-form-wrap {
  max-width: 640px; margin: 0 auto;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 18px; padding: clamp(24px,4vw,40px);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.contact-form-wrap .input-group input,
.contact-form-wrap .input-group textarea,
.contact-form-wrap .input-group select {
  width: 100%; padding: 12px 14px;
  background: var(--surface2); border: 1.5px solid var(--border);
  border-radius: 10px; color: var(--text);
  font-family: var(--font-body); font-size: 0.93rem;
  transition: border-color 0.2s, box-shadow 0.2s; resize: vertical;
}
.contact-form-wrap .input-group input:focus,
.contact-form-wrap .input-group textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(16,185,129,0.15);
}
.form-msg { padding: 12px 16px; border-radius: 10px; margin-top: 12px; font-size: 0.88rem; font-weight: 600; display: none; }
.form-msg.success { background: rgba(16,185,129,0.1); border: 1px solid rgba(16,185,129,0.25); color: var(--success); display: block; }
.form-msg.error   { background: rgba(239,68,68,0.1);   border: 1px solid rgba(239,68,68,0.25);   color: var(--danger);  display: block; }
.honeypot { display: none !important; }

/* ── PRIVACY / DISCLAIMER / ABOUT ── */
.legal-content { max-width: 780px; margin: 0 auto; }
.legal-content h2 { margin: 32px 0 10px; }
.legal-content h3 { margin: 22px 0 8px; color: var(--accent2); }
.legal-content p, .legal-content li { font-size: 0.9rem; line-height: 1.75; color: var(--text2); margin-bottom: 10px; }
.legal-content ul { padding-left: 20px; }
.legal-content a { color: var(--accent); }
@media (max-width: 600px) {
  .form-row { grid-template-columns: 1fr; }
}

  .htu-result-list { grid-template-columns: 1fr; }
  .htu-section { padding: 24px 16px; }
  .htu-tool-title { padding: 14px 16px; }
  .htu-field { padding: 16px; }
}

/* ── HOW TO USE — ACCORDION CARDS ── */
.htu-accordion { display: flex; flex-direction: column; gap: 10px; }

.htu-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  transition: box-shadow 0.2s;
}
.htu-card.open { box-shadow: var(--shadow2); border-color: rgba(16,185,129,0.3); }

.htu-card-header {
  width: 100%; background: none; border: none;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; cursor: pointer; gap: 12px;
  transition: background 0.2s;
}
.htu-card-header:hover { background: var(--surface2); }
/* Static (always-open) header — no pointer, no hover */
.htu-card-header--static {
  cursor: default; pointer-events: none;
}
.htu-card-header--static:hover { background: none; }

.htu-card-left { display: flex; align-items: center; gap: 12px; text-align: left; }
.htu-badge {
  font-family: var(--font-head); font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.07em; text-transform: uppercase;
  background: rgba(16,185,129,0.12); border: 1px solid rgba(16,185,129,0.2);
  color: var(--accent2); padding: 3px 9px; border-radius: 99px;
  flex-shrink: 0;
}
.htu-card-emoji { font-size: 20px; flex-shrink: 0; }
.htu-card-title {
  font-family: var(--font-head); font-size: 0.95rem;
  font-weight: 700; color: var(--text);
}
.htu-card-sub { font-size: 0.78rem; color: var(--muted); margin-top: 2px; }
.htu-chevron {
  font-size: 14px; color: var(--muted); flex-shrink: 0;
  transition: transform 0.3s; display: inline-block;
}
.htu-card.open .htu-chevron { transform: rotate(180deg); color: var(--accent); }

/* Body — hidden by default */
.htu-card-body {
  max-height: 0; overflow: hidden;
  transition: max-height 0.4s ease;
}
.htu-card.open .htu-card-body { max-height: 2000px; }

/* Rows inside card */
.htu-rows { border-top: 1px solid var(--border); }
.htu-row {
  display: grid;
  grid-template-columns: 180px 1fr 220px;
  gap: 0;
  border-bottom: 1px solid var(--border);
  align-items: stretch;
}
.htu-row-last { border-bottom: none; }

.htu-row-field {
  padding: 14px 16px;
  font-family: var(--font-head); font-size: 0.8rem; font-weight: 700;
  color: var(--accent2); border-right: 1px solid var(--border);
  background: rgba(16,185,129,0.04);
  display: flex; align-items: center;
}
.htu-row-desc {
  padding: 14px 16px;
  font-size: 0.82rem; color: var(--text2); line-height: 1.6;
  border-right: 1px solid var(--border);
  display: flex; align-items: center;
}
.htu-row-desc strong { color: var(--text); }
.htu-row-eg {
  padding: 14px 16px;
  font-size: 0.78rem; color: var(--muted);
  font-family: monospace; line-height: 1.5;
  background: var(--bg2);
  display: flex; align-items: center;
}
.htu-row-eg strong { color: var(--accent2); font-family: var(--font-head); }

/* Output pills row */
.htu-output-row {
  padding: 14px 20px;
  display: flex; flex-wrap: wrap; gap: 8px;
  background: linear-gradient(135deg, rgba(16,185,129,0.06), transparent);
  border-top: 1px solid var(--border);
}
.htu-output-pill {
  font-size: 0.75rem; font-weight: 600;
  background: rgba(16,185,129,0.1); border: 1px solid rgba(16,185,129,0.22);
  color: var(--accent2); padding: 4px 12px; border-radius: 99px;
}

/* Mobile */
@media (max-width: 800px) {
  .htu-row { grid-template-columns: 1fr; }
  .htu-row-field { border-right: none; border-bottom: 1px solid var(--border); padding: 10px 16px; }
  .htu-row-desc { border-right: none; border-bottom: 1px solid var(--border); padding: 10px 16px; }
  .htu-row-eg { padding: 10px 16px; }
  .htu-card-header { padding: 14px 16px; }
  .htu-badge { display: none; }
}
@media (max-width: 480px) {
  .htu-card-sub { display: none; }
  .htu-output-row { padding: 12px 16px; }
}