:root {
  --bg: #0b1220;
  --bg-elev: #121a2b;
  --ink: #e8eef8;
  --muted: #9aa8c0;
  --line: rgba(232, 238, 248, 0.12);
  --accent: #3b82f6;
  --accent-soft: rgba(59, 130, 246, 0.16);
  --ok: #34d399;
  --warn: #fbbf24;
  --bad: #f87171;
  --max: 72rem;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Sora", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(59, 130, 246, 0.18), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(52, 211, 153, 0.08), transparent 50%),
    var(--bg);
  line-height: 1.55;
  min-height: 100vh;
}

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: #93c5fd; }

.wrap { width: min(100% - 2rem, var(--max)); margin-inline: auto; }

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--line);
}
.brand {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.nav { display: flex; gap: 1rem; flex-wrap: wrap; }
.nav a { color: var(--muted); text-decoration: none; font-size: 0.9rem; }
.nav a:hover { color: var(--ink); }

.hero {
  padding: 4.5rem 0 3rem;
  display: grid;
  gap: 1.25rem;
  max-width: 40rem;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin: 0;
  font-weight: 550;
}
.hero .lede { color: var(--muted); font-size: 1.05rem; margin: 0; max-width: 34rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 0.5rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 1px solid transparent;
  border-radius: 0.55rem;
  padding: 0.85rem 1.2rem;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #2563eb; color: #fff; }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--muted); color: #fff; }

.section { padding: 2.5rem 0; border-top: 1px solid var(--line); }
.section h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
}
.section .sub { color: var(--muted); margin: 0 0 1.5rem; max-width: 36rem; }

.route-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1rem;
}
.route {
  display: block;
  padding: 1.25rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: rgba(18, 26, 43, 0.65);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease;
}
.route:hover { border-color: rgba(59, 130, 246, 0.55); }
.route strong { display: block; margin-bottom: 0.35rem; }
.route span { color: var(--muted); font-size: 0.92rem; }

.panel {
  background: rgba(18, 26, 43, 0.8);
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  padding: 1.25rem;
}

.form-grid {
  display: grid;
  gap: 0.85rem;
  max-width: 28rem;
}
label { display: grid; gap: 0.35rem; font-size: 0.88rem; color: var(--muted); }
input, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: #0a101c;
  color: var(--ink);
  padding: 0.75rem 0.85rem;
  font: inherit;
}
input:focus, select:focus {
  outline: 2px solid rgba(59, 130, 246, 0.45);
  outline-offset: 1px;
}
.micro { font-size: 0.8rem; color: var(--muted); }

.calc-layout {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 1.25rem;
}
@media (max-width: 860px) {
  .calc-layout { grid-template-columns: 1fr; }
}

.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.stat {
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  padding: 0.9rem;
  background: rgba(11, 18, 32, 0.55);
}
.stat .k { font-size: 0.75rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.stat .v { font-family: var(--font-display); font-size: 1.45rem; margin-top: 0.25rem; }
.stat.ok .v { color: var(--ok); }
.stat.warn .v { color: var(--warn); }
.stat.bad .v { color: var(--bad); }

.tool {
  display: grid;
  gap: 0.35rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--line);
}
.tool:last-child { border-bottom: 0; }
.tool h3 { margin: 0; font-size: 1.05rem; }
.tool p { margin: 0; color: var(--muted); font-size: 0.95rem; }

.book-list { display: grid; gap: 0.85rem; }
.book {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
}
.book:last-child { border-bottom: 0; }
.book .meta { color: var(--muted); font-size: 0.9rem; }

.site-footer {
  margin-top: 3rem;
  padding: 1.5rem 0 2.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.85rem;
  display: grid;
  gap: 0.6rem;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 0.9rem; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--ink); }

.legal h1 { font-family: var(--font-display); }
.legal p, .legal li { color: var(--muted); }
.legal strong { color: var(--ink); }

.pill {
  display: inline-block;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #93c5fd;
  background: var(--accent-soft);
  border: 1px solid rgba(59, 130, 246, 0.35);
  border-radius: 999px;
  padding: 0.28rem 0.65rem;
  width: fit-content;
}

.download-row { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1rem; }
