:root {
  color-scheme: light;
  --ink: #162327;
  --muted: #5c6a70;
  --line: rgba(22, 35, 39, 0.12);
  --paper: #f7faf8;
  --panel: rgba(255, 255, 255, 0.9);
  --teal: #0d7c78;
  --teal-dark: #075a58;
  --coral: #d96853;
  --gold: #b58a35;
  --blue: #356f98;
  --green-soft: #e6f3ef;
  --coral-soft: #faebe6;
  --shadow: 0 24px 70px rgba(17, 42, 44, 0.2);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Noto Sans SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

button,
input,
select {
  font: inherit;
}

.shell {
  min-height: 100vh;
}

.hero {
  position: relative;
  min-height: 94vh;
  overflow: hidden;
  color: #fff;
}

.hero__media,
.hero__shade {
  position: absolute;
  inset: 0;
}

.hero__media {
  background-image: url("assets/hero-clinic.png");
  background-position: center;
  background-size: cover;
  transform: scale(1.02);
}

.hero__shade {
  background:
    linear-gradient(90deg, rgba(8, 34, 38, 0.86) 0%, rgba(8, 34, 38, 0.68) 42%, rgba(8, 34, 38, 0.2) 100%),
    linear-gradient(180deg, rgba(5, 20, 24, 0.2) 0%, rgba(5, 20, 24, 0.7) 100%);
}

.hero__inner {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 26px 0 52px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand__mark {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.16);
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 17px;
}

.brand small {
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
}

.nav-link {
  color: #fff;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  padding: 9px 16px;
  background: rgba(255, 255, 255, 0.12);
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 430px);
  gap: 42px;
  align-items: start;
}

.intro {
  padding-top: 34px;
  max-width: 690px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--coral);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.intro h1 {
  margin: 0;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 1.05;
  letter-spacing: 0;
}

.lead {
  width: min(620px, 100%);
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 18px;
  line-height: 1.8;
}

.author {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 30px;
  padding: 11px 14px;
  border-left: 4px solid var(--coral);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
}

.author span {
  color: rgba(255, 255, 255, 0.72);
}

.query-panel {
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  padding: 24px;
  background: rgba(248, 252, 250, 0.88);
  color: var(--ink);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.panel-head {
  margin-bottom: 18px;
}

.panel-kicker {
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.panel-head h2 {
  margin: 4px 0 0;
  font-size: 24px;
}

.field,
.toggle {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.field span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.field input,
.field select {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(16, 56, 58, 0.18);
  border-radius: 7px;
  padding: 10px 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.86);
  outline: none;
}

.field input:focus,
.field select:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(13, 124, 120, 0.16);
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.toggle {
  grid-template-columns: 18px 1fr;
  align-items: center;
  color: var(--ink);
  font-size: 14px;
}

.toggle input {
  width: 18px;
  height: 18px;
  accent-color: var(--teal);
}

.due-field {
  display: none;
}

.due-field.is-visible {
  display: grid;
}

.primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 7px;
  color: #fff;
  background: var(--teal-dark);
  cursor: pointer;
  font-weight: 800;
}

.primary-btn:hover {
  background: var(--teal);
}

.primary-btn svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.panel-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.results {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 44px 0 26px;
}

.empty-state {
  padding: 44px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fff;
  text-align: center;
}

.empty-state h2 {
  margin: 0 0 8px;
}

.empty-state p {
  margin: 0;
  color: var(--muted);
}

.report-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: end;
  margin-bottom: 24px;
}

.report-head h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 46px);
  letter-spacing: 0;
}

.report-head p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.age-badge {
  min-width: 220px;
  padding: 18px;
  border-left: 4px solid var(--teal);
  background: #fff;
  box-shadow: 0 16px 36px rgba(15, 44, 46, 0.08);
}

.age-badge strong {
  display: block;
  font-size: 30px;
}

.age-badge span {
  color: var(--muted);
  font-size: 13px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.metric {
  min-height: 164px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.metric__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.metric h3 {
  margin: 0;
  font-size: 15px;
}

.metric small {
  color: var(--muted);
}

.metric__value {
  margin: 0 0 10px;
  font-size: 30px;
  font-weight: 800;
}

.metric__range,
.metric__note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.metric--teal {
  background: var(--green-soft);
}

.metric--coral {
  background: var(--coral-soft);
}

.metric--blue {
  background: #e8f0f5;
}

.metric--gold {
  background: #f6f0e4;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 34px 0 18px;
}

.tab {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 14px;
  color: var(--muted);
  background: #fff;
  cursor: pointer;
  font-weight: 700;
}

.tab.is-active {
  color: #fff;
  border-color: var(--teal-dark);
  background: var(--teal-dark);
}

.details {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 18px;
  align-items: start;
}

.section-band {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.section-band h3 {
  margin: 0 0 14px;
  font-size: 22px;
}

.milestone-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.milestone-list li {
  display: grid;
  gap: 5px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.milestone-list li:last-child {
  border-bottom: 0;
}

.milestone-list strong {
  font-size: 14px;
}

.milestone-list span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mini-pill {
  border-radius: 999px;
  padding: 7px 10px;
  background: #eef5f2;
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 700;
}

.fitness-table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  font-size: 13px;
}

.fitness-table th,
.fitness-table td {
  border-bottom: 1px solid var(--line);
  padding: 10px 8px;
  text-align: left;
}

.fitness-table th {
  color: var(--muted);
  font-weight: 700;
}

.notice {
  margin-top: 18px;
  padding: 16px;
  border-left: 4px solid var(--coral);
  background: #fff7f4;
  color: #634238;
  line-height: 1.7;
}

.sources {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 30px;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 54px 0 70px;
  border-top: 1px solid var(--line);
}

.sources h2 {
  margin: 0;
  font-size: 30px;
}

.sources ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.sources li {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  line-height: 1.6;
}

.sources a {
  color: var(--teal-dark);
  text-decoration: none;
  font-weight: 700;
}

.sources a:hover {
  color: var(--coral);
}

@media (max-width: 980px) {
  .hero {
    min-height: auto;
  }

  .hero__inner {
    padding-bottom: 36px;
  }

  .topbar {
    margin-bottom: 34px;
  }

  .hero__grid,
  .report-head,
  .details,
  .sources {
    grid-template-columns: 1fr;
  }

  .intro {
    padding-top: 0;
  }

  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .hero__inner,
  .results,
  .sources {
    width: min(100% - 24px, 1180px);
  }

  .hero__shade {
    background:
      linear-gradient(180deg, rgba(8, 34, 38, 0.86) 0%, rgba(8, 34, 38, 0.72) 56%, rgba(8, 34, 38, 0.55) 100%),
      linear-gradient(90deg, rgba(5, 20, 24, 0.55), rgba(5, 20, 24, 0.2));
  }

  .topbar {
    align-items: flex-start;
  }

  .brand small,
  .nav-link {
    display: none;
  }

  .intro h1 {
    font-size: 38px;
  }

  .lead {
    font-size: 16px;
  }

  .query-panel {
    padding: 18px;
  }

  .field-grid,
  .metric-grid {
    grid-template-columns: 1fr;
  }

  .section-band {
    padding: 18px;
  }
}
