:root {
  --bg-0: #fffaf3;
  --bg-1: #fff2e5;
  --bg-2: #fdebdc;
  --paper: rgba(255, 253, 249, .74);
  --line: rgba(116, 55, 27, .075);
  --text: #40281c;
  --muted: #765849;
  --apricot-strong: #bd7d5c;
  --teal: #6eb8ad;
  --shadow: 0 14px 34px rgba(124, 45, 18, .075);
  --radius-lg: 30px;
  --radius-md: 24px;
}

* { box-sizing: border-box; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background:
    radial-gradient(circle at 8% 10%, rgba(255,255,255,.78) 0 9%, transparent 24%),
    radial-gradient(circle at 86% 4%, rgba(255,246,236,.72) 0 10%, transparent 25%),
    linear-gradient(140deg, var(--bg-0) 0%, var(--bg-1) 54%, var(--bg-2) 100%);
  line-height: 1.65;
  letter-spacing: 0;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .12;
  background-image:
    linear-gradient(90deg, rgba(151, 91, 55, .16) 1px, transparent 1px),
    linear-gradient(rgba(151,91,55,.14) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.35), transparent 78%);
}
a { color: inherit; }
button, input { font: inherit; }
code {
  border-radius: 8px;
  padding: 2px 6px;
  background: rgba(255,255,255,.6);
  color: #6b3d2b;
}

.access-gate {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 22px;
  background:
    radial-gradient(circle at 18% 8%, rgba(255,255,255,.78), transparent 28%),
    linear-gradient(140deg, #fffaf3, #fff0df 58%, #fde5d1);
}
.access-gate.hidden { display: none; }
.gate-card {
  width: min(460px, 100%);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: rgba(255, 253, 249, .82);
  box-shadow: 0 24px 58px rgba(124, 45, 18, .12);
  padding: 28px;
}
.gate-mark, .brand-mark {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--apricot-strong), #f4b595);
  color: #fffaf5;
  box-shadow: 0 10px 24px rgba(124,45,18,.12), inset 0 1px rgba(255,255,255,.46);
}
.gate-mark {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  margin-bottom: 18px;
}
.gate-mark svg, .brand-mark svg { width: 24px; height: 24px; }
.gate-card h1 { margin: 0 0 8px; font-size: clamp(28px, 6vw, 38px); line-height: 1.12; }
.gate-card p { margin: 0 0 20px; color: var(--muted); }
.gate-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.gate-input {
  min-width: 0;
  height: 48px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.74);
  color: var(--text);
  padding: 0 14px;
  outline: none;
}
.gate-input:focus {
  border-color: rgba(110,184,173,.72);
  box-shadow: 0 0 0 4px rgba(110,184,173,.18);
}
.btn, .button-link {
  border: 0;
  cursor: pointer;
  min-height: 44px;
  border-radius: 16px;
  padding: 0 16px;
  background: var(--teal);
  color: #123d38;
  font-weight: 900;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform .18s ease, box-shadow .18s ease;
}
.btn:hover, .button-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(44, 122, 112, .13);
}
.button-link.secondary {
  background: rgba(255,255,255,.66);
  color: #654739;
  border: 1px solid var(--line);
}
.gate-error { display: none; color: #9b3522; margin-top: 12px; font-size: 14px; }
.gate-error.show { display: block; }

.app {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 44px;
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 8px 2px 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  font-weight: 950;
  font-size: 20px;
  color: #4a3025;
  text-decoration: none;
}
.brand-mark { width: 44px; height: 44px; border-radius: 16px; flex: 0 0 auto; }
.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}
.nav a, .nav button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0 12px;
  text-decoration: none;
  background: rgba(255, 253, 249, .72);
  border: 1px solid var(--line);
  color: #654739;
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
}

.card {
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: var(--shadow), inset 0 1px rgba(255,255,255,.64);
  backdrop-filter: blur(12px);
}
.section-card { padding: 20px; }
.section-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}
.section-title { margin: 0; color: var(--text); font-size: 19px; line-height: 1.3; font-weight: 1000; }
.section-subtitle { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.66);
  border: 1px solid var(--line);
  color: #72503e;
  font-size: 13px;
  font-weight: 900;
}

.hero-grid, .content-grid, .two-col {
  display: grid;
  gap: 18px;
}
.hero-grid { grid-template-columns: minmax(0, 1.05fr) minmax(340px, .95fr); align-items: stretch; }
.content-grid { grid-template-columns: .95fr 1.05fr; margin-top: 18px; }
.two-col { grid-template-columns: 1fr 1fr; margin-top: 18px; }
.wide-section { margin-top: 18px; }
.hero-card {
  min-height: 360px;
  padding: clamp(22px, 4vw, 34px);
  position: relative;
  overflow: hidden;
}
.hero-card::before {
  content: "";
  position: absolute;
  width: 240px;
  height: 240px;
  right: -96px;
  top: -96px;
  border-radius: 50%;
  background: rgba(255,255,255,.40);
}
.hero-content { position: relative; z-index: 1; }
.hero-title {
  margin: 20px 0 10px;
  font-size: clamp(44px, 7vw, 76px);
  line-height: .95;
  color: var(--text);
  font-weight: 1000;
}
.hero-copy { max-width: 620px; margin: 0; color: #684a3b; font-size: 16px; }
.memory-note {
  margin-top: 22px;
  padding: 18px 20px;
  border-radius: 22px;
  background: rgba(255,255,255,.60);
  border: 1px solid var(--line);
  color: #55382a;
  font-size: 15px;
}
.progress-wrap { margin-top: 24px; }
.progress-line {
  height: 13px;
  border-radius: 999px;
  background: rgba(116,55,27,.08);
  overflow: hidden;
  box-shadow: inset 0 2px 5px rgba(116,55,27,.055);
}
.progress-line span {
  display: block;
  width: var(--pregnancy-progress, 0%);
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #c99573, #f3b28f, #f8d1b8);
}
.progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 9px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.task-list { display: grid; gap: 0; }
.task {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  gap: 12px;
  padding: 15px 0;
  border-top: 1px solid rgba(116,55,27,.07);
}
.task:first-child { border-top: 0; }
.task-icon {
  width: 38px;
  height: 38px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  color: #fffaf5;
  box-shadow: 0 7px 14px rgba(124,45,18,.10);
}
.task-icon svg { width: 19px; height: 19px; }
.task h3 { margin: 0 0 4px; font-size: 15px; line-height: 1.3; color: var(--text); }
.task p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.badge {
  align-self: start;
  white-space: nowrap;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.55);
  padding: 6px 9px;
  font-size: 12px;
  font-weight: 1000;
}
.badge-yellow { background: #fff3c7; color: #7a5108; }
.badge-blue { background: #e8f8f2; color: #11796f; }
.badge-green { background: #fff7ee; color: #9a5127; }
.badge-red { background: #ffece3; color: #9b3522; }
.badge-gray { background: rgba(255,255,255,.66); color: #72503e; }

.report-row { display: grid; grid-template-columns: 120px 1fr; gap: 16px; align-items: center; }
.report-paper {
  min-height: 148px;
  border-radius: 20px;
  background: #fffdf8;
  border: 1px solid var(--line);
  box-shadow: 0 10px 22px rgba(124,45,18,.08);
  transform: rotate(-2deg);
  overflow: hidden;
  display: block;
}
.report-paper img { width: 100%; height: 100%; min-height: 148px; object-fit: cover; display: block; }
.report-paper.large {
  transform: none;
  min-height: auto;
}
.report-paper.large img { height: auto; max-height: 72vh; object-fit: contain; background: #fffdf8; }
.report-copy { margin: 0 0 12px; color: #6d4f40; font-size: 14px; }
.metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.metric {
  border-radius: 18px;
  background: rgba(255,255,255,.60);
  border: 1px solid var(--line);
  padding: 12px;
}
.metric strong { display: block; color: #76503c; font-size: 21px; line-height: 1; }
.metric span { display: block; color: var(--muted); font-size: 12px; line-height: 1.35; margin-top: 6px; }

.quick-links, .card-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.quick-link, .info-card {
  min-height: 92px;
  border-radius: 20px;
  padding: 14px;
  text-decoration: none;
  background: rgba(255,255,255,.58);
  border: 1px solid var(--line);
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: space-between;
  box-shadow: inset 0 1px rgba(255,255,255,.48);
}
.quick-link { font-weight: 1000; }
.quick-link small, .info-card p { color: var(--muted); font-weight: 800; line-height: 1.45; font-size: 12px; margin: 0; }
.info-card h3 { margin: 0; font-size: 16px; line-height: 1.35; }

.timeline, .source-list, .detail-list { display: grid; gap: 12px; }
.timeline-item, .source-card, .detail-item {
  padding: 14px;
  border-radius: 18px;
  background: rgba(255,255,255,.48);
  border: 1px solid var(--line);
}
.timeline-item { display: grid; grid-template-columns: 110px 1fr; gap: 14px; align-items: start; }
.timeline-date { color: #76503c; font-weight: 1000; font-size: 13px; }
.timeline-title, .detail-title { margin: 0 0 4px; font-size: 15px; color: var(--text); font-weight: 950; }
.timeline-text, .detail-text { margin: 0; color: var(--muted); font-size: 13px; }
.source-card h3 { margin: 0 0 6px; font-size: 16px; }
.source-card p { margin: 4px 0 12px; color: var(--muted); font-size: 13px; }
.source-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.list { margin: 0; padding-left: 18px; color: var(--muted); font-size: 14px; }
.list li + li { margin-top: 8px; }
.footer { margin-top: 24px; color: var(--muted); font-size: 13px; text-align: center; }

@media (max-width: 980px) {
  .hero-grid, .content-grid, .two-col { grid-template-columns: 1fr; }
  .quick-links, .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .app { width: min(100% - 22px, 1220px); padding-top: 14px; }
  .topbar { align-items: flex-start; flex-direction: column; }
  .nav { justify-content: flex-start; }
  .hero-card, .section-card { padding: 18px; }
  .task { grid-template-columns: 38px 1fr; }
  .badge { grid-column: 2; justify-self: start; }
  .report-row, .timeline-item, .gate-row { grid-template-columns: 1fr; }
  .metrics { grid-template-columns: 1fr; }
}
