:root {
  --navy:  #032147;
  --yellow:#ecad0a;
  --blue:  #209dd7;
  --purple:#753991;
  --grey:  #888888;
  --white: #ffffff;
  --bg:    #f5f7fa;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: #1a1a1a;
}
a { color: var(--blue); }

.site-nav {
  background: var(--navy);
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 32px;
  height: 56px;
  position: relative;
}
.site-nav .logo { color: var(--yellow); font-weight: 700; font-size: 1.1rem; text-decoration: none; }
.site-nav a { color: rgba(255,255,255,0.8); text-decoration: none; font-size: 0.9rem; }
.site-nav a:hover, .site-nav a.active { color: var(--white); }

.nav-links { display: flex; align-items: center; gap: 32px; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  margin-left: auto;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

@media (max-width: 768px) {
  .site-nav {
    height: 56px;
    padding: 0 16px;
    justify-content: space-between;
    z-index: 1000;
  }
  .nav-toggle {
    display: flex;
    height: 56px;
  }
  .nav-links {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--navy);
    padding: 4px 16px 12px;
    z-index: 9999;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  }
  .nav-links a {
    padding: 13px 4px;
    font-size: 1rem;
    border-top: 1px solid rgba(255,255,255,0.08);
  }
  .site-nav.nav-open .nav-links { display: flex; }
  .site-nav.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .site-nav.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  .site-nav.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

.container { max-width: 900px; margin: 0 auto; padding: 32px 24px; }
h1 { color: var(--navy); font-size: 1.6rem; margin-bottom: 8px; }
h2 { color: var(--navy); font-size: 1.2rem; margin-bottom: 16px; }

.btn { display: inline-block; padding: 10px 20px; border-radius: 4px; font-weight: 600;
       font-size: 0.9rem; text-decoration: none; border: none; cursor: pointer; }
.btn-primary  { background: var(--blue);   color: var(--white); }
.btn-secondary{ background: var(--purple); color: var(--white); }
.btn-tertiary { background: var(--navy);   color: var(--white); }
.btn:hover { opacity: 0.88; }

.search-bar { display: flex; gap: 10px; margin-bottom: 24px; }
.search-bar input {
  flex: 1; padding: 12px 16px; border: 2px solid #d1d5db;
  border-radius: 4px; font-size: 1rem; font-family: inherit;
}
.search-bar input:focus-visible { outline: none; border-color: var(--blue); }
.error-msg { color: #b91c1c; font-size: 0.9rem; margin-top: 6px; }

.metrics-grid {
  display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin: 20px 0;
}
.card {
  background: var(--white); border-radius: 6px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.07); padding: 16px;
}
.metric-label { color: var(--grey); font-size: 0.78rem; margin-bottom: 4px; }
.metric-value {
  color: var(--navy); font-size: 1.4rem; font-weight: 700;
  font-variant-numeric: tabular-nums; line-height: 1.1;
}
.metric-value-sm { font-size: 0.95rem; line-height: 1.3; }
.metric-sub  { color: var(--grey); font-size: 0.75rem; margin-top: 2px; }

.insight {
  background: #fff8e6; border-left: 4px solid var(--yellow);
  padding: 12px 16px; border-radius: 0 4px 4px 0;
  font-size: 0.9rem; margin: 16px 0;
}

.chart-sub   { color: var(--grey); font-size: 0.85rem; margin-bottom: 16px; }
.chart-label { color: var(--navy); font-size: 0.82rem; font-weight: 600; margin-bottom: 6px; }

.chart-wrap {
  background: none;
  padding: 0;
  margin-bottom: 16px;
}
#geo-chart { height: 260px !important; width: 100% !important; }

.cta-row { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.cta-row .btn { flex: 1; min-width: 140px; text-align: center; }

.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-weight: 600; font-size: 0.88rem; margin-bottom: 4px; }
.form-group input[type=text],
.form-group input[type=email],
.form-group select,
.form-group textarea {
  width: 100%; padding: 10px 12px; border: 2px solid #d1d5db;
  border-radius: 4px; font-family: inherit; font-size: 0.95rem;
}
.form-group textarea { height: 80px; resize: vertical; }
.form-group input:focus-visible,
.form-group select:focus-visible,
.form-group textarea:focus-visible { outline: none; border-color: var(--blue); }
.required-star { color: #b91c1c; }
.form-note { font-size: 0.8rem; color: var(--grey); margin-top: 3px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.checkbox-label { display: flex; align-items: flex-start; gap: 8px; font-size: 0.88rem; cursor: pointer; }
.checkbox-label input { margin-top: 2px; }

.result-box {
  background: var(--white); border-radius: 6px;
  border: 2px solid var(--blue); padding: 24px; margin-top: 24px;
}
.result-band {
  text-align: center; background: var(--bg); border-radius: 6px; padding: 20px; margin-bottom: 20px;
}
.result-band-letter { font-size: 3rem; font-weight: 700; color: var(--navy); line-height: 1; }
.result-band-range  { color: var(--grey); font-size: 0.85rem; margin-top: 6px; }
.prototype-notice {
  background: #fff8e6; border-left: 4px solid var(--yellow);
  padding: 10px 14px; border-radius: 0 4px 4px 0;
  font-size: 0.85rem; margin-bottom: 16px;
}

.breakdown-row {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 0; border-bottom: 1px solid #f0f0f0; font-size: 0.82rem;
}
.breakdown-row:last-child { border-bottom: none; }
.breakdown-label { width: 110px; flex-shrink: 0; color: #333; }
.breakdown-bar {
  flex: 1; height: 8px; background: #eee; border-radius: 4px; overflow: hidden;
}
.breakdown-fill { height: 100%; background: var(--blue); border-radius: 4px; }
.breakdown-pct { width: 32px; text-align: right; color: var(--grey); flex-shrink: 0; }

.detail-nav {
  display: flex; align-items: center; gap: 20px; margin-bottom: 24px;
}

.site-footer {
  background: var(--navy); color: rgba(255,255,255,0.6);
  text-align: center; padding: 16px; font-size: 0.82rem; margin-top: 48px;
}
.site-footer a { color: var(--yellow); }

@media (max-width: 600px) {
  .metrics-grid { grid-template-columns: 1fr 1fr; }
  .metrics-bottom { grid-template-columns: 1fr; }
  .search-bar { flex-direction: column; }
  .cta-row { flex-direction: column; }
  .form-row { grid-template-columns: 1fr; }
}

/* ── Home page ────────────────────────────────────────────────────── */

/* Hero */
.hero {
  background: var(--navy);
  padding: 64px 24px 72px;
}
.hero-inner {
  max-width: 720px;
  margin: 0 auto;
}
.hero-eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--yellow);
  margin-bottom: 16px;
}
.hero-title {
  color: var(--white);
  font-size: 2.4rem;
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 20px;
}
.hero-sub {
  color: rgba(255,255,255,0.85);
  font-size: 1.05rem;
  line-height: 1.7;
  max-width: 620px;
  margin-bottom: 36px;
}
.hero-ctas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.btn-hero-book {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255,255,255,0.35);
  padding: 10px 20px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.btn-hero-book:hover {
  border-color: var(--white);
  background: rgba(255,255,255,0.08);
}

/* Section layout */
.home-section {
  padding: 56px 0;
}
.section-title {
  font-size: 1.65rem;
  color: var(--navy);
  margin-bottom: 12px;
}
.section-intro {
  color: #444;
  font-size: 0.975rem;
  line-height: 1.7;
  max-width: 680px;
  margin-bottom: 28px;
}
.home-chart-caption {
  color: var(--grey);
  font-size: 0.8rem;
  margin-top: 10px;
  text-align: center;
}

/* Stats */
.home-stats-section {
  background: #f0f3f7;
  padding: 48px 0;
}
.home-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.home-stat-card {
  background: rgba(0,0,0,0.04);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 6px;
  padding: 24px 20px;
  text-align: center;
}
.home-stat-card--accent {
  border-color: var(--yellow);
  background: rgba(236,173,10,0.09);
}
.home-stat-num {
  color: var(--navy);
  font-size: 2.8rem;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 8px;
}
.home-stat-card--accent .home-stat-num { color: var(--yellow); }
.home-stat-label {
  color: #555;
  font-size: 0.82rem;
  line-height: 1.5;
}

/* EPC Tool entry */
.home-search-note {
  color: var(--grey);
  font-size: 0.8rem;
  margin-top: 8px;
}

/* Book section */
.home-book-section {
  background: var(--navy);
  padding: 56px 0;
}
.home-book-row {
  display: flex;
  gap: 48px;
  align-items: flex-start;
}
.home-book-cover {
  flex: 0 0 auto;
}
.home-book-img {
  width: 270px;
  max-width: 100%;
  border-radius: 4px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.4);
  display: block;
  transition: box-shadow 0.2s;
}
.home-book-img:hover { box-shadow: 0 12px 36px rgba(0,0,0,0.55); }
.home-book-info { flex: 1; min-width: 0; }
.home-book-eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--yellow);
  margin-bottom: 10px;
}
.home-book-title {
  font-size: 1.25rem;
  color: var(--white);
  line-height: 1.35;
  margin-bottom: 14px;
}
.home-book-desc {
  color: rgba(255,255,255,0.75);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 16px;
}
.home-book-bullets {
  list-style: none;
  padding: 0;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.home-book-bullets li {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.75);
  padding-left: 16px;
  position: relative;
  line-height: 1.5;
}
.home-book-bullets li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--yellow);
}
.home-book-cta { display: inline-block; }

/* Bridge strip */
.home-bridge {
  background: var(--white);
  padding: 32px 0;
}
.home-bridge-text {
  border-left: 4px solid var(--yellow);
  padding-left: 20px;
  font-size: 1.05rem;
  color: var(--navy);
  line-height: 1.65;
  max-width: 680px;
  margin: 0;
  font-style: italic;
}

/* ── Assessment — route map ───────────────────────────────────────── */
.route-steps {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.route-phase-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--phase-col);
  padding: 20px 0 7px 4px;
  border-top: 2px solid var(--phase-col);
  margin-top: 8px;
}
.route-step {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--step-bg);
  border-left: 4px solid var(--step-col);
  border-radius: 0 6px 6px 0;
  padding: 14px 16px;
  margin-bottom: 6px;
  position: relative;
}
.route-step-num {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--step-col);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.route-step-body { flex: 1; }
.route-step-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 3px;
}
.route-step-desc {
  font-size: 0.85rem;
  color: var(--grey);
  line-height: 1.5;
}

/* ── Assessment — services ────────────────────────────────────────── */
.services-notice-bar {
  background: #fff8e6;
  border-left: 4px solid var(--yellow);
  border-radius: 0 4px 4px 0;
  padding: 12px 16px;
  font-size: 0.9rem;
  color: #444;
  line-height: 1.5;
}
.services-notice-label {
  display: inline-block;
  background: var(--yellow);
  color: var(--navy);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 2px 8px;
  border-radius: 3px;
  margin-right: 10px;
  vertical-align: middle;
}
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.service-card {
  background: var(--white);
  border-radius: 6px;
  padding: 20px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.07);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.service-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--navy);
}
.service-card-desc {
  font-size: 0.875rem;
  color: #444;
  line-height: 1.6;
  flex: 1;
}
.service-card-status {
  font-size: 0.75rem;
  color: var(--grey);
  font-style: italic;
  margin-top: 4px;
}

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

/* Home responsive */
@media (max-width: 700px) {
  .hero-title { font-size: 1.7rem; }
  .home-stats-grid { grid-template-columns: 1fr; }
  .home-book-row { flex-direction: column; }
  .home-book-cover { align-self: center; }
}

/* Band breakdown cards */
.metrics-bottom .card { padding: 14px 16px; }
.band-breakdown { margin-top: 6px; }
.band-row { display: flex; align-items: baseline; gap: 8px; padding: 3px 0; border-bottom: 1px solid #f0f0f0; font-size: 0.82rem; }
.band-row:last-child { border-bottom: none; }
.band-tag { display: inline-block; width: 28px; text-align: center; font-weight: 700; font-size: 0.75rem; border-radius: 3px; padding: 1px 0; flex-shrink: 0; color: #fff; }
.band-tag-ab { background: #2ecc71; }
.band-tag-c  { background: #a8d08d; color: #1a1a1a; }
.band-tag-d  { background: #ecad0a; color: #1a1a1a; }
.band-tag-e  { background: #e07b2a; }
.band-tag-f  { background: #e05252; }
.band-tag-g  { background: #b91c1c; }
.band-val { color: #333; flex: 1; line-height: 1.3; }
#m-heat-bands .band-val { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
