/* ==========================================================================
   SimpleHome — style.css (v27: Real Design)
   ========================================================================== */

/* 1. VARIABLES */
:root {
  --page-width: 1240px;

  /* Blue */
  --brand:        #2563eb;
  --brand-dark:   #1d4ed8;
  --brand-darker: #1e3a8a;
  --brand-light:  #60a5fa;
  --brand-pale:   #eff6ff;
  --brand-grad:   linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
  --brand-glow:   0 8px 28px -6px rgba(37, 99, 235, 0.45);

  /* Neutrals */
  --bg:        #f4f7ff;
  --ink-100:   #0f172a;
  --ink-200:   #1e293b;
  --ink-300:   #64748b;
  --ink-400:   #94a3b8;
  --border:    #dbeafe;
  --border-md: #bfdbfe;

  /* Legacy aliases — keep state pages working */
  --text-soft:     #1e293b;
  --text-softer:   #64748b;
  --pill-bg:       rgba(37,99,235,0.07);
  --pill-border:   rgba(37,99,235,0.22);
  --card-bg:       #ffffff;
  --glass-surface: rgba(255,255,255,0.85);
  --glass-border:  1px solid rgba(255,255,255,0.9);
  --glass-shine:   inset 0 1px 0 rgba(255,255,255,0.9);
  --glass-blur:    blur(20px) saturate(150%);
  --ease-spring:   cubic-bezier(0.4, 0, 0.2, 1);
  --ease-snap:     cubic-bezier(0.175, 0.885, 0.32, 1.1);
  --bg-core:       #f4f7ff;
  --bg-grad:       none;

  /* Shadows */
  --shadow-sm:    0 1px 3px rgba(15,23,42,0.07), 0 1px 2px rgba(15,23,42,0.04);
  --shadow-card:  0 4px 24px -4px rgba(15,23,42,0.09), 0 1px 4px rgba(15,23,42,0.05);
  --shadow-float: 0 20px 48px -10px rgba(37,99,235,0.25), 0 4px 16px -4px rgba(37,99,235,0.15);

  /* Shape */
  --radius-xl:   28px;
  --radius-lg:   18px;
  --radius-md:   12px;
  --radius-pill: 999px;

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --font-body: "Poppins", system-ui, -apple-system, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", monospace;
}

body.theme-dark {
  --brand:        #60a5fa;
  --brand-dark:   #3b82f6;
  --brand-darker: #1e3a8a;
  --brand-light:  #93c5fd;
  --brand-pale:   rgba(37,99,235,0.16);
  --brand-grad:   linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
  --brand-glow:   0 8px 28px -6px rgba(96,165,250,0.45);

  --bg:      #060c1a;
  --bg-core: #060c1a;
  --ink-100: #f0f6ff;
  --ink-200: #c7d8f0;
  --ink-300: #7b99c2;
  --ink-400: #2e4a6e;
  --border:    rgba(96,165,250,0.14);
  --border-md: rgba(96,165,250,0.30);

  --text-soft:  #c7d8f0;
  --text-softer:#7b99c2;
  --card-bg:    #0d1b35;

  --shadow-sm:    0 2px 8px rgba(0,0,0,0.35);
  --shadow-card:  0 8px 32px -8px rgba(0,0,0,0.6);
  --shadow-float: 0 20px 48px -10px rgba(0,0,0,0.7);
}

/* 2. BASE */
*, *::before, *::after {
  box-sizing: border-box; margin: 0; padding: 0;
  -webkit-tap-highlight-color: transparent;
}
html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink-100);
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: var(--brand); text-underline-offset: 2px; text-decoration-color: color-mix(in srgb, var(--brand) 35%, transparent); }
a:hover { color: var(--brand-dark); }

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--ink-400); border-radius: 99px; }

.page {
  max-width: var(--page-width);
  margin: 0 auto;
  padding: 20px 20px 120px;
}

/* =====================================================================
   3. HERO SHELL — dark blue gradient full-width card
   ===================================================================== */
.hero-shell {
  background: var(--brand-grad);
  border-radius: var(--radius-xl);
  overflow: hidden;
  margin-bottom: 16px;
  position: relative;
  /* Dot grid texture */
  background-image:
    radial-gradient(circle, rgba(255,255,255,0.07) 1px, transparent 1px),
    var(--brand-grad);
  background-size: 28px 28px, 100% 100%;
}

/* Glow orbs */
.hero-shell::before {
  content: '';
  position: absolute; top: -60px; right: -60px;
  width: 380px; height: 380px; border-radius: 50%;
  background: radial-gradient(circle, rgba(96,165,250,0.28) 0%, transparent 65%);
  pointer-events: none;
}
.hero-shell::after {
  content: '';
  position: absolute; bottom: -80px; left: -40px;
  width: 320px; height: 320px; border-radius: 50%;
  background: radial-gradient(circle, rgba(29,78,216,0.45) 0%, transparent 65%);
  pointer-events: none;
}

/* =====================================================================
   4. TOPBAR (inside hero — white-on-dark)
   ===================================================================== */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  background: rgba(255,255,255,0.09);
  border-bottom: 1px solid rgba(255,255,255,0.12);
  position: relative; z-index: 10;
}

.brand { display: flex; align-items: center; gap: 12px; cursor: pointer; text-decoration: none; }

.brand-logo {
  width: 38px; height: 38px;
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.28);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 0.95rem; color: #fff;
  flex-shrink: 0;
}

.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-size: 0.97rem; font-weight: 700; color: #fff; letter-spacing: -0.01em; }
.brand-text span { font-size: 0.66rem; color: rgba(255,255,255,0.55); font-weight: 500; }

.topbar-right { display: flex; align-items: center; gap: 8px; }

.tag-chip-main {
  display: flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: var(--radius-pill);
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.20);
  font-size: 0.75rem; font-weight: 600; color: rgba(255,255,255,0.88);
  white-space: nowrap;
}
.tag-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #4ade80; flex-shrink: 0;
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity:1; } 50% { opacity:0.35; } }

.theme-toggle {
  height: 34px; padding: 0 14px; border-radius: var(--radius-pill);
  border: 1px solid rgba(255,255,255,0.22);
  background: rgba(255,255,255,0.08);
  font-size: 0.8rem; font-weight: 600; color: rgba(255,255,255,0.82);
  font-family: var(--font-body); cursor: pointer; transition: 0.2s;
  white-space: nowrap; display: flex; align-items: center;
}
select.theme-toggle {
  appearance: none; -webkit-appearance: none; padding-right: 28px;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.6)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat; background-position: right 9px center; background-size: 13px;
  background-color: rgba(255,255,255,0.08);
}
.theme-toggle:hover { background: rgba(255,255,255,0.18); border-color: rgba(255,255,255,0.4); color: #fff; }

/* =====================================================================
   5. HERO CONTENT
   ===================================================================== */
.hero-main {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 48px;
  align-items: center;
  padding: 44px 36px 52px;
  position: relative; z-index: 2;
}
.hero-copy { text-align: left; }

.hero-h1 {
  font-size: clamp(1.9rem, 3.4vw, 2.75rem);
  line-height: 1.12;
  margin-bottom: 14px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
}

.hero-copy p {
  font-size: 0.97rem;
  color: rgba(255,255,255,0.72);
  margin-bottom: 10px;
  line-height: 1.72;
  max-width: 500px;
}

.hero-mini-note {
  font-size: 0.83rem;
  color: rgba(255,255,255,0.55);
  margin-top: 8px;
  line-height: 1.6;
}
.hero-mini-note a {
  color: rgba(255,255,255,0.78);
  text-decoration-color: rgba(255,255,255,0.25);
}
.hero-mini-note a:hover { color: #fff; }

.hero-list { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 20px; }
.hero-pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 14px; border-radius: var(--radius-pill);
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.18);
  color: rgba(255,255,255,0.88);
  font-size: 0.79rem; font-weight: 600;
  transition: background 0.2s;
}
.hero-pill:hover { background: rgba(255,255,255,0.18); }
.hero-pill svg { flex-shrink: 0; opacity: 0.75; }

/* =====================================================================
   6. CALC PREVIEW CARD (hero-side)
   ===================================================================== */
.hero-side { display: flex; flex-direction: column; }

.calc-preview {
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 20px;
  overflow: hidden;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.cp-header {
  background: rgba(0,0,0,0.15);
  padding: 8px 16px 0;
}
.cp-house-svg { display: block; width: 100%; height: auto; }

.cp-body { padding: 18px 20px 20px; }

.cp-sample-tag {
  display: inline-block;
  font-size: 0.65rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: rgba(255,255,255,0.5);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: var(--radius-pill);
  padding: 3px 10px;
  margin-bottom: 10px;
}

.cp-cost {
  font-size: 1.65rem; font-weight: 900;
  color: #fff; letter-spacing: -0.03em;
  margin-bottom: 4px; line-height: 1;
}

.cp-meta {
  font-size: 0.76rem; color: rgba(255,255,255,0.55);
  margin-bottom: 16px;
}

.cp-bars { display: flex; flex-direction: column; gap: 9px; }
.cp-bar-row { display: flex; align-items: center; gap: 8px; }
.cp-bar-label { width: 58px; font-size: 0.72rem; color: rgba(255,255,255,0.65); font-weight: 500; flex-shrink: 0; }
.cp-track { flex: 1; height: 5px; background: rgba(255,255,255,0.12); border-radius: 99px; overflow: hidden; }
.cp-fill { height: 100%; background: rgba(255,255,255,0.55); border-radius: 99px; }
.cp-bar-pct { width: 28px; text-align: right; font-size: 0.72rem; color: rgba(255,255,255,0.65); font-weight: 600; flex-shrink: 0; }

/* =====================================================================
   7. FEATURES ROW
   ===================================================================== */
.features-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 20px;
}
body.theme-dark .features-row { background: var(--border); }

.feat {
  background: #fff;
  padding: 18px 20px;
  display: flex; align-items: center; gap: 14px;
  transition: background 0.18s;
}
body.theme-dark .feat { background: #0d1b35; }
.feat:hover { background: var(--brand-pale); }
body.theme-dark .feat:hover { background: rgba(37,99,235,0.12); }

.feat-icon {
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--brand-pale); border: 1px solid var(--border-md);
  display: flex; align-items: center; justify-content: center;
  color: var(--brand); flex-shrink: 0;
  transition: background 0.18s;
}
body.theme-dark .feat-icon { background: rgba(37,99,235,0.15); border-color: var(--border-md); }
.feat:hover .feat-icon { background: rgba(37,99,235,0.15); }

.feat-text { min-width: 0; }
.feat-text strong { display: block; font-size: 0.88rem; font-weight: 700; color: var(--ink-100); white-space: nowrap; }
.feat-text span { font-size: 0.76rem; color: var(--ink-300); }

/* =====================================================================
   8. MAIN LAYOUT
   ===================================================================== */
.layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  align-items: start;
}

/* =====================================================================
   9. CARDS
   ===================================================================== */
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: var(--shadow-card);
}
body.theme-dark .card { background: #0d1b35; border-color: var(--border); }
.card:hover { transform: none; box-shadow: var(--shadow-card); }

.card h2 {
  font-size: 1.15rem; font-weight: 800; margin-bottom: 4px;
  letter-spacing: -0.02em; color: var(--ink-100);
}
.muted { font-size: 0.87rem; color: var(--ink-300); margin-bottom: 24px; }

/* Step pills */
.step-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.step-pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 14px 5px 5px;
  background: var(--brand-pale); border: 1px solid var(--border-md);
  border-radius: var(--radius-pill);
  font-size: 0.76rem; font-weight: 600; color: var(--brand-dark);
}
body.theme-dark .step-pill { background: rgba(37,99,235,0.13); border-color: var(--border-md); color: var(--brand-light); }
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--brand-grad); color: #fff;
  font-size: 0.68rem; font-weight: 800; flex-shrink: 0;
}

/* Presets */
.preset-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }
.preset-btn {
  background: transparent; border: 1px solid var(--border-md);
  padding: 7px 15px; border-radius: var(--radius-md);
  font-size: 0.79rem; font-weight: 600; color: var(--ink-300);
  cursor: pointer; transition: 0.18s; font-family: var(--font-body);
}
.preset-btn:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-pale); }

/* =====================================================================
   10. FORM
   ===================================================================== */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.form-grid > div,
.sh-check {
  background: #f8fbff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 13px 16px;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
body.theme-dark .form-grid > div,
body.theme-dark .sh-check { background: rgba(37,99,235,0.05); border-color: var(--border); }

.form-grid > div:focus-within {
  background: #fff;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}
body.theme-dark .form-grid > div:focus-within { background: rgba(37,99,235,0.08); }

#elevatorBox { grid-column: 1 / -1; }

.sh-check {
  display: flex; flex-direction: column; gap: 8px;
  border-style: dashed; cursor: default;
}
.sh-check:hover { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(37,99,235,0.10); }
.sh-check-row { display: flex; align-items: center; gap: 10px; }
.sh-check input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--brand); cursor: pointer; flex-shrink: 0; }
.sh-check-text { font-size: 0.93rem; font-weight: 600; color: var(--ink-100); }

label {
  display: block; font-size: 0.67rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.09em;
  color: var(--ink-300); margin-bottom: 5px;
}

input, select {
  width: 100%; background: transparent; border: none; outline: none;
  font-size: 0.97rem; color: var(--ink-100); font-weight: 600;
  font-family: inherit; padding: 2px 0;
}
select { cursor: pointer; }
input[type="number"] { appearance: textfield; -moz-appearance: textfield; }
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.help-text { font-size: 0.75rem; color: var(--ink-300); margin-top: 5px; line-height: 1.45; }

/* =====================================================================
   11. BUTTONS
   ===================================================================== */
.btn-row {
  margin-top: 28px;
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; flex-wrap: wrap;
}

.btn-secondary {
  background: transparent; border: 1px solid var(--border-md);
  padding: 10px 22px; border-radius: var(--radius-pill);
  font-size: 0.85rem; font-weight: 600; color: var(--ink-300);
  cursor: pointer; transition: 0.18s; font-family: var(--font-body);
  display: flex; align-items: center; gap: 8px;
}
.btn-secondary:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-pale); }

button.primary {
  background: var(--brand-grad); color: #fff;
  border: none; border-radius: var(--radius-pill);
  padding: 14px 40px; font-size: 1rem; font-weight: 700;
  cursor: pointer; box-shadow: var(--brand-glow);
  transition: 0.2s; font-family: var(--font-body);
  display: flex; align-items: center; gap: 8px;
}
button.primary:hover { filter: brightness(1.08); box-shadow: 0 14px 38px -8px rgba(37,99,235,0.55); }
button.primary:active { transform: scale(0.98); }

/* =====================================================================
   12. RESULTS
   ===================================================================== */
#results { display: none; margin-top: 32px; animation: rise 0.4s var(--ease); }
@keyframes rise { from { opacity:0; transform:translateY(14px); } to { opacity:1; transform:translateY(0); } }

.total-shell {
  padding: 2px; border-radius: var(--radius-xl);
  background: var(--brand-grad); box-shadow: var(--shadow-float);
  margin-bottom: 24px;
}
.total-card {
  background: #fff; border-radius: 26px; padding: 36px 30px;
  text-align: center;
}
body.theme-dark .total-card { background: #060c1a; }

.total-label {
  font-size: 0.67rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.14em; color: var(--ink-300); margin-bottom: 10px;
}
.total-value {
  font-weight: 900; line-height: 1; margin-bottom: 14px;
  background: var(--brand-grad); background-clip: text;
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  letter-spacing: -0.04em;
  font-size: clamp(2.2rem, 9vw, 3.6rem);
  font-variant-numeric: tabular-nums;
}
.total-subline { font-size: 0.95rem; color: var(--ink-200); line-height: 1.7; }
.total-subline span { color: var(--brand); font-weight: 700; }
.range-line { font-size: 0.84rem; color: var(--ink-300); margin-top: 6px; }

.pill, #rRatePill {
  display: inline-flex; align-items: center; gap: 6px; justify-content: center;
  background: var(--brand-pale); border: 1px solid var(--border-md);
  padding: 5px 14px; border-radius: var(--radius-pill);
  font-size: 0.81rem; margin-top: 14px; margin-bottom: 14px;
  color: var(--brand-dark); font-weight: 600;
}

.mini-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; text-align: left; }
.mini-grid > div {
  background: var(--brand-pale); padding: 12px 14px; border-radius: 10px;
  border: 1px solid var(--border);
  font-size: 0.74rem; color: var(--ink-300); line-height: 1.3;
}
body.theme-dark .mini-grid > div { background: rgba(37,99,235,0.08); border-color: var(--border); }
.mini-grid strong {
  display: block; font-size: 0.92rem; font-weight: 700;
  color: var(--ink-100); margin-top: 4px;
  font-family: var(--font-mono);
}

.section-title {
  font-size: 0.95rem; font-weight: 700; color: var(--ink-100);
  margin-top: 28px; margin-bottom: 2px;
}

/* =====================================================================
   13. TABLE
   ===================================================================== */
table {
  width: 100%; border-collapse: separate; border-spacing: 0;
  border: 1px solid var(--border); border-radius: 14px;
  overflow: hidden; margin-top: 12px;
}
th {
  text-align: left; padding: 13px 16px;
  background: var(--brand-pale);
  font-size: 0.69rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--brand-dark);
}
body.theme-dark th { background: rgba(37,99,235,0.12); color: var(--brand-light); }
td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 0.91rem; color: var(--ink-200); font-weight: 500;
  word-break: break-word;
}
body.theme-dark td { border-bottom-color: var(--border); }
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--brand-pale); color: var(--ink-100); }
body.theme-dark tr:hover td { background: rgba(37,99,235,0.08); }
td:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }
th:nth-child(1), td:nth-child(1) { width: 52%; }
th:nth-child(2), td:nth-child(2) { width: 13%; text-align: center; }
th:nth-child(3), td:nth-child(3) { width: 35%; white-space: nowrap; }

/* Bars */
#barsContainer { margin-top: 20px; }
.bar-row { display: flex; align-items: center; gap: 14px; margin-bottom: 11px; }
.bar-label { width: 170px; font-size: 0.79rem; font-weight: 600; color: var(--ink-200); line-height: 1.3; flex-shrink: 0; }
.bar-track { flex: 1; height: 6px; background: var(--border); border-radius: 99px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--brand-grad); border-radius: 99px; transition: width 1s var(--ease); }
.bar-value { width: 38px; text-align: right; font-weight: 700; font-size: 0.81rem; color: var(--brand); font-family: var(--font-mono); }

/* Materials */
.materials-list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; list-style: none; margin-top: 12px; }
.materials-list li {
  background: var(--brand-pale); padding: 16px; border-radius: 12px;
  border: 1px solid var(--border); transition: border-color 0.18s;
}
body.theme-dark .materials-list li { background: rgba(37,99,235,0.07); border-color: var(--border); }
.materials-list li:hover { border-color: var(--brand); }
.materials-label { display: block; font-size: 0.68rem; color: var(--ink-300); font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 4px; }
.materials-list span:last-child { font-size: 1.08rem; font-weight: 700; color: var(--ink-100); font-family: var(--font-mono); }

/* =====================================================================
   14. ASIDE
   ===================================================================== */
.side-card-tagline { font-size: 0.88rem; color: var(--ink-300); margin-bottom: 16px; line-height: 1.65; }

.state-note-box {
  padding: 16px; border-radius: var(--radius-md);
  background: var(--brand-pale); border: 1px solid var(--border-md);
  color: var(--ink-200); font-size: 0.88rem; line-height: 1.65;
  margin-bottom: 16px;
}

.side-fine { font-size: 0.8rem; color: var(--ink-300); line-height: 1.55; margin-top: 10px; }

/* Legacy side items */
.side-highlight-item {
  background: var(--brand-pale); padding: 14px; border-radius: 12px;
  border: 1px solid var(--border-md); margin-bottom: 12px;
  display: flex; gap: 12px;
}
.side-highlight-icon { font-size: 1.4rem; color: var(--brand); }
.side-highlight-item strong { display: block; font-size: 0.92rem; font-weight: 700; color: var(--ink-100); margin-bottom: 2px; }
.side-highlight-item div { font-size: 0.84rem; color: var(--ink-200); line-height: 1.5; }

/* =====================================================================
   15. STATE PAGES GRID
   ===================================================================== */
.state-pages {
  margin-top: 20px;
  padding: 32px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
}
body.theme-dark .state-pages { background: #0d1b35; border-color: var(--border); }

.sp-header { margin-bottom: 24px; }
.sp-header h2 {
  font-size: 1.2rem; font-weight: 800;
  color: var(--ink-100); margin-bottom: 6px; letter-spacing: -0.02em;
}
.sp-header p { font-size: 0.88rem; color: var(--ink-300); }

.sp-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.sp-card {
  display: flex; flex-direction: column;
  padding: 18px 16px;
  background: var(--brand-pale);
  border: 1px solid var(--border-md);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: background 0.18s, border-color 0.18s, transform 0.18s, box-shadow 0.18s;
  position: relative;
}
body.theme-dark .sp-card { background: rgba(37,99,235,0.08); border-color: var(--border); }
.sp-card:hover {
  background: var(--brand);
  border-color: var(--brand-dark);
  transform: translateY(-2px);
  box-shadow: var(--brand-glow);
}
.sp-card:hover .sp-icon { background: rgba(255,255,255,0.2); color: #fff; border-color: rgba(255,255,255,0.25); }
.sp-card:hover .sp-name { color: #fff; }
.sp-card:hover .sp-sub { color: rgba(255,255,255,0.7); }
.sp-card:hover .sp-arrow { color: rgba(255,255,255,0.8); }

/* "All India" card — slightly distinct */
.sp-card--all {
  background: var(--brand-pale);
  border: 2px dashed var(--border-md);
}
body.theme-dark .sp-card--all { background: rgba(37,99,235,0.06); }

.sp-icon {
  width: 36px; height: 36px;
  background: rgba(255,255,255,0.7);
  border: 1px solid var(--border-md);
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  color: var(--brand);
  margin-bottom: 12px;
  transition: background 0.18s, color 0.18s;
}
body.theme-dark .sp-icon { background: rgba(37,99,235,0.15); border-color: var(--border-md); }

.sp-name {
  font-size: 0.93rem; font-weight: 700;
  color: var(--ink-100); margin-bottom: 2px;
  transition: color 0.18s;
}
.sp-sub {
  font-size: 0.74rem; color: var(--ink-300);
  transition: color 0.18s; flex: 1;
}
.sp-arrow {
  color: var(--ink-400); margin-top: 14px;
  transition: color 0.18s;
}

/* =====================================================================
   16. INFO SECTION
   ===================================================================== */
.info-section {
  margin-top: 20px; padding: 36px 32px;
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius-xl); box-shadow: var(--shadow-card);
}
body.theme-dark .info-section { background: #0d1b35; border-color: var(--border); }

.info-heading { font-size: 1.3rem; font-weight: 800; margin-bottom: 10px; letter-spacing: -0.02em; }
.info-section > p { font-size: 0.92rem; color: var(--ink-200); line-height: 1.72; margin-bottom: 24px; }

.accordion-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0 40px;
  border-top: 1px solid var(--border);
}

details { border-bottom: 1px solid var(--border); padding: 16px 0; }
details summary {
  font-size: 0.94rem; font-weight: 700; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center;
  color: var(--ink-100); list-style: none; user-select: none; transition: color 0.18s;
}
details summary::-webkit-details-marker { display: none; }
details summary:hover { color: var(--brand); }
details[open] summary { color: var(--brand); }

.summary-label { display: flex; align-items: center; gap: 8px; }

.summary-chevron {
  width: 22px; height: 22px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.summary-chevron::after {
  content: '';
  display: block; width: 7px; height: 7px;
  border-right: 2px solid var(--ink-400);
  border-bottom: 2px solid var(--ink-400);
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.2s, border-color 0.2s;
}
details[open] .summary-chevron::after {
  transform: rotate(-135deg) translateY(-2px);
  border-color: var(--brand);
}

.details-body { margin-top: 12px; color: var(--ink-200); font-size: 0.9rem; line-height: 1.72; }
.faq-item-title { font-weight: 700; color: var(--ink-100); margin-bottom: 3px; margin-top: 12px; }
.faq-item-title:first-child { margin-top: 0; }

.info-footer-note {
  margin-top: 22px; font-size: 0.79rem; color: var(--ink-300);
  border-top: 1px solid var(--border); padding-top: 16px;
}

/* =====================================================================
   16. FOOTER
   ===================================================================== */
.footer {
  text-align: center; color: var(--ink-400); font-size: 0.79rem;
  margin-top: 40px; padding-bottom: 20px;
}

/* =====================================================================
   17. PRINT
   ===================================================================== */
.print-only { display: none; }
@media print {
  body { background: #fff !important; color: #000 !important; }
  .no-print, .hero-shell, .features-row, .info-section, .footer { display: none !important; }
  .print-only { display: block !important; }
  #results { display: block !important; margin-top: 0; }
  .total-shell, .card { box-shadow: none !important; border: 1px solid #ccc !important; background: #fff !important; }
  .total-value { -webkit-text-fill-color: #000 !important; }
  .layout { grid-template-columns: 1fr !important; }
}
.print-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.print-logo { width: 34px; height: 34px; background: #1e3a8a; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-weight: 900; color: #fff; font-size: 0.85rem; }
.print-title { font-size: 1rem; font-weight: 700; }
.print-sub { font-size: 0.79rem; color: #555; }
.print-sep { border: none; border-top: 1px solid #ddd; margin: 10px 0; }

/* =====================================================================
   18. REDUCED MOTION
   ===================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* =====================================================================
   19. RESPONSIVE
   ===================================================================== */
@media (max-width: 980px) {
  .hero-main { grid-template-columns: 1fr; gap: 28px; padding: 36px 28px 44px; }
  .hero-side { display: none; }
  .hero-copy p { max-width: 100%; }

  .features-row { grid-template-columns: 1fr 1fr; }
  .layout { grid-template-columns: 1fr; }
  .accordion-grid { grid-template-columns: 1fr; }
  .sp-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 640px) {
  .page { padding: 12px 14px 80px; }

  /* Topbar */
  .topbar { padding: 8px 14px; }
  .brand-text { display: none; }
  .tag-chip-main { display: none; }
  .theme-toggle { padding: 0 10px; font-size: 0.77rem; height: 32px; }
  select.theme-toggle { padding-right: 24px; }

  /* Hero */
  .hero-shell { border-radius: 18px; }
  .hero-main { padding: 24px 18px 32px; }
  .hero-h1 { font-size: 1.6rem; }
  .hero-copy p { font-size: 0.91rem; }
  .hero-pill { font-size: 0.76rem; padding: 6px 12px; }

  /* Features */
  .features-row { grid-template-columns: 1fr 1fr; }
  .feat { padding: 14px 14px; gap: 10px; }
  .feat-icon { width: 34px; height: 34px; border-radius: 8px; }
  .feat-text strong { font-size: 0.82rem; }
  .feat-text span { font-size: 0.7rem; }

  /* Card */
  .card { padding: 20px 16px; }

  /* Form */
  .form-grid { grid-template-columns: 1fr; }
  #elevatorBox { grid-column: 1; }

  /* Buttons */
  .btn-row { flex-direction: column-reverse; gap: 10px; }
  button.primary { width: 100%; justify-content: center; padding: 14px; }

  /* Results */
  .total-card { padding: 24px 16px; }
  .mini-grid { grid-template-columns: 1fr; }
  .materials-list { grid-template-columns: 1fr; }
  .bar-label { width: 100px; font-size: 0.73rem; }

  /* Mobile table */
  table { border: none; background: transparent; }
  table thead { display: none; }
  table tbody, table tr, table td { border: none !important; }
  tr:hover td { background: transparent; color: inherit; }

  table tr {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 4px 10px;
    padding: 14px;
    background: var(--brand-pale);
    border: 1px solid var(--border-md) !important;
    border-radius: 12px;
    margin-bottom: 10px;
  }
  body.theme-dark table tr { background: rgba(37,99,235,0.08); border-color: var(--border) !important; }

  table td:nth-child(1) {
    grid-column: 1 / -1; grid-row: 1;
    padding: 0 0 4px 0; font-size: 0.9rem; font-weight: 700;
    color: var(--ink-100); text-align: left;
  }
  table td:nth-child(2) {
    grid-column: 1; grid-row: 2; padding: 0;
    font-size: 0.79rem; color: var(--ink-300); text-align: left;
  }
  table td:nth-child(2)::after { content: " of total"; opacity: 0.7; font-size: 0.69rem; margin-left: 3px; }
  table td:nth-child(3) {
    grid-column: 2; grid-row: 2; padding: 0;
    font-size: 0.92rem; font-weight: 700; color: var(--brand);
    text-align: right; white-space: nowrap;
  }

  /* State pages */
  .state-pages { padding: 24px 18px; }
  .sp-grid { grid-template-columns: 1fr 1fr; }

  /* Info */
  .info-section { padding: 24px 18px; }
  .info-heading { font-size: 1.1rem; }
}
