:root {
    --brand: #143c3c;
    --accent: #b6925a;
    --accent-ink: #765522;
    --ink: #172221;
    --muted: #65706e;
    --line: rgba(23,34,33,.14);
    --paper: #fff;
    --cream: #f4f1eb;
    --soft: #edf2f1;
    --focus: #2f78c4;
    --display: "Libre Caslon Text", "Big Caslon", Georgia, "Noto Serif KR", serif;
    --sans: "Apple SD Gothic Neo", Pretendard, "Noto Sans KR", system-ui, sans-serif;
    color: var(--ink);
    background: var(--paper);
    font-family: var(--sans);
    font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); line-height: 1.72; word-break: keep-all; overflow-wrap: anywhere; }
body, button, input, textarea, select { font: inherit; }
a { color: inherit; text-underline-offset: 4px; }
img { display: block; max-width: 100%; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }

.shell { width: min(1240px, calc(100% - 64px)); margin-inline: auto; }
.skip-link { position: fixed; z-index: 200; top: 12px; left: 12px; padding: 10px 15px; color: #fff; background: #000; transform: translateY(-180%); }
.skip-link:focus { transform: translateY(0); }
.preview-bar { position: relative; z-index: 120; padding: 9px 20px; color: #fff; background: #8a4b08; text-align: center; font-size: .82rem; font-weight: 750; }

.site-header { position: sticky; z-index: 100; top: 0; border-bottom: 1px solid rgba(23,34,33,.08); background: rgba(255,255,255,.88); backdrop-filter: blur(18px); }
.header-inner { min-height: 76px; display: flex; align-items: center; gap: 30px; }
.brand { display: inline-flex; align-items: center; color: var(--brand); text-decoration: none; font-weight: 800; }
.brand img { width: auto; max-width: 210px; height: 48px; object-fit: contain; }
.primary-nav { margin-left: auto; display: flex; align-items: center; gap: 28px; }
.primary-nav a { position: relative; padding-block: 10px; color: #34413f; text-decoration: none; font-size: .86rem; font-weight: 650; }
.primary-nav a::after { content: ""; position: absolute; right: 0; bottom: 2px; left: 0; height: 1px; transform: scaleX(0); background: var(--accent); transition: transform .2s ease; }
.primary-nav a:hover::after { transform: scaleX(1); }
.header-cta { min-height: 42px; display: inline-flex; align-items: center; padding: 0 17px; color: #fff; background: var(--brand); text-decoration: none; font-size: .85rem; font-weight: 750; }
.nav-toggle { display: none; min-width: 44px; min-height: 42px; border: 1px solid var(--line); color: var(--brand); background: #fff; }

.breadcrumbs { display: flex; align-items: center; gap: 10px; padding-top: 24px; color: var(--muted); font-size: .8rem; }
.breadcrumbs a { color: var(--brand); font-weight: 750; }
.hero { padding: 28px 0 0; background: linear-gradient(180deg,#f7f8f7,#fff); }
.hero-grid { min-height: 650px; display: grid; grid-template-columns: minmax(0,.92fr) minmax(420px,1.08fr); overflow: hidden; background: var(--cream); }
.hero-copy { display: flex; flex-direction: column; justify-content: center; padding: clamp(48px,7vw,92px); }
.eyebrow, .card-kicker, .service-category { margin: 0 0 18px; color: var(--accent-ink); font-family: var(--display); font-size: .75rem; font-weight: 700; letter-spacing: .17em; text-transform: uppercase; }
.hero h1 { max-width: 12ch; margin: 0; color: var(--brand); font-size: clamp(2.7rem,5vw,5rem); line-height: 1.08; letter-spacing: -.065em; text-wrap: balance; }
.hero-summary { max-width: 650px; margin: 28px 0 0; color: #4d5d5b; font-size: clamp(1rem,1.6vw,1.18rem); line-height: 1.82; }
.hero-introduction { max-width: 650px; margin: 15px 0 0; color: var(--muted); white-space: pre-line; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; }
.button { min-height: 50px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 0 22px; border: 1px solid var(--brand); color: var(--brand); background: transparent; text-decoration: none; font-size: .88rem; font-weight: 760; transition: transform .2s ease; }
.button:hover { transform: translateY(-2px); }
.button.primary { color: #fff; background: var(--brand); }
.button.secondary { background: rgba(255,255,255,.65); }
.button.light { border-color: #fff; color: var(--brand); background: #fff; }
.trust-line { display: flex; flex-wrap: wrap; gap: 10px 20px; margin-top: 34px; color: #596664; font-size: .77rem; }
.trust-line span { position: relative; padding-left: 13px; }
.trust-line span::before { content: ""; position: absolute; top: .7em; left: 0; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.page-context { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 0; }
.page-context div { display: flex; gap: 7px; padding: 7px 10px; border: 1px solid var(--line); background: rgba(255,255,255,.6); }
.page-context dt { color: var(--muted); font-size: .72rem; }
.page-context dd { margin: 0; font-size: .76rem; font-weight: 780; }
.page-source { margin: 14px 0 0; color: var(--muted); font-size: .77rem; }

.hero-visual { position: relative; min-height: 650px; overflow: hidden; background: #d9ddda; }
.hero-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.hero-visual::after { content: ""; position: absolute; inset: 36% 0 0; background: linear-gradient(180deg,transparent,rgba(10,24,23,.68)); }
.identity-card { position: absolute; z-index: 2; right: 28px; bottom: 28px; left: 28px; padding: 26px 28px; color: #fff; border: 1px solid rgba(255,255,255,.38); background: rgba(19,40,38,.88); backdrop-filter: blur(16px); }
.identity-card .card-kicker { margin-bottom: 8px; color: #fff; }
.identity-card h2 { margin: 0 0 16px; font-size: 1.25rem; letter-spacing: -.025em; }
.identity-card dl { margin: 0; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
.identity-card dl div { min-width: 0; padding: 10px 14px 6px 0; border-top: 1px solid rgba(255,255,255,.18); }
.identity-card dt { color: #fff; font-size: .69rem; }
.identity-card dd { margin: 3px 0 0; font-size: .82rem; font-weight: 700; }

.section-block { padding: clamp(90px,10vw,150px) 0; }
.section-grid { display: grid; grid-template-columns: minmax(260px,.72fr) minmax(0,1.28fr); gap: clamp(50px,8vw,120px); align-items: start; }
.section-heading h2 { margin: 0; color: var(--brand); font-size: clamp(2.2rem,4vw,4rem); line-height: 1.12; letter-spacing: -.06em; text-wrap: balance; }
.section-heading > p:last-child { margin: 22px 0 0; color: var(--muted); }
.section-heading.centered { max-width: 800px; margin: 0 auto 58px; text-align: center; }

.facts-section { background: #fff; }
.facts-grid { margin: 0; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); border-top: 1px solid var(--ink); }
.facts-grid div { min-height: 120px; padding: 28px 22px 28px 0; border-bottom: 1px solid var(--line); }
.facts-grid div:nth-child(even) { padding-left: 26px; border-left: 1px solid var(--line); }
.facts-grid div.wide { grid-column: 1/-1; padding-left: 0; border-left: 0; }
.facts-grid dt { margin-bottom: 10px; color: var(--muted); font-size: .74rem; font-weight: 750; letter-spacing: .07em; }
.facts-grid dd { margin: 0; color: var(--brand); font-size: 1.05rem; font-weight: 690; }
.facts-grid dd small { display: block; margin-top: 8px; color: var(--muted); font-size: .74rem; font-weight: 500; }

.services-section { background: var(--cream); }
.service-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); border-top: 1px solid var(--ink); }
.service-card { padding: 34px 30px 38px 0; border-bottom: 1px solid var(--line); }
.service-card:nth-child(even) { padding-left: 30px; border-left: 1px solid var(--line); }
.service-card h3 { margin: 0; color: var(--brand); font-size: 1.5rem; letter-spacing: -.04em; }
.service-category { margin-bottom: 10px; }
.service-summary, .service-card > p { color: #4e5d5b; }
.service-card dl { display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding-top: 15px; border-top: 1px solid var(--line); }
.service-card dt { color: var(--muted); font-size: .75rem; }
.service-card dd { margin: 0; font-size: .87rem; }
.service-source { font-size: .78rem; }

.answers-section { background: var(--soft); }
.topic { padding-top: 42px; scroll-margin-top: 100px; }
.topic + .topic { margin-top: 62px; border-top: 1px solid var(--line); }
.topic-heading { display: grid; grid-template-columns: 58px 1fr; gap: 20px; margin-bottom: 26px; }
.topic-heading > p { margin: 3px 0 0; color: var(--accent-ink); font-family: var(--display); font-weight: 700; }
.topic-heading h2 { margin: 0; color: var(--brand); font-size: clamp(1.7rem,3vw,2.5rem); letter-spacing: -.045em; }
.topic-heading div > p { margin: 8px 0 0; color: var(--muted); }
.answer-list { border-top: 1px solid var(--ink); }
.answer-card { display: grid; grid-template-columns: 64px minmax(0,1fr); gap: 22px; padding: 38px 0 44px; border-bottom: 1px solid rgba(23,34,33,.18); scroll-margin-top: 110px; }
.answer-number { width: 48px; height: 48px; display: grid; place-items: center; color: #fff; background: var(--brand); font-family: var(--display); font-size: .78rem; }
.answer-content h3 { margin: 2px 0 16px; color: var(--brand); font-size: clamp(1.35rem,2.6vw,2rem); line-height: 1.38; letter-spacing: -.038em; }
.short-answer { margin: 0; padding-left: 18px; border-left: 2px solid var(--accent); color: #304a47; font-size: 1.05rem; font-weight: 690; }
.detailed-answer { margin-top: 20px; color: #52605e; white-space: pre-line; }
.sources { margin-top: 25px; padding: 20px; background: rgba(255,255,255,.56); }
.sources h4 { margin: 0 0 8px; color: var(--muted); font-size: .72rem; letter-spacing: .08em; }
.sources ol { margin: 0; padding-left: 20px; }
.sources li { padding: 4px 0; color: #4c5a58; font-size: .83rem; }
.sources li span { display: block; color: var(--muted); }
.answer-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 20px; color: var(--muted); font-size: .77rem; }
.detail-link { display: inline-flex; align-items: center; gap: 8px; margin-top: 22px; color: var(--brand); font-weight: 780; }

.verification-section { background: #fff; }
.people-grid { border-top: 1px solid var(--ink); }
.person-card { display: flex; gap: 22px; padding: 26px 0; border-bottom: 1px solid var(--line); }
.person-card img { flex: 0 0 auto; border-radius: 50%; background: #e7ecea; }
.person-card h3 { margin: 0; color: var(--brand); font-size: 1.18rem; }
.person-card p { margin: 8px 0 0; color: var(--muted); white-space: pre-line; }
.person-card .person-title { color: var(--brand); font-weight: 750; }
.empty-note { padding: 28px 0; border-bottom: 1px solid var(--line); color: var(--muted); }

.related-pages { background: var(--cream); }
.related-page-grid { margin-top: 42px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); border-top: 1px solid var(--ink); }
.related-page-grid a { display: grid; gap: 10px; padding: 28px 24px 30px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.related-page-grid a:nth-child(even) { padding-left: 24px; border-left: 1px solid var(--line); }
.related-page-grid strong { color: var(--brand); font-size: 1.12rem; }
.related-page-grid span { color: var(--muted); font-size: .87rem; }

.final-cta { padding: clamp(70px,9vw,120px) 0; color: #fff; background: #252c2b; }
.final-cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 50px; }
.final-cta h2 { margin: 0; font-size: clamp(2.2rem,4vw,4rem); line-height: 1.12; letter-spacing: -.06em; }
.final-cta p { margin: 18px 0 0; color: rgba(255,255,255,.62); }
.final-cta .eyebrow { color: #cfb894; }
.site-footer { padding: 40px 0; color: rgba(255,255,255,.55); background: #141918; font-size: .78rem; }
.footer-inner { display: flex; justify-content: space-between; gap: 30px; }
.site-footer strong { color: #fff; }
.site-footer p { margin: 0; }

.template-professional { --brand: #18283f; --accent: #b58b4a; --cream: #f1f0eb; --soft: #edf0f2; }
.template-local { --brand: #374c2e; --accent: #c66c3f; --cream: #f3f0e6; --soft: #eef1e8; }
.template-aeo { --brand: #163a5f; --accent: #c9843b; --cream: #f5f3ee; --soft: #eef2f4; }

.status-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--soft); }
.status-card { width: min(620px,100%); padding: 50px; border-top: 2px solid var(--brand); background: #fff; text-align: center; }
.status-card h1 { margin: 0; color: var(--brand); font-size: clamp(1.8rem,4vw,3rem); letter-spacing: -.05em; }
.status-card p:last-child { color: var(--muted); }

@media (max-width: 980px) {
    .shell { width: min(100% - 36px,1240px); }
    .header-inner { flex-wrap: wrap; min-height: 68px; }
    .brand { margin-right: auto; }
    .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
    .header-cta { display: none; }
    .primary-nav { display: none; order: 4; width: 100%; margin: -2px 0 14px; padding: 12px; border: 1px solid var(--line); background: #fff; }
    .primary-nav.is-open { display: grid; }
    .primary-nav a { min-height: 42px; display: flex; align-items: center; padding: 7px 9px; }
    .hero-grid { grid-template-columns: 1fr; }
    .hero-visual { min-height: 520px; }
    .section-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    body { word-break: normal; }
    .shell { width: min(100% - 24px,1240px); }
    .brand img { max-width: 158px; height: 40px; }
    .hero { padding-top: 12px; }
    .hero-copy { padding: 46px 24px; }
    .hero h1 { max-width: none; font-size: clamp(2.4rem,12vw,3.5rem); }
    .hero-actions, .hero-actions .button { width: 100%; }
    .hero-visual { min-height: 440px; }
    .identity-card { right: 14px; bottom: 14px; left: 14px; padding: 20px; }
    .identity-card dl { grid-template-columns: 1fr; }
    .facts-grid, .service-grid, .related-page-grid { grid-template-columns: 1fr; }
    .facts-grid div, .facts-grid div:nth-child(even), .facts-grid div.wide, .service-card, .service-card:nth-child(even), .related-page-grid a, .related-page-grid a:nth-child(even) { grid-column: auto; padding-right: 0; padding-left: 0; border-left: 0; }
    .topic-heading { grid-template-columns: 38px 1fr; gap: 10px; }
    .answer-card { grid-template-columns: 1fr; padding: 30px 0 36px; }
    .answer-number { width: 42px; height: 42px; }
    .person-card, .final-cta-inner, .footer-inner { flex-direction: column; align-items: flex-start; }
    .final-cta .button { width: 100%; }
    .status-card { padding: 36px 22px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; }
}
