/* 비타코드 — 짙은 초록 + 흰 바탕, 표 중심 */
:root {
  --green: #1d5a39;
  --green-dark: #123d26;
  --green-soft: #e7f0ea;
  --ink: #17201b;
  --muted: #4b5a51;
  --line: #cfdcd3;
  --bg: #ffffff;
  --bg-alt: #f4f7f5;
  --code-bg: #eef4f0;
  --radius: 8px;
  --wrap: 1120px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: "Pretendard Variable", Pretendard, system-ui, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif; font-size: 17px; line-height: 1.75; color: var(--ink); background: var(--bg); word-break: keep-all; overflow-wrap: break-word; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green); text-underline-offset: 3px; }
a:hover { color: var(--green-dark); }
h1, h2, h3 { line-height: 1.3; letter-spacing: -0.02em; margin: 0 0 .6em; }
h1 { font-size: clamp(28px, 4.2vw, 46px); font-weight: 800; }
h2 { font-size: clamp(22px, 2.6vw, 30px); font-weight: 800; }
h3 { font-size: 19px; font-weight: 700; }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.wrap.narrow { max-width: 780px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.section { padding: 56px 0; }
.section + .section { border-top: 2px solid var(--bg-alt); }

/* 버튼 */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 20px; border-radius: var(--radius); font-weight: 700; font-size: 16px; text-decoration: none; border: 2px solid var(--green); cursor: pointer; white-space: nowrap; }
.btn-main { background: var(--green); color: #fff; }
.btn-main:hover { background: var(--green-dark); border-color: var(--green-dark); color: #fff; }
.btn-line { background: #fff; color: var(--green); }
.btn-line:hover { background: var(--green-soft); }
.btn-sm { min-height: 40px; padding: 0 14px; font-size: 15px; }
.kcode { font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: .95em; font-weight: 700; background: var(--code-bg); color: var(--green-dark); padding: 2px 8px; border-radius: 4px; letter-spacing: .04em; }

/* 머리말 */
.site-header { position: sticky; top: 0; z-index: 20; background: #fff; border-bottom: 2px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 18px; height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); flex-shrink: 0; }
.logo-mark { width: 34px; height: 34px; fill: var(--green); }
.logo-mark path { stroke: #fff; stroke-width: 2.4; stroke-linecap: round; fill: none; }
.logo-text { font-weight: 800; font-size: 20px; display: flex; flex-direction: column; line-height: 1.15; }
.logo-sub { font-size: 13px; font-weight: 600; color: var(--muted); }
.main-nav { display: flex; gap: 4px; margin-left: auto; }
.main-nav a { padding: 8px 10px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: 16px; border-bottom: 2px solid transparent; }
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--green); border-bottom-color: var(--green); }
.main-nav .nav-cta { display: none; }
.menu-toggle { display: none; align-items: center; gap: 6px; height: 40px; padding: 0 12px; border: 2px solid var(--line); background: #fff; border-radius: var(--radius); font: inherit; font-weight: 700; font-size: 15px; color: var(--ink); cursor: pointer; }
.ico svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; display: block; }

/* 첫 화면 */
.hero { background: var(--green-soft); padding: 44px 0 48px; }
.hero-in { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.hero-kicker { font-weight: 700; color: var(--green); margin-bottom: .4em; font-size: 16px; }
.hero h1 { white-space: nowrap; font-size: clamp(26px, 5.4vw, 52px); }
.hero-lead { font-size: 18px; color: var(--ink); max-width: 34em; }
.hero-facts { display: flex; gap: 0; margin: 22px 0 0; border-top: 2px solid var(--green); }
.hero-facts div { flex: 1; padding: 12px 14px 0 0; }
.hero-facts dt { font-size: 15px; color: var(--muted); font-weight: 600; }
.hero-facts dd { margin: 0; font-size: 28px; font-weight: 800; color: var(--green-dark); }
.hero-photo { margin: 0; max-height: 440px; overflow: hidden; border-radius: var(--radius); }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; }

/* 코드 표 */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 0 1em; }
.code-table, .info-table { width: 100%; border-collapse: collapse; font-size: 16px; }
.code-table thead th, .info-table thead th { text-align: left; font-size: 15px; color: var(--muted); font-weight: 700; padding: 10px 12px; border-bottom: 2px solid var(--green); white-space: nowrap; }
.code-table td, .code-table tbody th, .info-table td, .info-table tbody th { padding: 14px 12px; border-bottom: 2px solid var(--bg-alt); text-align: left; vertical-align: middle; }
.code-table tbody th a { font-weight: 700; color: var(--ink); text-decoration: none; display: block; }
.code-table tbody th a:hover { color: var(--green); text-decoration: underline; }
.ct-rate { display: block; font-size: 15px; color: var(--green); font-weight: 700; }
.ct-go { text-align: right; }
.info-table tbody th { font-weight: 700; white-space: nowrap; }
.note { color: var(--muted); font-size: 16px; margin-top: 12px; }

.code-rows { list-style: none; margin: 0; padding: 0; }
.code-rows li { display: flex; align-items: center; gap: 16px; padding: 16px 0; border-bottom: 2px solid var(--bg-alt); }
.cr-no { font-weight: 800; font-size: 22px; color: var(--green); width: 28px; }
.cr-body { flex: 1; }
.cr-body h3 { margin: 0; }
.cr-body h3 a { color: var(--ink); text-decoration: none; }
.cr-rate, .cr-brief { margin: 2px 0 0; font-size: 16px; }
.cr-brief { color: var(--muted); }

.split-in { display: grid; grid-template-columns: .8fr 1.2fr; gap: 40px; align-items: start; }
.split-head p { color: var(--muted); }
.more a { font-weight: 700; }

/* 단계·체크·질문 */
.steps, .checklist { list-style: none; margin: 0; padding: 0; }
.steps li { display: flex; gap: 16px; padding: 16px 0; border-bottom: 2px solid var(--bg-alt); }
.step-no { flex-shrink: 0; width: 36px; height: 36px; border-radius: var(--radius); background: var(--green); color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.steps h3 { margin: 4px 0 4px; }
.steps p { margin: 0; color: var(--muted); }
.checklist li { padding: 14px 0 14px 18px; border-left: 3px solid var(--green); margin-bottom: 12px; }
.checklist h3 { margin-bottom: 4px; }
.checklist p { margin: 0; color: var(--muted); }
.faq { border-bottom: 2px solid var(--bg-alt); }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 0; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary h3 { margin: 0; font-size: 18px; }
.faq[open] .ico { transform: rotate(45deg); }
.faq p { padding: 0 0 16px; margin: 0; color: var(--muted); }
.digest-item { padding: 14px 0; border-bottom: 2px solid var(--bg-alt); }
.digest-item h3 { margin: 0 0 4px; }
.digest-item h3 span { color: var(--green); font-size: 16px; margin-left: 6px; }
.digest-item p { margin: 0; color: var(--muted); }
.directory { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 28px; }
.directory li { padding: 14px 0; border-bottom: 2px solid var(--bg-alt); }
.directory a { font-weight: 700; font-size: 18px; text-decoration: none; }
.directory p { margin: 2px 0 0; font-size: 15px; color: var(--muted); }

/* 안쪽 페이지 */
.breadcrumb { font-size: 15px; color: var(--muted); padding: 16px 0 0; }
.breadcrumb a { color: var(--muted); }
.page-head { padding: 28px 0 40px; border-bottom: 2px solid var(--line); }
.page-head-in { display: grid; grid-template-columns: 1fr; gap: 32px; }
.page-head.has-photo .page-head-in { grid-template-columns: 1.2fr .8fr; align-items: center; }
.page-lead { font-size: 18px; color: var(--muted); max-width: 40em; }
.page-head-photo, .detail-photo { margin: 0; border-radius: var(--radius); overflow: hidden; }
.detail-head-in { display: grid; grid-template-columns: 1.2fr .8fr; gap: 36px; align-items: center; }
.detail-rate { font-size: 22px; font-weight: 800; color: var(--green-dark); }
.page-actions { margin-top: 18px; }
.text-block { margin-bottom: 36px; }
.text-block:last-child { margin-bottom: 0; }
.text-photo { margin: 0 0 18px; border-radius: var(--radius); overflow: hidden; }
.plain-list, .num-list { padding-left: 1.3em; margin: 0 0 1em; }
.plain-list li, .num-list li { margin-bottom: .5em; }
.block-go { margin-top: 12px; }
.spec-table tbody th { width: 9em; color: var(--muted); }
.cta-strip { background: var(--green); color: #fff; }
.cta-strip .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.cta-strip p { margin: 0; font-weight: 700; font-size: 18px; }
.cta-strip .btn-main { background: #fff; color: var(--green-dark); border-color: #fff; }
.more-menu ul, .related-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; }
.more-menu a { font-weight: 600; }
.related-list { flex-direction: column; }
.related-list span { color: var(--muted); font-size: 15px; margin-left: 6px; }
.back-link { margin-top: 20px; font-weight: 700; }
.static-page h1 { margin-top: 12px; }
.notfound { text-align: center; padding: 100px 0; }

/* 꼬리말 */
.site-footer { background: var(--green-dark); color: #dfe9e2; padding: 48px 0 32px; margin-top: 0; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-top { display: grid; grid-template-columns: 1.3fr 1fr 1fr .8fr; gap: 28px; margin-bottom: 28px; }
.footer-brand .logo-text { color: #fff; }
.footer-brand p { font-size: 15px; margin-top: 10px; }
.footer-nav { display: flex; flex-direction: column; gap: 6px; font-size: 15px; }
.footer-title { font-weight: 800; color: #fff; margin: 0 0 4px; font-size: 16px; }
.footer-nav .strong { font-weight: 800; }
.disclaimer { font-size: 15px; color: #c3d3c8; margin: 0 0 8px; }
.to-top { display: inline-block; margin-top: 12px; font-weight: 700; }

/* 휴대폰 */
@media (max-width: 960px) {
  .main-nav { display: none; position: absolute; top: 64px; left: 0; right: 0; background: #fff; flex-direction: column; padding: 8px 20px 16px; border-bottom: 2px solid var(--line); }
  .nav-open .main-nav { display: flex; }
  .main-nav a { padding: 12px 0; border-bottom: 2px solid var(--bg-alt); }
  .menu-toggle { display: inline-flex; }
  .header-cta { margin-left: auto; }
  .hero-in, .split-in, .page-head.has-photo .page-head-in, .detail-head-in { grid-template-columns: 1fr; }
  .hero-photo { max-height: 300px; }
  .directory { grid-template-columns: 1fr 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .logo-sub { display: none; }
  .section { padding: 40px 0; }
  .hero { padding: 28px 0 32px; }
  .hero h1 { font-size: clamp(22px, 7.4vw, 34px); }
  .hero-facts dd { font-size: 22px; }
  .directory { grid-template-columns: 1fr; }
  .code-table thead { display: none; }
  .code-table tr { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 14px 0; border-bottom: 2px solid var(--bg-alt); }
  .code-table td, .code-table tbody th { border: 0; padding: 0; }
  .code-table tbody th { grid-column: 1 / -1; }
  .code-table td:nth-child(3) { grid-column: 1 / -1; color: var(--muted); font-size: 15px; }
  .ct-go { grid-column: 1 / -1; text-align: left; }
  .ct-go .btn { width: 100%; }
  .cta-strip .wrap { flex-direction: column; align-items: flex-start; }
  .footer-top { grid-template-columns: 1fr; }
  .code-rows li { flex-wrap: wrap; }
  .code-rows .btn { width: 100%; }
}
@media (max-width: 379px) {
  .header-cta { display: none; }
  .menu-toggle { margin-left: auto; }
  .main-nav .nav-cta { display: block; font-weight: 800; color: var(--green); }
  .logo-text { font-size: 18px; }
}

/* 그리드 칸이 표·버튼 때문에 넘치지 않게 */
.hero-in > *, .split-in > *, .two-col > *, .two > *, .page-head-in > *, .detail-head-in > *, .code-cards > *, .code-card > *, .footer-top > *, .footer-row > *, .footer-grid > *, .footer-cols > * { min-width: 0; }
@media (max-width: 560px) { .btn { white-space: normal; text-align: center; max-width: 100%; } }
