:root {
  --ink: #172033;
  --muted: #667085;
  --line: #dde3ee;
  --panel: #ffffff;
  --page: #f6f8fb;
  --primary: #176b5f;
  --primary-dark: #0f5048;
  --primary-soft: #e8f4f1;
  --accent: #c05621;
  --danger: #b42318;
  --shadow: 0 10px 30px rgba(23, 32, 51, .08);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", Segoe UI, sans-serif;
  color: var(--ink);
  background: var(--page);
  line-height: 1.55;
}
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }

.topbar {
  height: 68px;
  padding: 0 28px;
  background: rgba(255,255,255,.96);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 10;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
}
.brand strong, .brand small { display: block; }
.brand small { color: var(--muted); font-size: 12px; }
.nav { display: flex; gap: 18px; color: var(--muted); font-size: 14px; font-weight: 650; }

.hero {
  min-height: 430px;
  padding: 72px 28px 54px;
  color: #fff;
  background:
    linear-gradient(90deg, rgba(11,58,52,.94), rgba(11,58,52,.78)),
    url("https://images.unsplash.com/photo-1503454537195-1dcabb73ffb9?auto=format&fit=crop&w=1800&q=80") center/cover;
  display: grid;
  grid-template-columns: minmax(0, 720px) minmax(280px, 420px);
  gap: 34px;
  align-items: end;
}
.eyebrow { margin: 0 0 12px; color: #bce7dd; font-weight: 750; }
.hero h1 { margin: 0; font-size: clamp(34px, 5vw, 58px); line-height: 1.12; letter-spacing: 0; }
.lead { max-width: 620px; margin: 18px 0 0; color: rgba(255,255,255,.82); font-size: 18px; }
.hero-panel {
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.25);
  backdrop-filter: blur(10px);
  border-radius: 8px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}
.hero-panel div { padding: 22px 18px; border-right: 1px solid rgba(255,255,255,.18); }
.hero-panel div:last-child { border-right: 0; }
.hero-panel span { display: block; font-size: 28px; font-weight: 800; }
.hero-panel small { color: rgba(255,255,255,.74); }

.ad-slot {
  max-width: 970px;
  min-height: 90px;
  margin: 20px auto;
  border: 1px dashed #c7d0dd;
  background: #fff;
}

.search-section { max-width: 1180px; margin: 0 auto; padding: 22px 20px 64px; }
.search-card {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: 8px;
  padding: 18px;
  display: grid;
  grid-template-columns: 160px 1fr 1.4fr 120px;
  gap: 12px;
}
label span { display: block; margin-bottom: 6px; color: var(--muted); font-size: 13px; font-weight: 700; }
input, select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: #fff;
  color: var(--ink);
}
button {
  align-self: end;
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}
button:hover { background: var(--primary-dark); }

.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 22px 0 14px; }
.toolbar p { margin: 0; color: var(--muted); font-weight: 650; }
.toolbar select { max-width: 180px; }
.status-box {
  margin-bottom: 14px;
  padding: 14px 16px;
  border: 1px solid #ffd5a7;
  background: #fff7ed;
  border-radius: 8px;
  color: #8a3b12;
}
.results { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px; }
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.card-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.card h2 { margin: 0; font-size: 18px; line-height: 1.35; }
.badge { flex: none; padding: 4px 8px; border-radius: 999px; background: var(--primary-soft); color: var(--primary); font-size: 12px; font-weight: 800; }
.meta { margin: 0; color: var(--muted); font-size: 13px; }
.metric-grid { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.metric { padding: 12px; background: #fbfcfe; border-right: 1px solid var(--line); }
.metric:last-child { border-right: 0; }
.metric strong { display: block; font-size: 20px; }
.metric span { display: block; color: var(--muted); font-size: 12px; }
.age-list { display: flex; flex-wrap: wrap; gap: 6px; }
.age-list span { padding: 4px 8px; background: #f0f3f8; border-radius: 999px; font-size: 12px; color: #344054; }
.card-actions { display: flex; gap: 8px; margin-top: auto; }
.card-actions a {
  flex: 1;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  font-size: 13px;
  font-weight: 800;
}
.card-actions a.primary { background: var(--primary); color: #fff; border-color: var(--primary); }

.content-band {
  background: #fff;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 56px 28px;
}
.content-band > div, .source { max-width: 1180px; margin: 0 auto; }
.content-band h2, .source h2 { margin: 0 0 12px; font-size: 26px; }
.content-band p, .source p { color: var(--muted); }
.guide-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 22px !important; }
.guide-grid article { border: 1px solid var(--line); border-radius: 8px; padding: 20px; background: #fbfcfe; }
.guide-grid h3 { margin: 0 0 8px; }
.source { padding: 48px 28px; }
.source a { display: inline-flex; color: var(--primary); font-weight: 800; }
.footer { padding: 28px; background: #172033; color: rgba(255,255,255,.72); text-align: center; font-size: 13px; }

@media (max-width: 860px) {
  .topbar { height: auto; padding: 14px 18px; align-items: flex-start; }
  .nav { display: none; }
  .hero { grid-template-columns: 1fr; padding: 54px 20px 32px; }
  .hero-panel { max-width: 100%; }
  .search-card { grid-template-columns: 1fr; }
  .toolbar { align-items: stretch; flex-direction: column; }
  .toolbar select { max-width: none; }
  .guide-grid { grid-template-columns: 1fr; }
}

@media (max-width: 460px) {
  .hero-panel { grid-template-columns: 1fr; }
  .hero-panel div { border-right: 0; border-bottom: 1px solid rgba(255,255,255,.18); }
  .results { grid-template-columns: 1fr; }
}
