:root {
  --bg: #050b14;
  --bg2: #071626;
  --panel: rgba(9, 18, 31, 0.84);
  --panel-strong: rgba(11, 24, 40, 0.96);
  --card: #0b1726;
  --line: rgba(125, 198, 255, 0.15);
  --text: #e9f2ff;
  --muted: #9bb0c6;
  --teal: #00d4aa;
  --cyan: #00c2ff;
  --orange: #ff8a3d;
  --red: #ff5c7a;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --radius: 22px;
  --radius-sm: 14px;
  --max: 1180px;
  font-synthesis-weight: none;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 20% 10%, rgba(0, 212, 170, 0.14), transparent 28%),
    radial-gradient(circle at 80% 0%, rgba(0, 194, 255, 0.10), transparent 25%),
    linear-gradient(180deg, var(--bg), var(--bg2));
  color: var(--text);
}
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
.hidden { display: none !important; }
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}
.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(circle at center, black 40%, transparent 100%);
  opacity: 0.22;
}
.bg-glow {
  position: fixed;
  width: 440px;
  height: 440px;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
  opacity: 0.24;
}
.bg-glow-left { top: -110px; left: -110px; background: rgba(0, 212, 170, 0.5); }
.bg-glow-right { right: -120px; bottom: 80px; background: rgba(255, 138, 61, 0.38); }
.hero, .section, .section-nav, .gate-card { width: min(var(--max), calc(100vw - 32px)); margin: 16px auto; border-radius: var(--radius); }
.hero {
  padding: 30px;
  display: grid;
  grid-template-columns: 1.3fr 0.8fr;
  gap: 24px;
  align-items: end;
}
.hero h1, .section h2, .gate-card h1 { margin: 0; line-height: 1.05; letter-spacing: -0.03em; }
.hero h1 { font-size: clamp(2rem, 5vw, 4rem); max-width: 11ch; }
.section h2 { font-size: clamp(1.3rem, 3vw, 2rem); }
.lede { color: var(--muted); font-size: 1.02rem; line-height: 1.6; max-width: 70ch; }
.eyebrow {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(0, 212, 170, 0.28);
  color: var(--teal);
  background: rgba(0, 212, 170, 0.08);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 14px;
}
.hero-stats, .metric, .result-card, .compare-card, .tip, .gate-card, .section-nav {
  background: rgba(7, 14, 25, 0.72);
}
.hero-stats { display: grid; gap: 12px; }
.stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.stat span, .metric span, .help, .muted { color: var(--muted); }
.stat strong, .metric strong { font-size: 1.05rem; }
.stat.accent strong { color: var(--orange); }
.section-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px;
  position: sticky;
  top: 12px;
  z-index: 9;
}
.section-nav a {
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(155, 176, 198, 0.16);
  color: var(--text);
  background: rgba(255,255,255,0.02);
}
.section-nav a:hover { border-color: rgba(0, 212, 170, 0.5); color: var(--teal); }
.app { width: min(var(--max), calc(100vw - 32px)); margin: 0 auto 32px; }
.section {
  padding: 24px;
  margin-top: 18px;
  border-radius: var(--radius);
}
.section.alt { background: var(--panel-strong); }
.section-head { display: flex; justify-content: space-between; gap: 24px; align-items: start; margin-bottom: 18px; }
.section-head h2 { margin-bottom: 8px; }
.grid { display: grid; gap: 18px; }
.grid.two { grid-template-columns: 1.1fr 0.9fr; }
.form-grid { display: grid; gap: 14px; }
.dual-fields { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field { display: grid; gap: 8px; }
.field span { color: var(--muted); font-size: 0.88rem; }
input, select, button {
  border-radius: 14px;
  border: 1px solid rgba(155, 176, 198, 0.18);
  background: rgba(4, 9, 16, 0.72);
  color: var(--text);
  padding: 13px 14px;
}
input:focus, select:focus { outline: 2px solid rgba(0, 212, 170, 0.34); border-color: rgba(0, 212, 170, 0.5); }
.primary-btn {
  background: linear-gradient(135deg, var(--teal), var(--cyan));
  color: #00131a;
  font-weight: 800;
  border: 0;
  cursor: pointer;
}
.primary-btn:hover { filter: brightness(1.05); }
.result-card {
  border-radius: 18px;
  border: 1px solid rgba(0, 194, 255, 0.16);
  padding: 18px;
  display: grid;
  gap: 14px;
  align-content: start;
}
.result-card-big { min-height: 100%; }
.metric { padding: 16px; border-radius: 16px; border: 1px solid var(--line); display: flex; justify-content: space-between; gap: 14px; align-items: center; }
.metric strong { font-size: 1.35rem; }
.compare-grid, .checklist-grid { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.compare-card, .tip {
  padding: 18px;
  border-radius: 18px;
  border: 1px solid var(--line);
}
.compare-left { box-shadow: inset 0 0 0 1px rgba(0, 212, 170, 0.08); }
.compare-right { box-shadow: inset 0 0 0 1px rgba(255, 138, 61, 0.08); }
.compare-card h3 { margin-top: 0; margin-bottom: 10px; }
.compare-card ul { margin: 14px 0 0; padding-left: 18px; color: var(--muted); line-height: 1.7; }
.table-wrap { overflow: auto; border-radius: 18px; border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; table-layout: fixed; }
th, td { text-align: left; padding: 14px 16px; border-bottom: 1px solid rgba(155, 176, 198, 0.12); word-break: break-word; overflow-wrap: anywhere; vertical-align: top; }
th { color: var(--teal); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.12em; background: rgba(255,255,255,0.02); }
td:nth-child(1) { width: 28%; }
td:nth-child(2) { width: 32%; }
td:nth-child(3) { width: 40%; }
tr:last-child td { border-bottom: 0; }
.score-row { display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.badge {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 8px 12px; border-radius: 999px; font-weight: 800; color: #00131a; background: var(--teal);
}
.badge.caution { background: #ffce4a; }
.badge.expensive { background: var(--orange); }
.badge.danger { background: var(--red); color: white; }
.mini-bars { display: grid; gap: 12px; margin-top: 6px; }
.mini-bars > div { display: grid; gap: 8px; }
.bar { height: 10px; border-radius: 999px; background: rgba(255,255,255,0.08); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0%; border-radius: inherit; background: linear-gradient(90deg, var(--teal), var(--orange)); }
.checklist-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.check {
  display: flex; gap: 12px; align-items: start;
  padding: 16px; border: 1px solid var(--line); border-radius: 16px;
  background: rgba(255,255,255,0.02);
}
.check input { margin-top: 4px; accent-color: var(--teal); }
.check.warning { border-color: rgba(255, 138, 61, 0.2); }
.tip-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.tip.highlight { border-color: rgba(255, 138, 61, 0.35); color: #ffe1cf; }
.gate {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 16px;
  z-index: 20;
  background: rgba(2, 6, 12, 0.84);
  backdrop-filter: blur(16px);
}
.gate-card { max-width: 560px; padding: 30px; border-radius: 24px; }
.gate-card h1 { font-size: clamp(2rem, 5vw, 3rem); margin-bottom: 12px; }
.fineprint { color: var(--muted); font-size: 0.85rem; margin-bottom: 0; }
.error { color: #ff8aa3; min-height: 1.2em; }
.help { font-size: 0.9rem; line-height: 1.5; }
@media (max-width: 920px) {
  .hero, .grid.two, .compare-grid, .checklist-grid, .tip-row, .dual-fields { grid-template-columns: 1fr; }
  .section-head, .score-row { flex-direction: column; align-items: start; }
  .section-nav { top: 0; border-radius: 0 0 18px 18px; width: 100%; margin: 0 auto; }
}

@media (max-width: 720px) {
  .table-wrap { overflow: visible; border: 0; }
  table, thead, tbody, tr, th, td { display: block; width: 100%; }
  thead { display: none; }
  tbody tr {
    margin-bottom: 12px;
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: hidden;
    background: rgba(255,255,255,0.02);
  }
  td {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid rgba(155, 176, 198, 0.12);
  }
  td::before {
    content: attr(data-label);
    color: var(--teal);
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    flex: 0 0 42%;
    max-width: 42%;
  }
  td:last-child { border-bottom: 0; }
}
