/* ============================================================
   Texas Home Power Cost Calculator — shared styles
   (mirrors Astro global.css / tokens.css conventions)
   ============================================================ */

:root {
  /* Palette — warm Texas editorial */
  --sand-50:  #fdfaf4;
  --sand-100: #faf6ef;
  --sand-200: #f2ebdd;
  --sand-300: #e6dcc7;
  --sand-400: #c9bda0;
  --sand-500: #8a7f66;

  --ink-900: #10212e;
  --ink-800: #1a3a52;   /* primary */
  --ink-700: #2d5068;
  --ink-500: #506879;
  --ink-400: #8298a6;

  --clay-700: #8a3d25;
  --clay-600: #b8593a;  /* accent */
  --clay-500: #d07a58;
  --clay-100: #f6e6dd;

  --sage-700: #4e6b4a;
  --sage-100: #e4ebd9;

  --rule: #e6dcc7;
  --rule-soft: #efe7d5;

  /* Type */
  --font-display: "Source Serif 4", "Source Serif Pro", Georgia, serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Rhythm */
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(26, 58, 82, 0.04), 0 1px 1px rgba(26, 58, 82, 0.03);
  --shadow: 0 2px 4px rgba(26, 58, 82, 0.05), 0 8px 24px -12px rgba(26, 58, 82, 0.12);

  --max-w: 1120px;
  --max-w-prose: 720px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html {
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
body {
  background: var(--sand-100);
  color: var(--ink-900);
  font-family: var(--font-body);
  line-height: 1.55;
  font-feature-settings: "ss01", "cv11";
}

/* Typography scale */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--ink-900);
  margin: 0 0 0.4em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.25rem, 4.2vw, 3.4rem); line-height: 1.05; font-weight: 450; letter-spacing: -0.025em; }
h2 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); line-height: 1.15; }
h3 { font-size: 1.2rem; line-height: 1.3; font-weight: 550; }
h4 { font-size: 1rem; line-height: 1.35; font-weight: 600; font-family: var(--font-body); letter-spacing: 0; }

p { margin: 0 0 1em; text-wrap: pretty; }

a {
  color: var(--ink-800);
  text-decoration: underline;
  text-decoration-color: var(--sand-400);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: text-decoration-color .15s ease, color .15s ease;
}
a:hover { color: var(--clay-600); text-decoration-color: var(--clay-500); }

small, .small { font-size: 0.82rem; color: var(--ink-500); }
.mono { font-family: var(--font-mono); font-feature-settings: "tnum"; }
.eyebrow {
  font-family: var(--font-body);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--clay-700);
  font-weight: 600;
}

/* Layout */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 28px; }
.prose { max-width: var(--max-w-prose); }
.prose p, .prose li { font-size: 1.05rem; color: var(--ink-700); }
.prose h2 { margin-top: 2.5em; }
.prose h3 { margin-top: 1.8em; }

hr.rule { border: 0; border-top: 1px solid var(--rule); margin: 2.5rem 0; }

/* Header */
.site-header {
  border-bottom: 1px solid var(--rule);
  background: var(--sand-100);
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: blur(8px);
  background: color-mix(in oklab, var(--sand-100) 92%, transparent);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-weight: 550; font-size: 1.02rem;
  color: var(--ink-900); text-decoration: none;
  letter-spacing: -0.01em;
}
.brand-mark {
  width: 28px; height: 28px; border-radius: 6px;
  background: var(--ink-800);
  display: grid; place-items: center;
  color: var(--sand-100);
  font-family: var(--font-display); font-weight: 600; font-size: 0.85rem;
  letter-spacing: -0.02em;
  position: relative;
}
.brand-mark::after {
  content: ""; position: absolute; right: -3px; bottom: -3px;
  width: 10px; height: 10px; border-radius: 2px; background: var(--clay-600);
}
nav.site-nav { display: flex; gap: 28px; }
nav.site-nav a {
  font-size: 0.93rem; text-decoration: none; color: var(--ink-700);
  padding: 6px 0; position: relative;
}
nav.site-nav a:hover { color: var(--ink-900); }
nav.site-nav a.active { color: var(--ink-900); }
nav.site-nav a.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -22px;
  height: 2px; background: var(--clay-600);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--rule);
  background: var(--sand-50);
  padding: 56px 0 44px;
  margin-top: 88px;
}
.site-footer .grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
}
.site-footer h5 {
  font-family: var(--font-body); font-size: 0.75rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-500); margin: 0 0 14px; font-weight: 600;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { font-size: 0.92rem; color: var(--ink-700); text-decoration: none; }
.site-footer a:hover { color: var(--clay-600); }
.site-footer .legal {
  border-top: 1px solid var(--rule);
  margin-top: 40px; padding-top: 24px;
  display: flex; justify-content: space-between;
  font-size: 0.8rem; color: var(--ink-500);
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px;
  font-family: var(--font-body); font-size: 0.95rem; font-weight: 500;
  border-radius: var(--radius); border: 1px solid transparent;
  cursor: pointer; text-decoration: none;
  transition: transform .08s ease, background .15s ease, border-color .15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--ink-800); color: var(--sand-50);
  border-color: var(--ink-800);
}
.btn-primary:hover { background: var(--ink-900); color: var(--sand-50); text-decoration: none; }
.btn-secondary {
  background: transparent; color: var(--ink-800);
  border-color: var(--sand-400);
}
.btn-secondary:hover { border-color: var(--ink-800); color: var(--ink-900); text-decoration: none; }
.btn-ghost {
  background: transparent; color: var(--ink-700); border-color: transparent;
  padding: 10px 14px;
}
.btn-ghost:hover { color: var(--ink-900); text-decoration: none; }
.btn-large { padding: 16px 26px; font-size: 1rem; }

/* Cards */
.card {
  background: var(--sand-50);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: 28px;
}
.card-muted {
  background: var(--sand-100);
  border: 1px solid var(--rule-soft);
}

/* Badges */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 9px;
  font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.04em;
  border-radius: 999px;
  background: var(--sand-200); color: var(--ink-700);
  border: 1px solid transparent;
}
.badge-accent {
  background: var(--clay-100); color: var(--clay-700);
}
.badge-ink {
  background: var(--ink-800); color: var(--sand-50);
}

/* Utility */
.row { display: flex; gap: 16px; align-items: center; }
.stack-sm > * + * { margin-top: 6px; }
.stack   > * + * { margin-top: 16px; }
.stack-lg > * + * { margin-top: 28px; }
.muted { color: var(--ink-500); }
.dim   { color: var(--ink-700); }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* --- Calculator-specific --- */

.hero {
  padding: 64px 0 48px;
  border-bottom: 1px solid var(--rule);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 64px;
  align-items: center;
}
.hero .eyebrow { margin-bottom: 18px; display: inline-block; }
.hero h1 { margin-bottom: 18px; }
.hero-sub {
  font-size: 1.18rem; color: var(--ink-700); line-height: 1.5;
  max-width: 540px;
}
.trust-line {
  display: flex; align-items: center; gap: 10px;
  margin-top: 22px;
  font-size: 0.88rem; color: var(--ink-500);
}
.trust-line::before {
  content: ""; width: 6px; height: 6px; border-radius: 999px; background: var(--sage-700);
}
.hero-cta { margin-top: 32px; display: flex; gap: 12px; align-items: center; }

.hero-image {
  aspect-ratio: 5/4;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, rgba(26,58,82,0.18), rgba(184,89,58,0.25) 55%, rgba(231,215,180,0.4)),
    repeating-linear-gradient(45deg, var(--sand-300) 0 2px, transparent 2px 12px),
    var(--sand-200);
  border: 1px solid var(--rule);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.hero-flag-img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}

/* Section heading */
.section {
  padding: 72px 0;
}
.section-head {
  max-width: 720px;
  margin-bottom: 40px;
}
.section-head .eyebrow { display: inline-block; margin-bottom: 12px; }

/* Wizard */
.wizard {
  background: var(--sand-50);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: 40px 44px 36px;
  box-shadow: var(--shadow-sm);
  position: relative;
}
.wizard-top {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--rule-soft);
}
.step-counter {
  font-family: var(--font-mono); font-size: 0.78rem; color: var(--ink-500);
  letter-spacing: 0.05em;
}
.step-counter b { color: var(--clay-700); font-weight: 600; }
.wizard-progress {
  display: flex; gap: 6px;
}
.wizard-progress i {
  width: 28px; height: 3px; background: var(--sand-300); border-radius: 2px;
  transition: background .3s ease;
}
.wizard-progress i.done { background: var(--clay-600); }
.wizard-progress i.current { background: var(--ink-800); }

.wiz-q-label {
  font-family: var(--font-display); font-size: 1.55rem; line-height: 1.25;
  color: var(--ink-900); margin-bottom: 6px; font-weight: 450;
  letter-spacing: -0.01em;
}
.wiz-q-help {
  color: var(--ink-500); font-size: 0.93rem; margin-bottom: 24px;
}

/* Inputs */
.toggle-group {
  display: inline-flex; background: var(--sand-200); border-radius: 8px;
  padding: 3px; margin-bottom: 14px;
}
.toggle-group button {
  background: transparent; border: 0; cursor: pointer;
  padding: 7px 16px; font-size: 0.85rem; font-family: var(--font-body);
  color: var(--ink-700); border-radius: 6px;
  transition: all .15s ease;
}
.toggle-group button.active {
  background: var(--sand-50); color: var(--ink-900);
  box-shadow: var(--shadow-sm);
}

.field {
  display: flex; align-items: stretch;
  border: 1px solid var(--sand-400);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--sand-50);
  max-width: 380px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field:focus-within {
  border-color: var(--ink-800);
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--ink-800) 10%, transparent);
}
.field input {
  flex: 1; border: 0; background: transparent; outline: none;
  font-family: var(--font-mono); font-size: 1.1rem;
  padding: 10px 8px;
  color: var(--ink-900);
}
.field input::placeholder { color: var(--sand-500); font-family: var(--font-body); font-size: 0.95rem; }
.field .suffix {
  display: flex; align-items: center;
  padding: 0 8px;
  font-family: var(--font-body); font-size: 0.88rem;
  color: var(--ink-500);
  border-left: 1px solid var(--rule);
  background: var(--sand-100);
  white-space: nowrap;
}

/* Choice grid */
.choice-grid { display: grid; gap: 10px; max-width: 520px; }
.choice-grid.two { grid-template-columns: 1fr 1fr; }
.choice {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--sand-400);
  background: var(--sand-50);
  border-radius: var(--radius);
  cursor: pointer; text-align: left;
  transition: all .12s ease;
  font: inherit; color: inherit;
  width: 100%;
}
.choice:hover { border-color: var(--ink-700); background: var(--sand-100); }
.choice.selected {
  border-color: var(--ink-800);
  background: color-mix(in oklab, var(--ink-800) 5%, var(--sand-50));
  box-shadow: 0 0 0 1px var(--ink-800) inset;
}
.choice .radio {
  width: 18px; height: 18px; border-radius: 999px;
  border: 1.5px solid var(--sand-400);
  flex-shrink: 0; position: relative;
}
.choice.selected .radio { border-color: var(--ink-800); }
.choice.selected .radio::after {
  content: ""; position: absolute; inset: 3px;
  background: var(--ink-800); border-radius: 999px;
}
.choice .label { font-size: 0.98rem; }
.choice .hint { font-size: 0.82rem; color: var(--ink-500); margin-top: 2px; }

.wiz-nav {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 36px; padding-top: 22px;
  border-top: 1px solid var(--rule-soft);
}

/* Validation */
.err { color: var(--clay-700); font-size: 0.85rem; margin-top: 10px; }

/* ---- Results ---- */

.results-head {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 48px;
  align-items: end;
  margin-bottom: 36px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--rule);
}
.results-head h2 { margin-bottom: 8px; }
.inputs-pill-row {
  display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px;
}
.inputs-pill {
  background: var(--sand-200);
  padding: 5px 10px; border-radius: 5px;
  font-size: 0.78rem;
  font-family: var(--font-mono);
  color: var(--ink-700);
}
.inputs-pill b { color: var(--ink-900); font-weight: 600; }

.current-cost-card {
  background: var(--ink-800); color: var(--sand-50);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  position: relative;
  overflow: hidden;
}
.current-cost-card .eyebrow { color: var(--sand-300); }
.current-cost-card .big {
  font-family: var(--font-display);
  font-size: 2.8rem; font-weight: 450; letter-spacing: -0.02em;
  line-height: 1; margin-top: 10px;
}
.current-cost-card .sub {
  margin-top: 8px; color: var(--sand-300); font-size: 0.88rem;
}

/* Summary comparison table */
.compare-table {
  width: 100%; border-collapse: collapse;
  background: var(--sand-50);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 48px;
}
.compare-table th, .compare-table td {
  padding: 14px 16px;
  text-align: right;
  border-bottom: 1px solid var(--rule-soft);
  font-size: 0.92rem;
}
.compare-table th:first-child, .compare-table td:first-child {
  text-align: left;
  background: var(--sand-100);
  border-right: 1px solid var(--rule-soft);
  font-weight: 500;
  color: var(--ink-700);
}
.compare-table thead th {
  background: var(--sand-200);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.82rem;
  text-transform: none;
  color: var(--ink-900);
  padding: 18px 16px;
  border-bottom: 1px solid var(--rule);
}
.compare-table thead th .thead-sub {
  display: block; font-weight: 400; font-size: 0.72rem;
  color: var(--ink-500); margin-top: 2px;
  font-family: var(--font-mono);
}
.compare-table tbody tr:last-child td,
.compare-table tbody tr:last-child th { border-bottom: 0; }
.compare-table tbody tr.highlight td,
.compare-table tbody tr.highlight th {
  background: var(--sand-200);
  font-weight: 500;
  color: var(--ink-900);
}
.compare-table tbody tr.highlight td:first-child,
.compare-table tbody tr.highlight th:first-child {
  background: var(--sand-300);
}
.compare-table .cell-num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  color: var(--ink-900);
}
.compare-table td.winner {
  background: color-mix(in oklab, var(--clay-600) 10%, transparent);
  position: relative;
  font-weight: 600;
}
.compare-table td.winner::before {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--clay-600);
}

/* Option detail cards */
.option-card {
  background: var(--sand-50);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 24px;
}
.option-card-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 26px 30px 22px;
  border-bottom: 1px solid var(--rule-soft);
  gap: 24px;
}
.option-icon {
  width: 48px; height: 48px; border-radius: 10px;
  background: var(--sand-200);
  display: grid; place-items: center;
  color: var(--ink-800);
  flex-shrink: 0;
}
.option-card-title-wrap { flex: 1; }
.option-card h3 {
  font-family: var(--font-display);
  font-size: 1.35rem; margin: 0 0 4px;
  font-weight: 500; letter-spacing: -0.01em;
}
.option-card .subtitle {
  color: var(--ink-500); font-size: 0.92rem;
}
.option-head-right {
  text-align: right;
  flex-shrink: 0;
}
.option-head-right .metric-label {
  font-family: var(--font-body); font-size: 0.72rem;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-500);
  margin-bottom: 4px;
}
.option-head-right .metric {
  font-family: var(--font-display); font-size: 1.8rem;
  font-weight: 500; letter-spacing: -0.015em;
  color: var(--ink-900);
  font-variant-numeric: tabular-nums;
}

.option-card-body {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 0;
}
.option-col {
  padding: 22px 30px;
  border-right: 1px solid var(--rule-soft);
}
.option-col:last-child { border-right: 0; }
.option-col h5 {
  font-family: var(--font-body); font-size: 0.72rem;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-500); margin: 0 0 12px; font-weight: 600;
}
.cost-line {
  display: flex; justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px dashed var(--rule-soft);
  font-size: 0.9rem;
}
.cost-line:last-child { border-bottom: 0; }
.cost-line .k { color: var(--ink-500); }
.cost-line .v { font-family: var(--font-mono); color: var(--ink-900); font-variant-numeric: tabular-nums; }
.cost-line.total {
  margin-top: 6px; padding-top: 12px;
  border-top: 1px solid var(--rule);
  border-bottom: 0;
  font-weight: 600;
}
.cost-line.total .k { color: var(--ink-900); }

.pref-chip {
  padding: 6px 14px;
  font-size: 0.84rem;
  border: 1px solid var(--rule);
  border-radius: 20px;
  background: #fff;
  cursor: pointer;
  color: var(--ink-700);
  font-family: var(--font-body);
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.pref-chip:hover { border-color: var(--clay-600); }
.pref-chip.selected {
  border-color: var(--clay-600);
  background: var(--clay-100);
  color: var(--clay-700);
  font-weight: 600;
}

ul.proscons { list-style: none; padding: 0; margin: 0; }
ul.proscons li {
  position: relative; padding-left: 22px;
  font-size: 0.9rem; margin-bottom: 8px;
  color: var(--ink-700); line-height: 1.4;
}
ul.proscons li::before {
  position: absolute; left: 0; top: 1px;
  font-family: var(--font-mono); font-size: 0.9rem;
  font-weight: 600;
}
ul.proscons.pros li::before { content: "+"; color: var(--sage-700); }
ul.proscons.cons li::before { content: "–"; color: var(--clay-700); }
.proscons-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.proscons-grid h6 {
  font-family: var(--font-body); font-size: 0.72rem;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-500); margin: 0 0 10px; font-weight: 600;
}

.option-card-foot {
  padding: 18px 30px;
  background: var(--sand-100);
  border-top: 1px solid var(--rule-soft);
  display: flex; justify-content: space-between; align-items: center;
  gap: 20px;
}
.driver-note {
  font-size: 0.9rem; color: var(--ink-700); line-height: 1.45;
  flex: 1;
}
.driver-note b { color: var(--ink-900); font-weight: 600; }

/* Solar toggle inside its card */
.solar-toggle-wrap {
  display: flex; align-items: center; gap: 10px;
  margin-top: 8px;
}
.solar-toggle-wrap .toggle-group { margin: 0; }
.solar-note {
  padding: 14px 30px 20px;
  background: var(--clay-100);
  border-top: 1px solid color-mix(in oklab, var(--clay-600) 15%, transparent);
  font-size: 0.85rem; color: var(--clay-700);
  line-height: 1.5;
}
.solar-note b { font-weight: 600; }

/* Preference + email capture */
.preference-card {
  background: linear-gradient(180deg, var(--sand-50), var(--sand-100));
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: 32px 36px;
  margin-bottom: 28px;
}
.preference-card h3 { margin-bottom: 16px; }
.pref-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pref-chip {
  padding: 10px 16px; border-radius: 999px;
  border: 1px solid var(--sand-400);
  background: var(--sand-50);
  cursor: pointer;
  font-size: 0.9rem;
  font-family: var(--font-body);
  color: var(--ink-800);
  transition: all .12s ease;
}
.pref-chip:hover { border-color: var(--ink-700); }
.pref-chip.selected {
  background: var(--ink-800); color: var(--sand-50); border-color: var(--ink-800);
}

.download-card {
  background: var(--ink-800);
  color: var(--sand-50);
  border-radius: var(--radius-lg);
  padding: 40px 44px;
  display: grid; grid-template-columns: 1.3fr 1fr; gap: 36px;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.download-card::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 100% 0%, rgba(208, 122, 88, 0.25), transparent 55%);
  pointer-events: none;
}
.download-card h3 {
  color: var(--sand-50); font-size: 1.55rem; font-weight: 500;
  margin-bottom: 10px; letter-spacing: -0.01em;
  position: relative;
}
.download-card p {
  color: var(--sand-300); margin-bottom: 0; font-size: 0.97rem;
  position: relative;
}
.email-row {
  display: flex; gap: 8px;
  position: relative;
}
.email-row input {
  flex: 1; padding: 13px 16px;
  border: 1px solid rgba(253, 250, 244, 0.2);
  background: rgba(253, 250, 244, 0.08);
  color: var(--sand-50);
  border-radius: var(--radius);
  font-family: var(--font-body); font-size: 0.95rem;
  outline: none;
}
.email-row input::placeholder { color: var(--sand-400); }
.email-row input:focus { border-color: var(--sand-100); background: rgba(253, 250, 244, 0.14); }
.email-row button {
  background: var(--clay-600); color: var(--sand-50);
  border: 0; border-radius: var(--radius);
  padding: 0 22px; cursor: pointer;
  font-family: var(--font-body); font-weight: 500; font-size: 0.95rem;
}
.email-row button:hover { background: var(--clay-700); }
.download-sub-note { margin-top: 10px; font-size: 0.8rem; color: var(--sand-400); position: relative; }

/* Methodology */
.method-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
}
.method-card {
  background: var(--sand-100);
  border: 1px solid var(--rule-soft);
  border-radius: var(--radius);
  padding: 20px 22px;
}
.method-card h4 { margin: 0 0 6px; font-size: 0.95rem; }
.method-card p { font-size: 0.88rem; color: var(--ink-700); margin: 0; }
.method-card .mono { font-size: 0.82rem; color: var(--ink-500); display: block; margin-top: 6px; }

/* Cross-link strip */
.crosslinks {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
  margin-top: 40px;
}
.crosslink {
  display: flex; justify-content: space-between; align-items: center;
  padding: 24px 28px;
  background: var(--sand-50);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  transition: all .15s ease;
}
.crosslink:hover {
  border-color: var(--ink-700);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
  text-decoration: none;
}
.crosslink .eyebrow { color: var(--ink-500); margin-bottom: 4px; }
.crosslink h4 { color: var(--ink-900); margin: 0; font-size: 1.05rem; }
.crosslink .arrow {
  font-family: var(--font-mono); font-size: 1.2rem; color: var(--clay-600);
  flex-shrink: 0; margin-left: 24px;
}
.crosslink:hover .arrow { color: var(--clay-700); }

/* Editorial content blocks (options + usage pages) */
.editorial-hero {
  padding: 72px 0 56px;
  border-bottom: 1px solid var(--rule);
}
.editorial-hero .eyebrow { margin-bottom: 14px; display: inline-block; }
.editorial-hero h1 {
  font-size: clamp(2rem, 3.6vw, 3rem);
  max-width: 780px; margin-bottom: 14px;
}
.editorial-hero .lede {
  font-size: 1.2rem; color: var(--ink-700); max-width: 640px;
  line-height: 1.5;
}

.option-long {
  display: grid;
  grid-template-columns: 0.95fr 1.25fr;
  gap: 56px;
  padding: 56px 0;
  border-bottom: 1px solid var(--rule-soft);
  align-items: start;
}
.option-long:last-of-type { border-bottom: 0; }
.option-long .sticky {
  position: sticky; top: 100px;
}
.option-long h2 { margin-bottom: 10px; }
.option-long .lead-sub { color: var(--ink-500); font-size: 0.95rem; margin-bottom: 18px; }
.option-long .tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.option-long .body p { font-size: 1.03rem; color: var(--ink-700); margin-bottom: 1em; }
.option-long h4 { margin-top: 1.4em; }

.kv-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  margin: 16px 0;
}
.kv-grid .kv {
  background: var(--sand-100);
  border: 1px solid var(--rule-soft);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}
.kv .k { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-500); }
.kv .v { font-family: var(--font-mono); font-size: 0.95rem; color: var(--ink-900); margin-top: 2px; }

/* Usage page */
.step-list { counter-reset: stp; padding: 0; list-style: none; margin: 0; }
.step-list > li {
  counter-increment: stp;
  padding: 22px 0 22px 60px;
  position: relative;
  border-bottom: 1px solid var(--rule-soft);
}
.step-list > li:last-child { border-bottom: 0; }
.step-list > li::before {
  content: counter(stp, decimal-leading-zero);
  position: absolute; left: 0; top: 22px;
  font-family: var(--font-display); font-size: 1.5rem;
  color: var(--clay-600);
  font-variant-numeric: tabular-nums;
}
.step-list > li h3 {
  font-size: 1.15rem; margin: 0 0 6px;
}
.step-list > li p { color: var(--ink-700); margin: 0; }

.bill-mock {
  background: var(--sand-50);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 24px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.75;
  color: var(--ink-700);
  position: relative;
}
.bill-mock .bill-head {
  display: flex; justify-content: space-between;
  padding-bottom: 12px; border-bottom: 1px dashed var(--rule);
  margin-bottom: 14px;
  color: var(--ink-500);
}
.bill-mock .row-hilite {
  background: color-mix(in oklab, var(--clay-600) 14%, transparent);
  margin: 0 -8px; padding: 4px 8px;
  border-left: 3px solid var(--clay-600);
  border-radius: 2px;
  position: relative;
}
.bill-mock .row-hilite .tag {
  position: absolute; right: 12px; top: 4px;
  font-family: var(--font-body); font-size: 0.7rem;
  color: var(--clay-700); font-weight: 600;
  letter-spacing: 0.06em;
}

.callout {
  background: var(--sage-100);
  border-left: 3px solid var(--sage-700);
  padding: 18px 22px;
  border-radius: 4px;
  margin: 22px 0;
  font-size: 0.97rem;
  color: var(--ink-800);
}
.callout.warn {
  background: var(--clay-100);
  border-left-color: var(--clay-600);
  color: var(--clay-700);
}
.callout b { color: var(--ink-900); font-weight: 600; }

.faq {
  border-top: 1px solid var(--rule);
}
.faq details {
  border-bottom: 1px solid var(--rule-soft);
  padding: 20px 0;
}
.faq summary {
  cursor: pointer; list-style: none;
  font-family: var(--font-display); font-size: 1.12rem;
  font-weight: 500; color: var(--ink-900);
  letter-spacing: -0.005em;
  display: flex; justify-content: space-between; align-items: center;
  gap: 20px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; font-family: var(--font-mono); font-size: 1.3rem;
  color: var(--clay-600);
  transition: transform .2s ease;
}
.faq details[open] summary::after { content: "–"; }
.faq details[open] summary { color: var(--clay-700); }
.faq details p {
  margin: 12px 0 0; color: var(--ink-700); font-size: 0.97rem; line-height: 1.55;
  max-width: 680px;
}

/* ============ V2 — additions ============ */

/* Compact results header */
.results-head-v2 {
  display: grid;
  grid-template-columns: 1.4fr 0.6fr;
  gap: 40px;
  align-items: end;
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--rule);
}
.results-head-v2 h2 { margin-bottom: 8px; font-size: clamp(1.45rem, 2.2vw, 1.8rem); }
.results-head-v2 .inputs-pill-row { align-items: center; gap: 8px; }

.btn-linklike {
  background: transparent; border: 0; cursor: pointer;
  color: var(--clay-600); font-family: var(--font-body);
  font-size: 0.82rem; padding: 3px 6px;
  margin-left: 4px;
  border-radius: 4px;
  text-decoration: underline; text-decoration-color: var(--sand-400);
  text-underline-offset: 3px;
}
.btn-linklike:hover { color: var(--clay-700); text-decoration-color: var(--clay-500); }

/* Compact current-cost (replaces large navy block) */
.current-cost-compact {
  display: flex; flex-direction: column;
  padding: 18px 22px;
  background: var(--sand-200);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  gap: 2px;
  align-self: end;
  min-width: 0;
}
.current-cost-compact .cc-label {
  font-family: var(--font-body); font-size: 0.7rem;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-500); font-weight: 600;
}
.current-cost-compact .cc-value {
  font-size: 1.35rem; color: var(--ink-900);
  font-weight: 600; letter-spacing: -0.01em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.current-cost-compact .cc-sub {
  font-size: 0.78rem; color: var(--ink-500);
  font-family: var(--font-mono); margin-top: 2px;
}

/* Chart card */
.chart-card {
  background: var(--sand-50);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: 26px 28px 22px;
  margin-bottom: 16px;
}
.chart-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 24px; margin-bottom: 22px; flex-wrap: wrap;
}
.chart-head h3 { margin: 0 0 4px; }
.chart-head .toggle-group { margin: 0; }

/* Delta/savings styling */
.delta {
  display: inline-flex; align-items: center;
  font-family: var(--font-mono); font-size: 0.78rem;
  padding: 3px 9px; border-radius: 4px;
  font-variant-numeric: tabular-nums;
  border: 1px solid transparent;
}
.delta-good { color: var(--sage-700); background: var(--sage-100); }
.delta-bad  { color: var(--clay-700); background: var(--clay-100); }
.delta-neutral { color: var(--ink-500); background: var(--sand-200); }

/* vs-retail row in summary table */
.compare-table tbody tr.delta-row th,
.compare-table tbody tr.delta-row td {
  border-top: 1px solid var(--rule);
  background: var(--sand-100);
  font-size: 0.86rem;
}
.compare-table tbody tr.delta-row th:first-child {
  background: var(--sand-200);
  color: var(--ink-500);
  font-style: italic;
  font-weight: 400;
}
.compare-table td.save-good { color: var(--sage-700); font-weight: 600; }
.compare-table td.save-bad  { color: var(--clay-700); font-weight: 600; }
.compare-table td.muted { color: var(--ink-400); font-style: italic; font-weight: 400; }

/* Baseline retail card — simpler treatment */
.option-card-baseline {
  background: var(--sand-100);
  border-style: dashed;
  border-color: var(--sand-400);
}
.option-card-baseline .option-card-head {
  padding: 22px 30px 18px;
}
.option-card-baseline .option-icon {
  background: var(--sand-300);
}
.option-card-baseline .option-head-right .metric {
  font-size: 1.5rem; color: var(--ink-700);
}
.option-card-baseline .subtitle {
  color: var(--ink-700); font-style: italic;
}
.option-card-body.baseline-body {
  grid-template-columns: 1fr 2fr;
}

/* Inverse preference chips (for inside dark download card) */
.pref-chips-inverse { display: flex; flex-wrap: wrap; gap: 8px; position: relative; }
.pref-chip-inverse {
  padding: 8px 14px; border-radius: 999px;
  border: 1px solid rgba(253, 250, 244, 0.22);
  background: rgba(253, 250, 244, 0.06);
  cursor: pointer;
  font-size: 0.85rem;
  font-family: var(--font-body);
  color: var(--sand-200);
  transition: all .12s ease;
}
.pref-chip-inverse:hover {
  border-color: rgba(253, 250, 244, 0.5);
  color: var(--sand-50);
}
.pref-chip-inverse.selected {
  background: var(--clay-600); color: var(--sand-50);
  border-color: var(--clay-600);
}

/* Responsive */
@media (max-width: 900px) {
  html { font-size: 16px; }
  .hero-grid, .results-head, .download-card, .option-long, .proscons-grid, .method-grid, .crosslinks, .site-footer .grid {
    grid-template-columns: 1fr;
  }
  .option-card-body { grid-template-columns: 1fr; }
  .option-col { border-right: 0; border-bottom: 1px solid var(--rule-soft); }
  .option-col:last-child { border-bottom: 0; }
  nav.site-nav { gap: 16px; font-size: 0.88rem; }
  .wizard { padding: 28px 22px; }
  .section { padding: 48px 0; }
  .hero { padding: 40px 0 32px; }
  .hero-cta { flex-direction: column; align-items: flex-start; }
  .option-long .sticky { position: static; }
  .compare-table { font-size: 0.82rem; }
  .compare-table th, .compare-table td { padding: 10px 8px; }
  .site-footer .grid { gap: 24px; }
  .site-footer .legal { flex-direction: column; gap: 8px; }
  .option-card-head { flex-direction: column; }
  .option-head-right { text-align: left; }

  /* v2 mobile */
  .results-head-v2 { grid-template-columns: 1fr; gap: 18px; }
  .current-cost-compact { align-self: start; }
  .chart-card { padding: 18px; }
  .chart-head { flex-direction: column; align-items: stretch; gap: 14px; }
  .option-card-body.baseline-body { grid-template-columns: 1fr; }
  .wiz-nav { flex-wrap: wrap; gap: 10px; }
  .wiz-q-label { font-size: 1.3rem; }
  .field input { font-size: 1rem; padding: 12px 14px; }
  .field .suffix { padding: 0 14px; font-size: 0.8rem; }
  .choice-grid.two { grid-template-columns: 1fr; }
  .download-card { padding: 28px 24px; }
}

@media (max-width: 560px) {
  .wizard { padding: 22px 18px; }
  .wizard-top { flex-direction: column; align-items: flex-start; gap: 10px; padding-bottom: 16px; margin-bottom: 18px; }
  .wizard-progress { width: 100%; }
  .wizard-progress i { flex: 1; width: auto; }
  .inputs-pill-row { gap: 5px; }
  .inputs-pill { font-size: 0.72rem; padding: 4px 8px; }

  /* Collapse comparison table into stacked cards */
  .compare-table, .compare-table thead, .compare-table tbody,
  .compare-table tr, .compare-table th, .compare-table td {
    display: block; width: 100%;
  }
  .compare-table { border-radius: var(--radius); }
  .compare-table thead { display: none; }
  .compare-table tr { border-bottom: 1px solid var(--rule); }
  .compare-table tr:last-child { border-bottom: 0; }
  .compare-table tbody th, .compare-table tbody td {
    text-align: left; padding: 8px 14px; border-bottom: 0;
  }
  .compare-table tbody th:first-child {
    background: var(--sand-200); color: var(--ink-500);
    font-size: 0.72rem; letter-spacing: 0.08em;
    text-transform: uppercase; padding: 10px 14px;
    border-right: 0;
  }
  .compare-table tbody td::before {
    content: attr(data-col) " ";
    display: inline-block; min-width: 0;
    color: var(--ink-500); font-family: var(--font-body);
    font-size: 0.78rem; margin-right: 8px;
  }
  .option-card-head { padding: 20px 20px 16px; gap: 14px; }
  .option-col { padding: 18px 20px; }
  .solar-note { padding: 14px 20px 16px; }
}

/* ============ Print / Save as PDF ============ */
@media print {
  @page { margin: 18mm 14mm; }

  /* Hide everything except the results */
  .site-header,
  .hero,
  .section-head,
  #methodology,
  site-footer,
  .no-print { display: none !important; }

  body { background: #fff; color: #000; font-size: 10pt; }
  .container { padding: 0; max-width: 100%; }
  .section { padding: 16px 0 0; }

  /* Strip decorative chrome */
  .card, .chart-card, .option-card, .compare-table,
  .current-cost-compact, .results-head-v2,
  .wizard { box-shadow: none !important; }

  /* Keep backgrounds readable but lighten them */
  .compare-table thead th { background: #f0ece3 !important; }
  .compare-table th:first-child, .compare-table td:first-child { background: #f7f4ee !important; }
  .compare-table tbody tr.highlight td,
  .compare-table tbody tr.highlight th { background: #e8e2d4 !important; }
  .current-cost-compact { background: #f0ece3 !important; border-color: #ccc !important; }

  /* Restore grid layouts collapsed by the 900px responsive breakpoint */
  .option-card-body { grid-template-columns: 1.2fr 1fr 1fr !important; }
  .option-card-body.baseline-body { grid-template-columns: 1fr 2fr !important; }
  .option-col { border-right: 1px solid var(--rule-soft) !important; border-bottom: 0 !important; }
  .option-col:last-child { border-right: 0 !important; }
  .proscons-grid { grid-template-columns: 1fr 1fr !important; }

  /* Page break control */
  .print-break-before { break-before: page; page-break-before: always; }
  .option-card { page-break-inside: avoid; break-inside: avoid; }
  .compare-table { page-break-inside: avoid; break-inside: avoid; }
  .compare-table tr { page-break-inside: avoid; break-inside: avoid; }
  .chart-card { page-break-inside: avoid; break-inside: avoid; }

  /* Print-only site attribution at top */
  #calculator::before {
    content: "txhomepower.com — Texas Home Power Cost Calculator";
    display: block;
    font-family: var(--font-mono);
    font-size: 8pt;
    color: #888;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #ddd;
  }
}
