/* ============================================================
   EVMath — style.css
   Design language: Tesla touchscreen meets Swiss precision.
   Geometric sans display type, ceramic light / obsidian dark,
   capacitive-touch UI elements, surgical spacing.
   ============================================================ */

/* ------------------------------------------------------------
   Google Fonts — Syne (display) + DM Mono (numbers)
   ------------------------------------------------------------ */
@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;500;600;700&family=DM+Mono:wght@300;400;500&display=swap');

/* ------------------------------------------------------------
   Design tokens — dark mode (default)
   ------------------------------------------------------------ */
:root {
  /* Surfaces */
  --bg-page:        #080a0d;
  --bg-primary:     #0e1117;
  --bg-card:        #13171f;
  --bg-card-raised: #181d27;
  --bg-inset:       #090c11;
  --bg-input:       #0c1018;
  --bg-pill:        #1a1f2b;

  /* Borders — razor thin */
  --b0:  rgba(255,255,255,0.03);
  --b1:  rgba(255,255,255,0.07);
  --b2:  rgba(255,255,255,0.12);
  --b3:  rgba(255,255,255,0.20);
  --b-tesla: rgba(232,33,39,0.6);
  --b-green: rgba(52,199,110,0.35);

  /* Text */
  --t1: #f2f4f8;
  --t2: #8a919e;
  --t3: #454d5a;
  --t4: #2a3040;

  /* Accent */
  --red:         #e82127;
  --red-glow:    rgba(232,33,39,0.15);
  --red-subtle:  rgba(232,33,39,0.08);
  --green:       #34c76e;
  --green-glow:  rgba(52,199,110,0.12);
  --green-dim:   rgba(52,199,110,0.25);
  --amber:       #f0a030;
  --amber-dim:   rgba(240,160,48,0.15);
  --blue:        #4a9eff;

  /* Spec */
  --font-display: 'Syne', -apple-system, sans-serif;
  --font-mono:    'DM Mono', 'SF Mono', monospace;
  --font-body:    'Syne', -apple-system, sans-serif;

  --ease-glass:    cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-snap:     cubic-bezier(0.34, 1.56, 0.64, 1);

  --r-xs: 4px;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-xl: 24px;
  --r-pill: 100px;

  /* Color scheme */
  color-scheme: dark;
}

/* ------------------------------------------------------------
   Light mode tokens
   ------------------------------------------------------------ */
[data-theme="light"] {
  --bg-page:        #f0f1f3;
  --bg-primary:     #fafafa;
  --bg-card:        #ffffff;
  --bg-card-raised: #ffffff;
  --bg-inset:       #f0f1f3;
  --bg-input:       #f5f6f8;
  --bg-pill:        #ededef;

  --b0:  rgba(0,0,0,0.03);
  --b1:  rgba(0,0,0,0.07);
  --b2:  rgba(0,0,0,0.11);
  --b3:  rgba(0,0,0,0.18);
  --b-tesla: rgba(232,33,39,0.4);
  --b-green: rgba(30,160,80,0.3);

  --t1: #0a0c10;
  --t2: #5a6270;
  --t3: #9aa0aa;
  --t4: #c8cdd4;

  --green:       #1a9a50;
  --green-glow:  rgba(26,154,80,0.08);
  --green-dim:   rgba(26,154,80,0.18);
  --amber:       #c07820;
  --amber-dim:   rgba(192,120,32,0.12);
  --red-glow:    rgba(232,33,39,0.08);
  --red-subtle:  rgba(232,33,39,0.05);

  color-scheme: light;
}

/* ------------------------------------------------------------
   Reset
   ------------------------------------------------------------ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0; padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background: var(--bg-page);
  color: var(--t1);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background 0.3s var(--ease-glass),
              color 0.3s var(--ease-glass);
}

/* Subtle noise grain overlay — adds premium texture */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
  opacity: 0.022;
  pointer-events: none;
  z-index: 9999;
}

img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ------------------------------------------------------------
   Layout
   ------------------------------------------------------------ */
.page-wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px 100px;
}

/* ------------------------------------------------------------
   Theme toggle
   ------------------------------------------------------------ */
.theme-toggle-wrap {
  position: fixed;
  top: 20px;
  right: 24px;
  z-index: 100;
}

.theme-toggle {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--bg-card);
  border: 1px solid var(--b2);
  border-radius: var(--r-pill);
  padding: 4px;
  cursor: pointer;
  transition: border-color 0.2s;
}

.theme-toggle:hover { border-color: var(--b3); }

.theme-toggle-option {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 28px;
  border-radius: var(--r-pill);
  font-size: 14px;
  transition: background 0.2s var(--ease-glass);
  color: var(--t3);
}

.theme-toggle-option.active {
  background: var(--bg-pill);
  color: var(--t1);
}

/* ------------------------------------------------------------
   Header
   ------------------------------------------------------------ */
.site-header {
  padding: 72px 0 56px;
  position: relative;
}

/* Ambient glow behind header */
.site-header::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 300px;
  background: radial-gradient(ellipse at center top,
    rgba(232,33,39,0.06) 0%,
    transparent 70%);
  pointer-events: none;
}

.header-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-eyebrow::before,
.header-eyebrow::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--b2));
}

.header-eyebrow::after {
  background: linear-gradient(to left, transparent, var(--b2));
}

.site-header h1 {
  font-family: var(--font-display);
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--t1);
  margin-bottom: 18px;
  text-align: center;
}

.site-header h1 em {
  font-style: normal;
  color: var(--red);
}

.site-tagline {
  font-size: 16px;
  color: var(--t2);
  text-align: center;
  max-width: 440px;
  margin: 0 auto;
  line-height: 1.7;
  font-weight: 400;
}

/* ------------------------------------------------------------
   Section chrome — shared card shell
   ------------------------------------------------------------ */
.panel {
  background: var(--bg-card);
  border: 1px solid var(--b1);
  border-radius: var(--r-lg);
  margin-bottom: 12px;
  transition: background 0.3s var(--ease-glass),
              border-color 0.3s var(--ease-glass);
}

.panel-inner {
  padding: 24px 28px;
}

/* Step label — Tesla touchscreen small all-caps */
.step-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--t3);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid var(--b2);
  font-size: 9px;
  color: var(--t3);
  flex-shrink: 0;
}

/* ------------------------------------------------------------
   Car picker
   ------------------------------------------------------------ */
.picker-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 560px) {
  .picker-grid { grid-template-columns: 1fr; }
}

.field-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--t3);
}

/* Tesla-style select / input — capacitive feel */
select,
input[type="search"],
input[type="number"],
input[type="text"] {
  width: 100%;
  background: var(--bg-inset);
  border: 1px solid var(--b2);
  border-radius: var(--r-sm);
  color: var(--t1);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 400;
  padding: 12px 16px;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
  cursor: pointer;
}

select:focus,
input:focus {
  border-color: var(--b3);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.04);
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23454d5a' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 38px;
}

select:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}

input::placeholder { color: var(--t3); }

/* ------------------------------------------------------------
   Location row
   ------------------------------------------------------------ */
.location-row {
  display: flex;
  align-items: flex-end;
  gap: 24px;
  flex-wrap: wrap;
}

.location-zip { flex: 0 0 160px; }

.gas-price-block {
  flex: 1;
  min-width: 120px;
}

.gas-price-amount {
  font-family: var(--font-mono);
  font-size: 36px;
  font-weight: 300;
  letter-spacing: -0.02em;
  color: var(--t1);
  line-height: 1;
  margin-bottom: 4px;
  transition: color 0.3s;
}

.gas-price-amount.loaded { color: var(--red); }

.gas-price-meta {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--t3);
}

/* ------------------------------------------------------------
   Sliders — Tesla touchscreen style
   ------------------------------------------------------------ */
.slider-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.slider-item {
  display: grid;
  grid-template-columns: 180px 1fr 72px;
  align-items: center;
  gap: 16px;
}

@media (max-width: 560px) {
  .slider-item {
    grid-template-columns: 1fr 56px;
    grid-template-rows: auto auto;
  }

  .slider-item .field-label { grid-column: 1 / -1; }
}

.slider-item input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 2px;
  background: var(--b2);
  border-radius: 1px;
  border: none;
  padding: 0;
  cursor: pointer;
  outline: none;
  transition: background 0.2s;
}

.slider-item input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--t1);
  border: 2px solid var(--bg-page);
  box-shadow: 0 0 0 1px var(--b3);
  cursor: pointer;
  transition: transform 0.15s var(--ease-snap), box-shadow 0.15s;
}

.slider-item input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 0 0 3px var(--b2);
}

.slider-item input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--t1);
  border: 2px solid var(--bg-page);
  cursor: pointer;
}

.slider-val {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 400;
  color: var(--t1);
  text-align: right;
}

/* ------------------------------------------------------------
   Divider
   ------------------------------------------------------------ */
.divider {
  height: 1px;
  background: var(--b1);
  margin: 8px 0;
}

/* ------------------------------------------------------------
   Comparison section — hidden until car selected
   ------------------------------------------------------------ */
#comparison-card {
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: opacity 0.4s var(--ease-glass),
              transform 0.4s var(--ease-glass);
}

#comparison-card.visible {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

/* Section heading */
.section-heading {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--t3);
  margin-bottom: 12px;
  margin-top: 32px;
}

/* ------------------------------------------------------------
   Vehicle card grid
   ------------------------------------------------------------ */
.card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

@media (max-width: 600px) {
  .card-grid { grid-template-columns: 1fr; }
}

/* Vehicle card shell */
.v-card {
  background: var(--bg-card);
  border: 1px solid var(--b1);
  border-radius: var(--r-lg);
  padding: 24px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s var(--ease-glass);
}

/* Tesla card — signature red glow */
.v-card.is-tesla {
  border-color: var(--b-tesla);
}

/* Ambient corner glow on Tesla card */
.v-card.is-tesla::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 200px; height: 200px;
  background: radial-gradient(circle,
    rgba(232,33,39,0.12) 0%,
    transparent 70%);
  pointer-events: none;
}

.v-card-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  margin-bottom: 14px;
}

.badge-gas {
  background: var(--b1);
  color: var(--t3);
  border: 1px solid var(--b1);
}

.badge-tesla {
  background: var(--red-subtle);
  color: var(--red);
  border: 1px solid rgba(232,33,39,0.2);
}

.badge-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.v-card-name {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--t1);
  margin-bottom: 3px;
  line-height: 1.1;
}

.v-card-sub {
  font-size: 12px;
  color: var(--t3);
  margin-bottom: 22px;
  font-weight: 400;
}

/* Spec rows — surgical precision */
.spec-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--b0);
}

.spec-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 9px 0;
  border-bottom: 1px solid var(--b0);
  gap: 12px;
}

.spec-item:last-child { border-bottom: none; }

.spec-k {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--t3);
  flex-shrink: 0;
}

.spec-v {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 500;
  color: var(--t2);
  text-align: right;
}

.spec-v.positive { color: var(--green); }
.spec-v.negative { color: var(--red);   }
.spec-v.highlight {
  color: var(--t1);
  font-size: 16px;
}

/* ------------------------------------------------------------
   Savings panel
   ------------------------------------------------------------ */
.savings-panel {
  background: var(--bg-card);
  border: 1px solid var(--b-green);
  border-radius: var(--r-lg);
  padding: 28px;
  margin-bottom: 12px;
  position: relative;
  overflow: hidden;
}

.savings-panel::before {
  content: '';
  position: absolute;
  bottom: -80px; right: -80px;
  width: 300px; height: 300px;
  background: radial-gradient(circle,
    var(--green-glow) 0%,
    transparent 70%);
  pointer-events: none;
}

.savings-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.savings-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--green-dim);
}

.savings-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}

@media (max-width: 600px) {
  .savings-stats { grid-template-columns: repeat(2, 1fr); }
}

.s-stat {
  padding: 0 20px 0 0;
  border-right: 1px solid var(--b1);
}

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

@media (max-width: 600px) {
  .s-stat {
    padding: 16px 16px 16px 0;
    border-right: none;
    border-bottom: 1px solid var(--b1);
  }
  .s-stat:nth-child(even) { padding-left: 16px; border-left: 1px solid var(--b1); }
  .s-stat:nth-last-child(-n+2) { border-bottom: none; }
}

.s-stat-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--t3);
  margin-bottom: 8px;
}

.s-stat-value {
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 300;
  letter-spacing: -0.02em;
  color: var(--green);
  line-height: 1;
}

/* ------------------------------------------------------------
   Break-even row
   ------------------------------------------------------------ */
.breakeven-panel {
  background: var(--bg-card);
  border: 1px solid var(--b1);
  border-radius: var(--r-lg);
  padding: 20px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.breakeven-left {}

.breakeven-title {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--t3);
  margin-bottom: 4px;
}

.breakeven-sub {
  font-size: 12px;
  color: var(--t3);
  font-weight: 400;
}

.breakeven-value {
  font-family: var(--font-mono);
  font-size: 40px;
  font-weight: 300;
  letter-spacing: -0.03em;
  color: var(--amber);
  line-height: 1;
  white-space: nowrap;
}

/* ------------------------------------------------------------
   CTA buttons — Tesla capacitive touch style
   ------------------------------------------------------------ */
.cta-strip {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 13px 22px;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s var(--ease-glass);
  white-space: nowrap;
  user-select: none;
  -webkit-user-select: none;
}

.btn:active { transform: scale(0.97); }
.btn:hover  { text-decoration: none; }

/* Primary — Tesla red fill */
.btn-primary {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

.btn-primary:hover {
  background: #d01820;
  border-color: #d01820;
  color: #fff;
  box-shadow: 0 0 24px rgba(232,33,39,0.3);
}

/* Secondary — ghost capacitive */
.btn-secondary {
  background: var(--bg-inset);
  border-color: var(--b2);
  color: var(--t2);
}

.btn-secondary:hover {
  border-color: var(--b3);
  color: var(--t1);
  background: var(--bg-card-raised);
}

/* Arrow icon */
.btn-arrow {
  font-size: 14px;
  transition: transform 0.2s var(--ease-glass);
}

.btn:hover .btn-arrow { transform: translateX(3px); }

/* ------------------------------------------------------------
   Maintenance breakdown
   ------------------------------------------------------------ */
.maint-panel {
  background: var(--bg-card);
  border: 1px solid var(--b1);
  border-radius: var(--r-lg);
  margin-bottom: 12px;
  overflow: hidden;
}

.maint-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px;
  cursor: pointer;
  transition: background 0.15s;
  color: var(--t2);
}

.maint-trigger:hover { background: var(--b0); }

.maint-trigger-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.maint-trigger-right {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--green);
}

.maint-chevron {
  font-size: 12px;
  color: var(--t3);
  transition: transform 0.2s var(--ease-glass);
}

.maint-trigger.open .maint-chevron { transform: rotate(180deg); }

.maint-body {
  display: none;
  padding: 0 28px 24px;
}

.maint-body.open { display: block; }

.maint-table {
  width: 100%;
  border-collapse: collapse;
}

.maint-table th {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--t3);
  font-weight: 500;
  padding: 0 0 10px;
  text-align: left;
  border-bottom: 1px solid var(--b1);
}

.maint-table th:not(:first-child) { text-align: right; }

.maint-table td {
  font-size: 12px;
  color: var(--t2);
  padding: 10px 0;
  border-bottom: 1px solid var(--b0);
  vertical-align: top;
}

.maint-table td:not(:first-child) {
  text-align: right;
  font-family: var(--font-mono);
  font-size: 11px;
}

.maint-table td.pos { color: var(--green); }
.maint-table td.neg { color: var(--red); }

.maint-note {
  font-size: 10px;
  color: var(--green);
  display: block;
  margin-top: 2px;
  font-weight: 400;
}

/* ------------------------------------------------------------
   Used Tesla section
   ------------------------------------------------------------ */
.used-panel {
  background: var(--bg-card);
  border: 1px solid var(--b1);
  border-radius: var(--r-lg);
  padding: 24px 28px;
  margin-bottom: 12px;
}

.used-panel-title {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--t3);
  margin-bottom: 18px;
}

.used-card {
  background: var(--bg-inset);
  border: 1px solid var(--b1);
  border-radius: var(--r-md);
  padding: 20px;
  margin-bottom: 10px;
}

.used-card:last-child { margin-bottom: 0; }

.used-card.is-featured {
  border-color: var(--b-green);
}

.used-card-name {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--t1);
  margin-bottom: 2px;
}

.used-card-years {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--t3);
  margin-bottom: 12px;
}

.used-why {
  font-size: 13px;
  color: var(--t2);
  margin-bottom: 14px;
  line-height: 1.55;
  font-weight: 400;
}

.used-owner-story {
  font-size: 12px;
  color: var(--green);
  border-left: 2px solid var(--green-dim);
  padding: 8px 14px;
  margin-bottom: 16px;
  font-style: italic;
  line-height: 1.6;
  background: var(--green-glow);
  border-radius: 0 var(--r-xs) var(--r-xs) 0;
}

.tier-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.tier-cell {
  background: var(--bg-card);
  border: 1px solid var(--b1);
  border-radius: var(--r-sm);
  padding: 12px;
  text-align: center;
}

.tier-cell-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--t3);
  margin-bottom: 4px;
}

.tier-cell-range {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--t3);
  margin-bottom: 6px;
}

.tier-cell-price {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 300;
  letter-spacing: -0.02em;
  color: var(--green);
}

.battery-note {
  font-size: 11px;
  color: var(--t3);
  line-height: 1.5;
  margin-bottom: 14px;
}

/* ------------------------------------------------------------
   Owner callout
   ------------------------------------------------------------ */
.owner-callout {
  background: transparent;
  border: 1px solid var(--b1);
  border-left: 2px solid var(--green);
  border-radius: var(--r-md);
  padding: 22px 26px;
  margin: 40px 0;
}

.owner-callout p {
  font-size: 14px;
  color: var(--t2);
  line-height: 1.7;
  margin-bottom: 10px;
  font-weight: 400;
}

.owner-callout p:last-child { margin-bottom: 0; }

.owner-callout strong { color: var(--t1); font-weight: 600; }

/* ------------------------------------------------------------
   Footer
   ------------------------------------------------------------ */
.site-footer {
  border-top: 1px solid var(--b1);
  padding: 40px 0 0;
  margin-top: 60px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-left p,
.footer-right p {
  font-size: 12px;
  color: var(--t3);
  line-height: 1.7;
  margin-bottom: 4px;
}

.footer-left a,
.footer-right a {
  color: var(--t3);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-left a:hover,
.footer-right a:hover {
  color: var(--t2);
  text-decoration: underline;
}

.footer-copy {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--t4);
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--b0);
}

/* ------------------------------------------------------------
   States
   ------------------------------------------------------------ */
.hidden { display: none !important; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* ------------------------------------------------------------
   Load animations
   ------------------------------------------------------------ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}

.site-header     { animation: fadeUp 0.5s var(--ease-glass) both; }
.panel:nth-child(1) { animation: fadeUp 0.5s 0.1s var(--ease-glass) both; }
.panel:nth-child(2) { animation: fadeUp 0.5s 0.15s var(--ease-glass) both; }
.panel:nth-child(3) { animation: fadeUp 0.5s 0.2s var(--ease-glass) both; }

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

/* ------------------------------------------------------------
   System dark/light preference (before JS hydrates)
   ------------------------------------------------------------ */
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    --bg-page:        #f0f1f3;
    --bg-primary:     #fafafa;
    --bg-card:        #ffffff;
    --bg-card-raised: #ffffff;
    --bg-inset:       #f0f1f3;
    --bg-input:       #f5f6f8;
    --bg-pill:        #ededef;
    --b0:  rgba(0,0,0,0.03);
    --b1:  rgba(0,0,0,0.07);
    --b2:  rgba(0,0,0,0.11);
    --b3:  rgba(0,0,0,0.18);
    --b-tesla: rgba(232,33,39,0.4);
    --b-green: rgba(30,160,80,0.3);
    --t1: #0a0c10;
    --t2: #5a6270;
    --t3: #9aa0aa;
    --t4: #c8cdd4;
    --green:       #1a9a50;
    --green-glow:  rgba(26,154,80,0.08);
    --green-dim:   rgba(26,154,80,0.18);
    --amber:       #c07820;
    --amber-dim:   rgba(192,120,32,0.12);
    --red-glow:    rgba(232,33,39,0.08);
    --red-subtle:  rgba(232,33,39,0.05);
    color-scheme: light;
  }
}
