/* 비타세일 — 벽돌색 + 흰 바탕, 세일 판 */
:root {
  --brick: #8f2d14;
  --brick-dark: #6c210e;
  --brick-soft: #f6e9e4;
  --char: #222222;
  --muted: #555050;
  --line: #e2dcd8;
  --alt: #f6f4f2;
  --white: #fff;
  --radius: 8px;
  --wrap: 1120px;
  --head: "Do Hyeon", "Noto Sans KR", sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: "Noto Sans KR", system-ui, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif; font-size: 17px; line-height: 1.8; color: var(--char); background: var(--white); word-break: keep-all; overflow-wrap: break-word; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brick); text-underline-offset: 3px; }
h1, h2, h3 { line-height: 1.3; margin: 0 0 .6em; }
h1, h2 { font-family: var(--head); font-weight: 400; letter-spacing: 0; }
h1 { font-size: clamp(32px, 5vw, 58px); }
h2 { font-size: clamp(25px, 3vw, 34px); }
h3 { font-size: 18px; font-weight: 700; }
p { margin: 0 0 1em; }
.wrap { 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.alt { background: var(--alt); }
.slab { display: inline-block; background: var(--brick); color: #fff; padding: 4px 14px 2px; border-radius: 4px; }
.two { display: grid; grid-template-columns: .8fr 1.2fr; gap: 40px; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 20px; border-radius: var(--radius); font: inherit; font-weight: 700; font-size: 16px; text-decoration: none; border: 2px solid var(--brick); white-space: nowrap; }
.btn-main { background: var(--brick); color: #fff; }
.btn-main:hover { background: var(--brick-dark); border-color: var(--brick-dark); color: #fff; }
.btn-line { background: var(--white); color: var(--brick); }
.btn-line:hover { background: var(--brick-soft); }
.btn-sm { min-height: 40px; font-size: 15px; padding: 0 14px; }
.kcode { font-family: ui-monospace, Consolas, monospace; font-weight: 700; color: var(--brick-dark); background: var(--brick-soft); padding: 1px 7px; border-radius: 4px; }

/* 머리말 */
.site-header { background: var(--white); border-bottom: 4px solid var(--brick); position: sticky; top: 0; z-index: 20; }
.header-inner { display: flex; align-items: center; gap: 14px; height: 64px; }
.logo { display: flex; align-items: center; gap: 9px; text-decoration: none; color: var(--char); flex-shrink: 0; }
.logo-mark { width: 34px; height: 34px; border-radius: 7px; background: var(--brick); color: #fff; font-family: var(--head); font-size: 24px; display: inline-flex; align-items: center; justify-content: center; }
.logo-text { font-family: var(--head); font-size: 26px; }
.logo-sub { font-size: 14px; color: var(--muted); padding-left: 10px; border-left: 2px solid var(--line); }
.main-nav { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.main-nav a { color: var(--char); text-decoration: none; font-weight: 500; padding: 8px 11px; font-size: 16px; border-bottom: 3px solid transparent; }
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--brick); border-bottom-color: var(--brick); }
.main-nav .nav-cta { margin-left: 8px; background: var(--brick); color: #fff; border-radius: var(--radius); font-weight: 700; }
.main-nav .nav-cta:hover { background: var(--brick-dark); color: #fff; border-bottom-color: transparent; }
.menu-toggle { display: none; align-items: center; gap: 6px; margin-left: auto; height: 40px; padding: 0 12px; border: 2px solid var(--char); background: var(--white); border-radius: var(--radius); font: inherit; font-weight: 700; font-size: 15px; color: var(--char); cursor: pointer; }
.ico svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; display: block; }

/* 첫 화면 */
.hero { background: var(--brick-soft); padding: 52px 0; }
.hero-in { display: grid; grid-template-columns: 1fr 440px; gap: 48px; align-items: center; }
.hero h1 { white-space: nowrap; font-size: clamp(30px, 6vw, 66px); color: var(--brick-dark); }
.hero-lead { font-size: 18px; max-width: 32em; }
.sale-board { background: var(--char); color: #fff; border-radius: var(--radius); padding: 22px 22px 10px; }
.sb-head { font-family: var(--head); font-size: 24px; margin-bottom: 8px; }
.sale-board ul { list-style: none; margin: 0; padding: 0; }
.sale-board li { border-top: 2px solid #444; }
.sale-board a { display: grid; grid-template-columns: 1fr auto; gap: 0 12px; padding: 12px 0; color: #fff; text-decoration: none; }
.sale-board a:hover strong { text-decoration: underline; }
.sale-board strong { font-size: 18px; }
.sale-board span { grid-column: 1; color: #d8d2cf; font-size: 15px; }
.sale-board em { grid-column: 2; grid-row: 1 / span 2; font-style: normal; color: #f2b8a6; font-size: 14.5px; text-align: right; align-self: center; max-width: 9em; }

/* 코드 넓은 카드 */
.code-cards.wide { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 32px; }
.wide .code-card { display: grid; grid-template-columns: 200px 1fr; gap: 18px; align-items: start; padding-bottom: 24px; border-bottom: 2px solid var(--line); }
.wide .cc-photo img { aspect-ratio: 1 / 1; object-fit: cover; border-radius: var(--radius); }
.cc-body h3 { font-size: 20px; margin-bottom: 4px; }
.cc-body h3 a { color: var(--char); text-decoration: none; }
.cc-body h3 a:hover { color: var(--brick); text-decoration: underline; }
.cc-rate { font-weight: 700; color: var(--brick); margin: 0 0 4px; }
.cc-brief { color: var(--muted); font-size: 15.5px; }
.code-rows { list-style: none; padding: 0; margin: 0; }
.code-rows li { display: flex; align-items: center; gap: 16px; padding: 14px 0; border-bottom: 2px solid var(--line); }
.cr-no { font-family: var(--head); font-size: 28px; color: var(--brick); width: 28px; }
.cr-body { flex: 1; }
.cr-body h3 { margin: 0; }
.cr-body h3 a { color: var(--char); }
.cr-rate, .cr-brief { margin: 0; font-size: 16px; }
.cr-brief { color: var(--muted); }

.decide { padding-left: 1.4em; margin: 0; }
.decide li { margin-bottom: 14px; padding-left: 4px; }
.decide li::marker { font-family: var(--head); color: var(--brick); font-size: 20px; }

.table-scroll { overflow-x: auto; margin: 0 0 1em; }
.info-table, .code-table { width: 100%; border-collapse: collapse; font-size: 16px; background: var(--white); }
.info-table thead th, .code-table thead th { text-align: left; padding: 10px 12px; border-bottom: 3px solid var(--char); font-weight: 700; white-space: nowrap; }
.info-table td, .info-table tbody th, .code-table td, .code-table tbody th { padding: 12px; border-bottom: 2px solid var(--line); text-align: left; }
.info-table tbody th { font-weight: 700; white-space: nowrap; }
.code-table tbody th a { color: var(--char); font-weight: 700; text-decoration: none; display: block; }
.ct-rate { display: block; font-size: 15px; color: var(--brick); }
.ct-go { text-align: right; }
.spec-table tbody th { width: 9em; color: var(--muted); }

.steps, .checklist { list-style: none; margin: 0; padding: 0; }
.steps li { display: flex; gap: 16px; padding: 14px 0; border-bottom: 2px solid var(--line); }
.step-no { font-family: var(--head); font-size: 26px; color: var(--brick); min-width: 28px; line-height: 1.2; }
.steps h3 { margin: 0 0 2px; }
.steps p, .checklist p { margin: 0; color: var(--muted); }
.checklist li { padding: 14px 0 14px 16px; border-left: 4px solid var(--brick); margin-bottom: 10px; background: var(--white); }
.checklist h3 { margin: 0 0 2px; }
.faq { border-bottom: 2px solid var(--line); }
.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; }
.faq[open] .ico { transform: rotate(45deg); }
.faq p { margin: 0; padding: 0 0 16px; color: var(--muted); }
.digest-item { padding: 12px 0; border-bottom: 2px solid var(--line); }
.digest-item h3 span { color: var(--brick); 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: 16px 28px; }
.directory a { font-weight: 700; font-size: 17px; }
.directory p { margin: 2px 0 0; font-size: 15px; color: var(--muted); }

/* 안쪽 페이지 */
.breadcrumb { font-size: 15px; color: var(--muted); padding-top: 16px; }
.breadcrumb a { color: var(--muted); }
.page-head { padding: 20px 0 38px; border-bottom: 2px solid var(--line); }
.page-head.has-photo .page-head-in, .detail-head-in { display: grid; grid-template-columns: 1.2fr .8fr; gap: 36px; align-items: center; }
.page-lead { font-size: 18px; color: var(--muted); }
.page-head-photo, .detail-photo, .text-photo { margin: 0; border-radius: var(--radius); overflow: hidden; }
.detail-rate { font-size: 22px; font-weight: 700; color: var(--brick); }
.text-block { margin-bottom: 36px; }
.plain-list, .num-list { padding-left: 1.3em; }
.plain-list li, .num-list li { margin-bottom: .5em; }
.cta-strip { background: var(--brick); color: #fff; }
.cta-strip .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.cta-strip p { margin: 0; font-weight: 700; }
.cta-strip .btn-main { background: #fff; color: var(--brick-dark); border-color: #fff; }
.more-menu ul, .related-list { list-style: none; padding: 0; margin: 0; }
.more-menu ul { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.related-list li { padding: 8px 0; border-bottom: 2px solid var(--line); }
.related-list span { color: var(--muted); font-size: 15px; }
.back-link { margin-top: 18px; font-weight: 700; }
.notfound { text-align: center; padding: 90px 0; }

/* 꼬리말 */
.site-footer { background: var(--char); color: #d6d0cc; padding: 44px 0 28px; }
.site-footer a { color: #fff; }
.footer-row { display: grid; grid-template-columns: 1fr 1.4fr; gap: 32px; }
.footer-name { display: flex; align-items: center; gap: 8px; font-family: var(--head); font-size: 26px; color: #fff; margin: 0 0 8px; }
.footer-nav, .footer-codes, .footer-site { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 15px; }
.footer-codes, .footer-site { margin-top: 16px; padding-top: 16px; border-top: 2px solid #3a3a3a; }
.footer-site .strong { font-weight: 700; }
.disclaimer { font-size: 15px; margin-top: 14px; }
.to-top { font-weight: 700; }

@media (max-width: 1000px) {
  .menu-toggle { display: inline-flex; }
  .main-nav { display: none; position: absolute; top: 64px; left: 0; right: 0; background: var(--white); flex-direction: column; align-items: stretch; padding: 8px 20px 16px; border-bottom: 4px solid var(--brick); }
  .nav-open .main-nav { display: flex; }
  .main-nav a { padding: 12px 0; border-bottom: 2px solid var(--line); }
  .main-nav .nav-cta { margin: 10px 0 0; text-align: center; }
  .hero-in, .two, .page-head.has-photo .page-head-in, .detail-head-in, .footer-row { grid-template-columns: 1fr; }
  .code-cards.wide { grid-template-columns: 1fr; }
  .directory { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .logo-sub { display: none; }
  .section { padding: 40px 0; }
  .hero { padding: 30px 0; }
  .hero h1 { font-size: clamp(28px, 10vw, 44px); }
  .hero-cta .btn { width: 100%; white-space: normal; text-align: center; }
  .wide .code-card { grid-template-columns: 96px 1fr; gap: 14px; }
  .wide .cc-body .btn { width: 100%; }
  .directory { grid-template-columns: 1fr; }
  .code-rows li { flex-wrap: wrap; }
  .code-rows .btn { width: 100%; }
  .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(--line); }
  .code-table td, .code-table tbody th { border: 0; padding: 0; }
  .code-table tbody th, .code-table td:nth-child(3), .ct-go { grid-column: 1 / -1; text-align: left; }
  .ct-go .btn { width: 100%; }
}

/* 그리드 칸이 표·버튼 때문에 넘치지 않게 */
.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%; } }
