/* ═══════════════════════════════════════════
   EcoTrace — Main Stylesheet
   Extracted from index.html for code quality
   and render performance.
═══════════════════════════════════════════ */

/* ── Web Fonts (non-blocking) ── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

/* ═══════════════════════════════════════════
   DESIGN TOKENS
═══════════════════════════════════════════ */
:root {
  /* ── Carbon/Climate Earth Palette ── */
  --ink:      #071A0F;
  --ink-2:    rgba(10,30,18,0.82);
  --ink-3:    rgba(52,168,83,0.18);
  --paper:    #E8F5E9;
  --paper-2:  #C8E6C9;

  /* Google Brand — semantic roles */
  --google-green:  #34A853;
  --google-blue:   #4285F4;
  --google-yellow: #FBBC05;
  --google-red:    #EA4335;

  /* Aliased */
  --orange:    #34A853;
  --orange-dk: #2A9044;
  --moss:      #1B5E20;
  --moss-lt:   #66BB6A;
  --sky:       #4285F4;
  --amber:     #FBBC05;
  --danger:    #EA4335;

  /* Text — all ≥ 4.5:1 on --ink */
  --txt-1: #E8F5E9;
  --txt-2: #A5D6A7;
  --txt-3: #6EC677;

  /* Typography */
  --ff-d: 'Inter', system-ui, sans-serif;
  --ff-m: 'IBM Plex Mono', 'Courier New', monospace;
  --ff-u: 'Inter', system-ui, sans-serif;

  /* Glassmorphism */
  --glass-bg:     rgba(7,26,15,0.70);
  --glass-border: rgba(52,168,83,0.22);
  --glass-shadow: 0 8px 32px rgba(0,0,0,0.45), 0 0 0 1px rgba(52,168,83,0.12);

  /* Geometry */
  --r-sm: 6px;
  --r-md: 12px;
  --r-lg: 20px;
  --ease: cubic-bezier(.4,0,.2,1);
  --t:    .25s;
}

/* ═══════════════════════════════════════════
   RESET
═══════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--ff-u);
  background:
    radial-gradient(ellipse at 20% 50%, rgba(52,168,83,0.08) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(66,133,244,0.06) 0%, transparent 50%),
    var(--ink);
  color: var(--txt-1);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
#starfield {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 0;
}
main, nav.topbar, footer { position: relative; z-index: 1; }
img   { display: block; max-width: 100%; }
button { cursor: pointer; font-family: var(--ff-u); }
a { color: inherit; }

/* ═══════════════════════════════════════════
   ACCESSIBILITY
═══════════════════════════════════════════ */
.skip {
  position: absolute; top: -100%; left: 1rem;
  background: var(--google-green); color: #fff;
  padding: .5rem 1.25rem; border-radius: var(--r-sm);
  font-size: .85rem; font-weight: 600; z-index: 9999;
  text-decoration: none; transition: top .2s;
}
.skip:focus { top: 1rem; }

:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; }

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

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

/* ═══════════════════════════════════════════
   PROGRESS BAR
═══════════════════════════════════════════ */
#prog {
  position: fixed; top: 0; left: 0; height: 2px; width: 0;
  background: var(--orange); z-index: 1000;
  transition: width .4s var(--ease);
  box-shadow: 0 0 8px var(--orange);
}

/* ═══════════════════════════════════════════
   TOASTS
═══════════════════════════════════════════ */
#toasts {
  position: fixed; bottom: 1.5rem; right: 1.5rem;
  z-index: 9999; display: flex; flex-direction: column; gap: .5rem;
  pointer-events: none;
}
.toast {
  background: var(--ink-2); border: 1px solid var(--ink-3);
  border-left: 3px solid var(--moss-lt);
  color: var(--txt-1); border-radius: var(--r-md);
  padding: .7rem 1rem; font-size: .82rem;
  display: flex; align-items: center; gap: .5rem;
  animation: tin .25s var(--ease) both;
  max-width: 300px; pointer-events: auto;
}
.toast.err { border-left-color: var(--danger); }
@keyframes tin {
  from { opacity: 0; transform: translateX(12px); }
  to   { opacity: 1; transform: none; }
}

/* ═══════════════════════════════════════════
   NAV
═══════════════════════════════════════════ */
nav.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem 2rem;
  border-bottom: 1px solid var(--glass-border);
  position: sticky; top: 0;
  background: rgba(7,26,15,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 100;
  box-shadow: 0 1px 0 rgba(52,168,83,0.15);
}
.logo-mark { display: flex; align-items: baseline; gap: .4rem; }
.logo-name {
  font-family: var(--ff-u);
  font-size: 1.35rem; font-weight: 700;
  letter-spacing: -.02em; color: var(--txt-1);
  text-shadow: 0 0 20px rgba(52,168,83,0.4);
}
.logo-name em { color: var(--google-green); font-style: normal; }
.logo-sub {
  font-family: var(--ff-m); font-size: .6rem;
  color: var(--txt-3); letter-spacing: .14em;
  text-transform: uppercase; align-self: center;
}
.nav-pill {
  display: flex; align-items: center; gap: .5rem;
  border: 1px solid var(--ink-3); border-radius: 100px;
  padding: .3rem .8rem; font-size: .7rem;
  color: var(--txt-3); font-family: var(--ff-m); letter-spacing: .06em;
}
.nav-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--google-green); animation: blink 2.4s ease infinite;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }

/* ═══════════════════════════════════════════
   HERO
═══════════════════════════════════════════ */
.hero {
  padding: 5rem 2rem 4rem; max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 380px;
  gap: 4rem; align-items: center;
}
.hero-kicker {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: var(--ff-m); font-size: .7rem;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--txt-3); margin-bottom: 1.5rem;
}
.hero-kicker::before { content: ''; width: 24px; height: 1px; background: var(--txt-3); }
.hero h1 {
  font-family: var(--ff-d);
  font-size: clamp(3rem, 5.5vw, 5.2rem);
  font-style: italic; line-height: 1.05;
  letter-spacing: -.02em; color: var(--txt-1); margin-bottom: 1.5rem;
}
.hero h1 strong { font-style: normal; color: var(--orange); display: block; }
.hero-desc {
  font-size: 1rem; color: var(--txt-2); line-height: 1.75;
  max-width: 480px; margin-bottom: 2rem; font-weight: 300;
}
.hero-actions { display: flex; gap: .75rem; flex-wrap: wrap; }

.hero-right {
  background: var(--ink-2); border: 1px solid var(--ink-3);
  border-radius: var(--r-lg); padding: 2rem; position: relative; overflow: hidden;
}
.hero-right::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--orange), var(--amber));
}
.counter-label {
  font-family: var(--ff-m); font-size: .65rem;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--txt-3); margin-bottom: .75rem;
}
.counter-num {
  font-family: var(--ff-m);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 600; color: var(--orange);
  letter-spacing: -.03em; line-height: 1; margin-bottom: .5rem;
}
.counter-unit {
  font-family: var(--ff-m); font-size: .7rem;
  color: var(--txt-3); margin-bottom: 1.75rem;
}
.fact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin-top: 1rem; }
.fact { background: var(--ink-3); border-radius: var(--r-sm); padding: .9rem .8rem; }
.fact-val {
  font-family: var(--ff-m); font-size: 1.1rem; font-weight: 600;
  color: var(--txt-1); line-height: 1; margin-bottom: .3rem;
}
.fact-desc  { font-size: .7rem; color: var(--txt-3); line-height: 1.4; }
.fact.green .fact-val { color: var(--moss-lt); }
.fact.amber .fact-val { color: var(--amber); }
.fact.sky   .fact-val { color: var(--sky); }

/* ═══════════════════════════════════════════
   BUTTONS
═══════════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .75rem 1.5rem; border-radius: var(--r-md);
  font-size: .9rem; font-weight: 600; border: none;
  text-decoration: none; transition: var(--t) var(--ease);
  font-family: var(--ff-u); white-space: nowrap;
  letter-spacing: .01em; position: relative; overflow: hidden;
}
.btn::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  background: rgba(255,255,255,0.12);
  transform: scale(0); transition: transform .4s var(--ease), opacity .4s;
  opacity: 0;
}
.btn:active::after { transform: scale(2.5); opacity: 1; transition: 0s; }
.btn-primary {
  background: var(--google-green); color: #fff;
  box-shadow: 0 4px 15px rgba(52,168,83,0.35);
}
.btn-primary:hover {
  background: var(--orange-dk); transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(52,168,83,0.45);
}
.btn-ghost {
  background: rgba(52,168,83,0.08); color: var(--txt-2);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(8px);
}
.btn-ghost:hover {
  border-color: var(--google-green); color: var(--txt-1);
  background: rgba(52,168,83,0.14);
}
.btn:disabled { opacity: .45; pointer-events: none; }
.btn-sm { padding: .45rem 1rem; font-size: .8rem; }

/* ═══════════════════════════════════════════
   LAYOUT
═══════════════════════════════════════════ */
.ruled { border: none; border-top: 1px solid var(--ink-3); margin: 0; }
.section { max-width: 1200px; margin: 0 auto; padding: 3rem 2rem; }
.sec-label {
  font-family: var(--ff-m); font-size: .65rem;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--txt-3); margin-bottom: .6rem;
}
.sec-title {
  font-family: var(--ff-u); font-weight: 700;
  font-size: 2rem; letter-spacing: -.03em;
  color: var(--txt-1); margin-bottom: 1.75rem;
}

/* ═══════════════════════════════════════════
   STEP RAIL
═══════════════════════════════════════════ */
.step-rail {
  display: flex; align-items: stretch;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-md);
  overflow: hidden; margin-bottom: 2rem;
}
.step-rail-item {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: .3rem;
  padding: .9rem .5rem;
  background: transparent; border: none; color: var(--txt-3);
  font-family: var(--ff-u); font-size: .75rem; font-weight: 500;
  cursor: pointer; transition: var(--t) var(--ease);
  border-right: 1px solid var(--glass-border); position: relative;
}
.step-rail-item:last-child { border-right: none; }
.step-rail-item:hover  { background: rgba(52,168,83,0.1); color: var(--txt-1); }
.step-rail-item.active { background: rgba(52,168,83,0.15); color: var(--txt-1); }
.step-rail-item.active::after,
.step-rail-item.done::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 2px;
}
.step-rail-item.active::after { background: var(--orange); }
.step-rail-item.done   { color: var(--moss-lt); }
.step-rail-item.done::after { background: var(--moss); }
.step-icon { font-size: 1.1rem; line-height: 1; }

/* ═══════════════════════════════════════════
   PANELS
═══════════════════════════════════════════ */
.panel { display: none; }
.panel.active { display: block; animation: fadeup .3s var(--ease) both; }
@keyframes fadeup {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}
.panel-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-lg); padding: 2rem;
  box-shadow: var(--glass-shadow);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.panel-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.5), 0 0 0 1px rgba(52,168,83,0.25);
}
.panel-header {
  display: flex; align-items: flex-start;
  justify-content: space-between; gap: 1rem;
  margin-bottom: 1.75rem; padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--glass-border); flex-wrap: wrap;
}
.panel-title {
  font-family: var(--ff-d); font-style: italic;
  font-size: 1.5rem; letter-spacing: -.02em; color: var(--txt-1);
}
.panel-number {
  font-family: var(--ff-m); font-size: .65rem; color: var(--txt-3);
  letter-spacing: .12em; text-transform: uppercase;
  padding: .3rem .7rem; border: 1px solid var(--ink-3);
  border-radius: 100px; flex-shrink: 0;
}
.panel-footer {
  display: flex; justify-content: flex-end; gap: .75rem;
  padding-top: 1.5rem; border-top: 1px solid var(--glass-border);
}

/* ═══════════════════════════════════════════
   FORM FIELDS
═══════════════════════════════════════════ */
.field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem; margin-bottom: 1.75rem;
}
.field { display: flex; flex-direction: column; gap: .45rem; }
.field label {
  font-size: .75rem; font-weight: 500; color: var(--txt-2);
  display: flex; align-items: center; gap: .4rem; letter-spacing: .02em;
}
.field select,
.field input[type="number"],
.field input[type="text"] {
  background: rgba(7,26,15,0.6);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-sm); color: var(--txt-1);
  font-family: var(--ff-u); font-size: .92rem;
  padding: .65rem .85rem; width: 100%;
  -webkit-appearance: none; appearance: none;
  transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.field select:focus,
.field input:focus {
  outline: none; border-color: var(--google-green);
  box-shadow: 0 0 0 3px rgba(52,168,83,0.2);
}
.field-hint { font-size: .7rem; color: var(--txt-3); line-height: 1.4; }

.range-row { display: flex; align-items: center; gap: .85rem; }
.range-row input[type="range"] {
  flex: 1; -webkit-appearance: none; appearance: none;
  height: 3px; background: var(--glass-border); border-radius: 100px;
  cursor: pointer; padding: 0; border: none; accent-color: var(--google-green);
}
.range-row input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 17px; height: 17px;
  border-radius: 50%; background: var(--google-green);
  border: 2px solid var(--ink);
  box-shadow: 0 0 8px rgba(52,168,83,0.5);
}
.range-val {
  font-family: var(--ff-m); font-size: .82rem; font-weight: 600;
  color: var(--google-green); min-width: 82px; text-align: right; white-space: nowrap;
}

.sel-wrap { position: relative; }
.sel-wrap::after {
  content: '▾'; position: absolute; right: .85rem; top: 50%;
  transform: translateY(-50%); color: var(--txt-3);
  pointer-events: none; font-size: .75rem;
}
.sel-wrap select { padding-right: 2.2rem; cursor: pointer; }

/* ═══════════════════════════════════════════
   RESULTS
═══════════════════════════════════════════ */
#results { display: none; }
#results.on { display: block; }

.results-layout {
  display: grid; grid-template-columns: 280px 1fr;
  gap: 2rem; align-items: start;
}
.sidebar {
  position: sticky; top: 80px;
  display: flex; flex-direction: column; gap: 1rem;
}

.score-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-lg); padding: 1.75rem 1.5rem;
  position: relative; overflow: hidden;
  box-shadow: var(--glass-shadow);
  animation: floatCard 7s ease-in-out infinite;
}
@keyframes floatCard {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-6px); }
}
.score-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--orange), var(--amber));
}
.score-tag {
  font-family: var(--ff-m); font-size: .6rem;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--txt-3); margin-bottom: .5rem;
}
.score-num {
  font-family: var(--ff-m); font-size: 3.2rem; font-weight: 600;
  color: var(--google-green); letter-spacing: -.04em;
  line-height: 1; margin-bottom: .3rem;
  text-shadow: 0 0 20px rgba(52,168,83,0.4);
}
.score-unit {
  font-family: var(--ff-m); font-size: .7rem;
  color: var(--txt-3); margin-bottom: 1.25rem;
}
.score-badge {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .35rem .75rem; border-radius: 100px;
  font-size: .72rem; font-weight: 500;
  border: 1px solid currentColor;
}
.badge-great { color: var(--moss-lt); background: rgba(127,191,106,.08); }
.badge-ok    { color: var(--sky);     background: rgba(91,168,196,.08); }
.badge-avg   { color: var(--amber);   background: rgba(212,154,46,.08); }
.badge-high  { color: var(--danger);  background: rgba(217,79,79,.08); }

.cat-list {
  display: flex; flex-direction: column; gap: .6rem;
  margin-top: 1.25rem; padding-top: 1.25rem;
  border-top: 1px solid var(--ink-3);
}
.cat-row { display: flex; flex-direction: column; gap: .3rem; }
.cat-head { display: flex; align-items: center; justify-content: space-between; font-size: .75rem; }
.cat-name { display: flex; align-items: center; gap: .4rem; color: var(--txt-2); }
.cat-val  { font-family: var(--ff-m); font-size: .75rem; font-weight: 600; color: var(--txt-1); }
.cat-bar  { height: 3px; background: var(--ink-3); border-radius: 100px; overflow: hidden; }
.cat-fill { height: 100%; border-radius: 100px; transition: width 1s var(--ease); }

.results-main { display: flex; flex-direction: column; gap: 1.5rem; }
.res-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-lg); padding: 1.75rem;
  box-shadow: var(--glass-shadow);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.res-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 0 1px rgba(52,168,83,0.25);
}
.res-card-title {
  font-family: var(--ff-u); font-weight: 700; font-size: 1.15rem;
  margin-bottom: 1.25rem; padding-bottom: 1rem;
  border-bottom: 1px solid var(--glass-border); color: var(--txt-1);
}

.comp-row { margin-bottom: 1rem; }
.comp-row:last-child { margin-bottom: 0; }
.comp-label {
  display: flex; justify-content: space-between;
  font-size: .75rem; color: var(--txt-2); margin-bottom: .4rem;
}
.comp-label span:last-child { font-family: var(--ff-m); font-weight: 600; color: var(--txt-1); }
.comp-track { height: 6px; background: var(--glass-border); border-radius: 100px; overflow: hidden; }
.comp-fill  { height: 100%; border-radius: 100px; transition: width 1.2s cubic-bezier(.4,0,.2,1); }

.chart-wrap { max-width: 280px; margin: 0 auto; }

.tip-item {
  padding: 1.1rem 0; border-bottom: 1px solid var(--ink-3);
  display: flex; gap: 1rem; animation: fadeup .3s var(--ease) both;
}
.tip-item:last-child { border-bottom: none; padding-bottom: 0; }
.tip-num    { font-family: var(--ff-m); font-size: .68rem; color: var(--orange); font-weight: 600; min-width: 24px; padding-top: .15rem; }
.tip-cat    { font-family: var(--ff-m); font-size: .62rem; letter-spacing: .1em; text-transform: uppercase; color: var(--txt-3); margin-bottom: .3rem; }
.tip-text   { font-size: .88rem; line-height: 1.65; color: var(--txt-2); }
.tip-impact { display: inline-block; margin-top: .4rem; font-size: .75rem; color: var(--moss-lt); font-family: var(--ff-m); }

.skel {
  background: linear-gradient(90deg, var(--ink-2) 25%, var(--ink-3) 50%, var(--ink-2) 75%);
  background-size: 200% 100%; animation: shim 1.4s infinite;
  border-radius: var(--r-sm);
}
@keyframes shim { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.skel-row {
  padding: .9rem 0; border-bottom: 1px solid var(--ink-3);
  display: flex; flex-direction: column; gap: .4rem;
}
.skel-row:last-child { border-bottom: none; }

.pledge {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-lg); padding: 3rem 2rem;
  text-align: center; position: relative; overflow: hidden;
  box-shadow: var(--glass-shadow);
}
.pledge::after {
  content: ''; position: absolute; bottom: -60px; right: -60px;
  width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(circle, rgba(52,168,83,0.12), transparent 70%);
  pointer-events: none;
}
.pledge h2 { font-family: var(--ff-u); font-weight: 700; font-size: 1.8rem; margin-bottom: .75rem; color: var(--txt-1); }
.pledge p  { color: var(--txt-2); max-width: 420px; margin: 0 auto 1.75rem; font-size: .92rem; font-weight: 300; }
.pledge-btns { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; }

/* ═══════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════ */
footer {
  border-top: 1px solid var(--glass-border); padding: 2rem;
  text-align: center; color: var(--txt-3); font-size: .75rem;
  line-height: 2; max-width: 1200px; margin: 0 auto;
}
footer a { color: var(--google-green); text-decoration: none; }
footer a:hover { text-decoration: underline; }

/* ═══════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════ */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 2rem; }
  .hero-right { display: none; }
  .results-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
}
@media (max-width: 600px) {
  .hero      { padding: 3rem 1.25rem 2rem; }
  .section   { padding: 2rem 1.25rem; }
  nav.topbar { padding: 1rem 1.25rem; }
  .panel-card { padding: 1.25rem; }
  .field-grid { grid-template-columns: 1fr; }
  .step-label { display: none; }
}

/* ═══════════════════════════════════════════
   PRINT
═══════════════════════════════════════════ */
@media print {
  nav.topbar, .step-rail, .panel-footer,
  #toasts, #prog, .hero-right, .pledge-btns, #starfield { display: none; }
  body { background: #fff; color: #000; }
  .res-card, .score-card, .panel-card {
    border: 1px solid #ccc; break-inside: avoid;
  }
}

/* ═══════════════════════════════════════════
   LIVE PILL (nav bar real-time score)
═══════════════════════════════════════════ */
.live-pill {
  display: flex; align-items: center; gap: .4rem;
  background: rgba(52,168,83,0.12);
  border: 1px solid rgba(52,168,83,0.35);
  border-radius: 100px; padding: .3rem .85rem;
  font-family: var(--ff-m); font-size: .75rem;
  color: var(--txt-2); transition: background .3s var(--ease);
}
.live-pill-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--google-green); animation: blink 1.2s ease infinite;
}
.live-pill-unit { color: var(--txt-3); font-size: .65rem; }
.live-pill[data-tier="great"] { background: rgba(52,168,83,0.18); border-color: var(--moss-lt); }
.live-pill[data-tier="great"] #live-pill-val { color: var(--moss-lt); }
.live-pill[data-tier="ok"]    { background: rgba(66,133,244,0.14); border-color: var(--sky); }
.live-pill[data-tier="ok"]    #live-pill-val { color: var(--sky); }
.live-pill[data-tier="avg"]   { background: rgba(251,188,5,0.12);  border-color: var(--amber); }
.live-pill[data-tier="avg"]   #live-pill-val { color: var(--amber); }
.live-pill[data-tier="high"]  { background: rgba(234,67,53,0.12);  border-color: var(--danger); }
.live-pill[data-tier="high"]  #live-pill-val { color: var(--danger); }

/* ═══════════════════════════════════════════
   RESULTS CARD SUBTITLE
═══════════════════════════════════════════ */
.res-card-sub {
  font-size: .8rem; color: var(--txt-3);
  margin-top: -.9rem; margin-bottom: 1.2rem; line-height: 1.5;
}

/* ═══════════════════════════════════════════
   SMART PRIORITY ENGINE
═══════════════════════════════════════════ */
.priority-item {
  display: flex; gap: 1rem;
  padding: 1rem 0; border-bottom: 1px solid var(--ink-3);
  animation: fadeup .35s var(--ease) both;
}
.priority-item:last-child { border-bottom: none; padding-bottom: 0; }
.priority-rank {
  font-family: var(--ff-m); font-size: 1.5rem; font-weight: 700;
  color: var(--ink-3); min-width: 36px; line-height: 1.2;
}
.priority-content { flex: 1; }
.priority-header {
  display: flex; align-items: center; gap: .6rem;
  flex-wrap: wrap; margin-bottom: .45rem;
}
.priority-icon  { font-size: 1.1rem; line-height: 1; }
.priority-title { font-size: .9rem; font-weight: 600; color: var(--txt-1); flex: 1; }
.priority-saving {
  font-family: var(--ff-m); font-size: .72rem;
  color: var(--moss-lt); white-space: nowrap;
  background: rgba(52,168,83,0.12); padding: .2rem .5rem;
  border-radius: 100px; border: 1px solid rgba(52,168,83,0.25);
}
.priority-reason { font-size: .83rem; color: var(--txt-2); line-height: 1.6; margin-bottom: .5rem; }
.priority-meta   { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.priority-effort { font-family: var(--ff-m); font-size: .65rem; }
.priority-cat {
  font-family: var(--ff-m); font-size: .6rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--txt-3);
  border: 1px solid var(--ink-3); padding: .15rem .4rem; border-radius: 4px;
}

/* ═══════════════════════════════════════════
   WHAT-IF SIMULATOR
═══════════════════════════════════════════ */
.whatif-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: .75rem; margin-bottom: 1rem;
}
.whatif-card {
  background: rgba(52,168,83,0.06);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-md); padding: .9rem .8rem;
  text-align: left; cursor: pointer;
  transition: all .2s var(--ease);
  display: flex; flex-direction: column; gap: .25rem;
}
.whatif-card:hover {
  background: rgba(52,168,83,0.12);
  border-color: rgba(52,168,83,0.45);
  transform: translateY(-2px);
}
.whatif-card.active {
  background: rgba(52,168,83,0.2);
  border-color: var(--google-green);
  box-shadow: 0 0 0 2px rgba(52,168,83,0.25);
}
.wif-icon   { font-size: 1.3rem; line-height: 1; }
.wif-label  { font-size: .78rem; font-weight: 600; color: var(--txt-1); line-height: 1.3; }
.wif-saving {
  font-family: var(--ff-m); font-size: .68rem;
  color: var(--moss-lt); font-weight: 600;
}
.wif-pct {
  font-family: var(--ff-m); font-size: .6rem;
  color: var(--txt-3);
}

.whatif-result {
  display: flex; align-items: center; gap: .75rem;
  background: rgba(52,168,83,0.1);
  border: 1px solid rgba(52,168,83,0.3);
  border-radius: var(--r-md); padding: 1rem 1.25rem;
  flex-wrap: wrap; animation: fadeup .25s var(--ease) both;
}
.wif-result-label { font-size: .78rem; color: var(--txt-2); }
.wif-result-num {
  font-family: var(--ff-m); font-size: 1.6rem; font-weight: 700;
  color: var(--moss-lt); letter-spacing: -.03em;
}
.wif-result-unit { font-family: var(--ff-m); font-size: .72rem; color: var(--txt-3); }
.wif-result-new  { font-family: var(--ff-m); font-size: .75rem; color: var(--txt-2); margin-left: auto; }

/* ═══════════════════════════════════════════
   IMPACT EQUIVALENCES
═══════════════════════════════════════════ */
.equiv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
}
.equiv-item {
  background: rgba(52,168,83,0.06);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-md); padding: 1.1rem .9rem;
  display: flex; flex-direction: column; gap: .3rem;
  transition: transform .25s var(--ease);
}
.equiv-item:hover { transform: translateY(-3px); }
.equiv-icon  { font-size: 1.6rem; line-height: 1; }
.equiv-value {
  font-family: var(--ff-m); font-size: 1.2rem; font-weight: 700;
  color: var(--txt-1); letter-spacing: -.02em; line-height: 1;
}
.equiv-label { font-size: .72rem; color: var(--txt-2); line-height: 1.4; }
.equiv-sub   { font-size: .62rem; color: var(--txt-3); line-height: 1.4; margin-top: .15rem; }

/* ═══════════════════════════════════════════
   TIP META ROW & NOTICE
═══════════════════════════════════════════ */
.tip-meta-row {
  display: flex; align-items: center; gap: .5rem;
  flex-wrap: wrap; margin-bottom: .3rem;
}
.tip-effort   { font-family: var(--ff-m); font-size: .6rem; }
.tip-timeframe { font-family: var(--ff-m); font-size: .6rem; color: var(--txt-3); }

.tip-notice {
  background: rgba(251,188,5,0.1); border: 1px solid rgba(251,188,5,0.3);
  border-radius: var(--r-sm); padding: .75rem 1rem;
  font-size: .8rem; color: var(--amber);
  margin-bottom: 1.25rem;
}

/* ═══════════════════════════════════════════
   AI CHAT WIDGET
═══════════════════════════════════════════ */
#chat-widget {
  position: fixed; bottom: 1.75rem; right: 1.75rem;
  z-index: 9998; display: flex; flex-direction: column;
  align-items: flex-end; gap: .75rem;
}

/* Toggle button */
.chat-toggle-btn {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--google-green);
  border: none; cursor: pointer;
  box-shadow: 0 4px 20px rgba(52,168,83,0.5);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; transition: transform .25s var(--ease), box-shadow .25s var(--ease);
  position: relative;
}
.chat-toggle-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 30px rgba(52,168,83,0.65);
}
.chat-icon { line-height: 1; }

.chat-badge {
  position: absolute; top: -4px; right: -4px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--danger); color: #fff;
  font-size: .6rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--ink);
  animation: tin .3s var(--ease) both;
}

/* Chat panel */
.chat-panel {
  width: 340px; max-height: 520px;
  background: var(--glass-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-lg);
  box-shadow: 0 20px 60px rgba(0,0,0,0.6), 0 0 0 1px rgba(52,168,83,0.15);
  display: flex; flex-direction: column;
  overflow: hidden;
  animation: fadeup .3s var(--ease) both;
}

/* Header */
.chat-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: .9rem 1rem;
  background: rgba(52,168,83,0.08);
  border-bottom: 1px solid var(--glass-border);
}
.chat-header-info { display: flex; align-items: center; gap: .7rem; }
.chat-avatar      { font-size: 1.4rem; line-height: 1; }
.chat-name        { font-size: .85rem; font-weight: 600; color: var(--txt-1); margin-bottom: .1rem; }
.chat-status      { font-size: .65rem; color: var(--txt-3); display: flex; align-items: center; gap: .35rem; }
.chat-status-dot  { width: 6px; height: 6px; border-radius: 50%; background: var(--google-green); animation: blink 2s ease infinite; }
.chat-close-btn   { background: none; border: none; color: var(--txt-3); font-size: 1rem; padding: .25rem; transition: color .2s; }
.chat-close-btn:hover { color: var(--txt-1); }

/* Messages */
.chat-messages {
  flex: 1; overflow-y: auto; padding: 1rem;
  display: flex; flex-direction: column; gap: .75rem;
  scroll-behavior: smooth;
}
.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-track { background: transparent; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--glass-border); border-radius: 4px; }

.chat-msg { display: flex; }
.chat-msg-user      { justify-content: flex-end; }
.chat-msg-assistant { justify-content: flex-start; }

.chat-bubble {
  max-width: 85%; padding: .6rem .85rem;
  border-radius: 16px; font-size: .82rem; line-height: 1.5;
}
.chat-msg-user .chat-bubble {
  background: var(--google-green); color: #fff;
  border-bottom-right-radius: 4px;
}
.chat-msg-assistant .chat-bubble {
  background: rgba(52,168,83,0.12);
  border: 1px solid var(--glass-border);
  color: var(--txt-2);
  border-bottom-left-radius: 4px;
}

/* Typing indicator */
.chat-typing {
  display: flex; align-items: center; gap: 4px; padding: .7rem .85rem;
}
.chat-typing span {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--txt-3);
  animation: typingDot 1.2s ease-in-out infinite;
}
.chat-typing span:nth-child(2) { animation-delay: .2s; }
.chat-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes typingDot {
  0%, 80%, 100% { transform: scale(1); opacity: .5; }
  40%           { transform: scale(1.3); opacity: 1; }
}

/* Form */
.chat-form {
  display: flex; gap: .5rem; padding: .75rem;
  border-top: 1px solid var(--glass-border);
}
.chat-input {
  flex: 1; background: rgba(7,26,15,0.6);
  border: 1px solid var(--glass-border);
  border-radius: 100px; color: var(--txt-1);
  font-family: var(--ff-u); font-size: .82rem;
  padding: .5rem .9rem; outline: none;
  transition: border-color .2s var(--ease);
}
.chat-input:focus { border-color: var(--google-green); box-shadow: 0 0 0 2px rgba(52,168,83,0.2); }
.chat-input::placeholder { color: var(--txt-3); }
.chat-send-btn {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--google-green); color: #fff;
  border: none; cursor: pointer; font-size: .9rem; font-weight: 700;
  flex-shrink: 0; transition: transform .2s var(--ease), background .2s;
  display: flex; align-items: center; justify-content: center;
}
.chat-send-btn:hover { transform: scale(1.1); background: var(--orange-dk); }

/* ═══════════════════════════════════════════
   RESPONSIVE ADDITIONS
═══════════════════════════════════════════ */
@media (max-width: 900px) {
  .whatif-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .equiv-grid  { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .chat-panel { width: calc(100vw - 2rem); max-height: 60vh; }
  #chat-widget { bottom: 1rem; right: 1rem; }
  .equiv-grid  { grid-template-columns: repeat(2, 1fr); }
  .whatif-grid { grid-template-columns: 1fr 1fr; }
  .live-pill   { display: none; }
}

/* ═══════════════════════════════════════════
   PRINT ADDITIONS
═══════════════════════════════════════════ */
@media print {
  #chat-widget, .whatif-card, .whatif-result { display: none; }
}
