:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-soft: #f9fbff;
  --ink: #102136;
  --muted: #4f6178;
  --line: #d9e2ef;
  --accent: #1976d2;
  --accent-soft: #e7f1ff;
  --ok: #1d9b65;
  --warn: #cc7a00;
  --radius: 18px;
  --shadow: 0 10px 30px rgba(16, 33, 54, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Manrope", sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at 0 0, #e9f2ff 0%, var(--bg) 45%);
  line-height: 1.6;
}

main section[id],
footer[id] {
  scroll-margin-top: 84px;
}

h1,
h2,
h3 {
  margin: 0 0 0.75rem;
  font-family: "Outfit", sans-serif;
  line-height: 1.25;
  letter-spacing: 0.2px;
}

p {
  margin: 0 0 1rem;
  color: var(--muted);
}

.container {
  width: min(1100px, calc(100% - 2rem));
  margin: 0 auto;
}

.top-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(244, 247, 251, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.top-nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0;
}

.brand {
  display: inline-flex;
  flex-direction: column;
  text-decoration: none;
  font-family: "Outfit", sans-serif;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.2px;
  color: #15426c;
}

.brand__main {
  font-size: 1.08rem;
}

.brand__sub {
  margin-top: 0.14rem;
  margin-left: 2.95ch;
  font-size: 0.56rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: lowercase;
  color: #4f6178;
}

.menu-links {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.menu-links a {
  text-decoration: none;
  color: #2f4e70;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 0.35rem 0.55rem;
  border-radius: 8px;
  transition: background 0.2s ease, color 0.2s ease;
}

.menu-links a:hover,
.menu-links a:focus-visible {
  background: #e7f1ff;
  color: #134b88;
}

.hero {
  padding: 4.8rem 0 3.5rem;
  background:
    linear-gradient(120deg, rgba(25, 118, 210, 0.15), rgba(255, 255, 255, 0) 60%),
    linear-gradient(180deg, #eff6ff 0%, #f4f7fb 100%);
  border-bottom: 1px solid var(--line);
}

.hero__content {
  animation: rise 0.9s ease-out both;
}

.kicker {
  display: inline-block;
  padding: 0.2rem 0.7rem;
  margin-bottom: 1rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: var(--accent);
  background: var(--accent-soft);
}

h1 {
  font-size: clamp(2rem, 4vw, 3rem);
}

.subtitle {
  max-width: 62ch;
  font-size: 1.05rem;
}

.btn {
  display: inline-block;
  margin-top: 0.75rem;
  padding: 0.85rem 1.3rem;
  border-radius: 12px;
  font-weight: 700;
  text-decoration: none;
  color: #fff;
  background: linear-gradient(135deg, #1976d2, #125fad);
  box-shadow: 0 8px 18px rgba(25, 118, 210, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(25, 118, 210, 0.32);
}

.section {
  margin: 2rem 0;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.6rem;
  animation: fadeIn 0.6s ease both;
}

.note {
  padding: 0.75rem 0.95rem;
  background: #fff8e8;
  border-left: 4px solid #e6a400;
  border-radius: 10px;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 1rem;
}

.pill {
  padding: 1rem;
  border-radius: 12px;
  border: 1px dashed #b7d3f2;
  background: var(--surface-soft);
}

.section-head {
  margin-bottom: 1rem;
}

.strategy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.strategy-card {
  background: var(--surface);
  border-radius: 16px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 1.15rem;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.strategy-card:hover {
  transform: translateY(-3px);
  border-color: #bdd4f0;
}

.meta {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin-bottom: 0.8rem;
}

.tag {
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: #eef4fd;
  color: #2a4f7a;
  font-weight: 700;
}

.chart-wrap {
  position: relative;
  min-height: 240px;
}

.recommended {
  border: 1px solid #8eb9e8;
  background: linear-gradient(180deg, #f8fbff, #ffffff);
}

.highlight {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.age-input-label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 700;
  color: #214160;
}

#ageInput {
  width: 180px;
  max-width: 100%;
  margin-bottom: 0.75rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid #bfd2ea;
  border-radius: 10px;
  font: inherit;
}

#ageInput:focus {
  outline: 2px solid #7ab4f2;
  border-color: #7ab4f2;
}

.age-bands {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
  gap: 0.5rem;
}

.list {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--muted);
}

.list li {
  margin-bottom: 0.5rem;
}

.compact li {
  margin-bottom: 0.3rem;
}

.planner-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(260px, 1fr);
  gap: 1rem;
  align-items: start;
}

.input-panel label {
  display: block;
  margin-top: 0.7rem;
  font-weight: 700;
  color: #214160;
}

.input-panel input {
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid #bfd2ea;
  border-radius: 10px;
  font: inherit;
}

.input-panel input:focus {
  outline: 2px solid #7ab4f2;
  border-color: #7ab4f2;
}

.result-box {
  margin-top: 1rem;
  padding: 0.8rem;
  border-radius: 12px;
  background: #f8fbff;
  border: 1px solid var(--line);
}

.result-box p {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.55rem;
}

.benchmark {
  margin-top: 0.8rem;
  padding: 0.7rem;
  border-radius: 10px;
  font-weight: 700;
}

.benchmark.good {
  color: #0b6f47;
  background: #e8faef;
  border: 1px solid #abdebf;
}

.benchmark.warn {
  color: #8a4e00;
  background: #fff4e3;
  border: 1px solid #f5c57a;
}

.footer {
  margin-top: 2rem;
  padding: 1rem 0 2rem;
  text-align: center;
  color: #355170;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 860px) {
  .grid-2,
  .planner-grid {
    grid-template-columns: 1fr;
  }

  .top-nav__inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .menu-links {
    overflow-x: auto;
    flex-wrap: nowrap;
    max-width: 100%;
    padding-bottom: 0.2rem;
  }

  .hero {
    padding-top: 4.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
