/* ==========================================================================
   오픈닥터 — 공개 사이트 스타일
   ========================================================================== */

:root {
    --navy:        #0b1b33;
    --navy-800:    #12294a;
    --navy-600:    #1d3c66;
    --accent:      #1d5fd1;
    --accent-dark: #1548a5;
    --accent-soft: #eaf1fd;
    --gold:        #a8802f;
    --ink:         #14181f;
    --ink-soft:    #3d4654;
    --muted:       #6b7482;
    --line:        #e2e7ee;
    --line-soft:   #eef1f6;
    --bg:          #ffffff;
    --bg-soft:     #f6f8fb;
    --bg-deep:     #0b1b33;
    --warn:        #b8681c;
    --danger:      #c0392b;
    --success:     #17795e;

    --radius:      10px;
    --radius-lg:   16px;
    --shadow-sm:   0 1px 2px rgba(11, 27, 51, .06), 0 1px 3px rgba(11, 27, 51, .04);
    --shadow-md:   0 4px 16px rgba(11, 27, 51, .08);
    --shadow-lg:   0 18px 48px rgba(11, 27, 51, .12);

    /* 화면 폭을 100% 로 씁니다. 지도·표가 많은 화면에서 넓을수록 유리합니다.
       읽는 글(약관·인사이트 본문)만 .narrow / .article-body 로 폭을 제한합니다. */
    --container:   100%;
    --font: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont,
            'Apple SD Gothic Neo', 'Malgun Gothic', system-ui, sans-serif;
}

/* -------------------------------------------------- reset */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.7;
    color: var(--ink);
    background: var(--bg);
    word-break: keep-all;
    overflow-wrap: break-word;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5 { margin: 0; font-weight: 700; line-height: 1.35; letter-spacing: -.02em; }
p  { margin: 0; }
ul, ol, dl, dd { margin: 0; padding: 0; }
li { list-style: none; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
table { border-collapse: collapse; width: 100%; }

.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
    position: absolute; left: -9999px; top: 0; z-index: 999;
    background: var(--navy); color: #fff; padding: 12px 20px;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* -------------------------------------------------- layout */

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 32px; }
.container.narrow { max-width: 900px; }

/* 초대형 화면에서 콘텐츠가 가장자리에 붙지 않도록 여백만 키웁니다. */
@media (min-width: 1700px) { .container { padding: 0 56px; } }
@media (min-width: 2200px) { .container { padding: 0 88px; } }

/* 긴 문단은 폭이 넓어지면 오히려 읽기 어려워집니다. */
.prose { max-width: 82ch; }

.section { padding: 88px 0; }
.section-alt { background: var(--bg-soft); }
.section-center { padding: 120px 0; }

.section-head { margin-bottom: 44px; max-width: 760px; }
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.15rem); }
.section-head-row {
    display: flex; align-items: flex-end; justify-content: space-between;
    gap: 24px; max-width: none;
}
.section-foot { margin-top: 36px; }

.eyebrow {
    font-size: .8rem; font-weight: 700; letter-spacing: .14em;
    text-transform: uppercase; color: var(--accent); margin-bottom: 12px;
}

.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

.two-col { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: start; }

.empty {
    padding: 64px 24px; text-align: center; color: var(--muted);
    background: var(--bg-soft); border-radius: var(--radius);
}

/* -------------------------------------------------- header */

.site-header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--line);
}
.site-header.is-scrolled { box-shadow: var(--shadow-sm); }

.header-inner { display: flex; align-items: center; justify-content: space-between; height: 76px; gap: 24px; }

.brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.brand-mark { width: 34px; height: 34px; flex-shrink: 0; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { font-size: 1.06rem; letter-spacing: -.03em; color: var(--navy); }
.brand-text small { font-size: .72rem; color: var(--muted); }

.site-nav { display: flex; align-items: center; gap: 6px; }
.site-nav > a {
    padding: 9px 14px; border-radius: 8px; font-size: .95rem;
    font-weight: 600; color: var(--ink-soft); transition: background .15s, color .15s;
}
.site-nav > a:hover { background: var(--bg-soft); color: var(--ink); }
.site-nav > a.is-active { color: var(--accent); background: var(--accent-soft); }
.nav-cta { margin-left: 10px; }
.site-nav > a.nav-cta.is-active { color: #fff; background: var(--accent); }

/* 메뉴가 12개라 넓지 않은 노트북에서는 헤더 한 줄이 꽉 찹니다.
   햄버거로 넘어가기 전 구간에서만 여백과 글자를 줄여 한 줄을 지킵니다. */
@media (min-width: 861px) and (max-width: 1400px) {
    .site-nav { gap: 3px; }
    .site-nav > a { padding: 9px 10px; font-size: .92rem; }
    .nav-cta { margin-left: 6px; }
}

.nav-toggle {
    display: none; width: 44px; height: 44px; border: 1px solid var(--line);
    border-radius: 10px; background: #fff; cursor: pointer;
    flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.nav-toggle span { display: block; width: 18px; height: 2px; background: var(--ink); border-radius: 2px; }

/* -------------------------------------------------- buttons */

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 22px; border: 1px solid transparent; border-radius: 9px;
    font-size: .95rem; font-weight: 700; cursor: pointer; text-align: center;
    transition: background .15s, color .15s, border-color .15s, transform .1s;
    white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }

.btn-outline { background: #fff; color: var(--navy); border-color: var(--line); }
.btn-outline:hover { border-color: var(--navy); }

.btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .4); }
.btn-ghost:hover { background: rgba(255, 255, 255, .12); }

.btn-danger { background: #fff; color: var(--danger); border-color: #f0cfcb; }
.btn-danger:hover { background: var(--danger); color: #fff; border-color: var(--danger); }

.btn-lg { padding: 15px 30px; font-size: 1rem; }
.btn-sm { padding: 9px 16px; font-size: .875rem; }
.btn-xs { padding: 6px 12px; font-size: .8rem; border-radius: 7px; }
.btn-block { display: flex; width: 100%; }

.link-arrow { font-weight: 700; color: var(--accent); font-size: .95rem; white-space: nowrap; }
.link-arrow:hover { text-decoration: underline; }

/* -------------------------------------------------- hero */

.hero {
    background: linear-gradient(168deg, #f7f9fc 0%, #eef2f9 55%, #e8eef8 100%);
    border-bottom: 1px solid var(--line);
    padding: 76px 0 0;
}
.hero-inner { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }

.hero-copy h1 {
    font-size: clamp(1.9rem, 4vw, 3rem);
    line-height: 1.28; margin-bottom: 24px; color: var(--navy);
}
.hero-copy h1 em { font-style: normal; color: var(--accent); }
.hero-lead { font-size: 1.06rem; color: var(--ink-soft); max-width: 620px; margin-bottom: 32px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.hero-card {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
    padding: 28px; box-shadow: var(--shadow-lg);
}
.verdict-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.verdict-badge { font-size: .74rem; font-weight: 700; letter-spacing: .1em; color: var(--muted); text-transform: uppercase; }
.verdict-result {
    font-size: .85rem; font-weight: 700; padding: 5px 12px; border-radius: 999px;
    background: #fdf3e6; color: var(--warn);
}
.verdict-list { border-top: 1px solid var(--line-soft); }
.verdict-list > div {
    display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
    padding: 12px 0; border-bottom: 1px solid var(--line-soft);
}
.verdict-list dt { font-size: .9rem; color: var(--muted); }
.verdict-list dd { font-weight: 700; font-variant-numeric: tabular-nums; }
.verdict-list .is-strong dt { color: var(--ink); font-weight: 600; }
.verdict-list .is-strong dd { color: var(--accent); font-size: 1.15rem; }
.verdict-note { margin-top: 18px; font-size: .88rem; color: var(--ink-soft); line-height: 1.6; }
.verdict-note strong { color: var(--danger); }
.verdict-disclaimer { margin-top: 12px; font-size: .76rem; color: var(--muted); }

.hero-stats {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
    margin-top: 64px; background: var(--line); border-top: 1px solid var(--line);
}
.hero-stats > div { background: #f7f9fc; padding: 26px 20px; text-align: center; }
.hero-stats strong { display: block; font-size: 1.75rem; color: var(--navy); letter-spacing: -.03em; }
.hero-stats span { display: block; font-size: .84rem; color: var(--muted); margin-top: 4px; }

/* -------------------------------------------------- cards */

.card {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
    padding: 28px; transition: border-color .15s, box-shadow .15s, transform .15s;
    display: flex; flex-direction: column;
}
a.card:hover { border-color: var(--accent); box-shadow: var(--shadow-md); transform: translateY(-2px); }

.card h3 { font-size: 1.1rem; margin-bottom: 10px; color: var(--navy); }
.card-body { font-size: .93rem; color: var(--ink-soft); flex: 1; }
.card-sub { font-size: .88rem; color: var(--accent); font-weight: 600; margin-bottom: 10px; }

.card-plain { background: var(--bg-soft); border-color: transparent; }
.card-plain h3 { margin-bottom: 12px; }
.card-plain p { font-size: .95rem; color: var(--ink-soft); }

.card-index {
    display: inline-block; font-size: .8rem; font-weight: 800; letter-spacing: .1em;
    color: var(--accent); margin-bottom: 14px;
}

.card-warn { border-left: 3px solid var(--gold); }
.card-warn h3 { color: var(--ink); }
.card-warn p { font-size: .93rem; color: var(--ink-soft); }

.card-meta { display: flex; gap: 14px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line-soft); }
.card-meta em { font-style: normal; font-weight: 700; font-size: .88rem; color: var(--navy); }
.card-meta i { font-style: normal; font-size: .84rem; color: var(--muted); }

.card-post time { display: block; margin-top: 16px; font-size: .82rem; color: var(--muted); }

.card-case-lg { padding: 32px; }
.card-case-lg h2 { font-size: 1.22rem; margin: 14px 0 12px; color: var(--navy); }
.card-case-lg h2 a:hover { color: var(--accent); }
.card-case-lg .link-arrow { margin-top: 20px; }

.tag-row { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
    display: inline-block; font-size: .76rem; font-weight: 700; padding: 4px 10px;
    border-radius: 999px; background: var(--accent-soft); color: var(--accent-dark);
}
.tag-muted { background: var(--bg-soft); color: var(--muted); }

.metric-inline { display: flex; align-items: baseline; gap: 8px; margin-top: 18px; }
.metric-inline strong { font-size: 1.15rem; color: var(--accent); }
.metric-inline small { font-size: .8rem; color: var(--muted); }

.metric-row { display: flex; flex-wrap: wrap; gap: 24px; margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line-soft); }
.metric strong { display: block; font-size: 1.3rem; color: var(--navy); letter-spacing: -.02em; }
.metric small { display: block; font-size: .8rem; color: var(--muted); margin-top: 2px; }

.metric-band { background: var(--navy); color: #fff; padding: 40px 0; }
.metric-band-inner { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.metric-band-5 { grid-template-columns: repeat(5, 1fr); }
.metric-lg strong { font-size: 1.9rem; color: #fff; }
.metric-lg small { color: rgba(255, 255, 255, .68); font-size: .88rem; }

/* -------------------------------------------------- formula */

.section-formula { background: var(--navy); color: #fff; }
.formula-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.formula-copy .eyebrow { color: #7fb0ff; }
.formula-copy h2 { font-size: clamp(1.6rem, 3vw, 2.15rem); margin-bottom: 20px; }
.formula-copy > p { color: rgba(255, 255, 255, .74); margin-bottom: 26px; }

.check-list { margin-bottom: 26px; }
.check-list li {
    position: relative; padding-left: 26px; margin-bottom: 12px;
    color: rgba(255, 255, 255, .84); font-size: .96rem;
}
.check-list li::before {
    content: ''; position: absolute; left: 0; top: .55em;
    width: 9px; height: 9px; border-radius: 2px; background: #7fb0ff;
}
.check-list strong { color: #fff; }
/* 밝은 배경에서 쓰일 때 */
.section:not(.section-formula) .check-list li { color: var(--ink-soft); }
.section:not(.section-formula) .check-list li::before { background: var(--accent); }
.formula-copy .link-arrow { color: #7fb0ff; }

.formula-box {
    margin: 0; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .14);
    border-radius: var(--radius-lg); padding: 44px 32px; text-align: center;
}
.formula-line { display: inline-flex; flex-direction: column; align-items: center; gap: 10px; }
.numerator, .denominator { font-size: 1.05rem; font-weight: 700; color: #fff; }
.denominator { color: #9fc4ff; }
.bar { display: block; width: 100%; height: 2px; background: rgba(255, 255, 255, .5); }
.formula-box figcaption { margin-top: 22px; font-size: 1.15rem; font-weight: 700; color: #7fb0ff; }

/* -------------------------------------------------- process */

.process-steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; }
.process-steps li {
    position: relative; padding: 26px 20px; background: var(--bg-soft);
    border-radius: var(--radius); border-top: 3px solid var(--accent);
}
.process-steps span { font-size: .78rem; font-weight: 800; letter-spacing: .1em; color: var(--accent); }
.process-steps h3 { font-size: 1rem; margin: 8px 0 8px; }
.process-steps p { font-size: .87rem; color: var(--ink-soft); }

.timeline { display: grid; gap: 4px; }
.timeline-item { display: grid; grid-template-columns: 92px 1fr; gap: 28px; padding: 32px 0; border-bottom: 1px solid var(--line); }
.timeline-item:last-child { border-bottom: 0; }
.timeline-num { font-size: 2.1rem; font-weight: 800; color: var(--line); letter-spacing: -.04em; line-height: 1; }
.timeline-body h2 { font-size: 1.3rem; margin-bottom: 10px; color: var(--navy); }
.timeline-body h2 small { font-size: .85rem; font-weight: 600; color: var(--muted); margin-left: 10px; }
.timeline-body > p { color: var(--ink-soft); margin-bottom: 16px; }

/* -------------------------------------------------- page head */

.page-head { padding: 72px 0 44px; background: var(--bg-soft); border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); color: var(--navy); }
.page-lead { margin-top: 18px; font-size: 1.03rem; color: var(--ink-soft); max-width: 760px; }
.page-head-detail .tag-row { margin-bottom: 16px; }

.breadcrumb { font-size: .84rem; color: var(--muted); margin-bottom: 18px; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span { margin: 0 6px; opacity: .5; }
.breadcrumb strong { color: var(--ink-soft); font-weight: 600; }

/* -------------------------------------------------- service list */

.service-list { display: grid; gap: 0; }
.service-row {
    display: grid; grid-template-columns: 60px 1fr 220px; gap: 28px;
    padding: 40px 0; border-bottom: 1px solid var(--line);
}
.service-row:first-child { padding-top: 0; }
.service-row-index { font-size: 1.5rem; font-weight: 800; color: var(--line); letter-spacing: -.04em; }
.service-row-main h2 { font-size: 1.35rem; color: var(--navy); margin-bottom: 8px; }
.service-row-main h2 a:hover { color: var(--accent); }
.service-row-sub { font-size: .92rem; color: var(--accent); font-weight: 600; margin-bottom: 14px; }
.service-row-summary { color: var(--ink-soft); margin-bottom: 18px; }
.service-row-side { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.side-item { font-size: .88rem; }
.side-item span { display: block; color: var(--muted); font-size: .8rem; }
.side-item strong { color: var(--navy); }

.deliverables { display: grid; gap: 7px; }
.deliverables li {
    position: relative; padding-left: 20px; font-size: .9rem; color: var(--ink-soft);
}
.deliverables li::before {
    content: ''; position: absolute; left: 0; top: .6em;
    width: 6px; height: 6px; border-radius: 50%; background: var(--accent); opacity: .55;
}
.deliverables .is-more { color: var(--muted); }
.deliverables-lg li { font-size: .98rem; padding-left: 24px; margin-bottom: 4px; }

.notice-box {
    margin-top: 48px; padding: 28px; background: var(--bg-soft);
    border-radius: var(--radius); border-left: 3px solid var(--gold);
}
.notice-box h3 { font-size: 1rem; margin-bottom: 10px; }
.notice-box p { font-size: .92rem; color: var(--ink-soft); }

/* -------------------------------------------------- detail */

.detail-grid { display: grid; grid-template-columns: 1fr 320px; gap: 56px; align-items: start; }
.detail-summary { font-size: 1.1rem; color: var(--navy); font-weight: 600; margin-bottom: 28px; line-height: 1.65; }
.detail-h2 { font-size: 1.25rem; margin: 40px 0 14px; color: var(--navy); display: flex; align-items: baseline; gap: 10px; }
.detail-sub { font-size: .98rem; color: var(--navy); margin: 26px 0 10px; }
.detail-sub small { font-weight: 400; color: var(--muted); margin-left: 6px; }
.detail-h2:first-child { margin-top: 0; }
.h2-num { font-size: .78rem; font-weight: 800; color: var(--accent); letter-spacing: .1em; }
.detail-image { width: 100%; border-radius: var(--radius); margin-bottom: 32px; }
.detail-disclaimer {
    margin-top: 44px; padding: 18px 20px; background: var(--bg-soft);
    border-radius: var(--radius); font-size: .84rem; color: var(--muted); line-height: 1.65;
}

.prose { color: var(--ink-soft); font-size: 1rem; line-height: 1.85; }
.prose-lg { font-size: 1.05rem; line-height: 1.95; }

.detail-side { position: sticky; top: 100px; display: grid; gap: 20px; }
.side-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px; }
.side-card-soft { background: var(--bg-soft); border-color: transparent; }
.side-card h3 { font-size: 1rem; margin-bottom: 16px; color: var(--navy); }
.side-card dl { margin-bottom: 20px; }
.side-card dl > div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line-soft); font-size: .9rem; }
.side-card dt { color: var(--muted); }
.side-card dd { font-weight: 700; color: var(--navy); text-align: right; }
.side-note { font-size: .85rem; color: var(--muted); margin-top: 12px; line-height: 1.6; }
.side-list li { padding: 9px 0; border-bottom: 1px solid var(--line-soft); font-size: .92rem; }
.side-list li:last-child { border-bottom: 0; }
.side-list a:hover { color: var(--accent); }
.side-check li { position: relative; padding-left: 22px; font-size: .9rem; color: var(--ink-soft); margin-bottom: 8px; }
.side-check li::before { content: '✓'; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
.side-card hr { border: 0; border-top: 1px solid var(--line-soft); margin: 18px 0; }

.axis-list li { display: grid; grid-template-columns: 92px 1fr; gap: 20px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.axis-list strong { color: var(--navy); }
.axis-list span { font-size: .92rem; color: var(--ink-soft); }

/* -------------------------------------------------- posts */

.list-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 36px; flex-wrap: wrap; }

/* 칩 묶음은 바로 아래 콘텐츠와 붙지 않도록 기본 여백을 둡니다.
   이미 여백을 가진 감싸개(.facet) 나 가로 정렬 툴바 안에서는 0 으로 되돌립니다. */
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.facet .filter-bar,
.list-toolbar .filter-bar,
.admin-toolbar .filter-bar { margin-bottom: 0; }
.chip {
    display: inline-flex; align-items: center; gap: 6px; padding: 8px 15px;
    border: 1px solid var(--line); border-radius: 999px; font-size: .89rem;
    font-weight: 600; color: var(--ink-soft); background: #fff; transition: all .15s;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip.is-active { background: var(--navy); border-color: var(--navy); color: #fff; }
.chip em { font-style: normal; font-size: .78rem; opacity: .65; }

.search-form { display: flex; gap: 8px; }
.search-form input {
    width: 220px; padding: 10px 14px; border: 1px solid var(--line);
    border-radius: 8px; background: #fff;
}
.search-form button {
    padding: 10px 18px; border: 1px solid var(--navy); background: var(--navy);
    color: #fff; border-radius: 8px; font-weight: 600; cursor: pointer;
}

.result-note { margin-bottom: 24px; color: var(--muted); font-size: .92rem; }

.post-list { border-top: 1px solid var(--line); }
.post-row {
    display: grid; grid-template-columns: 160px 1fr; gap: 32px;
    padding: 30px 0; border-bottom: 1px solid var(--line);
}
.post-row-meta { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.post-row-meta time { font-size: .84rem; color: var(--muted); }
.post-row-main h2 { font-size: 1.2rem; margin-bottom: 8px; color: var(--navy); }
.post-row-main h2 a:hover { color: var(--accent); }
.post-row-main p { font-size: .95rem; color: var(--ink-soft); }

.article-meta { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 20px; font-size: .88rem; color: var(--muted); }
.article-body { max-width: 800px; }
.article-excerpt {
    font-size: 1.08rem; font-weight: 600; color: var(--navy); line-height: 1.7;
    padding: 20px 24px; background: var(--bg-soft); border-left: 3px solid var(--accent);
    border-radius: 0 var(--radius) var(--radius) 0; margin-bottom: 34px;
}
.article-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 44px; }
.article-nav-item {
    padding: 20px; border: 1px solid var(--line); border-radius: var(--radius);
    transition: border-color .15s;
}
.article-nav-item:hover { border-color: var(--accent); }
.article-nav-item span { display: block; font-size: .78rem; color: var(--muted); margin-bottom: 6px; }
.article-nav-item strong { font-size: .95rem; color: var(--navy); }
.article-nav-item.is-next { text-align: right; }

/* -------------------------------------------------- forms */

.contact-grid { display: grid; grid-template-columns: 1fr 340px; gap: 56px; align-items: start; }
.contact-side { position: sticky; top: 100px; display: grid; gap: 20px; }
.contact-tel { display: block; font-size: 1.5rem; font-weight: 800; color: var(--navy); letter-spacing: -.02em; }

.form { display: grid; gap: 20px; }
.form-row { display: grid; gap: 20px; }
.form-row-2 { grid-template-columns: 1fr 1fr; }

.field { display: grid; gap: 7px; }
.field label { font-size: .9rem; font-weight: 600; color: var(--ink); }
.field label small { font-weight: 400; color: var(--muted); margin-left: 6px; }
.req { color: var(--danger); }

.field input[type=text], .field input[type=tel], .field input[type=email],
.field input[type=password], .field input[type=search], .field input[type=number],
.field input[type=date], .field input[type=datetime-local],
.field select, .field textarea {
    width: 100%; padding: 12px 14px; border: 1px solid var(--line);
    border-radius: 9px; background: #fff; transition: border-color .15s, box-shadow .15s;
}
.field textarea { resize: vertical; line-height: 1.7; }
.field input:focus, .field select:focus, .field textarea:focus {
    outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--danger); }
.field-error { font-size: .84rem; color: var(--danger); }

.checkbox { display: flex; align-items: flex-start; gap: 10px; font-size: .92rem; cursor: pointer; }
.checkbox input { margin-top: 4px; width: 17px; height: 17px; accent-color: var(--accent); flex-shrink: 0; }
.checkbox a { color: var(--accent); text-decoration: underline; }
.checkbox-sm { font-size: .85rem; margin: 8px 0; }

.privacy-consent { display: grid; gap: 14px; }
.privacy-box {
    padding: 18px 20px; background: var(--bg-soft); border-radius: var(--radius);
    font-size: .85rem; color: var(--ink-soft); line-height: 1.7; max-height: 190px; overflow-y: auto;
}
.privacy-box strong { color: var(--ink); }
.privacy-consent.has-error .privacy-box { border: 1px solid var(--danger); }

/* 허니팟: 화면과 스크린리더 모두에서 제외 */
.hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

.alert { padding: 16px 20px; border-radius: var(--radius); font-size: .92rem; margin-bottom: 24px; }
.alert-error { background: #fdeceb; color: #8c2f24; }
.alert-error ul { margin-top: 8px; }
.alert-error li { list-style: disc; margin-left: 18px; }
.alert-info { background: var(--accent-soft); color: var(--accent-dark); }

.flash-wrap { padding-top: 24px; }
.flash { padding: 14px 20px; border-radius: var(--radius); font-size: .92rem; margin-bottom: 12px; }
.flash-success { background: #e7f6f0; color: var(--success); }
.flash-error { background: #fdeceb; color: #8c2f24; }
.flash-info { background: var(--accent-soft); color: var(--accent-dark); }

.complete-card {
    text-align: center; padding: 56px 32px; background: var(--bg-soft);
    border-radius: var(--radius-lg);
}
.complete-icon {
    width: 62px; height: 62px; margin: 0 auto 24px; border-radius: 50%;
    background: var(--accent); color: #fff; font-size: 1.7rem;
    display: flex; align-items: center; justify-content: center;
}
.complete-card h1 { font-size: 1.6rem; margin-bottom: 14px; color: var(--navy); }
.complete-card > p { color: var(--ink-soft); margin-bottom: 26px; }
.complete-actions { display: flex; justify-content: center; gap: 12px; margin-top: 28px; flex-wrap: wrap; }

.error-card { text-align: center; padding: 40px 20px; }
.error-code { font-size: 4.5rem; font-weight: 800; color: var(--line); letter-spacing: -.05em; line-height: 1; }
.error-card h1 { font-size: 1.6rem; margin: 12px 0 12px; color: var(--navy); }
.error-card > p { color: var(--ink-soft); }

/* -------------------------------------------------- legal */

.legal h2 { font-size: 1.15rem; margin: 36px 0 12px; color: var(--navy); }
.legal p, .legal li { color: var(--ink-soft); font-size: .96rem; }
.legal ul, .legal ol { margin: 10px 0 0 20px; }
.legal li { list-style: disc; margin-bottom: 6px; }
.legal ol li { list-style: decimal; }

/* -------------------------------------------------- pagination */

.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 48px; }
.pagination a, .pagination span {
    min-width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--line); border-radius: 8px; font-size: .9rem; font-weight: 600;
    color: var(--ink-soft); background: #fff; padding: 0 10px;
}
.pagination a:hover { border-color: var(--accent); color: var(--accent); }
.pagination .is-current { background: var(--navy); border-color: var(--navy); color: #fff; }

/* -------------------------------------------------- badges (공개·관리자 공용) */

.badge {
    display: inline-block; padding: 4px 10px; border-radius: 999px;
    font-size: .76rem; font-weight: 700; white-space: nowrap;
}
.badge-new         { background: var(--accent-soft); color: var(--accent-dark); }
.badge-contacted   { background: #fdf3e6; color: var(--warn); }
.badge-in_progress { background: #eef0fd; color: #4a4fbe; }
.badge-done        { background: #e7f6f0; color: var(--success); }
.badge-closed      { background: #f0f2f5; color: var(--muted); }

/* -------------------------------------------------- 병원 찾기 */

.data-stats {
    display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 22px;
    font-size: .9rem; color: var(--ink-soft);
}
.data-stats strong { color: var(--navy); font-variant-numeric: tabular-nums; }
.data-stats .muted { color: var(--muted); }

.count {
    font-style: normal; color: var(--accent);
    font-variant-numeric: tabular-nums; margin-left: 4px;
}

.facet { margin-bottom: 24px; }
.facet-title { font-size: .82rem; font-weight: 700; color: var(--muted); margin-bottom: 12px; letter-spacing: .04em; }

.facet-form {
    display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end;
    padding: 20px; background: var(--bg-soft); border-radius: var(--radius); margin-bottom: 16px;
}
.facet-form .field { gap: 6px; min-width: 160px; }
.facet-form .field label { font-size: .8rem; color: var(--muted); }
.facet-form .field-grow { flex: 1; min-width: 220px; }
.facet-form select:disabled { background: #eef1f5; color: var(--muted); cursor: not-allowed; }
.facet-actions { display: flex; gap: 8px; }

.filter-bar-sub { margin-bottom: 22px; }
.chip-sm { padding: 6px 12px; font-size: .83rem; }

.map-wrap { margin: 8px 0 0; }
.map-canvas {
    width: 100%; height: 460px; border-radius: var(--radius-lg);
    border: 1px solid var(--line); background: var(--bg-soft); overflow: hidden;
}
/* 폭이 100% 가 되면서 지도가 가로로 길어지므로 높이도 함께 키웁니다. */
@media (min-width: 1400px) { .map-canvas { height: 560px; } }
@media (min-width: 1900px) { .map-canvas { height: 640px; } }

.map-note { margin-top: 10px; font-size: .84rem; color: var(--muted); line-height: 1.6; }
.map-note strong { color: var(--ink-soft); }

/* 지도 마커 클릭 시 뜨는 카드 (CustomOverlay) */
.map-card {
    position: relative; min-width: 220px; max-width: 280px; padding: 14px 16px 14px;
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow-lg); font-size: .86rem; line-height: 1.55;
}
.map-card::after {
    content: ''; position: absolute; left: 50%; bottom: -7px; transform: translateX(-50%);
    border-left: 7px solid transparent; border-right: 7px solid transparent;
    border-top: 7px solid #fff;
}
.map-card-close {
    position: absolute; top: 6px; right: 8px; border: 0; background: none;
    font-size: 1.1rem; line-height: 1; color: var(--muted); cursor: pointer; padding: 2px 4px;
}
.map-card-title { display: block; color: var(--navy); font-size: .95rem; padding-right: 18px; }
.map-card-meta  { display: block; color: var(--accent); font-size: .78rem; margin-top: 2px; }
.map-card-addr  { display: block; color: var(--ink-soft); font-size: .8rem; margin-top: 6px; }
.map-card-tel   { display: block; color: var(--ink-soft); font-size: .82rem; margin-top: 4px; }
.map-card-link  { display: inline-block; margin-top: 8px; color: var(--accent); font-weight: 700; font-size: .82rem; }

.hospital-list { border-top: 1px solid var(--line); }
.hospital-row {
    display: grid; grid-template-columns: 1fr 170px; gap: 20px; align-items: center;
    padding: 18px 12px; border-bottom: 1px solid var(--line-soft);
    margin: 0 -12px; border-radius: var(--radius); transition: background .12s;
}
.hospital-row[data-hospital-focus] { cursor: pointer; }
.hospital-row[data-hospital-focus]:hover { background: var(--bg-soft); }
.hospital-row.is-closed { opacity: .62; }
.hospital-main h3 { font-size: 1.02rem; color: var(--navy); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hospital-main h3 a:hover { color: var(--accent); }
.hospital-meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 6px; }
.hospital-addr { font-size: .88rem; color: var(--ink-soft); }
.hospital-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; text-align: right; }
.hospital-tel { font-weight: 700; color: var(--navy); font-size: .9rem; }
.hospital-opened, .hospital-nogeo { font-size: .78rem; color: var(--muted); }

.spec-dl { display: grid; gap: 0; }
.spec-dl > div {
    display: grid; grid-template-columns: 120px 1fr; gap: 16px;
    padding: 12px 0; border-bottom: 1px solid var(--line-soft); font-size: .94rem;
}
.spec-dl dt { color: var(--muted); }
.spec-dl dd { color: var(--ink); }
.spec-dl a { color: var(--accent); }

.nearby-list { border-top: 1px solid var(--line); }
.nearby-row {
    display: grid; grid-template-columns: 66px 1fr auto; gap: 16px; align-items: center;
    padding: 13px 10px; border-bottom: 1px solid var(--line-soft);
    margin: 0 -10px; border-radius: var(--radius); transition: background .12s;
}
.nearby-row:hover { background: var(--bg-soft); }
.nearby-dist {
    font-size: .84rem; font-weight: 700; color: var(--accent);
    font-variant-numeric: tabular-nums;
}
.nearby-body strong { display: block; font-size: .95rem; color: var(--navy); font-weight: 600; }
.nearby-body small { display: block; font-size: .8rem; color: var(--muted); margin-top: 2px; }

a.tag:hover { background: var(--accent); color: #fff; }

/* -------------------------------------------------- 상권분석 */

/* 표 — 공개(상권분석)와 관리자에서 함께 씁니다 */
.table-wrap { overflow-x: auto; margin: 0 -4px; }
.table { min-width: 620px; font-size: .9rem; }
.table th {
    text-align: left; font-size: .78rem; font-weight: 700; color: var(--muted);
    padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.table td { padding: 13px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.table tbody tr:hover { background: var(--bg-soft); }
.table a:hover { color: var(--accent); }
.table .nowrap { white-space: nowrap; }
.table .muted { color: var(--muted); }
.table .block { display: block; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table th.num { text-align: right; }

.bar-list { display: grid; gap: 9px; margin: 4px 0 18px; }
.bar-list li { display: grid; grid-template-columns: 86px 1fr 130px; gap: 14px; align-items: center; }
.bar-label { font-size: .86rem; color: var(--ink-soft); }
.bar-track { display: block; height: 14px; background: var(--bg-soft); border-radius: 999px; overflow: hidden; }
.bar-track i { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.bar-value { font-size: .86rem; text-align: right; font-variant-numeric: tabular-nums; color: var(--navy); font-weight: 600; }
.bar-value small { color: var(--muted); font-weight: 400; }
.bar-list-year .bar-track i { background: var(--gold); }

/* 과목 배후수요에 해당하는 연령 구간 — 나머지와 확실히 갈라 보이게 합니다. */
.bar-list li.is-focus .bar-label { color: var(--accent); font-weight: 700; }
.bar-list li.is-focus .bar-track { background: var(--accent-soft); }
.bar-list li.is-focus .bar-value { color: var(--accent); }
/* 강조 구간이 있는 목록에서만 나머지를 흐리게 합니다(개원 추이 등 다른 막대는 그대로). */
.bar-list:has(li.is-focus) li:not(.is-focus) .bar-track i { opacity: .45; }

/* 지도 위 시군구 밀도 라벨 */
.map-region {
    display: block; min-width: 74px; padding: 7px 10px; text-align: center;
    background: #fff; border: 1px solid var(--line); border-radius: 10px;
    box-shadow: var(--shadow-md); transition: transform .12s, border-color .12s;
}
.map-region:hover { transform: translateY(-2px); border-color: var(--accent); }
.map-region strong { display: block; font-size: .78rem; color: var(--navy); line-height: 1.2; }
.map-region span { display: block; font-size: 1.05rem; font-weight: 800; color: var(--accent); line-height: 1.25; }
.map-region em { display: block; font-style: normal; font-size: .68rem; color: var(--muted); }
.map-region.is-high { border-color: #e0b48a; background: #fff8f0; }
.map-region.is-high span { color: var(--warn); }
.map-region.is-low { border-color: #9fc9b6; background: #f2fbf7; }
.map-region.is-low span { color: var(--success); }
.map-region.is-focus {
    border: 2px solid var(--navy); box-shadow: 0 0 0 4px rgba(29,95,209,.22), var(--shadow-lg);
    z-index: 5;
}

/* -------------------------------------------------- 매물 카드 */

.card-listing { padding: 0; overflow: hidden; }
.listing-thumb { width: 100%; height: 160px; object-fit: cover; background: var(--bg-soft); }
.card-listing > .tag-row { padding: 18px 20px 0; }
.card-listing h3 { padding: 0 20px; margin: 10px 0 6px; font-size: 1.05rem; }
.listing-addr { padding: 0 20px; font-size: .86rem; color: var(--muted); }
.listing-price {
    padding: 12px 20px 0; font-size: .9rem; color: var(--ink-soft);
    display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px;
}
.listing-price strong { color: var(--navy); font-size: 1.02rem; }
.listing-price small { color: var(--muted); font-size: .8rem; width: 100%; }
.listing-meta {
    display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 20px 18px; margin-top: auto;
}
.listing-meta i {
    font-style: normal; font-size: .78rem; color: var(--ink-soft);
    background: var(--bg-soft); padding: 3px 9px; border-radius: 999px;
}

/* -------------------------------------------------- 밀집 블록 지도 오버레이 */

/* 블록 원 한가운데 놓이는 병원 수 */
.block-badge {
    display: inline-block; transform: translateX(-50%);
    padding: 3px 9px; border-radius: 999px;
    background: rgba(192, 57, 43, .92); color: #fff;
    font-size: .8rem; font-weight: 700; font-variant-numeric: tabular-nums;
    white-space: nowrap; box-shadow: var(--shadow-sm);
}

/* 3곳 이상 입점한 건물 — 눌러야 주소가 펼쳐집니다 */
.bld-pin { display: flex; flex-direction: column; align-items: center; gap: 4px; transform: translateX(-50%); }
.bld-dot {
    width: 24px; height: 24px; border-radius: 50%; cursor: pointer;
    border: 2px solid #fff; background: var(--accent); color: #fff;
    font-size: .74rem; font-weight: 700; line-height: 1;
    display: flex; align-items: center; justify-content: center;
    box-shadow: var(--shadow-sm);
}
.bld-dot:hover { background: var(--accent-dark); }
.bld-label {
    max-width: 220px; padding: 5px 10px; border-radius: 7px;
    background: #fff; border: 1px solid var(--line);
    font-size: .78rem; color: var(--ink); line-height: 1.4;
    box-shadow: var(--shadow-md); text-align: center;
}

/* -------------------------------------------------- 행사 목록 */

.event-list { border-top: 1px solid var(--line); }
.event-row {
    display: grid; grid-template-columns: 84px 1fr 132px; gap: 24px; align-items: start;
    padding: 22px 12px; margin: 0 -12px;
    border-bottom: 1px solid var(--line-soft); border-radius: var(--radius);
    transition: background .12s;
}
.event-row:hover { background: var(--bg-soft); }

/* 날짜 블록 — 달력 한 칸처럼 */
.event-date {
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: 10px 6px; background: var(--bg-soft);
    border: 1px solid var(--line-soft); border-radius: var(--radius);
    line-height: 1.2;
}
.event-month { font-size: .74rem; color: var(--muted); font-weight: 600; }
.event-date strong { font-size: 1.5rem; color: var(--navy); letter-spacing: -.03em; }
.event-dow { font-size: .74rem; color: var(--muted); }

.event-main h2 { font-size: 1.08rem; color: var(--navy); margin: 10px 0 6px; }
.event-main h2 a:hover { color: var(--accent); }
.event-summary { font-size: .92rem; color: var(--ink-soft); }
.event-meta { margin-top: 8px; font-size: .84rem; color: var(--muted); }

.event-side { display: flex; flex-direction: column; align-items: stretch; gap: 8px; text-align: center; }
.event-fee { font-size: .86rem; font-weight: 700; color: var(--navy); }

/* 선택한 지역 요약 띠 */
.focus-strip {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    flex-wrap: wrap; padding: 14px 18px; margin-bottom: 20px;
    background: var(--navy); color: #fff; border-radius: var(--radius);
}
.focus-main { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.focus-tag {
    font-size: .72rem; font-weight: 700; letter-spacing: .08em;
    background: rgba(255,255,255,.16); padding: 3px 9px; border-radius: 999px;
}
.focus-main > strong { font-size: 1.15rem; }
.focus-sub { font-size: .88rem; color: rgba(255,255,255,.78); }
.focus-sub b { color: #fff; font-variant-numeric: tabular-nums; }
.focus-sub b.is-high { color: #ffb27a; }
.focus-sub b.is-low { color: #8fe3c0; }
.focus-actions { display: flex; gap: 8px; flex-wrap: wrap; }
/* 남색 띠 위라서 기본 outline 버튼(흰 배경)은 튑니다. 테두리만 남깁니다. */
.focus-actions .btn-outline { background: transparent; color: #fff; border-color: rgba(255,255,255,.45); }
.focus-actions .btn-outline:hover { background: rgba(255,255,255,.14); border-color: #fff; }

.table tr.is-focus { background: var(--accent-soft); }
.table tr.is-focus td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.table tr.is-focus:hover { background: #dfeafd; }

.section-data .hero-stats { background: transparent; gap: 16px; }
.section-data .hero-stats > div { background: #fff; border-radius: var(--radius); border: 1px solid var(--line); }

.card-data { background: #fff; }
.card-data .card-index {
    display: inline-block; padding: 4px 10px; border-radius: 999px;
    background: var(--accent-soft); color: var(--accent-dark); font-size: .76rem; letter-spacing: 0;
}
.card-data h3 { font-size: 1.2rem; margin: 14px 0 10px; }
.card-data .card-body { font-size: .95rem; }
.card-data .card-meta { border-top: 0; padding-top: 12px; }
.card-data .card-meta em { font-style: normal; font-size: .82rem; color: var(--muted); font-weight: 500; }
.card-data .link-arrow { margin-top: 14px; }

/* -------------------------------------------------- 도움말 */

.help-box {
    border: 1px solid var(--line); border-radius: var(--radius);
    background: #fff; margin-bottom: 22px; overflow: hidden;
}
.help-box > summary {
    display: flex; align-items: center; gap: 10px; padding: 13px 18px;
    cursor: pointer; list-style: none; font-size: .92rem; color: var(--ink-soft);
}
.help-box > summary::-webkit-details-marker { display: none; }
.help-box > summary strong { color: var(--navy); font-size: .95rem; }
.help-icon {
    width: 20px; height: 20px; border-radius: 50%; background: var(--accent);
    color: #fff; font-size: .78rem; font-weight: 800;
    display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.help-toggle { margin-left: auto; font-size: .84rem; color: var(--accent); font-weight: 600; }
.help-box[open] .help-toggle::after { content: ' ▲'; }
.help-box:not([open]) .help-toggle::after { content: ' ▼'; }
.help-box[open] .help-toggle { font-size: 0; }
.help-box[open] .help-toggle::after { content: '접기 ▲'; font-size: .84rem; }

.help-body { padding: 4px 18px 18px; border-top: 1px solid var(--line-soft); }
.help-list { display: grid; gap: 0; }
.help-list > div {
    display: grid; grid-template-columns: 190px 1fr; gap: 18px;
    padding: 11px 0; border-bottom: 1px solid var(--line-soft);
}
.help-list > div:last-child { border-bottom: 0; }
.help-list dt { font-size: .88rem; font-weight: 700; color: var(--navy); }
.help-list dd { font-size: .9rem; color: var(--ink-soft); line-height: 1.65; }
.help-list code {
    background: var(--bg-soft); padding: 1px 6px; border-radius: 4px;
    font-size: .86em; color: var(--accent-dark);
}
.help-note {
    margin-top: 14px; padding: 12px 14px; background: var(--bg-soft);
    border-radius: var(--radius); font-size: .86rem; color: var(--muted); line-height: 1.65;
}

/* -------------------------------------------------- 지도 범례 */

.map-legend { margin-top: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.legend-head {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    padding: 12px 16px; border-bottom: 1px solid var(--line-soft);
}
.legend-head strong { font-size: .9rem; color: var(--navy); }
.legend-head span { font-size: .82rem; color: var(--muted); }
.legend-reset {
    margin-left: auto; border: 1px solid var(--line); background: #fff;
    border-radius: 7px; padding: 5px 12px; font-size: .82rem; cursor: pointer; color: var(--ink-soft);
}
.legend-reset:hover { border-color: var(--accent); color: var(--accent); }

.legend-items { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 16px; }
.legend-item {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 5px 12px 5px 6px; border: 1px solid var(--line); border-radius: 999px;
    background: #fff; cursor: pointer; transition: all .12s;
}
.legend-item:hover { border-color: var(--accent); }
.legend-item svg { display: block; flex-shrink: 0; }
.legend-name { font-size: .86rem; color: var(--ink); font-weight: 600; }
.legend-count { font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.legend-item.is-off { opacity: .38; background: var(--bg-soft); }
.legend-item.is-off .legend-name { text-decoration: line-through; }

.legend-dot {
    display: inline-block; width: 10px; height: 10px; border-radius: 3px;
    margin: 0 3px 0 12px; vertical-align: middle; border: 1px solid var(--line);
}
.legend-dot.is-low  { background: #f2fbf7; border-color: #9fc9b6; }
.legend-dot.is-mid  { background: #fff; }
.legend-dot.is-high { background: #fff8f0; border-color: #e0b48a; }

.scope-notice {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 12px 18px; margin-bottom: 18px; flex-wrap: wrap;
    background: var(--accent-soft); border-radius: var(--radius);
    font-size: .9rem; color: var(--accent-dark);
}

/* -------------------------------------------------- cta band */

.cta-band { background: var(--navy); color: #fff; padding: 56px 0; }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.cta-inner h2 { font-size: 1.5rem; margin-bottom: 8px; }
.cta-inner p { color: rgba(255, 255, 255, .72); font-size: .96rem; }
.cta-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* -------------------------------------------------- footer */

.site-footer { background: #08121f; color: rgba(255, 255, 255, .68); padding: 64px 0 28px; font-size: .9rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 40px; }
.footer-brand strong { display: block; color: #fff; font-size: 1.05rem; margin-bottom: 8px; }
.footer-brand p { margin-bottom: 14px; }
.footer-note { font-size: .8rem; color: rgba(255, 255, 255, .44); line-height: 1.65; }
.footer-creds { font-size: .82rem; color: #7fb0ff; margin-bottom: 12px; }
.footer-col h3 { font-size: .84rem; color: #fff; margin-bottom: 14px; letter-spacing: .04em; }
.footer-col li { margin-bottom: 8px; }
.footer-col a:hover { color: #fff; text-decoration: underline; }
.footer-cta { color: #7fb0ff !important; font-weight: 600; }
.footer-meta li { font-size: .82rem; color: rgba(255, 255, 255, .5); }
.footer-bottom {
    display: flex; justify-content: space-between; align-items: center; gap: 20px;
    margin-top: 48px; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, .1);
    font-size: .82rem; color: rgba(255, 255, 255, .45); flex-wrap: wrap;
}
.footer-links { display: flex; gap: 18px; }
.footer-links a:hover { color: #fff; }

/* -------------------------------------------------- responsive */

@media (max-width: 1024px) {
    .section { padding: 68px 0; }
    .hero-inner, .formula-grid, .two-col, .detail-grid, .contact-grid { grid-template-columns: 1fr; gap: 40px; }
    .detail-side, .contact-side { position: static; }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .process-steps { grid-template-columns: repeat(2, 1fr); }
    .hero-stats { grid-template-columns: repeat(2, 1fr); }
    .service-row { grid-template-columns: 44px 1fr; }
    .service-row-side { grid-column: 2; flex-direction: row; align-items: center; flex-wrap: wrap; gap: 20px; }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
    .nav-toggle { display: flex; }
    .site-nav {
        position: absolute; top: 76px; left: 0; right: 0;
        flex-direction: column; align-items: stretch; gap: 2px;
        background: #fff; border-bottom: 1px solid var(--line);
        padding: 12px 20px 20px; box-shadow: var(--shadow-md);
        display: none;
        /* 메뉴가 12개라 가로 모드 폰에서는 화면을 넘깁니다. */
        max-height: calc(100vh - 76px); overflow-y: auto;
        overscroll-behavior: contain;
    }
    .site-nav.is-open { display: flex; }
    .nav-cta { margin: 8px 0 0; }
}

@media (max-width: 720px) {
    body { font-size: 15px; }
    .section { padding: 52px 0; }
    .section-center { padding: 72px 0; }
    .container { padding: 0 18px; }
    .hero { padding-top: 48px; }
    .grid-2, .grid-3, .metric-band-inner, .article-nav { grid-template-columns: 1fr; }
    .process-steps { grid-template-columns: 1fr; }
    .form-row-2 { grid-template-columns: 1fr; }
    .section-head-row { flex-direction: column; align-items: flex-start; }
    .post-row { grid-template-columns: 1fr; gap: 12px; }
    .post-row-meta { flex-direction: row; align-items: center; gap: 12px; }
    .timeline-item { grid-template-columns: 1fr; gap: 10px; }
    .timeline-num { font-size: 1.4rem; }
    .footer-grid { grid-template-columns: 1fr; gap: 28px; }
    .list-toolbar { flex-direction: column; align-items: stretch; }
    .search-form input { width: 100%; }
    .article-nav-item.is-next { text-align: left; }
    .card, .card-case-lg { padding: 22px; }

    .map-canvas { height: 340px; }
    .facet-form { padding: 16px; gap: 12px; }
    .facet-form .field, .facet-form .field-grow { min-width: 100%; }
    .facet-actions { width: 100%; }
    .facet-actions .btn { flex: 1; }
    /* 목록은 구분선 행 대신 카드 하나씩 — 손가락으로 훑기 좋게 */
    .hospital-list, .event-list { border-top: 0; }
    .hospital-row, .event-row {
        grid-template-columns: 1fr; gap: 10px;
        margin: 0 0 10px; padding: 16px;
        border: 1px solid var(--line); border-radius: var(--radius);
        background: #fff; box-shadow: var(--shadow-sm);
    }
    .hospital-row:hover, .event-row:hover { background: #fff; }
    .hospital-side { flex-direction: row; align-items: center; justify-content: flex-start; gap: 14px; text-align: left; }

    /* 날짜 칸은 카드 위쪽에 가로 한 줄로 */
    .event-date {
        flex-direction: row; align-items: baseline; gap: 8px;
        padding: 6px 12px; align-self: start;
    }
    .event-date strong { font-size: 1.1rem; }
    .event-main h2 { margin-top: 0; }
    .event-side { flex-direction: row; align-items: center; gap: 12px; text-align: left; }
    .event-side .btn { margin-left: auto; }
    .nearby-row { grid-template-columns: 60px 1fr; }
    .nearby-row .tag { grid-column: 2; justify-self: start; }
    .spec-dl > div { grid-template-columns: 92px 1fr; gap: 12px; font-size: .9rem; }
    .data-stats { gap: 6px 16px; font-size: .84rem; }
}

/* ==========================================================================
   모바일 최적화
   ========================================================================== */

@media (max-width: 860px) {
    /* 헤더를 낮춰 화면을 더 확보합니다 */
    .header-inner { height: 62px; }
    .site-nav { top: 62px; max-height: calc(100vh - 62px); overflow-y: auto; }
    .site-nav > a { padding: 13px 14px; font-size: 1rem; }
    .brand-text small { display: none; }
    .brand-mark { width: 30px; height: 30px; }

    /* 터치 목표를 44px 이상으로 */
    .chip, .legend-item { min-height: 40px; }
    .btn { min-height: 42px; }
    .btn-xs, .btn-sm { min-height: 38px; }
}

@media (max-width: 720px) {
    /* iOS 는 16px 미만 입력에서 화면을 확대합니다 */
    .field input, .field select, .field textarea,
    .search-form input, .search-form select { font-size: 16px; }

    .metric-band { padding: 28px 0; }
    .metric-band-inner, .metric-band-5 { grid-template-columns: repeat(2, 1fr); gap: 18px; }
    .metric-lg strong { font-size: 1.45rem; }
    .metric-lg small { font-size: .8rem; }

    /* 도움말: 용어/설명 2단 → 1단 */
    .help-box > summary { padding: 12px 14px; }
    .help-body { padding: 4px 14px 16px; }
    .help-list > div { grid-template-columns: 1fr; gap: 4px; padding: 12px 0; }
    .help-list dt { font-size: .9rem; }

    /* 막대 그래프 */
    .bar-list li { grid-template-columns: 62px 1fr 92px; gap: 10px; }
    .bar-label, .bar-value { font-size: .8rem; }

    .axis-list li { grid-template-columns: 1fr; gap: 4px; }
    .axis-list strong { color: var(--navy); }

    /* 범례 */
    .legend-head { padding: 10px 12px; gap: 8px; }
    .legend-head span { width: 100%; order: 3; }
    .legend-reset { margin-left: 0; }
    .legend-items { padding: 12px; gap: 6px; }
    .legend-name { font-size: .82rem; }

    /* 지도 라벨은 작게 */
    .map-region { min-width: 60px; padding: 5px 7px; }
    .map-region strong { font-size: .7rem; }
    .map-region span { font-size: .92rem; }
    .map-region em { font-size: .62rem; }

    .map-card { min-width: 190px; max-width: 240px; }

    .scope-notice { padding: 12px 14px; font-size: .86rem; }
    .scope-notice .btn { width: 100%; }

    .notice-box { padding: 20px 16px; }
    .complete-card { padding: 40px 20px; }
}

/*
 * 컬럼이 많은 표는 가로 스크롤이 유일한 해법입니다.
 * 첫 칸을 고정해 어느 지역·기관 행인지 놓치지 않게 하고,
 * 오른쪽 끝에 그림자를 둬서 "더 있다"는 것을 알립니다.
 */
@media (max-width: 720px) {
    .table-wrap {
        position: relative;
        -webkit-overflow-scrolling: touch;
        background:
            linear-gradient(to right, #fff 30%, rgba(255,255,255,0)) left center / 24px 100% no-repeat,
            linear-gradient(to left,  #fff 30%, rgba(255,255,255,0)) right center / 24px 100% no-repeat,
            radial-gradient(farthest-side at 0 50%, rgba(11,27,51,.14), transparent) left center / 12px 100% no-repeat,
            radial-gradient(farthest-side at 100% 50%, rgba(11,27,51,.14), transparent) right center / 12px 100% no-repeat;
        background-attachment: local, local, scroll, scroll;
    }
    .table { min-width: 560px; font-size: .85rem; }
    .table th, .table td { padding: 10px 8px; }

    .table th:first-child,
    .table td:first-child {
        position: sticky; left: 0; z-index: 2;
        background: #fff;
        box-shadow: 1px 0 0 var(--line-soft);
    }
    .table tbody tr:hover td:first-child { background: var(--bg-soft); }

    /* 카드형 목록 — 표를 가로로 밀지 않고 세로로 훑도록 행 하나를 카드 하나로 바꿉니다.
       각 칸의 제목은 td[data-label] 에서 가져옵니다. */
    .table-wrap.is-cards { overflow-x: visible; background: none; margin: 0; }
    .table-cards { min-width: 0; width: 100%; display: block; font-size: .88rem; }
    .table-cards thead { display: none; }
    .table-cards tbody { display: block; }

    .table-cards tr {
        display: block;
        border: 1px solid var(--line);
        border-radius: var(--radius);
        background: #fff;
        box-shadow: var(--shadow-sm);
        padding: 4px 14px 10px;
        margin-bottom: 10px;
    }
    .table-cards tbody tr:hover { background: #fff; }
    .table-cards tr.is-focus { border-color: var(--accent); background: var(--accent-soft); }
    .table-cards tr.is-focus:hover { background: var(--accent-soft); }
    .table-cards tr.is-focus td:first-child { box-shadow: none; }

    .table-cards td {
        display: flex; align-items: center; justify-content: space-between; gap: 12px;
        padding: 7px 0; border-bottom: 1px solid var(--line-soft);
        text-align: left;
    }
    .table-cards td:last-child { border-bottom: 0; padding-bottom: 0; }
    .table-cards td::before {
        content: attr(data-label);
        flex: 0 0 auto;
        font-size: .78rem; font-weight: 600; color: var(--muted);
    }
    .table-cards td.num { text-align: right; white-space: normal; }
    /* 카드 안에서는 폭 제약이 없으니 줄바꿈을 막을 이유가 없습니다. */
    .table-cards td.nowrap { white-space: normal; }
    /* 값이 비면 라벨만 남으므로 칸째 숨깁니다. */
    .table-cards td:empty,
    .table-cards td[data-label=""]:not(:first-child) { display: none; }

    /* 첫 칸은 카드 제목입니다. 라벨을 숨기고 한 줄 전체를 씁니다. */
    .table-cards td:first-child {
        position: static; display: block;
        padding: 10px 0 8px; font-size: 1rem;
        background: none; box-shadow: none;
        border-bottom: 1px solid var(--line);
    }
    .table-cards td:first-child::before { content: none; }
    .table-cards tbody tr:hover td:first-child { background: none; }

    /* 버튼만 든 칸은 라벨 없이 카드 하단 액션 영역으로 */
    .table-cards td.actions { justify-content: flex-end; padding-top: 10px; }
    .table-cards td.actions::before { content: none; }
    .table-cards td.actions .btn { flex: 1; text-align: center; }
}

@media (max-width: 560px) {
    .container { padding: 0 14px; }
    .section { padding: 44px 0; }
    .page-head { padding: 40px 0 30px; }
    .page-head h1 { font-size: 1.45rem; }
    .page-lead { font-size: .95rem; }

    .hero { padding-top: 34px; }
    .hero-copy h1 { font-size: 1.6rem; }
    .hero-actions .btn { width: 100%; }
    .hero-stats { grid-template-columns: 1fr 1fr; }
    .hero-stats > div { padding: 18px 12px; }
    .hero-stats strong { font-size: 1.35rem; }
    .hero-card { padding: 20px; }

    .section-head h2 { font-size: 1.35rem; }
    .detail-h2 { font-size: 1.1rem; }

    .map-canvas { height: 300px; }

    .metric-band-inner, .metric-band-5 { grid-template-columns: 1fr 1fr; }

    /* 칩이 너무 많아 화면을 덮지 않도록 가로 스크롤로 */
    .facet .filter-bar {
        flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px;
        -webkit-overflow-scrolling: touch; scrollbar-width: thin;
    }
    .facet .filter-bar .chip { flex-shrink: 0; }

    .filter-bar-sub { flex-wrap: wrap; overflow: visible; }

    .verdict-list > div { padding: 10px 0; }
    .verdict-list dt, .verdict-list dd { font-size: .86rem; }

    .footer-bottom { flex-direction: column; align-items: flex-start; gap: 10px; }
    .footer-links { flex-wrap: wrap; gap: 12px; }
}
