/* ==========================================================================
   장례 백서 — 한지와 먹, 국화의 금빛
   ========================================================================== */

:root {
  --fs: 17px;
  --paper: #f5f1e8;
  --paper-2: #efe9dc;
  --surface: #fffdf8;
  --ink: #1f1d1a;
  --ink-2: #3b3833;
  --muted: #6e675c;
  --line: #e2dacb;
  --line-2: #d3c9b6;
  --accent: #2c3b5a;         /* 먹빛 남색 */
  --accent-2: #44567c;
  --accent-soft: #e6eaf1;
  --gold: #a98437;           /* 국화 금빛 */
  --gold-soft: #f4ecd9;
  --legal: #a3392f;          /* 법정기한 */
  --legal-soft: #f7e6e2;
  --rec: #9a6a14;            /* 권장 */
  --rec-soft: #f6ecd6;
  --tip: #45623f;
  --tip-soft: #e7eee2;
  --info-soft: #e6ecf3;
  --shadow: 0 1px 2px rgba(40, 32, 18, .05), 0 8px 28px -12px rgba(40, 32, 18, .18);
  --shadow-lg: 0 2px 6px rgba(40, 32, 18, .06), 0 24px 60px -24px rgba(40, 32, 18, .30);
  --radius: 14px;
  --serif: 'Gowun Batang', 'Nanum Myeongjo', 'Noto Serif KR', serif;
  --display: 'Nanum Myeongjo', 'Gowun Batang', serif;
  --sans: 'Pretendard Variable', Pretendard, -apple-system, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  --top: 64px;
  --side: 290px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #131519; --paper-2: #181b20; --surface: #1c1f25;
    --ink: #ece6da; --ink-2: #d4cdc0; --muted: #a0998c;
    --line: #2b2f37; --line-2: #3a3f49;
    --accent: #a9bbde; --accent-2: #c3d0ea; --accent-soft: #232a38;
    --gold: #d7b46a; --gold-soft: #2a2519;
    --legal: #ea8a7f; --legal-soft: #34201e;
    --rec: #e0b25a; --rec-soft: #2e2615;
    --tip: #a6c49b; --tip-soft: #1f2a1d; --info-soft: #1f2632;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 28px -12px rgba(0,0,0,.6);
    --shadow-lg: 0 2px 6px rgba(0,0,0,.3), 0 24px 60px -24px rgba(0,0,0,.7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #131519; --paper-2: #181b20; --surface: #1c1f25;
  --ink: #ece6da; --ink-2: #d4cdc0; --muted: #a0998c;
  --line: #2b2f37; --line-2: #3a3f49;
  --accent: #a9bbde; --accent-2: #c3d0ea; --accent-soft: #232a38;
  --gold: #d7b46a; --gold-soft: #2a2519;
  --legal: #ea8a7f; --legal-soft: #34201e;
  --rec: #e0b25a; --rec-soft: #2e2615;
  --tip: #a6c49b; --tip-soft: #1f2a1d; --info-soft: #1f2632;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 28px -12px rgba(0,0,0,.6);
  --shadow-lg: 0 2px 6px rgba(0,0,0,.3), 0 24px 60px -24px rgba(0,0,0,.7);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: var(--fs); -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--top) + 16px); }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.8;
  color: var(--ink);
  background: var(--paper);
  word-break: keep-all;
  overflow-x: clip;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}
/* 한지 결 */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .38 0 0 0 0 .25 0 0 0 .06 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
:root[data-theme="dark"] body::before { opacity: .25; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--gold); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 6px; }
button { font: inherit; color: inherit; }
img, svg { max-width: 100%; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--ink); color: var(--paper); padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 8px; }

.progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 60; background: linear-gradient(90deg, var(--gold), var(--accent)); transition: width .1s linear; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50; height: var(--top);
  display: flex; align-items: center; gap: 14px; padding: 0 20px;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); flex-shrink: 0; }
.brand:hover { color: var(--ink); }
.mark { width: 34px; height: 34px; }
.mark .petals ellipse { fill: var(--gold); opacity: .85; }
.mark .core { fill: var(--surface); stroke: var(--gold); stroke-width: 1.5; }
.brand:hover .petals { transform-origin: center; animation: spin 6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text b { font-family: var(--display); font-size: 1.12rem; font-weight: 800; letter-spacing: .02em; }
.brand-text small { font-size: .7rem; color: var(--muted); letter-spacing: .04em; }

.search { position: relative; flex: 1; max-width: 460px; margin-left: auto; display: flex; align-items: center; }
.search > svg { position: absolute; left: 12px; color: var(--muted); pointer-events: none; }
.search input {
  width: 100%; height: 40px; padding: 0 40px 0 38px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font: inherit; font-size: .9rem; transition: border-color .2s, box-shadow .2s;
}
.search input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px color-mix(in srgb, var(--gold) 18%, transparent); }
.search kbd { position: absolute; right: 12px; font: 600 .72rem var(--sans); color: var(--muted); border: 1px solid var(--line); border-radius: 5px; padding: 0 6px; background: var(--paper); }
.search-results {
  position: absolute; top: 48px; left: 0; right: 0; max-height: 70vh; overflow: auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 6px;
}
.search-results a { display: block; padding: 10px 12px; border-radius: 10px; text-decoration: none; color: var(--ink); }
.search-results a:hover, .search-results a.on { background: var(--accent-soft); }
.search-results .sr-part { font-size: .72rem; color: var(--gold); font-weight: 700; letter-spacing: .05em; }
.search-results .sr-title { font-weight: 700; display: block; }
.search-results .sr-snip { font-size: .82rem; color: var(--muted); display: block; line-height: 1.5; }
.search-results mark { background: var(--gold-soft); color: inherit; border-radius: 3px; padding: 0 2px; }
.search-results .empty { padding: 14px; color: var(--muted); font-size: .9rem; }

.tools { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; min-width: 38px; height: 38px; padding: 0 8px;
  border: 1px solid transparent; background: transparent; border-radius: 10px; cursor: pointer; color: var(--ink-2); font-weight: 700; font-size: .85rem;
}
.icon-btn:hover { background: var(--paper-2); border-color: var(--line); }
.icon-btn sup { font-size: .7em; margin-left: 1px; }
.font-ctl { display: flex; }
.i-moon { display: none; }
:root[data-theme="dark"] .i-sun { display: none; }
:root[data-theme="dark"] .i-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .i-sun { display: none; }
  :root:not([data-theme="light"]) .i-moon { display: block; }
}
.sos {
  display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: 999px;
  background: var(--ink); color: var(--paper); text-decoration: none; font-weight: 700; font-size: .85rem; white-space: nowrap;
}
.sos:hover { color: var(--paper); background: var(--accent); }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: #e8a33b; box-shadow: 0 0 0 0 rgba(232,163,59,.7); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(232,163,59,0); } 100% { box-shadow: 0 0 0 0 rgba(232,163,59,0); } }
.menu-btn { display: none; }

/* ---------- Shell ---------- */
.shell { position: relative; z-index: 1; display: grid; grid-template-columns: var(--side) minmax(0, 1fr) 220px; min-height: calc(100vh - var(--top)); }
.sidebar {
  position: sticky; top: var(--top); height: calc(100vh - var(--top)); overflow-y: auto;
  border-right: 1px solid var(--line); padding: 22px 14px 28px 18px; display: flex; flex-direction: column;
  scrollbar-width: thin;
}
#nav { flex: 1; }
.nav-home { display: flex; gap: 8px; flex-direction: column; margin-bottom: 18px; }
.nav-link {
  display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 9px; text-decoration: none;
  color: var(--ink-2); font-size: .9rem; line-height: 1.45;
}
.nav-link:hover { background: var(--paper-2); color: var(--ink); }
.nav-link.on { background: var(--surface); color: var(--ink); font-weight: 700; box-shadow: var(--shadow); }
.nav-link.on::before { content: ""; width: 3px; align-self: stretch; margin: 2px 0 2px -6px; border-radius: 3px; background: var(--gold); }
.nav-link .ico { width: 22px; text-align: center; flex-shrink: 0; }
.nav-group { margin: 4px 0; }
.nav-group > button {
  width: 100%; display: flex; align-items: center; gap: 10px; background: none; border: 0; cursor: pointer; text-align: left;
  padding: 9px 10px; border-radius: 9px; font-weight: 700; font-size: .92rem; color: var(--ink);
}
.nav-group > button:hover { background: var(--paper-2); }
.nav-num {
  display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  border: 1px solid var(--line-2); font: 700 .72rem var(--serif); color: var(--gold); flex-shrink: 0;
}
.nav-group > button .chev { margin-left: auto; transition: transform .25s; color: var(--muted); }
.nav-group.open > button .chev { transform: rotate(90deg); }
.nav-group ul { list-style: none; margin: 2px 0 6px 21px; padding: 0 0 0 12px; border-left: 1px dashed var(--line-2); display: none; }
.nav-group.open ul { display: block; }
.nav-group ul .nav-link { font-size: .86rem; padding: 5px 10px; }
.nav-label { font-size: .7rem; letter-spacing: .12em; color: var(--muted); font-weight: 700; margin: 20px 10px 6px; }
.side-foot { margin-top: 24px; padding: 14px 10px 0; border-top: 1px solid var(--line); font-size: .76rem; color: var(--muted); line-height: 1.6; }
.side-foot p { margin: 0 0 4px; }

main { min-width: 0; padding: 40px 48px 120px; outline: none; }
#view { max-width: 780px; margin: 0 auto; }
#view.wide { max-width: 1080px; }
.view-enter { animation: rise .45s cubic-bezier(.2,.7,.2,1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.toc { position: sticky; top: var(--top); height: calc(100vh - var(--top)); overflow: auto; padding: 44px 18px 20px 6px; font-size: .8rem; }
.toc h5 { margin: 0 0 10px; font-size: .7rem; letter-spacing: .12em; color: var(--muted); }
.toc a { display: block; padding: 4px 0 4px 12px; border-left: 2px solid var(--line); color: var(--muted); text-decoration: none; line-height: 1.5; }
.toc a.sub { padding-left: 24px; font-size: .95em; }
.toc a:hover { color: var(--ink); }
.toc a.on { color: var(--ink); border-color: var(--gold); font-weight: 700; }

.scrim { position: fixed; inset: 0; background: rgba(10, 8, 5, .4); z-index: 40; }

/* ---------- Page header ---------- */
.crumb { font-size: .8rem; color: var(--muted); display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.crumb a { color: var(--muted); text-decoration: none; }
.crumb a:hover { color: var(--gold); }
.page-head { position: relative; margin-bottom: 26px; }
.page-head .ghost-num {
  position: absolute; right: -10px; top: -46px; font: 800 9rem/1 var(--display); color: var(--gold); opacity: .09; pointer-events: none; user-select: none;
}
.page-head h1 { font-family: var(--display); font-weight: 800; font-size: clamp(1.9rem, 1.4rem + 2vw, 2.6rem); line-height: 1.3; margin: 0 0 8px; letter-spacing: -.01em; }
.page-head .lede { color: var(--muted); font-size: 1.02rem; margin: 0; }
.page-actions { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.chip-btn {
  display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; padding: 5px 12px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); cursor: pointer; color: var(--ink-2); text-decoration: none;
}
.chip-btn:hover { border-color: var(--gold); color: var(--ink); }

/* 메타 카드 */
.meta {
  display: flex; flex-wrap: wrap; gap: 1px; overflow: hidden;
  background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); margin: 0 0 22px; box-shadow: var(--shadow);
}
.meta > div { background: var(--surface); padding: 14px 16px; flex: 1 1 200px; }
.meta dt { font-size: .72rem; letter-spacing: .08em; color: var(--muted); font-weight: 700; margin-bottom: 4px; display: flex; gap: 6px; align-items: center; }
.meta dd { margin: 0; font-weight: 600; font-size: .92rem; line-height: 1.55; }
.meta dd ul { margin: 0; padding-left: 1.05em; font-weight: 500; }
.meta .m-deadline { flex-basis: 100%; }
.meta .m-deadline.legal { background: var(--legal-soft); }
.meta .m-deadline.legal dd { color: var(--legal); font-size: 1.05rem; }
.meta .m-deadline.recommend { background: var(--rec-soft); }
.meta .m-deadline.recommend dd { color: var(--rec); font-size: 1.05rem; }
.meta .m-docs { flex-basis: 100%; }

.summary {
  position: relative; margin: 0 0 34px; padding: 20px 22px 18px 24px; border-radius: var(--radius);
  background: var(--gold-soft); border: 1px solid color-mix(in srgb, var(--gold) 30%, transparent);
}
.summary h4 { margin: 0 0 8px; font: 700 .76rem var(--sans); letter-spacing: .14em; color: var(--gold); }
.summary ol { margin: 0; padding: 0; list-style: none; counter-reset: s; }
.summary li { counter-increment: s; position: relative; padding-left: 30px; margin: 5px 0; font-weight: 600; line-height: 1.6; }
.summary li::before { content: counter(s); position: absolute; left: 0; top: 2px; width: 21px; height: 21px; border-radius: 50%; background: var(--gold); color: var(--surface); font: 700 .72rem/21px var(--serif); text-align: center; }

/* ---------- Prose ---------- */
.prose h2 {
  font-family: var(--serif); font-weight: 700; font-size: 1.5rem; line-height: 1.4; margin: 2.4em 0 .7em; padding-bottom: .4em;
  border-bottom: 1px solid var(--line); position: relative;
}
.prose h2::after { content: ""; position: absolute; left: 0; bottom: -1px; width: 44px; height: 2px; background: var(--gold); }
.prose h3 { font-family: var(--serif); font-size: 1.18rem; margin: 1.8em 0 .5em; }
.prose h4 { font-size: 1rem; margin: 1.4em 0 .4em; }
.prose > :first-child { margin-top: 0; }
.prose p { margin: .7em 0; }
.prose ul, .prose ol:not(.steps) { padding-left: 1.3em; }
.prose li { margin: .3em 0; }
.prose li::marker { color: var(--gold); }
.prose strong, .prose b { font-weight: 700; color: var(--ink); }
.prose hr { border: 0; height: 1px; background: var(--line); margin: 2.4em 0; }
.prose blockquote { margin: 1.2em 0; padding: .4em 1.2em; border-left: 3px solid var(--gold); font-family: var(--serif); color: var(--ink-2); }
.prose code { font-size: .88em; background: var(--paper-2); padding: 1px 6px; border-radius: 5px; }

/* 단계 */
.steps { list-style: none; padding: 0; margin: 1.4em 0; counter-reset: st; position: relative; }
.steps > li { counter-increment: st; position: relative; padding: 0 0 22px 56px; margin: 0; }
.steps > li::before {
  content: counter(st); position: absolute; left: 0; top: 0; width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center; background: var(--surface); border: 1.5px solid var(--accent); color: var(--accent);
  font: 700 1rem var(--serif); z-index: 1;
}
.steps > li::after { content: ""; position: absolute; left: 18.5px; top: 40px; bottom: 2px; width: 1px; background: repeating-linear-gradient(var(--line-2) 0 4px, transparent 4px 8px); }
.steps > li:last-child::after { display: none; }
.steps > li > b:first-child { display: block; font-size: 1.05rem; line-height: 1.5; padding-top: 6px; }
.steps > li > p { margin: .3em 0 0; color: var(--ink-2); }

/* 콜아웃 */
.callout { margin: 1.4em 0; padding: 16px 18px 14px 50px; border-radius: 12px; position: relative; background: var(--info-soft); border: 1px solid transparent; }
.callout::before { position: absolute; left: 16px; top: 15px; font-size: 1.1rem; line-height: 1.4; }
.callout > b:first-child { display: block; margin-bottom: 2px; }
.callout p { margin: .3em 0; }
.callout > :last-child { margin-bottom: 0; }
.callout ul { margin: .4em 0; }
.callout.info::before { content: "ℹ️"; }
.callout.tip { background: var(--tip-soft); }
.callout.tip::before { content: "💡"; }
.callout.tip > b:first-child { color: var(--tip); }
.callout.warn { background: var(--rec-soft); }
.callout.warn::before { content: "⚠️"; }
.callout.warn > b:first-child { color: var(--rec); }
.callout.danger { background: var(--legal-soft); border-color: color-mix(in srgb, var(--legal) 25%, transparent); }
.callout.danger::before { content: "⏰"; }
.callout.danger > b:first-child { color: var(--legal); }

/* 체크리스트 */
.checklist { list-style: none; padding: 0 !important; margin: 1.2em 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; box-shadow: var(--shadow); }
.checklist > li { margin: 0 !important; border-top: 1px solid var(--line); }
.checklist > li:first-child { border-top: 0; }
.checklist label { display: flex; gap: 14px; align-items: flex-start; padding: 12px 16px; cursor: pointer; transition: background .15s; }
.checklist label:hover { background: var(--paper-2); }
.checklist input { appearance: none; -webkit-appearance: none; flex-shrink: 0; width: 22px; height: 22px; margin: 3px 0 0; border-radius: 7px; border: 1.5px solid var(--line-2); background: var(--surface); cursor: pointer; display: grid; place-items: center; transition: all .15s; }
.checklist input::after { content: ""; width: 6px; height: 11px; border: solid var(--surface); border-width: 0 2.4px 2.4px 0; transform: rotate(45deg) scale(0); margin-top: -2px; transition: transform .15s; }
.checklist input:checked { background: var(--tip); border-color: var(--tip); }
.checklist input:checked::after { transform: rotate(45deg) scale(1); }
.checklist input:checked + span { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--line-2); }
.check-head { display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: var(--paper-2); font-size: .8rem; color: var(--muted); font-weight: 700; }
.check-bar { flex: 1; height: 5px; background: var(--line); border-radius: 5px; overflow: hidden; }
.check-bar i { display: block; height: 100%; width: 0; background: var(--tip); border-radius: 5px; transition: width .3s; }
.check-reset { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: .76rem; text-decoration: underline; }

/* 표 */
.tbl-wrap { margin: 1.4em 0; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); -webkit-overflow-scrolling: touch; }
.tbl { width: 100%; border-collapse: collapse; font-size: .9rem; line-height: 1.6; }
.tbl th, .tbl td { padding: 11px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.tbl thead th { background: var(--paper-2); font-weight: 700; font-size: .82rem; color: var(--ink-2); white-space: nowrap; position: sticky; top: 0; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover td { background: color-mix(in srgb, var(--gold-soft) 55%, transparent); }
.tbl tbody th { font-weight: 700; background: color-mix(in srgb, var(--paper-2) 50%, transparent); white-space: nowrap; }
.tbl td:first-child { font-weight: 600; }

/* 카드 */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); gap: 14px; margin: 1.4em 0; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 18px 14px; box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s, border-color .2s; }
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: var(--line-2); }
.card h4 { margin: 0 0 6px !important; font-family: var(--serif); font-size: 1.05rem; }
.card p { margin: .3em 0; font-size: .9rem; color: var(--ink-2); line-height: 1.65; }
.card ul { font-size: .9rem; padding-left: 1.1em; margin: .4em 0; }

/* 장단점 */
.pros-cons { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 1.4em 0; }
.pros-cons > div { border-radius: var(--radius); padding: 16px 18px; border: 1px solid var(--line); background: var(--surface); }
.pros-cons h4 { margin: 0 0 6px !important; font-size: .9rem; letter-spacing: .06em; }
.pros-cons .pros { border-top: 3px solid var(--tip); }
.pros-cons .pros h4 { color: var(--tip); }
.pros-cons .pros h4::before { content: "○ "; }
.pros-cons .cons { border-top: 3px solid var(--legal); }
.pros-cons .cons h4 { color: var(--legal); }
.pros-cons .cons h4::before { content: "× "; }
.pros-cons ul { margin: 0; padding-left: 1.1em; font-size: .92rem; }

/* FAQ */
details.faq { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); margin: .7em 0; overflow: hidden; }
details.faq summary { cursor: pointer; list-style: none; padding: 14px 48px 14px 18px; font-weight: 700; position: relative; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::before { content: "Q"; font-family: var(--serif); color: var(--gold); margin-right: 10px; }
details.faq summary::after { content: ""; position: absolute; right: 20px; top: 50%; width: 9px; height: 9px; border: solid var(--muted); border-width: 0 2px 2px 0; transform: translateY(-70%) rotate(45deg); transition: transform .2s; }
details.faq[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
details.faq[open] summary { border-bottom: 1px dashed var(--line); }
details.faq > div { padding: 6px 18px 12px; }

/* 배지 */
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: .72rem; font-weight: 700; padding: 1px 9px; border-radius: 999px; background: var(--paper-2); color: var(--ink-2); border: 1px solid var(--line); vertical-align: 2px; white-space: nowrap; line-height: 1.7; }
.badge.legal { background: var(--legal-soft); color: var(--legal); border-color: transparent; }
.badge.legal::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.rec { background: var(--rec-soft); color: var(--rec); border-color: transparent; }
.badge.rec::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.verify { font-size: .76rem; color: var(--rec); border-bottom: 1px dotted currentColor; cursor: help; }
.verify::before { content: "※ "; }

/* 템플릿 */
.template { position: relative; margin: 1.2em 0; border-radius: 12px; background: var(--paper-2); border: 1px solid var(--line); }
.template pre { margin: 0; padding: 18px 20px; white-space: pre-wrap; font-family: var(--serif); font-size: .95rem; line-height: 1.8; color: var(--ink); }
.template .copy { position: absolute; top: 10px; right: 10px; font-size: .74rem; padding: 4px 11px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); cursor: pointer; }
.template .copy:hover { border-color: var(--gold); }

/* 숫자 */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(140px, 100%), 1fr)); gap: 12px; margin: 1.4em 0; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 16px 12px; text-align: center; }
.stat em { display: block; font: 800 1.7rem/1.2 var(--display); color: var(--accent); font-style: normal; }
.stat span { font-size: .8rem; color: var(--muted); }

/* 관련/이전다음 */
.related { margin-top: 48px; }
.related h4 { font-size: .76rem; letter-spacing: .12em; color: var(--muted); margin: 0 0 10px; }
.related-list { display: flex; flex-wrap: wrap; gap: 8px; }
.related-list a { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); text-decoration: none; color: var(--ink-2); font-size: .86rem; }
.related-list a:hover { border-color: var(--gold); color: var(--ink); }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 36px; }
.pager a { display: block; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; background: var(--surface); color: var(--ink); transition: border-color .2s, transform .2s; }
.pager a:hover { border-color: var(--gold); transform: translateY(-2px); color: var(--ink); }
.pager small { display: block; color: var(--muted); font-size: .74rem; }
.pager b { font-family: var(--serif); }
.pager .next { text-align: right; grid-column: 2; }
.stamp { margin-top: 40px; padding-top: 16px; border-top: 1px solid var(--line); font-size: .78rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px 18px; }

/* ==========================================================================
   Home
   ========================================================================== */
.hero { position: relative; padding: 36px 0 20px; }
.hero-eyebrow { font-size: .78rem; letter-spacing: .24em; color: var(--gold); font-weight: 700; margin: 0 0 18px; }
.hero h1 { font-family: var(--display); font-weight: 800; font-size: clamp(2.2rem, 1.3rem + 3.6vw, 3.8rem); line-height: 1.25; letter-spacing: -.02em; margin: 0 0 20px; }
.hero h1 em { font-style: normal; color: var(--gold); position: relative; }
.hero p { font-size: 1.08rem; color: var(--ink-2); max-width: 560px; margin: 0; font-family: var(--serif); line-height: 1.9; }
.hero-flower { position: absolute; right: -30px; top: -10px; width: 300px; height: 300px; opacity: .9; pointer-events: none; }
.hero-flower ellipse { fill: none; stroke: var(--gold); stroke-width: .6; opacity: .55; }
.hero-flower .bloom { transform-origin: center; animation: bloom 2.4s cubic-bezier(.2,.7,.2,1) both; }
.hero-flower .slow { animation: spin 120s linear infinite; transform-origin: center; }
@keyframes bloom { from { transform: scale(.4) rotate(-40deg); opacity: 0; } to { transform: none; opacity: 1; } }

.doors { display: grid; grid-template-columns: 1.25fr 1fr 1fr; gap: 16px; margin: 40px 0 56px; }
.door {
  position: relative; display: flex; flex-direction: column; gap: 6px; padding: 24px 22px 22px; border-radius: 18px; text-decoration: none; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); overflow: hidden;
  transition: transform .25s cubic-bezier(.2,.7,.2,1), box-shadow .25s, border-color .25s; animation: rise .6s both;
}
.door:nth-child(2) { animation-delay: .08s; } .door:nth-child(3) { animation-delay: .16s; }
.door:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--line-2); color: var(--ink); }
.door .d-ico { font-size: 1.7rem; line-height: 1; margin-bottom: 8px; }
.door b { font-family: var(--serif); font-size: 1.28rem; line-height: 1.4; }
.door span { color: var(--muted); font-size: .9rem; line-height: 1.6; }
.door .arrow { margin-top: auto; padding-top: 14px; font-size: .84rem; font-weight: 700; color: var(--accent); }
.door.urgent { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.door.urgent span { color: color-mix(in srgb, var(--paper) 72%, transparent); }
.door.urgent .arrow { color: #e8b35a; }
.door.urgent::after {
  content: ""; position: absolute; right: -40px; bottom: -40px; width: 170px; height: 170px; border-radius: 50%;
  background: radial-gradient(circle, rgba(232,179,90,.35), transparent 70%);
}
.door.urgent:hover { color: var(--paper); }

.sec-title { display: flex; align-items: baseline; gap: 14px; margin: 0 0 18px; }
.sec-title h2 { font-family: var(--display); font-size: 1.6rem; font-weight: 800; margin: 0; }
.sec-title span { color: var(--muted); font-size: .88rem; }

/* 여정 */
.journey { position: relative; margin: 0 0 60px; padding: 28px 0 8px; overflow-x: auto; scrollbar-width: thin; }
.journey ol { list-style: none; margin: 0; padding: 0 4px; display: grid; grid-template-columns: repeat(7, minmax(min(120px, 100%), 1fr)); gap: 0; position: relative; min-width: 820px; }
.journey ol::before { content: ""; position: absolute; left: 30px; right: 30px; top: 21px; height: 2px; background: linear-gradient(90deg, var(--line-2), var(--gold), var(--accent)); }
.journey li { position: relative; text-align: center; padding: 0 6px; animation: rise .5s both; }
.journey li:nth-child(2){animation-delay:.05s}.journey li:nth-child(3){animation-delay:.1s}.journey li:nth-child(4){animation-delay:.15s}.journey li:nth-child(5){animation-delay:.2s}.journey li:nth-child(6){animation-delay:.25s}.journey li:nth-child(7){animation-delay:.3s}
.journey a { text-decoration: none; color: var(--ink); display: block; }
.journey .dot { width: 44px; height: 44px; margin: 0 auto 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--gold); display: grid; place-items: center; font-size: 1.1rem; position: relative; z-index: 1; transition: transform .2s, background .2s; }
.journey a:hover .dot { transform: scale(1.12); background: var(--gold-soft); }
.journey .when { display: block; font: 700 .72rem var(--sans); letter-spacing: .1em; color: var(--gold); }
.journey .what { display: block; font-family: var(--serif); font-weight: 700; font-size: .98rem; line-height: 1.4; margin-top: 2px; }
.journey .sub { display: block; font-size: .76rem; color: var(--muted); line-height: 1.5; margin-top: 4px; }

/* 도구 카드 */
.tool-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr)); gap: 14px; margin-bottom: 60px; }
.tool-card { display: flex; gap: 14px; align-items: flex-start; padding: 18px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); text-decoration: none; color: var(--ink); transition: transform .2s, border-color .2s, box-shadow .2s; }
.tool-card:hover { transform: translateY(-2px); border-color: var(--gold); box-shadow: var(--shadow); color: var(--ink); }
.tool-card .t-ico { width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); display: grid; place-items: center; font-size: 1.3rem; flex-shrink: 0; }
.tool-card b { display: block; font-size: .98rem; }
.tool-card span { font-size: .82rem; color: var(--muted); line-height: 1.55; display: block; margin-top: 2px; }

/* 파트 그리드 */
.part-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 16px; }
.part-card { position: relative; padding: 24px 22px 18px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.part-card .pc-num { position: absolute; right: 16px; top: 4px; font: 800 4.4rem/1 var(--display); color: var(--gold); opacity: .15; }
.part-card h3 { margin: 0 0 2px; font-family: var(--serif); font-size: 1.22rem; }
.part-card h3 a { color: var(--ink); text-decoration: none; }
.part-card h3 a:hover { color: var(--gold); }
.part-card .pc-sub { font-size: .8rem; color: var(--gold); font-weight: 700; margin: 0 0 12px; }
.part-card ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.part-card li a { display: inline-block; font-size: .8rem; padding: 3px 10px; border-radius: 999px; background: var(--paper-2); color: var(--ink-2); text-decoration: none; }
.part-card li a:hover { background: var(--gold-soft); color: var(--ink); }

.quote-band { margin: 64px 0 20px; padding: 36px 32px; border-radius: 20px; text-align: center; background: var(--paper-2); border: 1px solid var(--line); }
.quote-band p { font-family: var(--serif); font-size: 1.12rem; line-height: 1.9; margin: 0; color: var(--ink-2); }
.quote-band small { display: block; margin-top: 10px; color: var(--muted); font-size: .8rem; }

/* 파트 인덱스 */
.part-index { display: grid; gap: 12px; margin-top: 24px; }
.pi-item { display: grid; grid-template-columns: 44px 1fr auto; gap: 16px; align-items: center; padding: 16px 18px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); text-decoration: none; color: var(--ink); transition: border-color .2s, transform .2s; }
.pi-item:hover { border-color: var(--gold); transform: translateX(4px); color: var(--ink); }
.pi-item .n { font: 700 1.3rem var(--serif); color: var(--gold); text-align: center; }
.pi-item b { font-family: var(--serif); font-size: 1.05rem; }
.pi-item small { display: block; color: var(--muted); font-size: .84rem; line-height: 1.55; }

/* ==========================================================================
   Tools
   ========================================================================== */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 22px; box-shadow: var(--shadow); margin: 18px 0; }
.panel h3 { margin-top: 0; font-family: var(--serif); }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field > label, .field > .lab { font-weight: 700; font-size: .9rem; }
.field .hint { font-size: .8rem; color: var(--muted); }
.input, select.input {
  height: 46px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--paper); color: var(--ink); font: inherit; font-size: 1rem;
}
.input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px color-mix(in srgb, var(--gold) 18%, transparent); }
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg button {
  padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--paper); cursor: pointer; font-size: .9rem; transition: all .15s;
}
.seg button:hover { border-color: var(--gold); }
.seg button.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
input[type=range] { width: 100%; accent-color: var(--gold); }
.range-row { display: flex; justify-content: space-between; font-size: .76rem; color: var(--muted); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 20px; border-radius: 12px; border: 1px solid var(--ink); background: var(--ink); color: var(--paper); font-weight: 700; cursor: pointer; text-decoration: none; font-size: .95rem; }
.btn:hover { background: var(--accent); border-color: var(--accent); color: var(--paper); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn.ghost:hover { border-color: var(--gold); color: var(--ink); background: transparent; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* 긴급 */
.calm {
  text-align: center; padding: 34px 20px 30px; border-radius: 22px; margin-bottom: 26px; position: relative; overflow: hidden;
  background: radial-gradient(ellipse at 50% 0%, color-mix(in srgb, var(--gold) 16%, transparent), transparent 70%), var(--surface);
  border: 1px solid var(--line);
}
.calm .breath { width: 74px; height: 74px; margin: 0 auto 16px; border-radius: 50%; border: 1.5px solid var(--gold); position: relative; animation: breathe 8s ease-in-out infinite; }
.calm .breath::after { content: ""; position: absolute; inset: 12px; border-radius: 50%; background: color-mix(in srgb, var(--gold) 22%, transparent); }
@keyframes breathe { 0%, 100% { transform: scale(.8); } 45%, 55% { transform: scale(1.12); } }
.calm h1 { font-family: var(--display); font-size: clamp(1.6rem, 1.2rem + 1.8vw, 2.2rem); margin: 0 0 8px; }
.calm p { margin: 0 auto; max-width: 480px; color: var(--ink-2); font-family: var(--serif); }
.calm small { display: block; margin-top: 10px; color: var(--muted); font-size: .78rem; }

.sos-steps { list-style: none; padding: 0; margin: 0; counter-reset: e; }
.sos-step { counter-increment: e; display: grid; grid-template-columns: 52px 1fr; gap: 14px; padding: 18px 18px 16px; margin-bottom: 12px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); transition: opacity .25s, background .25s; animation: rise .45s both; }
.sos-step.done { opacity: .55; background: var(--paper-2); box-shadow: none; }
.sos-step .chk { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--accent); background: var(--surface); cursor: pointer; display: grid; place-items: center; font: 700 1.1rem var(--serif); color: var(--accent); transition: all .2s; }
.sos-step .chk::before { content: counter(e); }
.sos-step.done .chk { background: var(--tip); border-color: var(--tip); color: #fff; }
.sos-step.done .chk::before { content: "✓"; }
.sos-step h3 { margin: 4px 0 4px; font-family: var(--serif); font-size: 1.15rem; line-height: 1.45; }
.sos-step p { margin: 0; color: var(--ink-2); font-size: .94rem; }
.sos-step .more { display: inline-block; margin-top: 6px; font-size: .84rem; font-weight: 700; }
.sos-step .calls { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.sos-step .calls a { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px; background: var(--legal-soft); color: var(--legal); font-weight: 700; text-decoration: none; font-size: .88rem; }
.stop-line { display: flex; align-items: center; gap: 14px; margin: 28px 0; color: var(--gold); font-family: var(--serif); font-weight: 700; font-size: 1.05rem; }
.stop-line::before, .stop-line::after { content: ""; flex: 1; height: 1px; background: var(--gold); opacity: .4; }

/* 타임라인 */
.tl { list-style: none; padding: 0; margin: 20px 0; position: relative; }
.tl::before { content: ""; position: absolute; left: 118px; top: 10px; bottom: 10px; width: 2px; background: linear-gradient(var(--gold), var(--accent)); opacity: .5; }
.tl-item { display: grid; grid-template-columns: 100px 36px 1fr; gap: 0 0; align-items: start; margin-bottom: 14px; animation: rise .4s both; }
.tl-date { text-align: right; padding: 12px 14px 0 0; }
.tl-date b { display: block; font: 700 .98rem var(--serif); }
.tl-date small { color: var(--muted); font-size: .74rem; }
.tl-node { width: 16px; height: 16px; border-radius: 50%; margin: 18px 0 0 11px; background: var(--surface); border: 3px solid var(--gold); position: relative; z-index: 1; }
.tl-item.legal .tl-node { border-color: var(--legal); }
.tl-item.done .tl-node { background: var(--tip); border-color: var(--tip); }
.tl-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px 12px; box-shadow: var(--shadow); }
.tl-item.past:not(.done) .tl-card { border-color: color-mix(in srgb, var(--legal) 45%, var(--line)); }
.tl-item.done .tl-card { opacity: .6; box-shadow: none; }
.tl-card .tl-top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tl-card h4 { margin: 0; font-size: 1rem; flex: 1; min-width: 180px; }
.tl-card p { margin: 4px 0 0; font-size: .86rem; color: var(--ink-2); line-height: 1.6; }
.tl-card .tl-foot { display: flex; gap: 12px; align-items: center; margin-top: 8px; flex-wrap: wrap; font-size: .8rem; }
.dday { font: 700 .76rem var(--sans); padding: 2px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); white-space: nowrap; }
.dday.soon { background: var(--rec-soft); color: var(--rec); }
.dday.over { background: var(--legal-soft); color: var(--legal); }
.dday.ok { background: var(--tip-soft); color: var(--tip); }
.tl-done { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; color: var(--muted); }
.tl-done input { accent-color: var(--tip); width: 16px; height: 16px; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: .8rem; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; border: 2.5px solid; margin-right: 6px; vertical-align: -1px; }

/* 결과 막대 */
.bars { display: grid; gap: 12px; margin-top: 10px; }
.bar-row { display: grid; grid-template-columns: 110px 1fr 48px; gap: 12px; align-items: center; }
.bar-row .bl { font-weight: 700; font-size: .92rem; }
.bar-row .bt { height: 14px; background: var(--paper-2); border-radius: 8px; overflow: hidden; }
.bar-row .bt i { display: block; height: 100%; border-radius: 8px; background: linear-gradient(90deg, var(--accent), var(--gold)); transition: width .6s cubic-bezier(.2,.7,.2,1); }
.bar-row .bv { font: 700 .86rem var(--sans); color: var(--muted); text-align: right; }
.bar-row.top .bl { color: var(--gold); }
.result-hero { display: flex; gap: 18px; align-items: center; padding: 20px; border-radius: 16px; background: var(--gold-soft); margin-bottom: 18px; }
.result-hero .rh-ico { font-size: 2.4rem; }
.result-hero small { color: var(--gold); font-weight: 700; font-size: .76rem; letter-spacing: .1em; }
.result-hero b { display: block; font-family: var(--display); font-size: 1.6rem; line-height: 1.3; }
.result-hero p { margin: 4px 0 0; font-size: .9rem; color: var(--ink-2); }

.cost-total { text-align: center; padding: 22px; border-radius: 16px; background: var(--ink); color: var(--paper); margin-bottom: 18px; }
.cost-total small { opacity: .7; font-size: .8rem; }
.cost-total b { display: block; font: 800 2.2rem/1.3 var(--display); letter-spacing: -.01em; }
.cost-total span { font-size: .84rem; opacity: .75; }
.cost-lines { display: grid; gap: 8px; }
.cost-line { display: grid; grid-template-columns: 1fr auto; gap: 10px; font-size: .9rem; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.cost-line small { display: block; color: var(--muted); font-size: .76rem; }
.cost-line b { white-space: nowrap; font-variant-numeric: tabular-nums; }

/* 결정 도우미 */
.q-card { animation: rise .35s both; }
.q-card h3 { font-family: var(--serif); font-size: 1.3rem; margin: 0 0 6px; }
.q-card p.q-help { color: var(--muted); font-size: .9rem; margin: 0 0 16px; }
.q-opts { display: grid; gap: 10px; }
.q-opts button { text-align: left; padding: 14px 18px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--paper); cursor: pointer; font-size: .98rem; transition: all .15s; }
.q-opts button small { display: block; color: var(--muted); font-size: .82rem; margin-top: 2px; }
.q-opts button:hover { border-color: var(--gold); background: var(--gold-soft); transform: translateX(3px); }
.q-trail { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; font-size: .78rem; }
.q-trail span { padding: 2px 10px; border-radius: 999px; background: var(--paper-2); color: var(--muted); }

/* toast */
.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); opacity: 0; background: var(--ink); color: var(--paper); padding: 10px 18px; border-radius: 999px; font-size: .88rem; z-index: 80; transition: all .25s; pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.sos-float { display: none; }

.notfound { text-align: center; padding: 80px 0; }
.notfound h1 { font-family: var(--display); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1280px) {
  .shell { grid-template-columns: var(--side) minmax(0, 1fr); }
  .toc { display: none; }
}
@media (max-width: 980px) {
  :root { --top: 60px; }
  .menu-btn { display: inline-flex; }
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar {
    position: fixed; left: 0; top: var(--top); bottom: 0; height: auto; width: min(320px, 86vw); z-index: 45;
    background: var(--paper); transform: translateX(-102%); transition: transform .3s cubic-bezier(.2,.7,.2,1); box-shadow: var(--shadow-lg);
  }
  body.nav-open .sidebar { transform: none; }
  .sos { display: none; }
  .sos-float {
    display: flex; position: fixed; left: 16px; right: 16px; bottom: calc(14px + env(safe-area-inset-bottom)); z-index: 30; justify-content: center;
    height: 50px; align-items: center; border-radius: 999px; background: var(--ink); color: var(--paper); font-weight: 700; text-decoration: none; box-shadow: var(--shadow-lg);
  }
  body.route-emergency .sos-float { display: none; }
  main { padding: 28px 22px 120px; }
  .doors { grid-template-columns: 1fr; }
  .hero-flower { width: 180px; height: 180px; right: 0; top: -20px; opacity: .45; }
}
@media (max-width: 640px) {
  :root { --fs: 16px; }
  .topbar { gap: 8px; padding: 0 12px; }
  .brand-text small { display: none; }
  .search { max-width: none; }
  .search input { height: 38px; padding-right: 12px; font-size: .85rem; }
  .search kbd { display: none; }
  .search-results { left: 10px; right: 10px; top: calc(var(--top) - 4px); position: fixed; }
  .font-ctl { display: none; }
  .brand-text { display: none; }
  main { padding: 22px 16px 110px; }
  .pros-cons { grid-template-columns: 1fr; }
  .pager { grid-template-columns: 1fr; }
  .pager .next { grid-column: 1; }
  .page-head .ghost-num { font-size: 6rem; top: -30px; right: 0; }
  .tl::before { left: 14px; }
  .tl-item { grid-template-columns: 30px 1fr; }
  .tl-date { grid-column: 2; text-align: left; padding: 0 0 4px; display: flex; gap: 8px; align-items: baseline; }
  .tl-node { grid-row: 1 / span 2; grid-column: 1; margin: 4px 0 0 7px; }
  .tl-card { grid-column: 2; }
  .bar-row { grid-template-columns: 84px 1fr 40px; }
  .steps > li { padding-left: 50px; }
}

/* ==========================================================================
   Print
   ========================================================================== */
@media print {
  :root { --fs: 12pt; }
  body::before, .topbar, .sidebar, .toc, .pager, .related, .page-actions, .sos-float, .progress, .check-head .check-reset, .template .copy, .toast { display: none !important; }
  .shell { display: block; }
  main { padding: 0; }
  #view { max-width: none; }
  body { background: #fff; color: #000; }
  .card, .checklist, .tbl-wrap, .meta, .panel { box-shadow: none; }
  details.faq { break-inside: avoid; }
  details.faq > div { display: block !important; }
  a { color: #000; text-decoration: none; }
  .steps > li, .sos-step, .tl-item { break-inside: avoid; }
}

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