/* 유학가늠 — 비교 리포트형 한 장 안내. 기준: DESIGN.md */
:root {
  --ink: #101B33;
  --ink-2: #44506A;
  --paper: #F6F2EA;
  --surface: #FFFFFF;
  --rule: #D9D2C3;
  --brass: #8A5A12;
  --sand: #F1E7D3;
  --sand-ink: #3D2A08;
  --err: #A32020;
  --serif: "Noto Serif KR", "Nanum Myeongjo", "Apple SD Gothic Neo", serif;
  --sans: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Segoe UI", sans-serif;
  --wrap: 1120px;
  --gutter: 20px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--paper);
  word-break: keep-all;
  overflow-wrap: anywhere;
}
img, svg { max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p, ul, ol, dl, dd, figure, fieldset { margin: 0; padding: 0; }
ul, ol { list-style: none; }
fieldset { border: 0; min-width: 0; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 14px; }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }

/* 상시 고지 띠 */
.notice-band { background: var(--sand); color: var(--sand-ink); font-size: 0.8125rem; line-height: 1.6; border-bottom: 1px solid var(--rule); }
.notice-band .wrap { padding-top: 10px; padding-bottom: 10px; }
.notice-band strong { font-weight: 700; }

/* 머리 */
.site-head { position: sticky; top: 0; z-index: 40; background: var(--paper); border-bottom: 1px solid var(--ink); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; }
.brand svg { width: 36px; height: 36px; flex: 0 0 auto; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-name { font-family: var(--serif); font-weight: 700; font-size: 1.25rem; line-height: 1.15; letter-spacing: -0.01em; }
.brand-name small { font-family: var(--sans); font-weight: 500; font-size: 0.75rem; color: var(--ink-2); letter-spacing: 0.02em; margin-left: 6px; }
.brand-sub { font-size: 0.75rem; line-height: 1.3; color: var(--ink-2); white-space: nowrap; }
.nav { display: none; gap: 28px; font-size: 0.9375rem; font-weight: 600; }
.nav a { text-decoration: none; padding: 8px 0; border-bottom: 2px solid transparent; }
.nav a:hover { border-bottom-color: var(--brass); }

/* 버튼 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 22px;
  font: inherit; font-weight: 700; font-size: 1rem; line-height: 1.3; text-decoration: none; text-align: center;
  border-radius: 4px; border: 1px solid var(--ink); cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #1c2c52; }
.btn-secondary { background: var(--surface); color: var(--ink); }
.btn-secondary:hover { background: var(--sand); }
.btn-sm { min-height: 44px; padding: 8px 14px; font-size: 0.875rem; white-space: nowrap; flex: 0 0 auto; }
.btn[disabled] { opacity: 0.6; cursor: progress; }
.btn .arrow { font-family: var(--sans); }

/* 첫 화면 */
.hero { padding: 36px 0 48px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; align-items: start; }
.kicker { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-size: 0.875rem; font-weight: 700; color: var(--brass); margin-bottom: 16px; }
.kicker b { font-family: var(--serif); font-size: 1.0625rem; color: var(--ink); }
.hero h1 { font-family: var(--serif); font-weight: 700; font-size: clamp(1.75rem, 1.1rem + 3vw, 2.75rem); line-height: 1.3; letter-spacing: -0.02em; margin-bottom: 18px; }
.hero h1 em { font-style: normal; box-shadow: inset 0 -0.42em 0 var(--sand); }
.lead { font-size: clamp(1rem, 0.95rem + 0.3vw, 1.125rem); color: var(--ink-2); max-width: 38em; margin-bottom: 24px; }
.cta-row { display: flex; flex-direction: column; gap: 10px; margin-bottom: 28px; }
.facts { display: grid; grid-template-columns: minmax(0, 1fr); border-top: 1px solid var(--ink); }
.facts li { display: flex; gap: 12px; align-items: baseline; padding: 12px 0; border-bottom: 1px solid var(--rule); font-size: 0.9375rem; }
.facts li span:first-child { flex: 0 0 5.2em; font-size: 0.8125rem; font-weight: 700; color: var(--brass); }

.report-card { background: var(--surface); border: 1px solid var(--rule); border-top: 3px solid var(--ink); border-radius: 2px; padding: 24px 20px; }
.report-card h2 { font-family: var(--serif); font-size: 1.25rem; line-height: 1.4; margin-bottom: 4px; }
.report-card .sub { font-size: 0.875rem; color: var(--ink-2); margin-bottom: 14px; }
.gauge-list li { display: grid; grid-template-columns: 2.2em minmax(0, 1fr); gap: 4px 8px; padding: 14px 0; border-top: 1px solid var(--rule); }
.gauge-list .n { font-family: var(--serif); font-weight: 700; font-size: 1.125rem; color: var(--brass); line-height: 1.5; }
.gauge-list strong { display: block; font-size: 1rem; line-height: 1.5; }
.gauge-list span.d { display: block; font-size: 0.875rem; color: var(--ink-2); line-height: 1.6; }
.report-card .foot { margin-top: 6px; padding-top: 14px; border-top: 1px solid var(--ink); font-size: 0.8125rem; color: var(--ink-2); }

/* 절 */
.sec { padding: 48px 0; }
.sec.alt { background: var(--surface); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.sec-head { border-top: 2px solid var(--ink); padding-top: 16px; margin-bottom: 28px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.sec-no { font-family: var(--serif); font-weight: 700; font-size: 0.9375rem; color: var(--brass); }
.sec-head h2 { font-family: var(--serif); font-weight: 700; font-size: clamp(1.4rem, 1.1rem + 1.4vw, 1.875rem); line-height: 1.35; letter-spacing: -0.015em; }
.sec-head p { color: var(--ink-2); font-size: 0.9375rem; max-width: 46em; }

/* 비교표 */
.cmp { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--rule); }
.cmp caption { caption-side: bottom; text-align: left; padding: 12px 0 0; font-size: 0.8125rem; color: var(--ink-2); }
.cmp thead { display: none; }
.cmp tbody tr { display: block; padding: 16px 16px 8px; border-top: 1px solid var(--rule); }
.cmp tbody tr:first-child { border-top: 0; }
.cmp tbody th { display: block; text-align: left; font-family: var(--serif); font-size: 1.0625rem; margin-bottom: 6px; }
.cmp tbody td { display: grid; grid-template-columns: 7.2em minmax(0, 1fr); gap: 10px; padding: 9px 0; border-top: 1px dotted var(--rule); font-size: 0.9375rem; line-height: 1.55; }
.cmp tbody td::before { content: attr(data-route); font-size: 0.8125rem; font-weight: 700; color: var(--brass); }

/* 확인 항목 */
.checks { display: grid; grid-template-columns: minmax(0, 1fr); border-top: 1px solid var(--ink); }
.checks li { display: grid; grid-template-columns: 2.6em minmax(0, 1fr); gap: 0 10px; padding: 18px 0; border-bottom: 1px solid var(--rule); }
.checks .n { font-family: var(--serif); font-weight: 700; font-size: 1.5rem; line-height: 1.2; color: var(--brass); }
.checks h3 { font-size: 1.0625rem; line-height: 1.45; margin-bottom: 4px; }
.checks p { font-size: 0.9375rem; color: var(--ink-2); }

/* 절차 */
.steps { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; counter-reset: step; border-top: 1px solid var(--ink); }
.steps li { counter-increment: step; padding: 18px 0 18px 3em; position: relative; border-bottom: 1px solid var(--rule); }
.steps li::before { content: counter(step, decimal-leading-zero); position: absolute; left: 0; top: 16px; font-family: var(--serif); font-weight: 700; font-size: 1.375rem; color: var(--brass); }
.steps h3 { font-size: 1.0625rem; margin-bottom: 4px; }
.steps p { font-size: 0.9375rem; color: var(--ink-2); }

/* 신청서 */
.form-card { background: var(--surface); border: 1px solid var(--rule); border-top: 3px solid var(--ink); border-radius: 2px; padding: 24px 16px; max-width: 800px; margin: 0 auto; }
.form-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
.field label, .field legend { display: block; font-size: 0.9375rem; font-weight: 700; margin-bottom: 8px; padding: 0; }
.req { color: var(--err); margin-left: 2px; }
.opt { font-weight: 500; color: var(--ink-2); font-size: 0.8125rem; margin-left: 4px; }
.field input[type="text"], .field input[type="tel"], .field textarea {
  width: 100%; min-height: 48px; padding: 12px 14px; font: inherit; font-size: 1rem; color: var(--ink);
  background: var(--surface); border: 1px solid #A9A493; border-radius: 4px;
}
.field textarea { min-height: 84px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: 2px solid var(--brass); outline-offset: 1px; border-color: var(--ink); }
.chips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.chip-btn {
  min-height: 48px; padding: 8px 10px; font: inherit; font-size: 0.9375rem; font-weight: 600; line-height: 1.35; color: var(--ink);
  background: var(--surface); border: 1px solid #A9A493; border-radius: 4px; cursor: pointer; text-align: center;
}
.chip-btn:hover { background: var(--sand); }
.chip-btn.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.inline-notice { margin-top: 24px; padding: 14px 16px; background: var(--sand); color: var(--sand-ink); border-left: 3px solid var(--brass); font-size: 0.875rem; line-height: 1.65; }
.inline-note { margin-top: 10px; font-size: 0.875rem; font-weight: 600; color: var(--ink); }
.consents { margin-top: 16px; border-top: 1px solid var(--ink); }
.consent { display: flex; gap: 12px; align-items: flex-start; padding: 14px 0; border-bottom: 1px solid var(--rule); font-size: 0.9375rem; cursor: pointer; }
.consent input { width: 22px; height: 22px; margin: 2px 0 0; flex: 0 0 auto; accent-color: var(--ink); }
.consent strong { display: block; line-height: 1.5; }
.consent .detail { display: block; margin-top: 6px; font-size: 0.8125rem; color: var(--ink-2); line-height: 1.65; }
.consent .detail b { color: var(--ink); font-size: 1.06em; }
.consent .detail u { text-underline-offset: 2px; }
.legal-note { margin-top: 16px; font-size: 0.8125rem; color: var(--ink-2); line-height: 1.65; }
.error-msg { display: none; margin-top: 14px; padding: 12px 14px; border: 1px solid var(--err); color: var(--err); background: #FCF1F1; font-size: 0.9375rem; font-weight: 600; border-radius: 4px; }
.submit-row { margin-top: 18px; }
.submit-row .btn { width: 100%; min-height: 56px; font-size: 1.0625rem; }

/* 묻고 답하기 */
.faq { max-width: 860px; border-top: 1px solid var(--ink); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 16px; padding: 18px 0; font-weight: 700; font-size: 1rem; line-height: 1.5; min-height: 48px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--serif); font-size: 1.25rem; line-height: 1.2; color: var(--brass); flex: 0 0 auto; }
.faq details[open] summary::after { content: "−"; }
.faq details p { padding: 0 0 18px; font-size: 0.9375rem; color: var(--ink-2); max-width: 46em; }

/* 바닥 */
.site-foot { background: var(--ink); color: #D5D9E3; padding: 40px 0 96px; font-size: 0.8125rem; line-height: 1.75; }
.site-foot .brand-name, .site-foot strong { color: #fff; }
.site-foot .brand-name small, .site-foot .brand-sub { color: #B9C0D0; }
.foot-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.foot-brand svg { width: 36px; height: 36px; flex: 0 0 auto; }
.foot-rule { border: 0; border-top: 1px solid #36425F; margin: 18px 0; }
.site-foot a { color: #fff; text-underline-offset: 3px; }
.site-foot p + p { margin-top: 10px; }

/* 휴대폰 아래 신청 띠 */
.dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; background: var(--paper); border-top: 1px solid var(--ink); padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom, 0px)); transition: transform 0.2s ease; }
.dock .btn { width: 100%; }
.dock.hide { transform: translateY(110%); }

/* 단독 화면(접수 완료·처리방침) */
.plain { padding: 32px 0 64px; }
.sheet { background: var(--surface); border: 1px solid var(--rule); border-top: 3px solid var(--ink); border-radius: 2px; padding: 28px 20px; max-width: 820px; margin: 0 auto; }
.sheet h1 { font-family: var(--serif); font-size: clamp(1.4rem, 1.1rem + 1.4vw, 1.875rem); line-height: 1.35; margin-bottom: 12px; }
.sheet h2 { font-family: var(--serif); font-size: 1.125rem; margin: 28px 0 10px; padding-top: 14px; border-top: 1px solid var(--rule); }
.sheet p, .sheet li { font-size: 0.9375rem; color: var(--ink-2); }
.sheet ul.dots { list-style: disc; padding-left: 1.2em; display: grid; gap: 8px; }
.sheet strong { color: var(--ink); }
.ticket { margin: 20px 0 24px; border-top: 1px solid var(--ink); }
.ticket div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--rule); font-size: 0.9375rem; }
.ticket dt { color: var(--ink-2); flex: 0 0 auto; }
.ticket dd { font-weight: 700; text-align: right; }
.sheet .small { font-size: 0.8125rem; margin-top: 18px; }

@media (min-width: 480px) {
  .cta-row { flex-direction: row; flex-wrap: wrap; }
}
@media (min-width: 720px) {
  :root { --gutter: 32px; }
  .site-head .wrap { min-height: 72px; }
  .brand svg { width: 40px; height: 40px; }
  .brand-name { font-size: 1.375rem; }
  .brand-sub { font-size: 0.8125rem; }
  .hero { padding: 56px 0 64px; }
  .sec { padding: 72px 0; }
  .sec-head { grid-template-columns: 5em minmax(0, 1fr); gap: 4px 16px; }
  .sec-head p { grid-column: 2; }
  .report-card { padding: 28px; }
  .facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .facts li { flex-direction: column; gap: 2px; padding: 14px 16px 14px 0; border-bottom: 0; }
  .facts li span:first-child { flex: none; }
  .cmp thead { display: table-header-group; }
  .cmp thead th { text-align: left; vertical-align: bottom; padding: 18px 18px 14px; border-bottom: 2px solid var(--ink); font-family: var(--serif); font-size: 1.125rem; line-height: 1.4; width: 28%; }
  .cmp thead th:first-child { width: 16%; font-family: var(--sans); font-size: 0.8125rem; color: var(--ink-2); }
  .cmp thead th small { display: block; font-family: var(--sans); font-size: 0.8125rem; font-weight: 600; color: var(--brass); margin-bottom: 4px; }
  .cmp tbody tr { display: table-row; padding: 0; }
  .cmp tbody th, .cmp tbody td { display: table-cell; padding: 16px 18px; border-top: 1px solid var(--rule); vertical-align: top; font-size: 0.9375rem; }
  .cmp tbody th { font-family: var(--sans); font-size: 0.875rem; color: var(--ink-2); margin: 0; }
  .cmp tbody td { border-left: 1px solid var(--rule); font-weight: 600; }
  .cmp tbody td::before { content: none; }
  .checks { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 40px; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 40px; }
  .form-card { padding: 36px 32px; }
  .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .field.full { grid-column: 1 / -1; }
  .field.full .chips { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .sheet { padding: 40px; }
  .dock { display: none; }
  .site-foot { padding-bottom: 48px; }
}
@media (min-width: 1024px) {
  .nav { display: flex; }
  .hero-grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: 56px; }
  .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 28px; }
  .steps li { padding: 20px 0 0; border-bottom: 0; }
  .steps li::before { position: static; display: block; font-size: 1.75rem; margin-bottom: 8px; }
}
@media (max-width: 380px) {
  .brand svg { width: 32px; height: 32px; }
  .brand-name small { display: none; }
  .brand-sub { font-size: 0.75rem; letter-spacing: -0.02em; }
  .btn-sm { padding: 8px 10px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .dock { transition: none; }
}
