/* 제약산업 이야기 — 공용 스타일. 색·간격·모서리·그림자는 design/hana-bank.md 의 규칙을 따름 */
:root {
  --p50: #E6F5F3; --p100: #DDF3EE; --p200: #A9DDD6; --p300: #27B2A5; --p400: #00A38E;
  --p500: #008485; --p600: #00706F; --p800: #0B3F3D; --p900: #062925;
  --base: #F1F2F4; --subtle: #F6F7F9; --white: #FFFFFF;
  --text: #222A3B; --text2: #4A5160; --text3: #6E7277;
  --line: #E5E7EB; --line2: #EEEEEE;
  --warn-bg: #FDF1E6; --warn-fg: #A8530A;
  --r-sm: 6px; --r-md: 10px; --r-lg: 16px; --r-xl: 20px; --r-full: 9999px;
  --sh-sm: 0 1px 3px rgba(34, 42, 59, .08);
  --sh-md: 2px 2px 20px rgba(0, 0, 0, .04);
  --sh-lg: 2px 2px 20px rgba(0, 0, 0, .10);
  --fast: 150ms; --base-t: 250ms; --ease: cubic-bezier(.22, 1, .36, 1);
  --font: 'Noto Sans KR', 'Pretendard', -apple-system, 'Segoe UI', 'Malgun Gothic', sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--base); color: var(--text); font-family: var(--font);
  font-size: 16px; line-height: 1.65; letter-spacing: -0.3px;
  word-break: keep-all; overflow-wrap: break-word;
  padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px);
}
img, svg { max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--p500); outline-offset: 2px; }
.in { max-width: 1120px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.in.col { max-width: 1044px; }
[hidden] { display: none !important; }

/* 위쪽 메뉴 */
.nav { background: var(--white); box-shadow: 0 1px 0 var(--line2); }
.nav .in { display: flex; align-items: center; gap: 28px; height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 16px; text-decoration: none; white-space: nowrap; letter-spacing: -0.4px; }
.brand svg { width: 26px; height: 26px; flex: none; }
.brand.sm { font-size: 14px; }
.brand.sm svg { width: 20px; height: 20px; }
.nav nav { margin-left: auto; display: flex; gap: 22px; font-size: 14px; font-weight: 500; color: var(--text2); }
.nav nav a { text-decoration: none; padding: 6px 0; }
.nav nav a:hover { color: var(--p500); }

/* 버튼·칩 */
.btn { display: inline-flex; align-items: center; justify-content: center; height: 52px; padding: 0 26px; border-radius: 12px; background: var(--p400); color: #fff; font-weight: 700; font-size: 16px; text-decoration: none; white-space: nowrap; border: 0; cursor: pointer; transition: background var(--fast) var(--ease); }
.btn:hover { background: var(--p500); }
.btn:active { background: var(--p600); }
.btn.ghost { background: var(--white); color: var(--text); box-shadow: var(--sh-sm); }
.btn.ghost:hover { background: var(--subtle); }
.chip { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: var(--r-full); background: var(--p50); color: var(--p500); font-size: 12px; font-weight: 700; white-space: nowrap; }
.chip.on-dark { background: rgba(255, 255, 255, .12); color: #7FD9CB; }
.btns { display: flex; flex-wrap: wrap; gap: 8px; }

/* 첫 화면 */
.hero { background: linear-gradient(180deg, var(--p100) 0%, #EAF6F3 70%, var(--base) 100%); padding-block: 44px 56px; }
.hero-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 480px); gap: 48px; align-items: center; }
.hero h1 { margin: 0 0 16px; font-size: clamp(36px, 5.4vw, 56px); line-height: 1.2; font-weight: 800; letter-spacing: -0.04em; text-wrap: balance; }
.hero .lead { margin: 0 0 28px; font-size: 17px; line-height: 27px; color: var(--text2); max-width: 28em; }
.hero-art { border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--sh-lg); aspect-ratio: 520 / 400; background: var(--p900); }
.hero-art svg { display: block; width: 100%; height: 100%; }

.sec-title { margin: 0 0 6px; font-size: 24px; line-height: 32px; font-weight: 800; letter-spacing: -0.6px; }
.sec-sub { margin: 0; color: var(--text2); max-width: 36em; }

/* 여섯 단계 지도 */
.map { padding-block: 40px 24px; }
.path { list-style: none; margin: 32px 0 0; padding: 0; position: relative; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.path::before { content: ""; position: absolute; left: 20px; right: 8%; top: 20px; height: 2px; background: var(--p200); }
.stage { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding-right: 8px; }
.stage .n { width: 40px; height: 40px; border-radius: var(--r-full); display: grid; place-items: center; background: var(--white); box-shadow: inset 0 0 0 2px var(--p200); color: var(--p300); font-weight: 800; font-size: 16px; margin-bottom: 8px; font-variant-numeric: tabular-nums; position: relative; transition: background var(--fast) var(--ease); }
.stage.has .n { background: var(--p400); box-shadow: none; color: #fff; }
.stage.is-on .n { background: var(--p900); }
.stage h3 { margin: 0; font-size: 16px; line-height: 23px; font-weight: 700; letter-spacing: -0.4px; }
.stage p { margin: 0; font-size: 13px; line-height: 19px; color: var(--text3); }
.stage .go, .stage .soon { margin-top: 6px; font-size: 13px; font-weight: 700; }
.stage .go { color: var(--p500); background: none; border: 0; padding: 0; cursor: pointer; font-family: inherit; text-decoration: underline; text-underline-offset: 3px; text-align: left; }
.stage .soon { color: var(--text3); font-weight: 500; }
.stage.has { cursor: pointer; }
.stage.is-on h3 { color: var(--p600); }

/* 글 목록 */
.posts { padding-block: 16px 56px; }
.feature { display: grid; grid-template-columns: minmax(0, 1fr) 200px; gap: 24px; align-items: center; background: var(--p900); color: #fff; border-radius: var(--r-xl); padding: 32px; margin-bottom: 40px; position: relative; overflow: hidden; }
.feature h2 { margin: 12px 0 8px; font-size: clamp(22px, 3vw, 30px); line-height: 1.3; font-weight: 800; letter-spacing: -0.04em; text-wrap: balance; }
.feature h2 a { text-decoration: none; }
.feature h2 a:hover { text-decoration: underline; text-underline-offset: 4px; }
.feature p { margin: 0 0 20px; color: rgba(255, 255, 255, .74); max-width: 36em; }
.feature .btn { background: var(--p300); color: var(--p900); }
.feature .btn:hover { background: #7FD9CB; }
.feature-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.feature .sub { font-size: 13px; color: rgba(255, 255, 255, .62); }
.feature-art { display: grid; place-items: center; width: 200px; height: 200px; border-radius: 50%; background: var(--p800); color: var(--p300); }
.ico-xl { width: 110px; height: 110px; }
.list-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 20px; margin-bottom: 14px; }
.list-head .sec-title { margin: 0; }
.filter { margin: 0; display: inline-flex; align-items: center; gap: 10px; font-size: 14px; color: var(--p600); font-weight: 700; }
.filter button { height: 30px; padding: 0 12px; border: 0; border-radius: var(--r-full); background: var(--white); box-shadow: var(--sh-sm); font: inherit; font-size: 13px; font-weight: 700; color: var(--text); cursor: pointer; }
.rows { list-style: none; margin: 0; padding: 4px 20px; background: var(--white); border-radius: var(--r-lg); }
.rows:empty { display: none; }
.row { border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; }
.row-link { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 16px; padding: 18px 0; text-decoration: none; align-items: start; }
.tile { width: 56px; height: 56px; border-radius: 14px; background: var(--p50); color: var(--p500); display: grid; place-items: center; transition: background var(--fast) var(--ease); }
.row-link:hover .tile { background: var(--p100); }
.ico { width: 30px; height: 30px; }
.ico-s { width: 22px; height: 22px; flex: none; color: var(--p500); }
.row-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.row-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 13px; color: var(--text3); }
.row-title { font-size: 18px; line-height: 27px; font-weight: 700; letter-spacing: -0.4px; text-wrap: balance; }
.row-link:hover .row-title { color: var(--p600); }
.row-sum { font-size: 14px; line-height: 21px; color: var(--text2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.row-sub { font-size: 13px; color: var(--text3); }
.empty { margin: 12px 0 0; padding: 20px; background: var(--white); border-radius: var(--r-lg); color: var(--text2); }

/* 소개 */
.about { padding-block: 8px 56px; }
.about-in { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 40px; align-items: start; }
.slip { background: var(--white); border-radius: var(--r-lg); box-shadow: var(--sh-md); overflow: hidden; }
.slip-top { display: flex; align-items: center; gap: 10px; padding: 14px 20px; font-weight: 800; border-bottom: 2px dashed var(--p200); }
.slip dl { margin: 0; padding: 4px 20px 8px; }
.slip dl div { padding: 13px 0; border-bottom: 1px dashed var(--line); }
.slip dl div:last-child { border-bottom: 0; }
.slip dt { font-size: 12px; line-height: 16px; color: var(--text3); }
.slip dd { margin: 2px 0 0; font-size: 15px; line-height: 22px; font-weight: 700; }

.foot { border-top: 1px solid var(--line); padding-block: 24px calc(24px + env(safe-area-inset-bottom, 0px)); color: var(--text3); font-size: 13px; }
.foot .in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; }
.foot .brand { color: var(--text2); }

/* 본문 화면 */
.post-head { padding-block: 36px 24px; }
.post-head .in > * { max-width: 720px; }
.crumb { margin: 0 0 14px; font-size: 14px; color: var(--text3); display: flex; flex-wrap: wrap; gap: 4px 8px; }
.crumb a { color: var(--p500); font-weight: 700; text-decoration: none; }
.crumb a:hover { text-decoration: underline; }
.post-head h1 { margin: 0 0 16px; font-size: clamp(28px, 4.4vw, 42px); line-height: 1.28; font-weight: 800; letter-spacing: -0.045em; text-wrap: balance; }
.meta { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; font-size: 14px; color: var(--text3); }
.tracker { list-style: none; margin: 20px 0 0; padding: 0; display: flex; gap: 6px; }
.tracker li { flex: 1; height: 28px; border-radius: var(--r-full); background: var(--p100); display: grid; place-items: center; font-size: 12px; font-weight: 800; color: var(--p500); font-variant-numeric: tabular-nums; }
.tracker li.now { background: var(--p400); color: #fff; }
.banner { border-radius: var(--r-xl); overflow: hidden; margin-bottom: 36px; }
.banner svg { display: block; width: 100%; height: clamp(120px, 22vw, 220px); }
.post-grid { display: grid; grid-template-columns: minmax(0, 720px) 220px; gap: 56px; justify-content: start; align-items: start; }
.pager-wrap { max-width: 720px; }

.prose { font-size: 17px; line-height: 1.95; display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.prose p { margin: 0; overflow-wrap: anywhere; word-break: keep-all; }
.prose h2 { margin: 28px 0 0; font-size: 24px; line-height: 1.4; font-weight: 800; letter-spacing: -0.04em; text-wrap: balance; scroll-margin-top: 16px; }
.prose h3 { margin: 12px 0 0; font-size: 19px; line-height: 1.5; font-weight: 700; }
.prose ul, .prose ol { margin: 0; padding-left: 1.3em; display: flex; flex-direction: column; gap: 8px; }
.prose li { padding-left: 4px; overflow-wrap: anywhere; word-break: keep-all; }
.prose li::marker { color: var(--p500); font-weight: 700; }
.prose strong { font-weight: 800; }
.prose a { color: var(--p500); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; overflow-wrap: anywhere; }
.prose a:hover { color: var(--p600); }
.prose hr { border: 0; border-top: 1px solid var(--line); width: 100%; margin: 8px 0; }
.prose blockquote { margin: 0; padding: 16px 20px; background: var(--p50); border-radius: var(--r-lg); color: var(--text2); }
.prose code { font-family: 'Consolas', 'D2Coding', monospace; font-size: .9em; background: var(--white); padding: 1px 6px; border-radius: var(--r-sm); }
.prose h2.is-summary { margin-top: 12px; padding: 20px 24px 0; background: var(--p50); border-radius: var(--r-lg) var(--r-lg) 0 0; font-size: 18px; color: var(--p600); }
.prose h2.is-summary + ul { margin-top: -20px; padding: 0 24px 22px 44px; background: var(--p50); border-radius: 0 0 var(--r-lg) var(--r-lg); }
.flag { background: var(--warn-bg); color: var(--warn-fg); border-radius: 4px; padding: 0 6px; font-size: 12px; font-weight: 700; white-space: nowrap; }

.toc { position: sticky; top: 24px; font-size: 14px; line-height: 1.5; }
.toc b { display: block; margin-bottom: 10px; font-size: 13px; color: var(--text3); }
.toc ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; border-left: 2px solid var(--line); }
.toc a { display: block; padding-left: 14px; margin-left: -2px; border-left: 2px solid transparent; color: var(--text2); text-decoration: none; }
.toc a:hover { color: var(--p500); border-left-color: var(--p500); }

.pager { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-block: 56px 48px; }
.pager a { display: flex; flex-direction: column; gap: 4px; padding: 16px 20px; background: var(--white); border-radius: var(--r-lg); text-decoration: none; transition: box-shadow var(--base-t) var(--ease); }
.pager a:hover { box-shadow: var(--sh-lg); }
.pager small { font-size: 12px; color: var(--text3); }
.pager b { font-size: 15px; line-height: 22px; font-weight: 700; }
.pager .next { text-align: right; grid-column: 2; }

/* 좁은 화면 */
@media (max-width: 900px) {
  .hero-in { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .about-in { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .post-grid { grid-template-columns: minmax(0, 720px); }
  .toc { display: none; }
  .path { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .path::before { left: 20px; right: auto; top: 20px; bottom: 40px; width: 2px; height: auto; }
  .stage { display: grid; grid-template-columns: 40px minmax(0, 1fr); column-gap: 14px; row-gap: 2px; padding-right: 0; }
  .stage .n { grid-row: 1 / span 3; margin-bottom: 0; }
  .feature { grid-template-columns: minmax(0, 1fr); padding: 24px; }
  .feature-art { display: none; }
}
@media (max-width: 640px) {
  .in { padding-left: 16px; padding-right: 16px; }
  .nav .in { gap: 12px; }
  .nav nav { gap: 14px; font-size: 13px; }
  .brand span { font-size: 15px; }
  .hero { padding-block: 28px 36px; }
  .rows { padding: 2px 14px; }
  .row-link { grid-template-columns: 44px minmax(0, 1fr); gap: 12px; }
  .tile { width: 44px; height: 44px; border-radius: 12px; }
  .ico { width: 24px; height: 24px; }
  .row-title { font-size: 17px; }
  .prose { font-size: 16.5px; line-height: 1.9; }
  .prose h2 { font-size: 21px; }
  .pager { grid-template-columns: minmax(0, 1fr); }
  .pager .next { grid-column: auto; text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* 초안 미리 보기 띠 (글 목록에 올리기 전 화면에만 나옴) */
.draft-bar { background: #FFF4D6; color: #6B4A00; text-align: center; font-size: 14px; font-weight: 500; padding: 10px 16px; border-bottom: 1px solid #F0D58A; }
