@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/fonts/inter-latin.woff2') format('woff2');
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --near-black: #0D0D0D;
  --dark-navy: #1A1A2E;
  --electric-blue: #2D7FF9;
  --electric-blue-hover: #1A6AE0;
  --teal: #00D4AA;
  --off-white: #F8F9FA;
  --white: #FFFFFF;
  --med-gray: #6B7280;
  --light-gray: #E5E7EB;
  --red: #EF4444;
  --orange: #F59E0B;
  --green: #10B981;
}
html { font-size: 16px; scroll-behavior: smooth; }
body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; color: var(--off-white); background: var(--near-black); line-height: 1.6; -webkit-font-smoothing: antialiased; min-height: 100vh; }

/* Focus styles */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--electric-blue); outline-offset: 2px;
}
.check-btn:focus-visible, .results-cta-btn:focus-visible {
  outline: 2px solid var(--off-white); outline-offset: 2px;
}

/* Skip link */
.skip-link {
  position: absolute; top: -100%; left: 1rem; z-index: 200;
  background: var(--electric-blue); color: var(--white); padding: 0.75rem 1.5rem;
  border-radius: 0 0 8px 8px; font-weight: 600; text-decoration: none; font-size: 0.9rem;
}
.skip-link:focus { top: 0; }

/* Honeypot */
.honeypot { display: none; }

/* Nav */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(13,13,13,0.95); backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.nav-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 2rem;
  display: flex; justify-content: space-between; align-items: center; height: 72px;
}
.nav-logo {
  font-size: 1.5rem; font-weight: 800; letter-spacing: 0.15em;
  color: var(--off-white); text-decoration: none;
}
.nav-logo span { color: var(--electric-blue); }
.nav-back {
  color: rgba(248,249,250,0.6); text-decoration: none; font-size: 0.9rem;
  font-weight: 500; transition: color 0.2s;
}
.nav-back:hover { color: var(--off-white); }

/* Hero */
.check-hero {
  padding: 10rem 2rem 4rem; text-align: center;
  position: relative; overflow: hidden;
}
.check-hero::before {
  content: ''; position: absolute; top: -40%; right: -20%;
  width: 600px; height: 600px; border-radius: 50%;
  background: radial-gradient(circle, rgba(45,127,249,0.06) 0%, transparent 70%);
}
.check-badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: rgba(0,212,170,0.1); border: 1px solid rgba(0,212,170,0.2);
  border-radius: 100px; padding: 0.4rem 1rem; margin-bottom: 1.5rem;
  font-size: 0.8rem; color: var(--teal); font-weight: 700; letter-spacing: 0.05em;
}
.check-hero h1 {
  font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; line-height: 1.15;
  letter-spacing: -0.02em; margin-bottom: 1rem; max-width: 700px; margin-left: auto; margin-right: auto;
}
.check-hero h1 .gradient-text {
  background: linear-gradient(135deg, var(--electric-blue), var(--teal));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.check-sub {
  font-size: 1.1rem; color: rgba(248,249,250,0.55); max-width: 520px;
  margin: 0 auto 1rem; line-height: 1.7;
}
.check-disclosure {
  font-size: 0.8rem; color: rgba(248,249,250,0.35); max-width: 520px;
  margin: 0 auto 2rem; line-height: 1.5;
}
.check-disclosure a { color: rgba(248,249,250,0.5); text-decoration: underline; }
.check-disclosure a:hover { color: var(--off-white); }

/* Input area */
.check-input-wrap {
  max-width: 600px; margin: 0 auto; display: flex; gap: 0.75rem;
  position: relative; z-index: 1;
}
.check-input {
  flex: 1; padding: 1rem 1.25rem; border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.12); background: rgba(255,255,255,0.05);
  color: var(--off-white); font-family: inherit; font-size: 1rem;
  transition: border-color 0.2s;
}
.check-input::placeholder { color: rgba(248,249,250,0.3); }
.check-input:focus {
  border-color: var(--electric-blue);
  outline: 2px solid var(--electric-blue); outline-offset: 2px;
}
.check-btn {
  padding: 1rem 2rem; border: none; border-radius: 10px;
  background: var(--electric-blue); color: var(--white);
  font-family: inherit; font-size: 1rem; font-weight: 600;
  cursor: pointer; transition: all 0.2s; white-space: nowrap;
}
.check-btn:hover { background: var(--electric-blue-hover); }
.check-btn:disabled { opacity: 0.6; cursor: not-allowed; }
@media (max-width: 540px) {
  .check-input-wrap { flex-direction: column; }
  .check-input { min-height: 48px; }
  .check-btn { width: 100%; min-height: 52px; }
}

/* Loading */
.loading { height: 0; overflow: hidden; visibility: hidden; text-align: center; padding: 0 2rem; }
.loading.active { height: auto; visibility: visible; padding: 3rem 2rem; }
.spinner {
  width: 48px; height: 48px; border: 4px solid rgba(255,255,255,0.1);
  border-top-color: var(--electric-blue); border-radius: 50%;
  animation: spin 0.8s linear infinite; margin: 0 auto 1.5rem;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { color: rgba(248,249,250,0.55); font-size: 0.95rem; }
.loading-step { color: var(--teal); font-size: 0.85rem; margin-top: 0.5rem; font-weight: 600; }

/* Results */
.results { height: 0; overflow: hidden; visibility: hidden; max-width: 900px; margin: 0 auto; padding: 0 2rem; }
.results.active { height: auto; overflow: visible; visibility: visible; padding: 0 2rem 4rem; }
.results-url {
  text-align: center; font-size: 0.85rem; color: rgba(248,249,250,0.55);
  margin-bottom: 2rem; word-break: break-all;
}
.results-url strong { color: var(--off-white); }

/* Score gauges */
.scores-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem;
  margin-bottom: 3rem;
}
@media (max-width: 640px) { .scores-grid { grid-template-columns: repeat(2, 1fr); } }
.score-card {
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px; padding: 1.5rem; text-align: center;
}
.score-gauge {
  width: 90px; height: 90px; margin: 0 auto 0.75rem; position: relative;
}
.score-gauge svg { transform: rotate(-90deg); }
.score-gauge circle {
  fill: none; stroke-width: 6; stroke-linecap: round;
}
.score-bg { stroke: rgba(255,255,255,0.06); }
.score-fill { transition: stroke-dashoffset 1s ease; }
.score-value {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  font-size: 1.75rem; font-weight: 800;
}
.score-value.score-good, .score-fill.score-good { color: var(--green); stroke: var(--green); }
.score-value.score-mid, .score-fill.score-mid { color: var(--orange); stroke: var(--orange); }
.score-value.score-poor, .score-fill.score-poor { color: var(--red); stroke: var(--red); }
.score-label { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.03em; color: rgba(248,249,250,0.7); }

/* Metrics */
.metrics-section { margin-bottom: 3rem; }
.metrics-title {
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.15em;
  text-transform: uppercase; color: var(--electric-blue); margin-bottom: 1rem;
}
.metrics-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 1rem;
}
.metric-card {
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px; padding: 1.25rem;
}
.metric-val { font-size: 1.5rem; font-weight: 800; margin-bottom: 0.25rem; }
.metric-name { font-size: 0.8rem; color: rgba(248,249,250,0.55); }
.metric-good { color: var(--green); }
.metric-mid { color: var(--orange); }
.metric-bad { color: var(--red); }

/* Issues */
.issues-section { margin-bottom: 3rem; }
.issue-item {
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px; padding: 1.25rem; margin-bottom: 0.75rem;
  display: flex; gap: 1rem; align-items: start;
}
.issue-icon {
  width: 32px; height: 32px; border-radius: 8px; display: flex;
  align-items: center; justify-content: center; font-size: 0.85rem; font-weight: 800;
  flex-shrink: 0;
}
.issue-icon-red { background: rgba(239,68,68,0.15); color: var(--red); }
.issue-icon-orange { background: rgba(245,158,11,0.15); color: var(--orange); }
.issue-icon-green { background: rgba(16,185,129,0.15); color: var(--green); }
.issue-title { font-size: 0.95rem; font-weight: 600; margin-bottom: 0.25rem; }
.issue-desc { font-size: 0.85rem; color: rgba(248,249,250,0.55); line-height: 1.5; }
.issue-savings { font-size: 0.8rem; color: var(--teal); font-weight: 600; margin-top: 0.25rem; }

/* CTA panel */
.results-cta {
  background: linear-gradient(135deg, rgba(45,127,249,0.08), rgba(0,212,170,0.05));
  border: 1px solid rgba(45,127,249,0.15); border-radius: 16px;
  padding: 2.5rem; text-align: center; margin-top: 2rem;
}
.results-cta h3 { font-size: 1.35rem; font-weight: 800; margin-bottom: 0.5rem; }
.results-cta p { color: rgba(248,249,250,0.6); font-size: 0.95rem; max-width: 500px; margin: 0 auto 1.5rem; line-height: 1.6; }
.results-cta-form { max-width: 400px; margin: 0 auto; }
.results-cta-form input {
  width: 100%; padding: 0.85rem 1rem; border-radius: 8px; margin-bottom: 0.75rem;
  border: 1px solid rgba(255,255,255,0.12); background: rgba(255,255,255,0.05);
  color: var(--off-white); font-family: inherit; font-size: 0.95rem; min-height: 48px;
}
.results-cta-form input::placeholder { color: rgba(248,249,250,0.3); }
.results-cta-form input:focus {
  border-color: var(--electric-blue);
  outline: 2px solid var(--electric-blue); outline-offset: 2px;
}
.results-cta-btn {
  width: 100%; padding: 1rem; border: none; border-radius: 10px;
  background: var(--electric-blue); color: var(--white); font-family: inherit;
  font-size: 1rem; font-weight: 600; cursor: pointer; transition: all 0.2s; min-height: 48px;
}
.results-cta-btn:hover { background: var(--electric-blue-hover); }
.results-cta-error { height: 0; overflow: hidden; visibility: hidden; color: var(--red); font-size: 0.9rem; margin-top: 0.5rem; }
.results-cta-error.visible { height: auto; visibility: visible; }
.results-cta-form.hidden { display: none; }
.results-cta-note { font-size: 0.8rem; color: rgba(248,249,250,0.4); margin-top: 0.75rem; }
.results-cta-success { height: 0; overflow: hidden; visibility: hidden; }
.results-cta-success.visible { height: auto; overflow: visible; visibility: visible; }
.results-cta-success h4 { color: var(--teal); margin-bottom: 0.5rem; }
.results-cta-success p { color: rgba(248,249,250,0.6); font-size: 0.95rem; }

/* Comparison bar */
.comparison {
  margin-top: 2rem; padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.comparison h3 {
  font-size: 1rem; font-weight: 700; margin-bottom: 1rem; text-align: center;
}
.comparison-row {
  display: flex; align-items: center; gap: 1rem; margin-bottom: 0.75rem;
}
.comparison-label { width: 120px; font-size: 0.8rem; color: rgba(248,249,250,0.55); text-align: right; flex-shrink: 0; }
.comparison-bars { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.comparison-bar {
  height: 24px; border-radius: 6px; display: flex; align-items: center;
  padding: 0 0.75rem; font-size: 0.75rem; font-weight: 700;
  transition: width 1s ease; white-space: nowrap; overflow: visible;
}
.comparison-bar-them { background: rgba(239,68,68,0.2); color: var(--red); }
.comparison-bar-them.score-good { background: rgba(16,185,129,0.2); color: var(--green); }
.comparison-bar-them.score-mid { background: rgba(245,158,11,0.2); color: var(--orange); }
.comparison-bar-us { background: rgba(0,212,170,0.2); color: var(--teal); }

/* Error */
.error-msg {
  height: 0; overflow: hidden; visibility: hidden;
  text-align: center; padding: 0 2rem;
  color: var(--red); font-size: 0.95rem;
}
.error-msg.active { height: auto; visibility: visible; padding: 2rem; }

/* Footer */
.check-footer {
  border-top: 1px solid rgba(255,255,255,0.06); padding: 2rem;
  text-align: center; color: rgba(248,249,250,0.4); font-size: 0.8rem;
}
.check-footer a { color: rgba(248,249,250,0.6); text-decoration: none; }
.check-footer a:hover { color: var(--off-white); }

/* Visually hidden label */
.visually-hidden {
  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) {
  html { scroll-behavior: auto; }
  .spinner { animation: none; }
  .score-fill { transition: none; }
  .comparison-bar { transition: none; }
}
