/* ─────────────────────────────────────────────────────────────
   MediPole · 포만감미식가이드 — 공용 스타일
   팔레트는 무료 가이드 v2 / 엔딩 카드 규격을 따른다.
   ───────────────────────────────────────────────────────────── */
:root {
  --cream: #FAF6EC;
  --ivory: #FFFDF8;
  --navy: #15263B;
  --navy-soft: #2C3E55;
  --gold: #BE9530;
  --gold-ink: #8A6A14;
  --gold-soft: #E8D9B0;
  --orange: #FF6B00;
  --door1: #B23A2E;
  --door2: #3C7A57;
  --line: #E3DCCB;
  --muted: #6B6459;
  --max: 960px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--navy);
  font-family: "Pretendard", "Pretendard Variable", -apple-system, BlinkMacSystemFont,
    "Apple SD Gothic Neo", "Malgun Gothic", "맑은 고딕", "Noto Sans KR", sans-serif;
  font-size: 17px;
  line-height: 1.72;
  word-break: keep-all;
  -webkit-text-size-adjust: 100%;
}

a { color: var(--door2); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--orange); }
a:focus-visible, summary:focus-visible, button:focus-visible {
  outline: 3px solid var(--orange); outline-offset: 2px; border-radius: 3px;
}

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* ── header ─────────────────────────────────────────────── */
.site-header {
  background: var(--ivory);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 10;
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: 62px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--navy); }
.brand-mark {
  width: 30px; height: 30px; flex: none;
  border: 2px solid var(--gold); border-radius: 4px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 2px; padding: 4px;
}
.brand-mark i { display: block; border-radius: 1px; }
.brand-mark i:nth-child(1) { background: var(--door1); }
.brand-mark i:nth-child(2) { background: var(--door2); }
.brand-text { font-weight: 800; letter-spacing: -0.01em; }
.brand-text small { display: block; font-weight: 500; font-size: 12px; color: var(--muted); letter-spacing: 0.02em; }
.site-nav { display: flex; gap: 18px; font-size: 14px; }
.site-nav a { color: var(--navy-soft); text-decoration: none; font-weight: 600; }
.site-nav a:hover { color: var(--orange); }

/* ── hero ───────────────────────────────────────────────── */
.hero { padding: 44px 0 12px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 700; letter-spacing: 0.08em; color: var(--gold-ink);
  text-transform: uppercase;
}
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--gold); display: inline-block; }
h1 {
  font-size: clamp(28px, 5vw, 44px); line-height: 1.26; letter-spacing: -0.02em;
  margin: 14px 0 10px; font-weight: 800;
}
.hero .series { font-size: 15px; color: var(--muted); margin: 0 0 6px; font-weight: 600; }
.lede { font-size: 19px; color: var(--navy-soft); margin: 14px 0 22px; max-width: 44em; }
.lede strong { color: var(--navy); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 26px; padding: 0; list-style: none; }
.chips li {
  background: var(--ivory); border: 1px solid var(--line); border-radius: 999px;
  padding: 7px 14px; font-size: 14px; font-weight: 600;
}
.chips li b { color: var(--door1); }
.chips li.ok b { color: var(--door2); }

/* ── answer box (AI 인용용) ─────────────────────────────── */
.answer {
  background: var(--ivory);
  border: 1px solid var(--line);
  border-left: 5px solid var(--gold);
  border-radius: 10px;
  padding: 20px 22px;
  margin: 0 0 30px;
  font-size: 17px;
}
.answer .label {
  display: block; font-size: 12px; font-weight: 800; letter-spacing: 0.1em;
  color: var(--gold-ink); margin-bottom: 8px; text-transform: uppercase;
}
.answer p { margin: 0; }

/* ── sections ───────────────────────────────────────────── */
section { padding: 34px 0; border-top: 1px solid var(--line); }
section:first-of-type { border-top: 0; }
h2 {
  font-size: clamp(21px, 3.4vw, 27px); line-height: 1.35; letter-spacing: -0.01em;
  margin: 0 0 6px; font-weight: 800;
}
h2 .num { color: var(--gold); font-weight: 800; margin-right: 8px; }
.sub { color: var(--muted); font-size: 15px; margin: 0 0 20px; }
h3 { font-size: 17px; margin: 22px 0 8px; font-weight: 700; }

/* ── table ──────────────────────────────────────────────── */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 10px; }
table {
  width: 100%; border-collapse: collapse; background: var(--ivory);
  font-size: 15px; min-width: 560px;
}
caption {
  text-align: left; font-size: 13px; color: var(--muted); padding: 0 0 10px;
  caption-side: top;
}
th, td { border: 1px solid var(--line); padding: 12px 14px; text-align: left; vertical-align: top; }
thead th { background: var(--navy); color: #fff; font-weight: 700; font-size: 14px; }
tbody th { background: #F7F2E4; font-weight: 700; width: 28%; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.door1 { color: var(--door1); font-weight: 700; }
.door2 { color: var(--door2); font-weight: 700; }
tr.total td { background: #FBF7EC; font-weight: 700; }

/* ── cards ──────────────────────────────────────────────── */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.card {
  background: var(--ivory); border: 1px solid var(--line); border-radius: 10px;
  padding: 18px 18px 16px;
}
.card h3 { margin: 0 0 6px; font-size: 16px; }
.card p { margin: 0; font-size: 15px; color: var(--navy-soft); }
.card .big { font-size: 15px; }
.pill {
  display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 9px;
  border-radius: 999px; margin-bottom: 8px;
}
.pill.red { background: #F7E3DF; color: var(--door1); }
.pill.green { background: #E3F0E8; color: var(--door2); }
.pill.gold { background: #F5EAD2; color: #8A6A14; }

/* ── FF definition ──────────────────────────────────────── */
.ff-box {
  background: var(--navy); color: #F4EFE3; border-radius: 12px; padding: 24px;
  margin: 26px 0 0;
}
.ff-box h3 { margin: 0 0 10px; color: #fff; font-size: 18px; }
.ff-box p { margin: 0 0 10px; font-size: 15px; color: #E4DDCD; }
.ff-box p:last-child { margin-bottom: 0; }
.ff-box strong { color: var(--gold-soft); }
.scale { display: flex; gap: 6px; margin: 14px 0 4px; }
.scale div { flex: 1; text-align: center; font-size: 13px; font-weight: 700; padding: 9px 2px; border-radius: 4px; }
.scale .low { background: #7E2C23; color: #F6E4DF; }
.scale .mid { background: #6B6152; color: #F2EBDC; }
.scale .high { background: #2F5C43; color: #E2F0E7; }
.scale-note { font-size: 12px; color: #BFB7A6; }

/* ── steps ──────────────────────────────────────────────── */
ol.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; }
ol.steps > li {
  counter-increment: step; position: relative; padding: 0 0 20px 54px; margin: 0;
}
ol.steps > li::before {
  content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--gold); color: #fff; font-weight: 800;
  display: grid; place-items: center; font-size: 15px;
}
ol.steps > li:last-child { padding-bottom: 0; }
ol.steps h3 { margin: 2px 0 4px; font-size: 17px; }
ol.steps p { margin: 0; color: var(--navy-soft); font-size: 15px; }

/* ── faq ────────────────────────────────────────────────── */
.faq { margin: 0; }
.faq details {
  background: var(--ivory); border: 1px solid var(--line); border-radius: 8px;
  padding: 14px 16px; margin-bottom: 10px;
}
.faq summary { cursor: pointer; font-weight: 700; font-size: 16px; }
.faq summary::marker { color: var(--gold); }
.faq details[open] summary { margin-bottom: 8px; }
.faq p { margin: 0; font-size: 15px; color: var(--navy-soft); }

/* ── notice / citation ──────────────────────────────────── */
.note {
  background: #F3F0E6; border: 1px dashed #CFC5AC; border-radius: 10px;
  padding: 16px 18px; font-size: 14px; color: #5C564B; margin: 18px 0 0;
}
.cite {
  background: var(--ivory); border: 1px solid var(--line); border-left: 5px solid var(--door2);
  border-radius: 10px; padding: 18px 20px; margin: 18px 0 0; font-size: 15px;
}
.cite code {
  display: block; background: #F4EFE3; border-radius: 6px; padding: 10px 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px;
  margin-top: 8px; overflow-x: auto; white-space: pre-wrap; word-break: break-all;
}
.disclaimer { font-size: 13px; color: var(--muted); line-height: 1.65; }
.disclaimer p { margin: 0 0 8px; }

/* ── footer ─────────────────────────────────────────────── */
.site-footer {
  background: var(--navy); color: #D8D1C0; margin-top: 40px; padding: 34px 0 40px;
  font-size: 14px;
}
.site-footer a { color: var(--gold-soft); }
.site-footer .brand-text { color: #fff; }
.site-footer .cols { display: flex; flex-wrap: wrap; gap: 28px; justify-content: space-between; }
.site-footer ul { list-style: none; padding: 0; margin: 8px 0 0; }
.site-footer li { margin: 4px 0; }
.site-footer .fine { margin-top: 22px; font-size: 12px; color: #A9A193; }

/* ── archive list (home) ────────────────────────────────── */
.cards-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.cards-list li {
  background: var(--ivory); border: 1px solid var(--line); border-radius: 12px;
  padding: 18px 20px; display: flex; gap: 16px; align-items: flex-start;
}
.cards-list .idx {
  font-weight: 800; color: var(--gold-ink); font-size: 13px; letter-spacing: 0.08em;
  min-width: 44px; padding-top: 3px;
}
.cards-list h3 { margin: 0 0 4px; font-size: 18px; }
.cards-list h3 a { text-decoration: none; }
.cards-list p { margin: 0; font-size: 14px; color: var(--muted); }
.cards-list .soon { opacity: 0.62; }
.cards-list .soon h3 { font-size: 18px; }

@media (max-width: 720px) {
  body { font-size: 16px; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .site-nav { gap: 14px; font-size: 13px; }
  .hero { padding-top: 30px; }
  th, td { padding: 10px 11px; }
  tbody th { width: 34%; }
}

@media print {
  .site-header, .site-nav, .site-footer { display: none; }
  body { background: #fff; font-size: 11pt; }
  section { break-inside: avoid; }
  a { color: inherit; }
}
