/* ═══════════════════════════════════════════
   HomeFigures — style.css
   Design system: Uber DESIGN.md + Material Design colours
   ═══════════════════════════════════════════ */

/* ─── TOKENS ─── */
:root {
  /* Uber base */
  --black:       #000000;
  --navy:        #0f1f3d;
  --white:       #ffffff;
  --body-gray:   #4b4b4b;
  --muted-gray:  #afafaf;
  --chip-gray:   #efefef;
  --hover-gray:  #e2e2e2;
  --hover-light: #f3f3f3;
  --shadow-sm:   rgba(0,0,0,0.12) 0px 4px 16px;
  --shadow-md:   rgba(0,0,0,0.16) 0px 4px 16px;
  --shadow-fab:  rgba(0,0,0,0.16) 0px 2px 8px;
  --r-card:      8px;
  --r-featured:  12px;
  --r-pill:      999px;
  --font:        'DM Sans', system-ui, Helvetica Neue, Helvetica, Arial, sans-serif;

  /* Material Design colour palette */
  --md-blue:        #1976D2;
  --md-blue-dark:   #1565C0;
  --md-blue-light:  #E3F2FD;
  --md-teal:        #00897B;
  --md-teal-dark:   #00695C;
  --md-teal-light:  #E0F2F1;
  --md-indigo:      #3949AB;
  --md-indigo-dark: #283593;
  --md-amber:       #F9A825;
  --md-amber-dark:  #F57F17;
  --md-amber-light: #FFF8E1;
  --md-green:       #2E7D32;
  --md-green-light: #E8F5E9;
  --md-red:         #C62828;
  --md-red-light:   #FFEBEE;

  /* Semantic roles — swap these to retheme the whole site */
  --color-primary:       #1976D2;
  --color-primary-dark:  #1565C0;
  --color-primary-light: #E3F2FD;
  --color-action:        #2E7D32;
  --color-action-dark:   #1B5E20;
  --color-action-light:  #E8F5E9;
}

/* ─── RESET ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }

body {
  background: var(--white);
  color: var(--black);
  font-family: var(--font);
  font-weight: 400;
  line-height: 1.5;
  min-height: 100vh;
}

/* ─── BREADCRUMB ─── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.85rem 0;
  font-size: 0.78rem;
  color: var(--muted-gray);
  flex-wrap: wrap;
}

.breadcrumb a {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 500;
}

.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb-sep { color: var(--muted-gray); }
.breadcrumb span:last-child { color: var(--body-gray); font-weight: 500; }


.ad-slot {
  background: var(--chip-gray);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted-gray);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
}
.ad-leaderboard { width: 100%; height: 90px; }
.ad-rectangle   { width: 100%; height: 250px; }
.ad-strip       { width: 100%; height: 60px; }

/* ─── HEADER ─── */
.site-header {
  background: var(--navy);
  padding: 0 clamp(1rem, 5vw, 3rem);
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.02em;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

/* Icon badge — coloured pill behind the house */
.logo-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--color-action);
  flex-shrink: 0;
}

.logo-badge i {
  font-size: 1rem;
  color: var(--white);
  line-height: 1;
}

/* Wordmark — "Home" white, "Figures" green */
.logo-word-home   { color: var(--white); }
.logo-word-figures { color: var(--color-action); }

/* Footer brand lockup */
.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.02em;
}

.footer-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: var(--color-action);
  flex-shrink: 0;
}

.footer-badge i {
  font-size: 0.85rem;
  color: var(--white);
  line-height: 1;
}

.footer-word-figures { color: var(--color-action); }

.header-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.header-chip {
  background: rgba(255,255,255,0.12);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: var(--r-pill);
  white-space: nowrap;
  text-decoration: none;
  transition: background 0.15s;
}

.header-chip:hover { background: rgba(255,255,255,0.22); }
.header-chip.active { background: var(--color-primary); color: var(--white); }

/* ─── PAGE WRAPPER ─── */
.page {
  max-width: 1136px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2.5rem);
}

.ad-row { padding: 1rem 0; }

/* ─── HERO ─── */
.hero {
  padding: 3rem 0 2.5rem;
  border-bottom: 1px solid var(--chip-gray);
  margin-bottom: 2.5rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: end;
}

.hero-eyebrow {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted-gray);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.85rem;
}

.hero h1 {
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  font-weight: 700;
  line-height: 1.23;
  letter-spacing: -0.03em;
  color: var(--black);
  margin-bottom: 0.85rem;
  max-width: 20ch;
}

.hero-sub {
  font-size: 1rem;
  color: var(--body-gray);
  line-height: 1.5;
  max-width: 52ch;
}

.hero-stat-block {
  text-align: right;
  padding-left: 2rem;
  border-left: 1px solid var(--chip-gray);
  flex-shrink: 0;
}

.hero-stat-num {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--black);
  line-height: 1;
  letter-spacing: -0.03em;
  display: block;
}

.hero-stat-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted-gray);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: block;
  margin-top: 0.35rem;
}

/* ─── CONTENT GRID ─── */
.content-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2rem;
  align-items: start;
}

/* ─── STEP PILLS ─── */
.step-pills {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.step-pill {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: var(--r-pill);
  background: var(--chip-gray);
  color: var(--body-gray);
  border: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.step-pill .pill-num {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--muted-gray);
  color: var(--white);
  font-size: 0.65rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step-pill.active               { background: var(--color-primary); color: var(--white); }
.step-pill.active .pill-num     { background: rgba(255,255,255,0.3); }
.step-pill.done                 { background: var(--color-action); color: var(--white); opacity: 1; }
.step-pill.done .pill-num       { background: rgba(255,255,255,0.3); }

/* ─── CALCULATOR CARD ─── */
.calc-card {
  background: var(--white);
  border: 1px solid var(--chip-gray);
  border-radius: var(--r-featured);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.step-panel {
  display: none;
  padding: 2rem;
  animation: fadeUp 0.2s ease both;
}

.step-panel.active { display: block; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.step-heading {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--black);
  line-height: 1.25;
  margin-bottom: 0.35rem;
  letter-spacing: -0.02em;
}

.step-desc {
  font-size: 0.875rem;
  color: var(--body-gray);
  margin-bottom: 1.75rem;
  line-height: 1.5;
}

/* ─── FORM FIELDS ─── */
.field-group { margin-bottom: 1.35rem; }

.field-group label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--black);
  margin-bottom: 0.4rem;
}

.field-hint {
  font-size: 0.75rem;
  color: var(--muted-gray);
  margin-top: 0.3rem;
  line-height: 1.45;
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: stretch;
}

.input-affix {
  background: var(--chip-gray);
  border: 1px solid #d8d8d8;
  padding: 0 0.85rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--body-gray);
  display: flex;
  align-items: center;
  flex-shrink: 0;
  white-space: nowrap;
}

.input-affix.prefix { border-right: none; border-radius: var(--r-card) 0 0 var(--r-card); }
.input-affix.suffix { border-left: none;  border-radius: 0 var(--r-card) var(--r-card) 0; }

input[type="number"],
input[type="text"],
input[type="email"],
select {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1px solid #d8d8d8;
  border-radius: var(--r-card);
  background: var(--white);
  font-family: var(--font);
  font-size: 0.9375rem;
  font-weight: 400;
  color: var(--black);
  outline: none;
  transition: border-color 0.15s;
  -moz-appearance: textfield;
  appearance: textfield;
}

input::-webkit-inner-spin-button,
input::-webkit-outer-spin-button { -webkit-appearance: none; }

input:focus, select:focus { border-color: var(--color-primary); box-shadow: 0 0 0 3px var(--color-primary-light); }

.has-prefix input, .has-prefix select { border-radius: 0 var(--r-card) var(--r-card) 0; }
.has-suffix input { border-radius: var(--r-card) 0 0 var(--r-card); }

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* ─── SERVICE CHECKBOXES ─── */
.svc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.svc-item {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid #d8d8d8;
  border-radius: var(--r-card);
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s;
  background: var(--white);
}

.svc-item:hover          { border-color: var(--color-primary); background: var(--color-primary-light); }
.svc-item input[type="checkbox"] {
  width: 16px; height: 16px;
  flex-shrink: 0;
  accent-color: var(--color-primary);
  margin-top: 1px;
  cursor: pointer;
  border: none; border-radius: 0; padding: 0;
}

.svc-label { font-size: 0.8125rem; font-weight: 500; color: var(--black); line-height: 1.3; }
.svc-sub   { font-size: 0.7rem; color: var(--muted-gray); display: block; margin-top: 0.15rem; line-height: 1.35; font-weight: 400; }

/* ─── DIVIDER ─── */
.divider { border: none; border-top: 1px solid var(--chip-gray); margin: 1.5rem 0; }

/* ─── BUTTONS ─── */
.btn {
  font-family: var(--font);
  font-size: 0.9375rem;
  font-weight: 500;
  padding: 10px 20px;
  border-radius: var(--r-pill);
  border: none;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
  text-decoration: none;
}

.btn:active { transform: scale(0.98); }

.btn-primary        { background: var(--color-primary); color: var(--white); }
.btn-primary:hover  { background: var(--color-primary-dark); }

.btn-secondary { background: var(--chip-gray); color: var(--black); }
.btn-secondary:hover { background: var(--hover-gray); }

/* Green — forward progress: Next, Calculate */
.btn-next           { background: var(--color-action); color: var(--white); }
.btn-next:hover     { background: var(--color-action-dark); }

.btn-calculate      { background: var(--color-action); color: var(--white); font-size: 1rem; font-weight: 700; padding: 12px 28px; }
.btn-calculate:hover { background: var(--color-action-dark); }

.btn-ghost { background: transparent; color: var(--muted-gray); border: 1px solid var(--chip-gray); }
.btn-ghost:hover { border-color: var(--color-primary); color: var(--color-primary); }

.step-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--chip-gray);
  flex-wrap: wrap;
  gap: 0.5rem;
}

.step-nav-right { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }

/* ─── RESULTS ─── */
.verdict {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.25rem 1.5rem;
  border-radius: var(--r-featured);
  margin-bottom: 1.5rem;
}

.verdict.green { background: #f2faf5; border: 1px solid #a3d9b1; }
.verdict.amber { background: #fffbf0; border: 1px solid #f5cc6b; }
.verdict.red   { background: #fff5f5; border: 1px solid #f5a3a3; }

.verdict-icon  { font-size: 1.5rem; flex-shrink: 0; line-height: 1; margin-top: 0.1rem; }

.verdict-label { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 0.2rem; }
.verdict.green .verdict-label { color: #1a7a3c; }
.verdict.amber .verdict-label { color: #9a6600; }
.verdict.red   .verdict-label { color: #c0392b; }

.verdict-title { font-size: 1.125rem; font-weight: 700; color: var(--black); margin-bottom: 0.3rem; line-height: 1.3; }
.verdict-body  { font-size: 0.8125rem; color: var(--body-gray); line-height: 1.5; }

/* ─── STATS ROW ─── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--chip-gray);
  border: 1px solid var(--chip-gray);
  border-radius: var(--r-card);
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.stat-cell      { background: var(--white); padding: 1rem 1.1rem; }
.stat-cell.dark { background: var(--color-primary); }

.stat-cell-label { font-size: 0.68rem; font-weight: 500; color: var(--muted-gray); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.3rem; }
.stat-cell.dark .stat-cell-label { color: rgba(255,255,255,0.5); }

.stat-cell-val { font-size: clamp(1.2rem, 2.5vw, 1.6rem); font-weight: 700; color: var(--black); line-height: 1.1; letter-spacing: -0.02em; }
.stat-cell.dark .stat-cell-val { color: var(--white); }
.stat-cell-val.green { color: #1a7a3c; }
.stat-cell-val.amber { color: #9a6600; }
.stat-cell-val.red   { color: #c0392b; }

/* ─── BENCHMARK BAR ─── */
.bench-wrap    { margin-bottom: 1.5rem; }
.bench-heading { font-size: 0.75rem; font-weight: 700; color: var(--black); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 0.65rem; }

.bench-track {
  position: relative;
  height: 32px;
  background: var(--chip-gray);
  border-radius: var(--r-pill);
  overflow: visible;
  margin-bottom: 0.4rem;
  margin-top: 2rem;
}

.bench-fill {
  height: 100%;
  border-radius: var(--r-pill);
  transition: width 0.9s cubic-bezier(0.16,1,0.3,1);
  width: 0;
}

.bench-fill.green { background: #1a7a3c; }
.bench-fill.amber { background: #9a6600; }
.bench-fill.red   { background: #c0392b; }

.bench-avg-line {
  position: absolute;
  top: -5px; bottom: -5px;
  width: 2px;
  background: var(--black);
  z-index: 2;
}

.bench-avg-chip {
  position: absolute;
  top: -28px;
  transform: translateX(-50%);
  font-size: 0.65rem;
  font-weight: 700;
  background: var(--color-primary);
  color: var(--white);
  padding: 3px 8px;
  border-radius: var(--r-pill);
  white-space: nowrap;
}

.bench-scale { display: flex; justify-content: space-between; font-size: 0.7rem; color: var(--muted-gray); font-weight: 500; }

/* ─── BREAKDOWN ─── */
.breakdown-btn {
  width: 100%;
  background: var(--chip-gray);
  border: none;
  border-radius: var(--r-pill);
  padding: 10px 20px;
  font-family: var(--font);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--black);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
  transition: background 0.15s;
}

.breakdown-btn:hover { background: var(--color-primary-light); color: var(--color-primary); }

.breakdown-body {
  display: none;
  border: 1px solid var(--chip-gray);
  border-radius: 0 0 var(--r-card) var(--r-card);
  overflow: hidden;
  margin-top: -4px;
}

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

.breakdown-body table { width: 100%; border-collapse: collapse; font-size: 0.8125rem; }

.breakdown-body th {
  background: var(--color-primary); color: var(--white);
  padding: 0.55rem 0.9rem; text-align: left;
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
}

.breakdown-body th:last-child { text-align: right; }
.breakdown-body td { padding: 0.55rem 0.9rem; border-bottom: 1px solid var(--chip-gray); color: var(--body-gray); }
.breakdown-body td:last-child { text-align: right; font-weight: 700; color: var(--black); }
.breakdown-body tr:last-child td { border-bottom: none; background: var(--chip-gray); font-weight: 700; color: var(--black); }

/* ─── RIGHTS ─── */
.rights-heading { font-size: 1.25rem; font-weight: 700; color: var(--black); margin: 1.75rem 0 0.85rem; letter-spacing: -0.02em; }
.rights-list    { display: flex; flex-direction: column; gap: 0.65rem; }

.right-card {
  display: flex; gap: 0.85rem; padding: 1rem 1.1rem;
  background: var(--white); border: 1px solid var(--chip-gray);
  border-radius: var(--r-card); box-shadow: var(--shadow-sm);
  align-items: flex-start;
}

.right-icon  { font-size: 1.1rem; flex-shrink: 0; margin-top: 0.1rem; }
.right-title { font-size: 0.875rem; font-weight: 700; color: var(--black); margin-bottom: 0.2rem; line-height: 1.3; }
.right-body  { font-size: 0.8125rem; color: var(--body-gray); line-height: 1.5; }


/* ─── DISCLAIMER ─── */
.disclaimer {
  font-size: 0.75rem; color: var(--muted-gray); line-height: 1.5;
  padding: 1rem 1.1rem; background: var(--chip-gray);
  border-radius: var(--r-card); margin-top: 1.25rem;
}

/* ─── SIDEBAR ─── */
.sidebar { display: flex; flex-direction: column; gap: 1.25rem; }

.info-card {
  background: var(--white);
  border: 1px solid var(--chip-gray);
  border-radius: var(--r-featured);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.info-card-head { background: var(--color-primary); padding: 1rem 1.25rem; }
.info-card-head h3 { font-size: 0.9375rem; font-weight: 700; color: var(--white); line-height: 1.3; letter-spacing: -0.01em; }
.info-card-body { padding: 1.1rem 1.25rem; }
.info-card-body p { font-size: 0.8125rem; color: var(--body-gray); line-height: 1.6; margin-bottom: 0.65rem; }
.info-card-body p:last-child { margin-bottom: 0; }

/* avg table */
.avg-table { width: 100%; border-collapse: collapse; }
.avg-table th { font-size: 0.65rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted-gray); padding: 0.3rem 0; border-bottom: 1px solid var(--chip-gray); text-align: left; }
.avg-table th:last-child { text-align: right; }
.avg-table td { font-size: 0.8125rem; padding: 0.4rem 0; border-bottom: 1px solid var(--chip-gray); color: var(--body-gray); }
.avg-table td:last-child { text-align: right; font-weight: 700; color: var(--black); }
.avg-table tr:last-child td { border-bottom: none; }

/* tip list */
.tip-list { list-style: none; display: flex; flex-direction: column; gap: 0.55rem; }
.tip-list li { font-size: 0.8rem; color: var(--body-gray); padding-left: 1.1rem; position: relative; line-height: 1.5; }
.tip-list li::before { content: '→'; position: absolute; left: 0; color: var(--color-action); font-weight: 700; }

/* ─── FOOTER ─── */
.site-footer { background: var(--navy); margin-top: 4rem; padding: 2.5rem clamp(1rem, 5vw, 3rem); }

.footer-inner {
  max-width: 1136px; margin: 0 auto;
  display: flex; justify-content: space-between; align-items: flex-start;
  flex-wrap: wrap; gap: 1.5rem;
}

.footer-links { display: flex; gap: 1rem; flex-wrap: wrap; }
.footer-links a { font-size: 0.8rem; color: var(--muted-gray); text-decoration: none; transition: color 0.15s; }
.footer-links a:hover { color: var(--white); }
.footer-note { font-size: 0.75rem; color: var(--muted-gray); max-width: 55ch; line-height: 1.6; }

/* ─── RESPONSIVE ─── */
@media (max-width: 860px) {
  .content-grid { grid-template-columns: 1fr; }
  .hero { grid-template-columns: 1fr; }
  .hero-stat-block { text-align: left; border-left: none; padding-left: 0; border-top: 1px solid var(--chip-gray); padding-top: 1.25rem; }
}

@media (max-width: 600px) {
  .svc-grid    { grid-template-columns: 1fr; }
  .field-row   { grid-template-columns: 1fr; }
  .stats-row   { grid-template-columns: 1fr 1fr; }
  .step-pills  { gap: 0.35rem; }
  .step-pill   { padding: 7px 12px; font-size: 0.7rem; }
  .step-nav    { flex-direction: column; align-items: stretch; }
  .step-nav-right { justify-content: stretch; }
  .step-nav-right .btn { flex: 1; justify-content: center; }
}