/* ===== Reset ===== */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: #fff;
  color: #223D72;
  padding: .75rem 1.25rem;
  z-index: 100000;
  font-weight: 700;
  border-radius: 0 0 6px 0;
}
.skip-link:focus {
  left: 0;
}
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* ===== Design Tokens ===== */
:root {
  /* New brand tokens */
  --warm-50: #FBF8F2;
  --warm-900: #1A1610;
  --warm-150: #EDE5D5;
  --warm-200: #E4D9C3;
  --warm-100: #F5EFE4;
  --accent: #BE4D02;
  --accent-ink: #6E2C00;
  --accent-tint: #FFEEDE;
  --font-sans: "Arial", "Helvetica Neue", "Helvetica", system-ui, sans-serif;
  --font-narrow: "Arial Narrow", "Arial", "Helvetica", sans-serif;

  /* Legacy tokens (preserved verbatim) */
  --ta-orange: #BE4D02;
  --ta-orange-h: #a34200;
  --ta-slate: #555F60;
  --ta-lslate: #55726C;
  --ta-blue: #223D72;
  --ta-green: #55726C;
  --ta-seafoam: #D8F5E5;
  --ta-peach: #FFEDBE;
  --ta-skyblue: #D4F3FF;
  --ta-gray: #F6F6F6;
  --ta-red: #c0392b;
  --text-muted: #595959;
}

/* ===== Base ===== */
.page { display: none; }
.page.active { display: block; }
.hidden { display: none !important; }

body {
  background: var(--warm-50);
  font-family: var(--font-sans);
  color: var(--warm-900);
  font-size: 16px;
  line-height: 1.5;
}

/* ===== Layout ===== */
.site-header,
main,
footer {
  width: 100%;
}

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  backdrop-filter: blur(8px);
  background-color: rgba(251, 248, 242, 0.97);
  border-bottom: 1px solid var(--warm-150);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 24px;
  min-height: 56px;
}

.site-header img {
  height: 36px;
  width: auto;
  display: block;
}

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

.nav-help {
  color: var(--warm-900);
  text-decoration: none;
}

.btn-login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #1A1610;
  color: #fff;
  text-decoration: none;
  border-radius: 9999px;
  padding: 0.5rem 1.25rem;
  min-width: 44px;
  min-height: 44px;
  font-weight: 600;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

@media (max-width: 768px) {
  .nav-help {
    display: none;
  }

  .btn-login {
    min-width: 44px;
    min-height: 44px;
  }
}

/* ----- Hero (placeholder) ----- */

#hero {
  background: var(--warm-50);
}

.hero-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  gap: 64px;
  padding-top: 80px;
  padding-bottom: 64px;
  align-items: flex-start;
}

.hero-left {
  flex: 0 0 35%;
}

.hero-right {
  flex: 0 0 65%;
  min-width: 0;
}

.hero-left h1 {
  font-size: 4rem;
  font-weight: 800;
  color: var(--warm-900);
  line-height: 1.1;
  letter-spacing: -0.02em;
  max-width: 520px;
}

.hero-left p {
  font-size: 1rem;
  font-weight: 400;
  color: var(--ta-slate);
  line-height: 1.6;
  margin-top: 1rem;
  margin-bottom: 1.5rem;
}

.trust-badges {
  display: flex;
  gap: 24px;
  row-gap: 16px;
  align-items: center;
  margin-top: 24px;
}

.trustpilot-badge {
  display: flex;
  align-items: center;
  gap: 8px;
}

.trustpilot-badge svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.trustpilot-text {
  font-size: 0.85rem;
  color: var(--warm-900);
}

.experience-badge {
  display: flex;
  flex-direction: column;
  gap: 2px;
  color: var(--ta-slate, #555F60);
}

.experience-years {
  font-weight: 700;
  font-size: 1rem;
}

.experience-since {
  font-weight: 400;
  font-size: 0.85rem;
}

.bbb-badge img {
  height: 48px;
  width: auto;
}

.wizard-card {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
  max-width: 100%;
  width: 100%;
  padding: 1.5rem;
  margin: 0 auto;
}

.card-header-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ta-slate);
}

/* Wizard core */
.hidden { display: none !important; }
.wizard-step.hidden { display: none; }
.page { display: none; }
.page.active { display: block; }

/* Progress bar */
.progress-bar { margin-bottom: .75rem; }
.progress-steps { display: flex; justify-content: space-between; margin-bottom: .5rem; flex-wrap: wrap; gap: .25rem; }
.progress-steps .step { background: none; border: none; cursor: pointer; font-size: .78rem; color: var(--text-muted); padding: .3rem .5rem; border-radius: 4px; transition: all .2s; font-family: Arial, sans-serif; }
.progress-steps .step.active { color: var(--accent); font-weight: 600; }
.progress-steps .step.completed { color: var(--ta-green); }
.step-num { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; background: #e0e0e0; color: var(--text-muted); font-size: .7rem; font-weight: 700; margin-right: .25rem; }
.step.active .step-num { background: var(--accent); color: #fff; }
.step.completed .step-num { background: var(--ta-green); color: #fff; }
.progress-track { height: 4px; background: #e0e0e0; border-radius: 2px; }
.progress-fill { height: 100%; background: var(--accent); border-radius: 2px; transition: width .3s; width: 0%; }

/* Wizard card inner */
.card { background: #fff; border-radius: 10px; padding: 1.15rem; box-shadow: 0 2px 8px rgba(0,0,0,.08); margin-bottom: .75rem; }
.card h2 { font-size: 1rem; margin-bottom: .25rem; color: #333; font-weight: 700; display: flex; justify-content: space-between; align-items: center; }
.time-chip { display: none; }
.section-desc { font-size: .8rem; color: #666; margin-bottom: .75rem; line-height: 1.45; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .65rem; }
.span-2 { grid-column: span 2; }
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } .span-2 { grid-column: span 1; } }

/* Fields */
.field label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: .35rem; color: #444; }
.field:has(input[required]) label::after, .field:has(select[required]) label::after { content: " *"; color: var(--ta-red); font-weight: 700; }
.field input, .field select { width: 100%; padding: .55rem .75rem; border: 1px solid #d0d5dd; border-radius: 6px; font-size: .95rem; background: #fff; transition: border-color .2s; font-family: Arial, sans-serif; }
.field input:focus, .field select:focus { outline: 3px solid var(--accent); outline-offset: 2px; border-color: var(--accent); }
.field-hint { display: block; font-size: .78rem; color: #666; margin-top: .25rem; line-height: 1.5; }
.field-error { display: block; font-size: .75rem; color: var(--ta-red); min-height: 1rem; margin-top: .25rem; font-weight: 600; }
.field input.invalid, .field select.invalid { border-color: var(--ta-red); background: #fff8f8; }

/* Wizard nav buttons */
.wizard-nav { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; margin-top: .85rem; gap: 1rem; }
.btn-next, .btn-back, .btn-print { padding: .7rem 1.5rem; border: none; border-radius: 8px; font-size: .95rem; font-weight: 600; cursor: pointer; transition: background .2s; font-family: Arial, sans-serif; }
.btn-next { background: var(--accent); color: #fff; }
.btn-next:hover { background: var(--accent-ink); }
.btn-back { background: #e8eaed; color: #555; }
.btn-back:hover { background: #d0d5dd; }

/* Gate blocks */
.gate-block { padding: 1rem 1.25rem; border-radius: 8px; background: var(--ta-gray); border-left: 4px solid var(--ta-lslate); color: var(--ta-slate); margin-bottom: 1rem; }
.gate-block h3 { font-weight: 700; margin-bottom: .4rem; font-size: .95rem; }
.gate-block p { font-size: .85rem; line-height: 1.6; margin-bottom: .5rem; }
.gate-block .btn-assist { display: inline-block; margin-top: .25rem; padding: .45rem 1rem; background: var(--ta-lslate); color: #fff; border: none; border-radius: 6px; font-size: .85rem; font-weight: 700; cursor: pointer; font-family: Arial, sans-serif; }
.gate-block.hidden { display: none; }

/* Asset/income/expense summaries */
.income-total { margin-top: 1.25rem; padding: .75rem 1rem; background: #fff; border: none; border-radius: 6px; font-size: .88rem; color: var(--ta-slate); }
.income-total strong { color: #333; }
.expense-breakdown, .asset-summary { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid #e8eaed; }
.expense-breakdown h3 { font-size: .9rem; color: #555; margin-bottom: .75rem; font-weight: 700; }
.breakdown-grid, .asset-summary { display: flex; flex-direction: column; gap: .4rem; }
.breakdown-row { display: flex; justify-content: space-between; align-items: center; padding: .35rem .5rem; border-radius: 4px; font-size: .88rem; }
.breakdown-row:nth-child(odd) { background: #f8f9fb; }
.breakdown-label { color: #555; }
.breakdown-value { font-weight: 600; color: #333; }
.breakdown-total { margin-top: .35rem; border-top: 2px solid var(--accent); padding-top: .6rem; background: transparent !important; }
.breakdown-total .breakdown-label { font-weight: 700; color: var(--ta-slate); }
.breakdown-total .breakdown-value { font-size: 1.05rem; color: var(--accent); }

/* Expense pips */
.expense-pip { height: 3px; flex: 1; border-radius: 2px; background: #e0e0e0; transition: background 0.3s; }
.expense-pip.pip-active { background: var(--accent); }
.expense-pip.pip-done { background: var(--ta-green); }

/* Results */
.eligibility-warning { padding: .65rem 1rem; border-radius: 6px; font-size: .84rem; margin-bottom: .75rem; border-left: 4px solid; }
.eligibility-warning.warn { background: #fff3cd; border-color: #ffc107; color: #664d03; }
.results-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.result-card { background: #fff; border-radius: 10px; padding: 1.25rem; box-shadow: 0 2px 8px rgba(0,0,0,.08); text-align: center; }
.result-card.best { border-top-color: var(--ta-green); }
.result-card.unavailable { opacity: .5; border-top-color: #ccc; }
.result-card .program-name { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #666; margin-bottom: .15rem; }
.result-card .monthly { font-size: 1.6rem; font-weight: 700; color: #1a1a2e; }
.result-card .monthly span { font-size: .9rem; font-weight: 400; color: #888; }
.result-card .detail { font-size: .8rem; color: #666; margin-top: .4rem; }
.result-card .savings-line { font-size: .82rem; color: var(--ta-green); font-weight: 600; margin-top: .5rem; }
.badge-best { display: inline-block; background: var(--ta-green); color: #fff; font-size: .7rem; font-weight: 700; padding: .15rem .5rem; border-radius: 20px; margin-bottom: .5rem; text-transform: uppercase; }
.highlight-box { padding: 1.25rem; border-radius: 8px; margin-bottom: 1.25rem; background: #d4edda; border-left: 5px solid #28a745; }
.highlight-box.hidden { display: none; }

/* Assist CTA */
.assist-cta { padding: 1.25rem; background: #fff; border: 2px solid var(--accent); border-radius: 10px; margin-bottom: 1.25rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.assist-cta-text h3 { font-size: .95rem; font-weight: 700; color: var(--ta-slate); margin-bottom: .25rem; }
.assist-cta-text p { font-size: .82rem; color: var(--ta-lslate); }
.assist-cta--urgent { border-color: var(--ta-red); background: #fff5f5; }

/* RCP section */
.rcp-breakdown { margin-top: 1rem; border: 1px solid #e8eaed; border-radius: 8px; overflow: hidden; }
.rcp-breakdown-body { display: none; padding: 1rem; background: #fff; }
.rcp-breakdown-body.open { display: block; }
.rcp-row { display: flex; justify-content: space-between; font-size: .85rem; padding: .35rem 0; border-bottom: 1px solid #f0f0f0; }
.rcp-row:last-child { border-bottom: none; font-weight: 700; color: var(--accent); }

/* Confetti */
@keyframes confettiFall { 0% { transform: translateY(-100vh) rotate(0deg); opacity: 1; } 100% { transform: translateY(100vh) rotate(720deg); opacity: 0; } }
.confetti-piece { position: fixed; top: 0; z-index: 9999; animation: confettiFall linear forwards; pointer-events: none; }

/* Quick check fade animation */
@keyframes qcFadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.qc-fade-in { animation: qcFadeIn .4s ease-out; }

@media (max-width: 768px) {
  .hero-container {
    flex-direction: column;
    padding-top: 48px;
    padding-bottom: 40px;
  }

  .hero-left {
    width: 100%;
    flex: none;
  }

  .hero-right {
    width: 100%;
    flex: none;
    display: flex;
    justify-content: center;
  }

  .hero-left h1 {
    font-size: 2.5rem;
  }

  .trust-badges {
    flex-wrap: wrap;
  }
}

/* ----- How It Works (placeholder) ----- */

#how-it-works {
  background: var(--warm-50);
}

.how-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 24px 0;
  text-align: center;
}

.how-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  display: block;
  margin-bottom: 0.75rem;
  text-align: center;
}

.how-container h2 {
  font-size: 2.75rem;
  font-weight: 800;
  color: var(--warm-900);
  line-height: 1.15;
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
}

.how-container > p {
  font-size: 0.95rem;
  color: var(--ta-slate);
  text-align: center;
  margin-top: 0.75rem;
  margin-bottom: 3rem;
}

.how-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1.5rem;
}

.how-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 2rem;
  border: 1px solid var(--warm-200);
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  display: flex;
  flex-direction: column;
}

.how-card--featured {
  border: 2px solid var(--accent);
}

.how-card-number {
  font-size: 5rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 1rem;
}

.how-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--warm-900);
}

.how-card-desc {
  font-size: 0.88rem;
  color: var(--ta-slate);
  line-height: 1.6;
}

.how-card-meta {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ta-slate);
  margin-top: auto;
}

@media (max-width: 768px) {
  .how-container {
    padding-top: 48px;
  }
  .how-container h2 {
    font-size: 1.75rem;
  }
  .how-grid {
    grid-template-columns: 1fr;
  }
}

/* ----- FAQ (placeholder) ----- */
#faq { background: var(--warm-100, #F5EFE4); }
.faq-container { max-width: 1200px; margin: 0 auto; padding: 80px 24px; }
.faq-layout { display: flex; gap: 4rem; }
.faq-left { flex: 0 0 35%; }
.faq-label { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent); display: block; margin-bottom: 0.75rem; }
.faq-left h2 { font-size: 2.25rem; font-weight: 800; color: var(--warm-900); line-height: 1.2; max-width: 280px; }
.faq-left p { font-size: 0.88rem; color: var(--ta-slate); line-height: 1.6; margin-top: 1rem; max-width: 280px; }
.faq-cta { background: var(--warm-900); color: #fff; border: none; border-radius: 999px; padding: 0.75rem 1.5rem; font-weight: 700; font-size: 0.9rem; margin-top: 1.5rem; cursor: pointer; }
.faq-right { flex: 1; }
.faq-accordion-item { background: transparent; border-radius: 8px; padding: 1.25rem 0; }
.faq-accordion-item:not(:last-child) { border-bottom: 1px solid var(--warm-150); }
.faq-accordion-item summary { display: flex; justify-content: space-between; align-items: center; cursor: pointer; list-style: none; font-size: 0.95rem; font-weight: 600; color: var(--warm-900); }
.faq-accordion-item summary::-webkit-details-marker { display: none; }
.faq-accordion-item summary::after { content: "+"; font-size: 1.25rem; color: var(--accent); }
.faq-accordion-item[open] summary::after { content: "−"; }
.faq-accordion-item p { font-size: 0.88rem; color: var(--ta-slate); line-height: 1.6; padding-top: 0.75rem; }

@media (max-width: 768px) {
  .faq-container {
    padding: 48px 24px;
  }
  .faq-layout {
    flex-wrap: wrap;
    gap: 2rem;
  }
  .faq-left {
    flex: 0 0 100%;
  }
  .faq-right {
    flex: 0 0 100%;
  }
}

/* ----- Footer (placeholder) ----- */

.site-footer {
  background: var(--warm-50);
  border-top: 1px solid var(--warm-150);
  padding: 64px 0 32px;
}

.footer__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
}

.footer__logo img {
  height: 40px;
  width: auto;
}

.footer__tagline {
  font-size: 0.82rem;
  color: var(--ta-slate);
  margin-top: 0.75rem;
  line-height: 1.5;
}

.footer__socials {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-top: 1.25rem;
}

.footer__social-link {
  color: var(--ta-slate);
  transition: color 0.2s;
}

.footer__social-link:hover {
  color: var(--accent);
}

.footer__social-link svg {
  width: 20px;
  height: 20px;
  display: block;
}

.footer__heading {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--warm-900);
  margin-bottom: 1rem;
}

.footer__link {
  font-size: 0.88rem;
  color: var(--ta-slate);
  text-decoration: none;
  display: block;
  padding: 0.25rem 0;
  transition: color 0.2s;
}

.footer__link:hover {
  color: var(--accent);
}

.footer__rule {
  border: none;
  border-top: 1px solid var(--warm-150);
  margin-top: 3rem;
}

.footer__legal {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 1.5rem;
}

.footer__copyright {
  font-size: 0.78rem;
  color: var(--ta-slate);
}

.footer__legal-links {
  display: flex;
  gap: 1.5rem;
}

#teconsent {
  display: inline-flex;
  align-items: center;
}
#teconsent a {
  font-size: 0.78rem;
  color: var(--ta-slate);
  text-decoration: none;
  transition: color 0.2s;
  cursor: pointer;
}
#teconsent a:hover {
  color: var(--accent);
}

.footer__legal-link {
  font-size: 0.78rem;
  color: var(--ta-slate);
  text-decoration: none;
  transition: color 0.2s;
}

.footer__legal-link:hover {
  color: var(--accent);
}

@media (max-width: 768px) {
  .footer__grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer__legal {
    flex-direction: column;
    text-align: center;
  }

  .footer__legal-links {
    justify-content: center;
    flex-wrap: wrap;
  }
}

/* Hero collapse — wizard active state */
.hero-container.wizard-active {
  padding-top: 24px;
  padding-bottom: 24px;
  gap: 0;
}

.hero-container.wizard-active .hero-right {
  flex: 1 1 100%;
  max-width: 880px;
  margin: 0 auto;
}

.hero-left {
  transition: flex 0.45s cubic-bezier(.4,0,.2,1),
              opacity 0.3s ease;
}

.hero-right {
  transition: flex 0.45s cubic-bezier(.4,0,.2,1),
              max-width 0.45s cubic-bezier(.4,0,.2,1);
}
