/* ---------- Tokens ---------- */
:root {
  --navy-950: #06152f;
  --navy-900: #071d43;
  --navy-800: #0c2756;
  --navy-700: #10376f;
  --ink: #071d43;
  --ink-soft: #475569;
  --line: #e2e8f0;
  --bg: #ffffff;
  --bg-tint: #f2f6fb;
  --accent: #06c4e3;
  --accent-strong: #0878e6;
  --accent-2: #0878e6;
  --on-dark: #e6edf7;
  --on-dark-soft: #9fb0cc;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow: 0 10px 30px -12px rgba(15, 23, 42, .18);
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-head: "Space Grotesk", "Inter", system-ui, sans-serif;
  --header-h: 72px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.02em; }
h1 { font-size: clamp(2.5rem, 6vw, 4.25rem); font-weight: 700; }
h2 { font-size: clamp(1.9rem, 4vw, 2.75rem); font-weight: 600; }
h3 { font-size: 1.25rem; font-weight: 600; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.container.narrow { max-width: 820px; }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--accent); color: var(--navy-950); padding: 10px 16px; border-radius: 8px; font-weight: 600;
}
.skip-link:focus { top: 16px; }

:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 3px; border-radius: 6px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: 14px 24px; border-radius: 999px; border: 2px solid var(--accent);
  background: var(--accent); color: var(--navy-950);
  font-weight: 600; font-size: 1rem; text-decoration: none; cursor: pointer;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}
.btn:hover { background: #3dd5ee; transform: translateY(-1px); box-shadow: 0 8px 24px -8px rgba(6, 196, 227, .6); }
.btn-ghost { background: transparent; color: var(--on-dark); border-color: rgba(230, 237, 247, .35); }
.btn-ghost:hover { background: rgba(230, 237, 247, .08); box-shadow: none; }
.btn-small { padding: 9px 18px; font-size: .95rem; }
.btn-full { width: 100%; }

.eyebrow {
  font-size: .8rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent-strong); margin-bottom: 1rem;
}
.section-dark .eyebrow, .hero .eyebrow { color: var(--accent); }
.accent { color: var(--accent); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(6, 21, 47, .82);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; }
.logo-icon { width: 40px; height: 40px; flex: none; font-family: "Inter", "DejaVu Sans", Verdana, sans-serif; }
.logo-text { font-family: "Inter", "DejaVu Sans", Verdana, sans-serif; font-style: italic; font-weight: 800; font-size: 1.3rem; letter-spacing: -.02em; }
.logo-3r { color: var(--accent); }

.nav-menu { display: flex; align-items: center; gap: 28px; }
.nav-menu a:not(.btn) { color: var(--on-dark-soft); text-decoration: none; font-weight: 500; font-size: .97rem; transition: color .15s; }
.nav-menu a:not(.btn):hover { color: #fff; }

.nav-toggle {
  display: none; width: 44px; height: 44px; border: 0; background: transparent; cursor: pointer;
  flex-direction: column; justify-content: center; align-items: center; gap: 5px; padding: 0;
}
.nav-toggle span { display: block; width: 22px; height: 2px; background: #fff; border-radius: 2px; transition: transform .2s, opacity .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: radial-gradient(1200px 600px at 85% -10%, rgba(8, 120, 230, .25), transparent 60%),
              radial-gradient(900px 500px at -10% 110%, rgba(6, 196, 227, .18), transparent 60%),
              var(--navy-950);
  color: var(--on-dark);
  padding: 96px 0 112px;
}
.hero-grid-bg {
  position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 60% 40%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 60% 40%, #000 30%, transparent 75%);
}
.hero-inner { position: relative; display: grid; grid-template-columns: 1.05fr .95fr; gap: 64px; align-items: center; }
.hero h1 { color: #fff; }
.lead { font-size: 1.2rem; color: var(--on-dark-soft); max-width: 34em; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; margin: 32px 0 36px; }
.hero-points { display: grid; gap: 10px; color: var(--on-dark-soft); font-size: .97rem; }
.hero-points li { display: flex; align-items: center; gap: 10px; }
.hero-points li::before {
  content: ""; width: 18px; height: 18px; flex: none; border-radius: 50%;
  background: rgba(6, 196, 227, .15) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2306c4e3' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12l4 4 8-8'/%3E%3C/svg%3E") center/12px no-repeat;
}

/* Dashboard card */
.dash-card {
  background: linear-gradient(180deg, rgba(16, 55, 111, .85), rgba(12, 39, 86, .9));
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: var(--radius-lg);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255,255,255,.06);
  padding: 20px;
  transform: perspective(1200px) rotateY(-6deg) rotateX(3deg);
  animation: float 7s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: perspective(1200px) rotateY(-6deg) rotateX(3deg) translateY(0); }
  50% { transform: perspective(1200px) rotateY(-6deg) rotateX(3deg) translateY(-10px); }
}
.dash-head { display: flex; align-items: center; gap: 6px; margin-bottom: 18px; }
.dash-head .dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.18); }
.dash-title { margin-left: 10px; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .78rem; color: var(--on-dark-soft); }
.dash-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.kpi { background: rgba(6, 21, 47, .5); border: 1px solid rgba(255,255,255,.06); border-radius: 10px; padding: 12px; min-width: 0; }
.kpi-label { display: block; font-size: .72rem; color: var(--on-dark-soft); margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-value { font-family: var(--font-head); font-weight: 600; font-size: 1.15rem; color: #fff; font-variant-numeric: tabular-nums; }
.kpi-value.good { color: var(--accent); }
.dash-chart { color: var(--accent); background: rgba(6, 21, 47, .5); border-radius: 10px; padding: 12px; border: 1px solid rgba(255,255,255,.06); }
.dash-chart svg { width: 100%; height: 150px; }
.dash-chart .gridlines line { stroke: rgba(255,255,255,.07); stroke-width: 1; }
.dash-chart .line {
  fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 500; stroke-dashoffset: 500; animation: draw 2.2s .3s ease-out forwards;
  vector-effect: non-scaling-stroke;
}
.dash-chart .area { opacity: 0; animation: fade 1s 1.4s ease-out forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fade { to { opacity: 1; } }
.dash-flow { display: flex; align-items: center; gap: 8px; margin-top: 16px; }
.stage {
  flex: none; font-size: .8rem; font-weight: 600; padding: 6px 12px; border-radius: 999px;
  background: rgba(255,255,255,.06); color: var(--on-dark-soft); border: 1px solid rgba(255,255,255,.08);
}
.stage-on { background: rgba(6, 196, 227, .15); color: var(--accent); border-color: rgba(6, 196, 227, .4); }
.arrow { flex: 1; height: 2px; position: relative; background: rgba(255,255,255,.1); overflow: hidden; border-radius: 2px; }
.arrow::after {
  content: ""; position: absolute; top: 0; left: -30%; width: 30%; height: 100%;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  animation: flow 1.8s linear infinite;
}
@keyframes flow { to { left: 100%; } }

/* ---------- Sections ---------- */
.section { padding: 104px 0; }
.section-tint { background: var(--bg-tint); }
.section-dark { background: var(--navy-900); color: var(--on-dark); }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-head { max-width: 720px; margin-bottom: 56px; }
.section-sub { font-size: 1.12rem; color: var(--ink-soft); }
.section-dark .section-sub { color: var(--on-dark-soft); }

/* Services cards */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px;
  display: flex; flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: #cbd5e1; }
.card p { color: var(--ink-soft); font-size: .97rem; flex: 1; }
.card-icon {
  width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 20px;
  background: linear-gradient(135deg, rgba(6, 196, 227, .15), rgba(8, 120, 230, .15));
}
.card-icon svg { width: 24px; height: 24px; fill: none; stroke: var(--accent-strong); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tags li { font-size: .78rem; font-weight: 500; padding: 4px 10px; border-radius: 999px; background: var(--bg-tint); color: var(--ink-soft); }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; counter-reset: step; }
.step {
  position: relative; padding: 32px; border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(16, 55, 111, .6), rgba(12, 39, 86, .3));
  border: 1px solid rgba(255,255,255,.08);
  display: flex; flex-direction: column;
}
.step p { color: var(--on-dark-soft); flex: 1; }
.step-num {
  font-family: var(--font-head); font-weight: 700; font-size: 3rem; line-height: 1;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  margin-bottom: 20px; display: block;
}
.step h3 { font-size: 1.6rem; }
.step-out { font-size: .88rem; font-weight: 600; color: var(--accent); padding-top: 16px; border-top: 1px solid rgba(255,255,255,.08); }

/* Industries */
.industries { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.industry { background: #fff; padding: 32px; transition: background .2s; }
.industry:hover { background: var(--bg-tint); }
.industry h3 { font-size: 1.12rem; }
.industry p { color: var(--ink-soft); font-size: .97rem; margin: 0; }

.stack { margin-top: 64px; text-align: center; }
.stack-label { font-size: .85rem; font-weight: 600; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .12em; margin-bottom: 20px; }
.stack-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.stack-list li {
  font-family: var(--font-head); font-weight: 500; font-size: .95rem; color: var(--ink);
  padding: 8px 16px; border: 1px solid var(--line); border-radius: 999px; background: #fff;
}

/* About */
.about { display: grid; grid-template-columns: 1.1fr .9fr; gap: 64px; align-items: center; }
.about-copy p { color: var(--ink-soft); font-size: 1.07rem; }
.principles { display: grid; gap: 14px; }
.principles li {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px 20px 56px;
  position: relative; color: var(--ink-soft);
}
.principles li::before {
  content: ""; position: absolute; left: 20px; top: 22px; width: 20px; height: 20px; border-radius: 6px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
.principles strong { color: var(--ink); }

/* FAQ */
.faq { display: grid; gap: 12px; }
.faq details { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; transition: border-color .2s; }
.faq details[open] { border-color: #cbd5e1; box-shadow: var(--shadow); }
.faq summary {
  cursor: pointer; list-style: none; padding: 20px 56px 20px 24px; font-weight: 600; position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 24px; top: 50%; width: 12px; height: 12px; margin-top: -8px;
  border-right: 2px solid var(--ink-soft); border-bottom: 2px solid var(--ink-soft);
  transform: rotate(45deg); transition: transform .2s;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq details p { padding: 0 24px 20px; margin: 0; color: var(--ink-soft); }

/* Contact */
.contact { display: grid; grid-template-columns: .9fr 1.1fr; gap: 64px; align-items: start; }
.contact-email { color: var(--on-dark-soft); }
.contact-email a { color: var(--accent); font-weight: 600; text-decoration: none; }
.contact-email a:hover { text-decoration: underline; }
.contact-form {
  display: grid; grid-template-columns: 1fr 1fr; gap: 18px;
  background: var(--navy-800); border: 1px solid rgba(255,255,255,.08); border-radius: var(--radius-lg); padding: 32px;
}
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-full, .contact-form .btn, .form-status { grid-column: 1 / -1; }
.field label { font-size: .9rem; font-weight: 500; color: var(--on-dark); }
.optional { color: var(--on-dark-soft); font-weight: 400; }
.field input, .field select, .field textarea {
  font: inherit; font-size: 1rem; color: #fff; width: 100%;
  background: var(--navy-950); border: 1px solid var(--navy-700); border-radius: 10px; padding: 12px 14px;
  transition: border-color .15s, box-shadow .15s;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(6, 196, 227, .2);
}
.field.invalid input, .field.invalid textarea { border-color: #f87171; }
.form-status { margin: 0; font-size: .95rem; min-height: 1.5em; color: var(--on-dark-soft); }
.form-status.ok { color: var(--accent); }
.form-status.err { color: #fca5a5; }

/* Footer */
.site-footer { background: var(--navy-950); color: var(--on-dark-soft); padding: 40px 0; border-top: 1px solid rgba(255,255,255,.06); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer-nav { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-nav a { text-decoration: none; font-size: .95rem; }
.footer-nav a:hover { color: #fff; }
.copyright { margin: 0; font-size: .9rem; }

/* Reveal on scroll */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .hero-inner { gap: 40px; }
}

@media (max-width: 880px) {
  .nav-toggle { display: flex; }
  .nav-menu {
    position: fixed; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--navy-950); border-bottom: 1px solid rgba(255,255,255,.08);
    padding: 8px 16px 20px;
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: transform .2s ease, opacity .2s ease, visibility .2s;
  }
  .nav-menu.open { transform: none; opacity: 1; visibility: visible; }
  .nav-menu a:not(.btn) { padding: 14px 8px; font-size: 1.05rem; border-bottom: 1px solid rgba(255,255,255,.06); }
  .nav-menu .btn { margin-top: 16px; }

  .hero { padding: 64px 0 80px; }
  .hero-inner, .about, .contact { grid-template-columns: 1fr; }
  .hero-visual { max-width: 520px; }
  .dash-card { transform: none; animation: none; }
  .steps { grid-template-columns: 1fr; }
  .industries { grid-template-columns: repeat(2, 1fr); }
  .section { padding: 80px 0; }
}

@media (max-width: 600px) {
  body { font-size: 16px; }
  .container { padding: 0 16px; }
  .cards, .industries { grid-template-columns: 1fr; }
  .contact-form { grid-template-columns: 1fr; padding: 22px; }
  .hero-ctas .btn { flex: 1 1 100%; }
  .dash-kpis { grid-template-columns: 1fr 1fr; }
  .dash-kpis .kpi:first-child { grid-column: 1 / -1; }
  .section { padding: 64px 0; }
  .section-head { margin-bottom: 36px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .dash-chart .line { stroke-dashoffset: 0; }
  .dash-chart .area { opacity: 1; }
  .js .reveal { opacity: 1; transform: none; }
}

/* ---------- Market pulse ---------- */
.pulse-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 24px; }
.pulse-kpi {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px 24px;
  border-top: 3px solid var(--accent-strong);
}
.pulse-kpi-label { display: block; font-size: .85rem; font-weight: 600; color: var(--ink-soft); margin-bottom: 6px; }
.pulse-kpi-value { display: block; font-family: var(--font-head); font-size: clamp(1.9rem, 3.4vw, 2.5rem); font-weight: 700; line-height: 1.1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.pulse-kpi-sub { display: block; margin-top: 6px; font-size: .9rem; color: var(--ink-soft); }
.pulse-kpi-sub .up, .pulse-kpi-sub .down { font-weight: 600; color: var(--ink); }

.pulse-panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px; margin-bottom: 24px; min-width: 0; }
.pulse-panel-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; margin-bottom: 18px; }
.pulse-panel-head h3 { margin: 0; font-size: 1.15rem; }
.pulse-legend { display: flex; flex-wrap: wrap; gap: 18px; font-size: .85rem; color: var(--ink-soft); }
.pulse-legend li { display: flex; align-items: center; gap: 8px; }
.key { width: 22px; height: 0; border-top: 3px solid var(--accent-strong); }
.key-ly { border-top: 2px dashed #94a3b8; }

.pulse-charts { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.pulse-chart { margin: 0; position: relative; min-width: 0; }
.pulse-chart figcaption { font-size: .85rem; font-weight: 600; color: var(--ink-soft); margin-bottom: 4px; }
.pulse-chart svg { width: 100%; height: auto; overflow: visible; touch-action: pan-y; }
.pulse-chart .grid line { stroke: var(--line); stroke-width: 1; }
.pulse-chart .axis text { fill: #64748b; font-size: 11px; font-family: var(--font-body); }
.pulse-chart .now { fill: none; stroke: var(--accent-strong); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.pulse-chart .now-area { fill: rgba(8, 120, 230, .08); }
.pulse-chart .ly { fill: none; stroke: #94a3b8; stroke-width: 2; stroke-dasharray: 5 4; stroke-linejoin: round; }
.pulse-chart .cursor { stroke: #94a3b8; stroke-width: 1; }
.pulse-chart .dot-now { fill: var(--accent-strong); stroke: #fff; stroke-width: 2; }
.pulse-chart .dot-ly { fill: #94a3b8; stroke: #fff; stroke-width: 2; }
.pulse-tip {
  position: absolute; top: 24px; pointer-events: none; z-index: 2;
  background: var(--navy-950); color: var(--on-dark); font-size: .8rem; line-height: 1.45;
  padding: 8px 10px; border-radius: 8px; white-space: nowrap; box-shadow: var(--shadow);
}
.pulse-tip strong { color: #fff; }

.pulse-split { display: grid; grid-template-columns: 1.25fr 1fr; gap: 24px; }
.pulse-split .pulse-panel { margin-bottom: 0; }
.pulse-toggle { display: inline-flex; background: var(--bg-tint); border-radius: 999px; padding: 3px; }
.pulse-toggle button {
  font: inherit; font-size: .85rem; font-weight: 600; border: 0; cursor: pointer;
  padding: 7px 14px; border-radius: 999px; background: transparent; color: var(--ink-soft);
}
.pulse-toggle button[aria-pressed="true"] { background: var(--navy-900); color: #fff; }

.tile-map { display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); gap: 3px; max-width: 560px; }
.tile {
  aspect-ratio: 1; border-radius: 4px; display: flex; align-items: center; justify-content: center;
  font-size: clamp(.55rem, 1.1vw, .75rem); font-weight: 600; color: var(--ink); background: #e2e8f0;
  transition: background .3s ease, transform .15s ease; cursor: default;
}
.tile:hover, .tile:focus-visible { transform: scale(1.12); position: relative; z-index: 1; }
.tile.dark { color: #fff; }
.map-legend { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-size: .8rem; color: var(--ink-soft); flex-wrap: wrap; }
.map-legend .swatches { display: flex; gap: 2px; }
.map-legend .swatches span { width: 34px; height: 10px; border-radius: 2px; }
.map-readout { margin: 10px 0 0; font-size: .9rem; color: var(--ink-soft); min-height: 1.5em; }

.bands { display: grid; gap: 14px; }
.band-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; font-size: .9rem; }
.band-row .label { font-weight: 600; }
.band-row .meta { color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.band-bar { grid-column: 1 / -1; height: 10px; background: var(--bg-tint); border-radius: 999px; overflow: hidden; }
.band-bar span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent-strong), var(--accent)); width: 0; transition: width 1s ease; }
.bands-note { margin: 16px 0 0; font-size: .85rem; color: var(--ink-soft); }

.pulse-note { margin: 24px 0 0; font-size: .85rem; color: var(--ink-soft); max-width: 70em; }

@media (max-width: 1024px) {
  .pulse-split { grid-template-columns: 1fr; }
}
@media (max-width: 880px) {
  .pulse-charts { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .pulse-kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .pulse-kpi { padding: 16px; }
  .pulse-kpi-sub { font-size: .8rem; }
  .pulse-panel { padding: 18px 16px; }
  .tile-map { gap: 2px; }
}

/* Market toggle (cars / aircraft) */
.pulse-top { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 0 32px; }
.pulse-top .section-head { flex: 1 1 520px; }
.pulse-markets { margin-bottom: 56px; padding: 4px; background: #fff; border: 1px solid var(--line); }
.pulse-markets button { font-size: 1rem; padding: 10px 22px; }
.bands-wide .band-row { grid-template-columns: minmax(120px, 200px) 1fr auto; align-items: center; }
.bands-wide .band-bar { grid-column: 2; grid-row: 1; }
.bands-wide .meta { grid-column: 3; text-align: right; }
@media (max-width: 880px) {
  .pulse-markets { margin: -24px 0 32px; }
}
@media (max-width: 600px) {
  .pulse-markets { margin: -12px 0 24px; width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; border-radius: 18px; }
  .pulse-markets button { padding: 10px 8px; }
  .bands-wide .band-row { grid-template-columns: 1fr auto; }
  .bands-wide .band-bar { grid-column: 1 / -1; grid-row: auto; }
  .bands-wide .meta { grid-column: 2; grid-row: 1; }
}

/* Scatter (purchase power vs. intent) */
.pulse-scatter { margin: 0; position: relative; }
.pulse-scatter svg { width: 100%; height: auto; overflow: visible; }
.pulse-scatter .grid line { stroke: var(--line); stroke-width: 1; }
.pulse-scatter .axis text, .pulse-scatter .axis-title { fill: #64748b; font-size: 11px; font-family: var(--font-body); }
.pulse-scatter .axis-title { font-size: 12px; font-weight: 600; }
.pulse-scatter .mid { stroke: #94a3b8; stroke-width: 1; stroke-dasharray: 4 4; }
.pulse-scatter .q-hot { fill: rgba(6, 196, 227, .08); }
.pulse-scatter .q-label { fill: #94a3b8; font-size: 12px; font-weight: 600; font-family: var(--font-body); }
.pulse-scatter .q-label-hot { fill: var(--accent-strong); }
.pulse-scatter .pt { cursor: default; outline: none; }
.pulse-scatter .pt circle { fill: var(--accent-strong); stroke: #fff; stroke-width: 1.5; transition: r .15s; }
.pulse-scatter .pt text { fill: var(--ink); font-size: 10px; font-weight: 600; font-family: var(--font-body); pointer-events: none; }
.pulse-scatter .pt:hover circle, .pulse-scatter .pt:focus circle { r: 7; fill: var(--navy-900); }
.pulse-scatter .pulse-tip { white-space: normal; max-width: 280px; }
.pulse-scatter .q-label, .pulse-scatter .pt text { paint-order: stroke; stroke: #fff; stroke-width: 3px; stroke-linejoin: round; }

/* Market Pulse email sign-up */
.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; }
.pulse-signup {
  margin-top: 32px; padding: 28px; border-radius: var(--radius-lg); background: var(--navy-900); color: var(--on-dark);
  display: grid; grid-template-columns: 1fr 1.2fr; gap: 16px 32px; align-items: center;
}
.pulse-signup h3 { color: #fff; margin: 0 0 6px; font-size: 1.3rem; }
.pulse-signup-copy p { margin: 0; color: var(--on-dark-soft); font-size: .95rem; }
.signup-topics { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; }
.signup-topics label { display: inline-flex; align-items: center; gap: 7px; font-size: .92rem; cursor: pointer; }
.signup-topics input { width: 16px; height: 16px; accent-color: var(--accent); }
.signup-row { grid-column: 1 / -1; display: flex; gap: 10px; }
.signup-row input[type="email"] {
  flex: 1; min-width: 0; font: inherit; font-size: 1rem; color: #fff; background: var(--navy-950);
  border: 1px solid var(--navy-700); border-radius: 999px; padding: 12px 18px;
}
.signup-row input[type="email"]:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(6, 196, 227, .2); }
.signup-row .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.signup-status { grid-column: 1 / -1; margin: 0; min-height: 1.4em; font-size: .92rem; color: var(--on-dark-soft); }
.signup-status.ok { color: var(--accent); }
.signup-status.err { color: #fca5a5; }
@media (max-width: 880px) { .pulse-signup { grid-template-columns: 1fr; } }
@media (max-width: 600px) {
  .pulse-signup { padding: 22px 18px; }
  .signup-row { flex-direction: column; }
  .signup-row .btn { width: 100%; }
}

/* "Get your market" request */
.pulse-cta { margin-top: 32px; padding: 24px 28px; border-radius: var(--radius-lg); background: #fff; border: 1px solid var(--line);
  border-left: 4px solid var(--accent-strong); box-shadow: var(--shadow); }
.pulse-cta-head { display: flex; align-items: center; justify-content: space-between; gap: 16px 28px; flex-wrap: wrap; }
.pulse-cta h3 { margin: 0 0 4px; font-size: 1.25rem; }
.pulse-cta-head p { margin: 0; color: var(--ink-soft); max-width: 46em; }
.pulse-cta-head .btn { flex: none; }
.request-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.request-form[hidden] { display: none; }
.request-form .field { display: flex; flex-direction: column; gap: 6px; }
.request-form .field-full { grid-column: 1 / -1; }
.request-form label { font-size: .88rem; font-weight: 600; color: var(--ink); }
.request-form .optional { font-weight: 400; color: var(--ink-soft); }
.request-form input, .request-form select, .request-form textarea {
  font: inherit; font-size: 1rem; color: var(--ink); background: var(--bg-tint); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 12px; }
.request-form input:focus, .request-form select:focus, .request-form textarea:focus {
  outline: none; border-color: var(--accent-strong); box-shadow: 0 0 0 3px rgba(8, 120, 230, .15); }
.request-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.request-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.request-status { margin: 0; font-size: .92rem; color: var(--ink-soft); }
.request-status.ok { color: #047857; font-weight: 600; }
.request-status.err { color: #b91c1c; }
@media (max-width: 600px) {
  .pulse-cta { padding: 22px 18px; }
  .request-form { grid-template-columns: 1fr; }
  .pulse-cta-head .btn, .request-actions .btn { width: 100%; }
}

/* State pages (/states/…, built by tools/build_state_pages.py) */
.state-hero { padding-top: calc(var(--header-h) + 48px); }
.state-hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); margin: 6px 0 10px; }
.state-hero .eyebrow a { color: inherit; text-decoration: none; border-bottom: 1px solid currentColor; }
.state-highlights { margin-top: 28px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px 26px; box-shadow: var(--shadow); }
.state-highlights h2 { font-size: 1.15rem; margin: 0 0 10px; }
.state-highlights ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.state-highlights strong { color: var(--ink); }
.state-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 20px; }
.state-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px 24px; display: flex; flex-direction: column; }
.state-card h2 { font-size: 1.25rem; margin: 2px 0 8px; }
.state-card .eyebrow { margin: 0; }
.state-summary { margin: 0 0 12px; color: var(--ink-soft); font-size: .92rem; }
.state-table { width: 100%; border-collapse: collapse; font-size: .92rem; margin-bottom: 14px; }
.state-table th, .state-table td { text-align: left; padding: 8px 6px 8px 0; border-top: 1px solid var(--line); vertical-align: top; }
.state-table thead th { border-top: 0; font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-soft); font-weight: 600; }
.state-table tbody th { font-weight: 600; color: var(--ink); }
.state-table .rank { white-space: nowrap; color: var(--ink-soft); text-align: right; padding-right: 0; }
.state-more { margin-top: auto; font-weight: 600; color: var(--accent-strong); text-decoration: none; }
.state-more:hover { text-decoration: underline; }
.state-others-title { font-size: 1.3rem; margin: 0 0 16px; }
.state-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 6px 18px; }
.state-list a { color: var(--ink); text-decoration: none; }
.state-list a:hover { color: var(--accent-strong); text-decoration: underline; }
.state-list-big { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.state-list-big a { display: flex; flex-direction: column; padding: 12px 14px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.state-list-big a:hover { border-color: var(--accent-strong); text-decoration: none; }
.state-list-big span { font-size: .82rem; color: var(--ink-soft); }
.pulse-states-link { margin: 16px 0 0; font-weight: 600; }
.pulse-states-link a { color: var(--accent-strong); }

/* email.html / approve.html */
.simple-page { min-height: 70vh; padding: 72px 0; background: var(--bg-tint); }
.simple-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 32px; max-width: 620px; margin: 0 auto; }
.simple-card h1 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
.simple-card p { color: var(--ink-soft); }
.simple-card .signup-topics label { color: var(--ink); }
.simple-card .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.btn-plain { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-plain:hover { background: var(--bg-tint); box-shadow: none; }
.simple-card .msg { margin: 14px 0 0; min-height: 1.4em; font-size: .95rem; }
.simple-card .msg.ok { color: #047857; }
.simple-card .msg.err { color: #b91c1c; }
