/* 버버법 — 차분하고 믿음 가는 법률 자료 화면. 남색(--brand)·먹색 글자·흰 바탕, 장식 최소 */
/* 11-26 글꼴 통일: Pretendard(OFL, 2,350자 고정 굵기 판)를 우리 서버에서 — 없으면 PC마다 맑은 고딕·애플 고딕으로 달라 보였음 */
@font-face { font-family: Pretendard; font-weight: 400; font-display: swap; src: local('Pretendard Regular'), url(/fonts/Pretendard-Regular.subset.woff2) format('woff2'); }
@font-face { font-family: Pretendard; font-weight: 500; font-display: swap; src: local('Pretendard Medium'), url(/fonts/Pretendard-Medium.subset.woff2) format('woff2'); }
@font-face { font-family: Pretendard; font-weight: 600; font-display: swap; src: local('Pretendard SemiBold'), url(/fonts/Pretendard-SemiBold.subset.woff2) format('woff2'); }
@font-face { font-family: Pretendard; font-weight: 700; font-display: swap; src: local('Pretendard Bold'), url(/fonts/Pretendard-Bold.subset.woff2) format('woff2'); }
@font-face { font-family: Pretendard; font-weight: 800; font-display: swap; src: local('Pretendard ExtraBold'), url(/fonts/Pretendard-ExtraBold.subset.woff2) format('woff2'); }
:root {
  --brand: #16324f; --brand-2: #234b74; --accent: #8a6a2f;
  --ink: #1b1f24; --ink-2: #3a424c; --muted: #5d6773; --line: #dfe3e8; --line-2: #eceff3;
  --bg: #ffffff; --panel: #f6f7f9; --panel-2: #eef1f5; --hl: #fff3c4;
  --ok: #1d6b3a; --warn: #8a5a00; --err: #a32020; --info: #1f4f86;
  --link: #1a4f8b; --link-v: #5b3f8c;
  --radius: 10px; --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 2px 8px rgba(16, 24, 40, .05);
  --font: Pretendard, "Apple SD Gothic Neo", "Malgun Gothic", "맑은 고딕", "Noto Sans KR", system-ui, -apple-system, sans-serif;
  --serif: "Noto Serif KR", "Nanum Myeongjo", "Batang", serif;
  --fs-xs: .78rem; --fs-sm: .875rem; --fs: 1rem; --fs-md: 1.0625rem; --fs-lg: 1.25rem; --fs-xl: 1.6rem; --fs-2xl: 2.2rem;
  --maxw: 1240px;
  color-scheme: light;
}
[data-theme="dark"] {
  --brand: #9cc0e8; --brand-2: #b9d3ef; --accent: #d7b46a;
  --ink: #e6e9ee; --ink-2: #c9ced6; --muted: #9aa3ae; --line: #343b45; --line-2: #2a3038;
  --bg: #14181d; --panel: #1b2027; --panel-2: #222832; --hl: #4a4220;
  --ok: #6fcf8f; --warn: #e8b85c; --err: #ff8a8a; --info: #8ab6ea; --link: #9cc4f0; --link-v: #c3a7ee;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: var(--fs); line-height: 1.65; color: var(--ink); background: var(--bg); word-break: keep-all; overflow-wrap: break-word; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid #f2b705; outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, h4 { line-height: 1.35; margin: 0 0 .6em; color: var(--ink); }
h1 { font-size: var(--fs-xl); } h2 { font-size: var(--fs-lg); } h3 { font-size: var(--fs-md); }
p { margin: 0 0 .8em; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--brand); color: #fff; padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }
.muted { color: var(--muted); } .small { font-size: var(--fs-sm); } .xs { font-size: var(--fs-xs); }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; } .grow { flex: 1; } .right { margin-left: auto; }
.stack > * + * { margin-top: 12px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }

/* ── 머리 ── */
.top { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--bg) 94%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top-in { max-width: var(--maxw); margin: 0 auto; padding: 10px 20px; display: flex; align-items: center; gap: 18px; }
.brand { display: flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 800; letter-spacing: -.02em; flex: none; }
.brand:hover { text-decoration: none; }
.mark { width: 30px; height: 30px; border-radius: 8px; background: var(--brand); color: #fff; display: grid; place-items: center; font-size: 16px; font-weight: 800; }
[data-theme="dark"] .mark { color: #14181d; }
.word { font-size: 1.2rem; }
.topsearch { flex: 1; max-width: 560px; display: flex; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); overflow: hidden; min-width: 0; }
.topsearch input { flex: 1 1 auto; width: 0; min-width: 0; border: 0; padding: 9px 16px; font: inherit; background: transparent; color: var(--ink); }
.topsearch input:focus { outline: none; } .topsearch:focus-within { border-color: var(--brand-2); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-2) 18%, transparent); }
.topsearch button { border: 0; background: transparent; color: var(--muted); padding: 0 14px; cursor: pointer; }
body.home .topsearch { visibility: hidden; }
.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav a { color: var(--ink-2); padding: 6px 10px; border-radius: 8px; font-size: var(--fs-sm); white-space: nowrap; }
.nav a:hover { background: var(--panel); text-decoration: none; }
.when-in, .when-admin { display: none !important; } body.signed-in .when-in { display: inline-block !important; } body.signed-in .when-out { display: none !important; } body.is-admin .when-admin { display: inline-block !important; }
.iconbtn { border: 1px solid var(--line); background: var(--bg); color: var(--ink-2); width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; cursor: pointer; }
#notice-bar { background: var(--panel-2); border-bottom: 1px solid var(--line); font-size: var(--fs-sm); }
#notice-bar .in { max-width: var(--maxw); margin: 0 auto; padding: 8px 20px; }

main { min-height: 60vh; }
.page { max-width: var(--maxw); margin: 0 auto; padding: 24px 20px 48px; }
.page.narrow { max-width: 820px; }

/* ── 단추·입력 ── */
.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); padding: 7px 14px; border-radius: 8px; font: inherit; font-size: var(--fs-sm); cursor: pointer; line-height: 1.3; min-height: 36px; }
.btn:hover { background: var(--panel); text-decoration: none; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; } [data-theme="dark"] .btn.primary { color: #14181d; }
.btn.primary:hover { background: var(--brand-2); }
.btn.sm { padding: 4px 10px; min-height: 30px; font-size: var(--fs-xs); }
.btn.danger { color: var(--err); border-color: color-mix(in srgb, var(--err) 40%, var(--line)); }
.btn[aria-pressed="true"] { background: var(--panel-2); border-color: var(--brand-2); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
input[type=text], input[type=email], input[type=password], input[type=search], input[type=date], input[type=number], select, textarea {
  font: inherit; font-size: 16px; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; max-width: 100%; }
textarea { width: 100%; min-height: 110px; }
label { font-size: var(--fs-sm); color: var(--ink-2); }
.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.field input, .field select, .field textarea { width: 100%; }

/* ── 꼬리표·칩 ── */
.tag { display: inline-block; font-size: var(--fs-xs); padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-2); background: var(--panel); white-space: nowrap; }
.tag.cur { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, var(--line)); background: color-mix(in srgb, var(--ok) 8%, var(--bg)); }
.tag.old { color: var(--muted); } .tag.fut { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, var(--line)); background: color-mix(in srgb, var(--warn) 8%, var(--bg)); }
.tag.kind { color: var(--brand); border-color: color-mix(in srgb, var(--brand) 35%, var(--line)); background: color-mix(in srgb, var(--brand) 6%, var(--bg)); }
.tag.gen { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); background: color-mix(in srgb, var(--accent) 8%, var(--bg)); }
.tag.res { font-weight: 600; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); background: var(--bg); color: var(--ink-2); padding: 4px 12px; border-radius: 999px; font: inherit; font-size: var(--fs-sm); cursor: pointer; white-space: nowrap; }
.chip:hover { background: var(--panel); text-decoration: none; }
.chip[aria-current="true"], .chip.on { background: var(--brand); color: #fff; border-color: var(--brand); } [data-theme="dark"] .chip.on, [data-theme="dark"] .chip[aria-current="true"] { color: #14181d; }
.chip .n { opacity: .75; font-size: .85em; margin-left: 4px; }

/* ── 알림·상자 ── */
.alert { border: 1px solid var(--line); border-left: 4px solid var(--info); background: var(--panel); padding: 12px 14px; border-radius: 8px; margin: 12px 0; font-size: var(--fs-sm); }
.alert.err { border-left-color: var(--err); } .alert.warn { border-left-color: var(--warn); } .alert.ok { border-left-color: var(--ok); }
.alert p:last-child { margin: 0; }
.box { border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); padding: 16px; }
.box + .box { margin-top: 14px; }
.box h2, .box h3 { font-size: var(--fs-md); margin-bottom: 10px; }
.panel { background: var(--panel); border-radius: var(--radius); padding: 14px 16px; }
.loading { display: flex; align-items: center; gap: 10px; color: var(--muted); padding: 22px 0; font-size: var(--fs-sm); }
.spin { width: 16px; height: 16px; border: 2px solid var(--line); border-top-color: var(--brand-2); border-radius: 50%; animation: sp 0.8s linear infinite; }
@keyframes sp { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spin { animation: none; } * { transition: none !important; } }
.empty { padding: 28px 0; color: var(--muted); }
.gen-label { font-size: var(--fs-xs); color: var(--accent); font-weight: 600; }

/* ── 처음 화면 ── */
body.home .top { border-bottom-color: transparent; background: transparent; }
.hero { max-width: 760px; margin: 0 auto; padding: 9vh 20px 30px; text-align: center; }
.hero .logo { display: inline-flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.hero .logo .mark { width: 54px; height: 54px; border-radius: 14px; font-size: 28px; }
.hero .logo b { font-size: 2.4rem; letter-spacing: -.03em; }
.hero .tagline { color: var(--muted); margin-bottom: 26px; }
.bigsearch { display: flex; border: 1px solid var(--line); border-radius: 999px; box-shadow: var(--shadow); background: var(--bg); overflow: hidden; position: relative; }
.bigsearch:focus-within { border-color: var(--brand-2); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand-2) 16%, transparent); }
.bigsearch input { flex: 1 1 auto; width: 0; min-width: 0; border: 0; font: inherit; font-size: 1.1rem; padding: 15px 22px; background: transparent; color: var(--ink); }
.bigsearch input:focus { outline: none; }
.bigsearch button { border: 0; background: var(--brand); color: #fff; padding: 0 24px; font: inherit; font-weight: 700; cursor: pointer; }
[data-theme="dark"] .bigsearch button { color: #14181d; }
.examples { margin-top: 16px; justify-content: center; }
.examples .lbl { font-size: var(--fs-sm); color: var(--muted); margin-right: 4px; }
.home-sec { max-width: 1000px; margin: 10px auto 0; padding: 0 20px 40px; }
.home-sec h2 { font-size: var(--fs-md); color: var(--ink-2); }
.topic-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.topic-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; color: var(--ink); background: var(--bg); display: block; }
.topic-card:hover { border-color: var(--brand-2); text-decoration: none; box-shadow: var(--shadow); }
.topic-card b { display: block; margin-bottom: 4px; }
.topic-card span { font-size: var(--fs-xs); color: var(--muted); display: block; line-height: 1.5; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.two-col .box + .box { margin-top: 0; }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } }
.home-note { margin-top: 26px; font-size: var(--fs-sm); color: var(--muted); text-align: center; }

/* ── 자동완성 ── */
.sugg { position: absolute; left: 0; right: 0; top: 100%; margin-top: 6px; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); z-index: 40; text-align: left; overflow: hidden; }
.sugg [role=option] { display: flex; gap: 8px; align-items: center; padding: 8px 14px; cursor: pointer; font-size: var(--fs-sm); color: var(--ink); }
.sugg [role=option][aria-selected="true"], .sugg [role=option]:hover { background: var(--panel); }
.sugg .h { font-size: var(--fs-xs); color: var(--muted); padding: 8px 14px 2px; }
.sw { position: relative; }

/* ── 검색 결과 ── */
.sr-head { border-bottom: 1px solid var(--line); background: var(--bg); }
.sr-head .in { max-width: var(--maxw); margin: 0 auto; padding: 14px 20px 0; }
.tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: thin; margin-top: 8px; }
.tabs a { padding: 9px 12px; color: var(--muted); border-bottom: 3px solid transparent; white-space: nowrap; font-size: var(--fs-sm); }
.tabs a:hover { color: var(--ink); text-decoration: none; }
.tabs a[aria-current="page"] { color: var(--brand); border-bottom-color: var(--brand); font-weight: 700; }
.tabs .n { font-size: var(--fs-xs); color: var(--muted); margin-left: 3px; font-weight: 400; }
.sr-body { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; }
.sr-side > * + * { margin-top: 14px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 0 14px; border-bottom: 1px solid var(--line-2); margin-bottom: 6px; }
.filters select, .filters input { font-size: var(--fs-sm); padding: 5px 8px; }
.filters input[type=date] { width: 150px; }
.resinfo { font-size: var(--fs-sm); color: var(--muted); margin: 10px 0; }
.items { list-style: none; padding: 0; margin: 0; }
.item { padding: 14px 0; border-bottom: 1px solid var(--line-2); }
.item:last-child { border-bottom: 0; }
.item .t { font-size: var(--fs-md); font-weight: 600; display: inline; line-height: 1.45; }
.item .meta { font-size: var(--fs-sm); color: var(--muted); margin-top: 4px; display: flex; gap: 6px 10px; flex-wrap: wrap; align-items: center; }
.item .meta .sep::before { content: '·'; margin-right: 10px; color: var(--line); }
.item .snip { font-size: var(--fs-sm); color: var(--ink-2); margin-top: 6px; }
.item .acts { margin-top: 6px; display: flex; gap: 10px; flex-wrap: wrap; font-size: var(--fs-xs); }
.block { margin-bottom: 26px; }
.block-h { display: flex; align-items: baseline; gap: 10px; border-bottom: 2px solid var(--ink); padding-bottom: 6px; margin-bottom: 2px; }
.block-h h2 { font-size: var(--fs-md); margin: 0; }
.block-h .more { margin-left: auto; font-size: var(--fs-sm); }
.direct { border: 1px solid color-mix(in srgb, var(--brand) 30%, var(--line)); background: color-mix(in srgb, var(--brand) 4%, var(--bg)); border-radius: var(--radius); padding: 14px 16px; margin: 14px 0 20px; }
.direct .lbl { font-size: var(--fs-xs); color: var(--brand); font-weight: 700; }
.ai-box { border: 1px dashed color-mix(in srgb, var(--accent) 50%, var(--line)); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 20px; }
.ai-box ol { margin: 6px 0 0; padding-left: 20px; } .ai-box li { margin: 6px 0; font-size: var(--fs-sm); }
.pager { display: flex; gap: 4px; justify-content: center; flex-wrap: wrap; margin: 22px 0; }
.pager a, .pager span { min-width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 8px; font-size: var(--fs-sm); padding: 0 8px; color: var(--ink-2); }
.pager [aria-current="page"] { background: var(--brand); color: #fff; border-color: var(--brand); } [data-theme="dark"] .pager [aria-current="page"] { color: #14181d; }
.pager a:hover { text-decoration: none; background: var(--panel); }
mark { background: var(--hl); color: inherit; padding: 0 1px; border-radius: 2px; }

/* ── 영상 ── */
.vids { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.sr-side .vids { grid-template-columns: 1fr 1fr; gap: 10px; }
.vid { cursor: pointer; border: 0; background: none; padding: 0; text-align: left; font: inherit; color: var(--ink); }
.vid .th { position: relative; aspect-ratio: 16/9; border-radius: 8px; overflow: hidden; background: var(--panel-2); }
.vid .th img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vid .len { position: absolute; right: 6px; bottom: 6px; background: rgba(0, 0, 0, .78); color: #fff; font-size: 11px; padding: 1px 5px; border-radius: 4px; }
.vid .vt { font-size: var(--fs-sm); font-weight: 600; margin-top: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.4; }
.vid .vc { font-size: var(--fs-xs); color: var(--muted); }
.sr-side .vid .vt { font-size: var(--fs-xs); }

/* ── 문서(법령·판례) 화면 ── */
.doc-head { border-bottom: 1px solid var(--line); padding-bottom: 14px; margin-bottom: 18px; }
.doc-head h1 { font-family: var(--serif); font-size: clamp(1.4rem, 2.6vw, 1.9rem); letter-spacing: -.01em; margin: 6px 0 8px; }
.doc-tools { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.meta-tbl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; font-size: var(--fs-sm); margin: 0; }
.meta-tbl dt { color: var(--muted); } .meta-tbl dd { margin: 0; }
.doc-grid { display: grid; grid-template-columns: 220px minmax(0, 1fr) 300px; gap: 28px; align-items: start; }
.doc-grid.two { grid-template-columns: minmax(0, 1fr) 320px; }
.toc { position: sticky; top: 74px; max-height: calc(100vh - 90px); overflow: auto; font-size: var(--fs-sm); border-right: 1px solid var(--line-2); padding-right: 10px; }
.toc input { width: 100%; margin-bottom: 8px; font-size: 14px; padding: 6px 8px; }
.toc a { display: block; padding: 3px 4px; color: var(--ink-2); border-radius: 4px; line-height: 1.4; }
.toc a:hover { background: var(--panel); text-decoration: none; }
.toc .hd { font-weight: 700; color: var(--ink); margin-top: 8px; font-size: var(--fs-xs); }
.side { position: sticky; top: 74px; max-height: calc(100vh - 90px); overflow: auto; }
.side > * + * { margin-top: 14px; }
.law-body { font-family: var(--serif); font-size: 1.04rem; line-height: 1.85; }
.chapter { font-family: var(--font); font-weight: 800; font-size: var(--fs-md); margin: 30px 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--line); color: var(--brand); }
.art { padding: 12px 0 14px; border-bottom: 1px dashed var(--line-2); scroll-margin-top: 80px; }
.art:target { background: color-mix(in srgb, var(--hl) 50%, transparent); }
.art-h { font-family: var(--font); display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.art-h b { font-size: var(--fs-md); }
.art-h .t { font-weight: 700; }
.art .ln { margin: 2px 0; }
.art .lv1 { padding-left: 0; } .art .lv2 { padding-left: 1.4em; } .art .lv3 { padding-left: 2.8em; }
.art-acts { font-family: var(--font); display: flex; gap: 4px; flex-wrap: wrap; margin-top: 6px; }
.art-acts button { border: 0; background: var(--panel); color: var(--ink-2); font: inherit; font-size: var(--fs-xs); padding: 3px 9px; border-radius: 999px; cursor: pointer; }
.art-acts button:hover { background: var(--panel-2); color: var(--ink); }
.art .ref { font-family: var(--font); font-size: var(--fs-xs); color: var(--muted); }
.sec { margin: 22px 0; }
.sec h2 { font-size: var(--fs-md); padding-left: 10px; border-left: 4px solid var(--brand); margin-bottom: 10px; }
.sec .txt { font-family: var(--serif); line-height: 1.9; font-size: 1.02rem; white-space: normal; }
.sec.collapsed .txt { max-height: 340px; overflow: hidden; position: relative; }
.sec.collapsed .txt::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 80px; background: linear-gradient(transparent, var(--bg)); }
a.cite { border-bottom: 1px dotted currentColor; } a.cite:hover { text-decoration: none; background: color-mix(in srgb, var(--link) 10%, transparent); }
.src-panel { font-size: var(--fs-sm); }
.src-panel dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 10px; margin: 0; }
.src-panel dt { color: var(--muted); } .src-panel dd { margin: 0; overflow-wrap: anywhere; }
.ver-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 10px 12px; background: var(--panel); border-radius: 8px; font-size: var(--fs-sm); margin-top: 10px; }
.ver-bar select { font-size: 14px; max-width: 100%; }
.status-banner { padding: 10px 14px; border-radius: 8px; font-size: var(--fs-sm); margin-top: 10px; }
.status-banner.old { background: color-mix(in srgb, var(--warn) 12%, var(--bg)); border: 1px solid color-mix(in srgb, var(--warn) 40%, var(--line)); }
.status-banner.fut { background: color-mix(in srgb, var(--info) 10%, var(--bg)); border: 1px solid color-mix(in srgb, var(--info) 35%, var(--line)); }
.files a { display: inline-block; margin-right: 8px; font-size: var(--fs-xs); }
.rel h3 { font-size: var(--fs-sm); margin: 12px 0 6px; }
.rel ul { list-style: none; padding: 0; margin: 0; }
.rel li { font-size: var(--fs-sm); padding: 5px 0; border-bottom: 1px solid var(--line-2); line-height: 1.45; }
.rel li .m { font-size: var(--fs-xs); color: var(--muted); display: block; }
.note-gen { border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line)); background: color-mix(in srgb, var(--accent) 5%, var(--bg)); border-radius: 8px; padding: 10px 12px; font-size: var(--fs-sm); }

/* 비교 */
.cmp { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.cmp > div { padding: 10px 12px; border-bottom: 1px solid var(--line-2); font-size: var(--fs-sm); line-height: 1.7; }
.cmp > div:nth-child(odd) { border-right: 1px solid var(--line-2); }
.cmp .hd { background: var(--panel); font-weight: 700; }
.cmp del { background: color-mix(in srgb, var(--err) 16%, transparent); text-decoration: line-through; }
.cmp ins { background: color-mix(in srgb, var(--ok) 18%, transparent); text-decoration: none; }
.cmp .same { color: var(--muted); }

/* ── 창·알림 ── */
.modal-wrap { position: fixed; inset: 0; background: rgba(10, 15, 25, .5); display: grid; place-items: center; z-index: 80; padding: 16px; }
.modal { background: var(--bg); color: var(--ink); border-radius: 14px; width: min(640px, 100%); max-height: 88vh; overflow: auto; padding: 22px; position: relative; box-shadow: 0 10px 40px rgba(0, 0, 0, .25); }
.modal.wide { width: min(980px, 100%); }
.modal-x { position: absolute; right: 10px; top: 8px; border: 0; background: none; font-size: 26px; color: var(--muted); cursor: pointer; width: 40px; height: 40px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 10px; opacity: 0; transition: .25s; z-index: 90; font-size: var(--fs-sm); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ── 바닥 ── */
.foot { border-top: 1px solid var(--line); background: var(--panel); margin-top: 40px; }
.foot-in { max-width: var(--maxw); margin: 0 auto; padding: 22px 20px 30px; font-size: var(--fs-sm); color: var(--muted); }
.foot-warn { color: var(--ink-2); }
.foot-links { display: flex; gap: 6px 16px; flex-wrap: wrap; margin: 10px 0; }
.foot-links a { color: var(--ink-2); }

/* ── 표(관리자·목록) ── */
.tbl { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.tbl th, .tbl td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.tbl th { background: var(--panel); font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.tbl td.num { text-align: right; font-variant-numeric: tabular-nums; }
.st { font-weight: 700; } .st.ok { color: var(--ok); } .st.bad { color: var(--err); } .st.wait { color: var(--warn); } .st.link { color: var(--muted); }
.admin { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 24px; }
.admin nav a { display: block; padding: 7px 10px; border-radius: 8px; color: var(--ink-2); font-size: var(--fs-sm); }
.admin nav a[aria-current="page"] { background: var(--brand); color: #fff; } [data-theme="dark"] .admin nav a[aria-current="page"] { color: #14181d; }
.admin nav a .badge { float: right; background: var(--err); color: #fff; border-radius: 999px; font-size: 11px; padding: 0 6px; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.kpi { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.kpi .v { font-size: 1.5rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.kpi .l { font-size: var(--fs-xs); color: var(--muted); }
pre.raw { background: var(--panel); padding: 12px; border-radius: 8px; overflow: auto; max-height: 60vh; font-size: 12px; }

/* ── 반응형 ── */
@media (max-width: 1100px) {
  .doc-grid { grid-template-columns: 200px minmax(0, 1fr); }
  .doc-grid > .side { grid-column: 1 / -1; position: static; max-height: none; }
  .topic-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .top-in { gap: 10px; padding: 8px 14px; flex-wrap: wrap; }
  .topsearch { order: 3; flex-basis: 100%; max-width: none; }
  body.home .topsearch { display: none; }
  .nav a[href="/recent"], .nav a[href="/guides"] { display: none; }
  .nav a { padding: 6px 7px; }
  .sr-body, .doc-grid, .doc-grid.two { grid-template-columns: minmax(0, 1fr); }
  .toc { position: static; max-height: 260px; border-right: 0; border: 1px solid var(--line); border-radius: 8px; padding: 10px; }
  .side { position: static; max-height: none; }
  .admin { grid-template-columns: 1fr; }
  .admin nav { display: flex; gap: 4px; overflow-x: auto; } .admin nav a { white-space: nowrap; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .page { padding: 16px 14px 40px; }
  .sr-head .in { padding: 10px 14px 0; }
}
@media (max-width: 600px) {
  .topic-grid { grid-template-columns: 1fr 1fr; }
  .hero { padding-top: 6vh; } .hero .logo b { font-size: 2rem; }
  .bigsearch input { font-size: 1rem; padding: 13px 16px; } .bigsearch button { padding: 0 16px; }
  .cmp { grid-template-columns: 1fr; } .cmp > div:nth-child(odd) { border-right: 0; }
  .meta-tbl { grid-template-columns: 1fr; gap: 0 0; } .meta-tbl dt { margin-top: 6px; }
  .sr-side .vids { grid-template-columns: 1fr 1fr; }
  /* 폰: 표 → 카드 */
  .tbl.cards thead { display: none; }
  .tbl.cards tr { display: block; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 10px; padding: 6px 4px; }
  .tbl.cards td { display: flex; gap: 10px; border: 0; padding: 4px 10px; }
  .tbl.cards td::before { content: attr(data-l); color: var(--muted); min-width: 5.5em; flex: none; font-size: var(--fs-xs); }
  .filters input[type=date] { width: calc(50% - 30px); }
}

/* ── 인쇄 ── */
@media print {
  .top, .foot-links, .toc, .side, .doc-tools, .art-acts, .filters, .tabs, .sr-side, #notice-bar, .skip, .pager, .no-print { display: none !important; }
  body { color: #000; background: #fff; font-size: 11pt; }
  .doc-grid, .doc-grid.two { display: block; }
  a { color: #000; } a.cite { border: 0; }
  .sec.collapsed .txt { max-height: none; } .sec.collapsed .txt::after { display: none; }
  .print-src { display: block !important; border-top: 1px solid #999; margin-top: 18px; padding-top: 8px; font-size: 9pt; }
  .foot { background: none; border: 0; }
}
.print-src { display: none; }

/* ── 11-26 첫 화면 = 로고+검색창만(히스토리아처럼). 머리 로고·메뉴·바닥글 숨김, 밝기 단추만 오른쪽 위(되살리지 말 것) ── */
body.home .top .brand, body.home .topsearch, body.home .nav > a, body.home .foot, body.home #notice-bar { display: none !important; }
body.home .top-in { justify-content: flex-end; }
body.home .nav { margin-left: auto; }
.hero.hero-only { min-height: calc(100vh - 140px); min-height: calc(100dvh - 140px); display: flex; flex-direction: column; justify-content: center; padding: 0 20px 12vh; }
.hero.hero-only .logo { justify-content: center; margin: 0 auto 26px; font-size: inherit; }
.hero.hero-only .logo .mark { width: 64px; height: 64px; font-size: 32px; border-radius: 16px; }
.hero.hero-only .logo b { font-size: 3rem; }
.hero.hero-only .bigsearch { width: 100%; }
@media (max-width: 600px) { .hero.hero-only .logo .mark { width: 50px; height: 50px; font-size: 26px; } .hero.hero-only .logo b { font-size: 2.3rem; } .hero.hero-only { padding-bottom: 16vh; } }

/* ── 11-26 검색 결과 디자인 체계(소유자 「간격·글씨·구분 통일, 전문가 디자이너처럼」) ──
   글자 4단계: 섹션 제목 16/700 · 항목 제목 16/600 · 본문 14/400(줄 1.7) · 보조 13/400(흐림). 간격 = 8 의 배수(섹션 사이 40, 항목 16, 카드 안 20).
   모양 2가지만: 본문 = .blk(제목 줄 + 목록, 테두리 없음) · 오른쪽 = .card(테두리 상자). 안내 문구 = .hint 한 줄. 칩 = .chip(작게 .chips.sm) */
:root { --t-h: 1rem; --t-title: 1rem; --t-body: .875rem; --t-meta: .8125rem; --gap-sec: 40px; }
.sr-head .in { padding-top: 4px; }
.tabbar { display: flex; align-items: center; gap: 12px; }
.tabs { flex: 1; min-width: 0; margin: 0; gap: 4px; scrollbar-width: none; overflow-x: auto; overflow-y: visible; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { padding: 12px 10px 11px; font-size: .9375rem; color: var(--ink-2); font-weight: 500; border-bottom-width: 2px; }
.tabs a[aria-current="page"] { color: var(--ink); font-weight: 700; border-bottom-color: var(--ink); }
.tabs .n { font-size: .75rem; color: var(--muted); margin-left: 4px; font-weight: 500; font-variant-numeric: tabular-nums; }
.tabs a.zero { color: color-mix(in srgb, var(--muted) 70%, var(--bg)); } .tabs a.zero .n { opacity: .6; }
.tmore { position: relative; flex: none; }
.tmore summary { list-style: none; cursor: pointer; padding: 12px 10px 11px; font-size: .9375rem; color: var(--ink-2); font-weight: 500; white-space: nowrap; }
.tmore summary::-webkit-details-marker { display: none; }
.tmore summary::after { content: ''; display: inline-block; width: 6px; height: 6px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg) translate(-2px, -2px); margin-left: 8px; }
.tmenu { position: absolute; right: 0; top: 100%; z-index: 35; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 28px rgba(16, 24, 40, .12); padding: 6px; min-width: 200px; }
.tmenu a { display: flex; justify-content: space-between; padding: 9px 12px; border-radius: 8px; border: 0; font-size: .9375rem; color: var(--ink); }
.tmenu a:hover { background: var(--panel); text-decoration: none; }
.savebtn { flex: none; border: 1px solid var(--line); background: var(--bg); color: var(--ink-2); font: inherit; font-size: var(--t-meta); padding: 6px 12px; border-radius: 999px; cursor: pointer; }
.savebtn:hover { background: var(--panel); }
@media (min-width: 901px) { .tabs { overflow: visible; } .tabs a.t2 { display: none; } }
@media (max-width: 900px) { .tmore { display: none; } .savebtn { display: none; } }

.sr-body { grid-template-columns: minmax(0, 1fr) 340px; gap: 48px; padding-top: 8px; }
#res { max-width: 760px; }
.blk { margin: 0 0 var(--gap-sec); }
.blk-h { display: flex; align-items: baseline; gap: 8px; padding: 0 0 12px; margin: 0; border-bottom: 1px solid var(--line); }
.blk-h h2 { font-size: var(--t-h); font-weight: 700; margin: 0; letter-spacing: -.01em; }
.blk-h .cnt { font-size: var(--t-meta); color: var(--muted); font-variant-numeric: tabular-nums; }
.blk-h .more, .card-h .more { margin-left: auto; font-size: var(--t-meta); color: var(--ink-2); font-weight: 500; }
.blk-h .more::after, .card-h .more::after { content: ' ›'; }
.blk-foot { font-size: .75rem; color: var(--muted); margin: 12px 0 0; line-height: 1.6; }
.blk-foot a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.list { list-style: none; margin: 0; padding: 0; }
.list > li { padding: 16px 0; border-bottom: 1px solid var(--line-2); }
.list > li:last-child { border-bottom: 0; padding-bottom: 4px; }
/* 항목(법령·판례 등 itemRow + 관련 조문) */
.list .item .t, .it-t { font-size: var(--t-title); font-weight: 600; line-height: 1.5; color: var(--link); }
.list .item .meta, .it-m { font-size: var(--t-meta); color: var(--muted); margin: 4px 0 0; display: flex; flex-wrap: wrap; gap: 2px 8px; line-height: 1.5; }
.list .item .meta .sep::before { margin-right: 8px; }
.list .item .tag { font-size: .75rem; padding: 0 7px; vertical-align: 2px; margin-right: 2px; }
.it-t .sub { color: var(--ink-2); font-weight: 500; }
.it-s { font-size: var(--t-body); color: var(--ink-2); line-height: 1.7; margin: 6px 0 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
/* 상담 답변 */
.qa-q { font-size: var(--t-title); font-weight: 600; color: var(--ink); line-height: 1.55; margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.qa-q::before { content: 'Q'; display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; background: var(--brand); color: #fff; font-size: .75rem; font-weight: 700; margin-right: 8px; vertical-align: 2px; }
[data-theme="dark"] .qa-q::before { color: #14181d; }
.qa-a { font-size: var(--t-body); color: var(--ink-2); line-height: 1.75; margin: 8px 0 0; white-space: pre-line; }
.qa-a.clip { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.qa-f { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 10px; }
.lnk { border: 0; background: none; padding: 0; font: inherit; font-size: var(--t-meta); font-weight: 600; color: var(--link); cursor: pointer; }
.lnk:hover { text-decoration: underline; }
/* 칩(작게) */
.chips.sm { gap: 6px; }
.chips.sm .chip, .hint .chip { font-size: .75rem; padding: 3px 10px; line-height: 1.4; color: var(--ink-2); }
.lawrow { align-items: center; padding: 14px 0 2px; }
.lawrow .lbl { font-size: var(--t-meta); color: var(--muted); margin-right: 4px; }
/* 한 줄 안내 */
.hint { font-size: var(--t-meta); color: var(--muted); margin: 0 0 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; line-height: 1.6; }
.hint b { color: var(--ink); font-weight: 600; }
.hint.warn b, .hint.warn { color: var(--warn); } .hint.err { color: var(--err); }
.hint + .hint { margin-top: -16px; }
/* 바로 가기 */
a.direct { display: block; border: 1px solid var(--line); border-radius: 12px; padding: 16px 20px; margin: 0 0 32px; color: var(--ink); background: var(--bg); transition: border-color .15s, box-shadow .15s; }
a.direct:hover { text-decoration: none; border-color: var(--brand-2); box-shadow: var(--shadow); }
.direct .lbl { display: block; font-size: .75rem; font-weight: 600; color: var(--brand); margin-bottom: 4px; }
.direct .dt { display: block; font-size: 1.0625rem; font-weight: 700; line-height: 1.45; }
.direct .dt::after { content: ' →'; color: var(--brand); }
.direct .dm { display: block; font-size: var(--t-meta); color: var(--muted); margin-top: 4px; }
/* 오른쪽 카드 */
.sr-side > * + * { margin-top: 16px; }
.sr-side #topicbox:empty { display: none; }
.card { border: 1px solid var(--line); border-radius: 12px; padding: 20px; background: var(--bg); }
.card-h { display: flex; align-items: baseline; gap: 8px; margin-bottom: 14px; }
.card-h h2 { font-size: .9375rem; font-weight: 700; margin: 0; }
.tp-t { margin: 0; font-size: var(--t-title); font-weight: 700; } .tp-t a { color: var(--ink); }
.tp-d { font-size: var(--t-meta); color: var(--muted); margin: 4px 0 12px; line-height: 1.6; }
.mini { list-style: none; margin: 14px 0 0; padding: 12px 0 0; border-top: 1px solid var(--line-2); }
.mini li { font-size: var(--t-meta); padding: 3px 0; line-height: 1.5; }
.mini li a { color: var(--ink-2); } .mini li a::before { content: '§ '; color: var(--muted); }
.sr-side .vids { grid-template-columns: 1fr 1fr; gap: 14px 12px; }
.sr-side .vid .vt { font-size: .8125rem; font-weight: 500; line-height: 1.45; margin-top: 8px; }
.sr-side .vid .vc { font-size: .75rem; margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.arts { list-style: none; margin: 0; padding: 0; }
.arts li { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line-2); }
.arts li:first-child { border-top: 0; padding-top: 0; }
.arts .ai { flex: 1; min-width: 0; }
.arts a.at { font-size: .875rem; font-weight: 500; color: var(--ink); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.arts a.at:hover { color: var(--link); text-decoration: none; }
.arts .it-m { margin-top: 2px; font-size: .75rem; }
.arts img { width: 96px; height: 64px; object-fit: cover; border-radius: 8px; flex: none; background: var(--panel-2); }
.arts.wide li { padding: 16px 0; } .arts.wide li:first-child { padding-top: 0; } .arts.wide a.at { font-size: var(--t-title); font-weight: 600; } .arts.wide .it-m { font-size: var(--t-meta); }
/* 탭 화면 거르기 줄 */
.filters { padding: 0 0 16px; margin-bottom: 8px; border-bottom: 1px solid var(--line); gap: 8px; }
#res > .chips { margin-bottom: 16px; }
@media (max-width: 900px) {
  .sr-body { grid-template-columns: minmax(0, 1fr); gap: 32px; } #res { max-width: none; }
  .tabs a { padding: 12px 9px 11px; font-size: .875rem; }
}
@media (max-width: 600px) {
  :root { --gap-sec: 32px; }
  .card { padding: 16px; } a.direct { padding: 14px 16px; }
  .arts.wide img { width: 80px; height: 56px; }
}
.hint { display: block; } .hint .chip { display: inline-block; margin: 2px 4px 2px 0; }
.filters select, .filters input[type=search], .filters input[type=date] { height: 36px; font-size: .875rem; padding: 0 10px; border-radius: 8px; border-color: var(--line); }
.filters .btn.sm { height: 36px; min-height: 36px; font-size: .875rem; padding: 0 14px; }
.filters label.small { font-size: var(--t-meta); color: var(--muted); }
/* 11-26 오른쪽 칸 「참고 자료」 구역 — 공식 기관 자료와 눈에 띄게 나눔(위키백과·영상·기사) */
.refzone { margin-top: 18px; padding-top: 12px; border-top: 2px dashed var(--line); display: grid; gap: 14px; }
.refzone-h { margin: 0; font-size: var(--fs-sm); font-weight: 700; color: var(--ink-2); }
.refzone-h span { display: block; font-weight: 400; font-size: var(--fs-xs); color: var(--muted); margin-top: 2px; }
.refzone .card { background: var(--panel-2); border-style: dashed; }
#offbox:empty, #refbox:empty { display: none; }
/* 11-26 판결문 어려운 말 풀이(glossary.js) */
.gloss dl { margin: 0; display: grid; gap: 8px; }
.gloss dt { font-weight: 700; font-size: var(--fs-sm); }
.gloss dd { margin: 0; font-size: var(--fs-sm); color: var(--ink-2); line-height: 1.55; }
.gloss dd a { margin-left: 4px; }
.box.refbox { border-style: dashed; }
/* 11-26 판례 변경(폐기) 경고 */
.overruled-alert { margin: 10px 0; padding: 12px 14px; border: 1px solid color-mix(in srgb, var(--err) 45%, var(--line)); background: color-mix(in srgb, var(--err) 8%, var(--bg)); border-radius: 10px; font-size: var(--fs-sm); }
/* 11-26 서버가 미리 넣은 본문(검색엔진용 ssr.mjs) — 화면 스크립트가 뜨면 바뀜 */
.ssr { max-width: 900px; margin: 0 auto; padding: 24px 16px; line-height: 1.7; }
.ssr h4 { margin: 18px 0 4px; }
.search-tip { margin: 4px 0 10px; }
/* 11-26 상황별 할 일 단계(steps.js) */
.steps { display: grid; gap: 10px; }
.sit { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; background: var(--bg); }
.sit > summary { cursor: pointer; list-style: revert; }
.step-list { margin: 10px 0 4px; padding-left: 22px; display: grid; gap: 12px; }
.step-list p { margin: 2px 0; }
.st-d { color: var(--ink-2); font-size: var(--fs-sm); line-height: 1.6; }
.st-m { font-size: var(--fs-xs); color: var(--muted); }
.st-m .lbl { display: inline-block; min-width: 34px; font-weight: 700; color: var(--ink-2); margin-right: 4px; }
.guides .snip { font-size: var(--fs-sm); color: var(--ink-2); }
