/* 다크 캔버스 + 단일 노란 강조 (참조 대시보드 스타일). 숫자는 탭형 숫자, 증감은 초록/빨강 */
:root {
  --bg: #0B0E11; --surface: #1E2329; --sunk: #161A1E; --elev: #2B3139;
  --ink: #EAECEF; --hi: #FFFFFF; --muted: #929AA5; --muted2: #707A8A; --line: #2B3139; --grid: #2B3139;
  --accent: #FCD535; --accent-act: #F0B90B; --on-accent: #181A20; --accent-soft: #3A3417;
  --pos: #0ECB81; --pos-soft: #0E2B22; --neg: #F6465D; --neg-soft: #3A1A20; --info: #3B82F6;
  --c1: #4C8DFF; --c2: #B7BDC6; --c3: #F78D3F; --c4: #B37FEB; --c5: #2DBDB6; --c6: #FF7EB6;
  --font: "Inter", "IBM Plex Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
  --num: "IBM Plex Sans", "IBM Plex Sans KR", "Segoe UI", sans-serif;
  --r: 12px; --rm: 6px; --rl: 8px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 14px; line-height: 1.5; font-variant-numeric: tabular-nums; }
button, input, select { font: inherit; }
h1, h2, h3 { margin: 0; }

/* ---------- 상단 바 ---------- */
.topbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: rgba(11, 14, 17, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.topbar-in { max-width: 1440px; margin: 0 auto; padding: 10px 20px; display: flex; align-items: center; gap: 20px; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--hi); font-weight: 800; text-decoration: none; white-space: nowrap; }
.logo-mark { width: 10px; height: 22px; background: var(--accent); border-radius: 2px; }
.nav { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.nav button { border: 0; background: transparent; color: var(--muted); font-weight: 600; padding: 8px 14px; border-radius: var(--rm); cursor: pointer; white-space: nowrap; display: flex; gap: 6px; align-items: baseline; }
.nav button b { font-family: var(--num); font-size: 11px; color: var(--muted2); }
.nav button:hover { color: var(--hi); background: var(--surface); }
.nav button.on { color: var(--on-accent); background: var(--accent); }
.nav button.on b { color: var(--on-accent); opacity: .7; }
.plan-chip { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); background: var(--sunk); border: 1px solid var(--line); border-radius: 99px; padding: 4px 12px; white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--pos); flex-shrink: 0; }

.wrap { max-width: 1440px; margin: 0 auto; padding: 24px 20px 64px; }
.view { display: none; flex-direction: column; gap: 18px; }
.view.on { display: flex; }
.view-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px 24px; }
.view-head h1, .view-head .view-title { font-size: 28px; font-weight: 700; color: var(--hi); letter-spacing: -.5px; }
.sub { color: var(--muted); margin: 2px 0 0; font-size: 13px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.note { font-size: 12px; color: var(--muted); margin: 0; }
.hint { font-size: 12px; color: var(--muted); margin: 0; }
.mt8 { margin-top: 8px; } .mt14 { margin-top: 14px; }

/* ---------- 공통 컴포넌트 ---------- */
.panel, .sec, .kpi, .yearbox { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.sec { padding: 14px 16px; min-width: 0; }
.sec h2, .panel h2 { font-size: 15px; color: var(--hi); font-weight: 700; margin: 0 0 10px; display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.btn { border-radius: var(--rm); background: var(--elev); border: 1px solid var(--elev); color: var(--hi); font-weight: 600; min-height: 36px; padding: 6px 12px; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: var(--muted2); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.primary:active { background: var(--accent-act); }
.btn.danger { color: var(--neg); }
.btn.danger:hover { border-color: var(--neg); background: var(--neg-soft); }
.btn.lg { min-height: 44px; padding: 10px 20px; font-size: 15px; }
.btn.full { width: 100%; }
.btn.add { width: 100%; margin-top: 6px; background: transparent; border: 1px dashed var(--muted2); color: var(--muted); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
input, select { color: var(--hi); background: var(--sunk); border: 1px solid var(--elev); border-radius: var(--rl); padding: 6px 8px; min-width: 0; width: 100%; }
input.amt { text-align: right; font-family: var(--num); }
input:focus-visible, select:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
label.mini { display: flex; flex-direction: column; font-size: 11px; color: var(--muted); gap: 3px; }
.chk { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); cursor: pointer; }
.chk input { width: auto; accent-color: var(--accent); }
.tag-example, .dirty { font-size: 11px; font-weight: 600; color: var(--accent); background: var(--accent-soft); border: 1px solid var(--accent); border-radius: 99px; padding: 1px 10px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--accent); color: var(--on-accent); font-weight: 600; padding: 9px 16px; border-radius: 8px; font-size: 13px; z-index: 50; }

/* ---------- 01 소개 ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 32px; align-items: center; padding: 28px 0 8px; }
.eyebrow { font-family: var(--num); font-size: 12px; font-weight: 700; color: var(--accent); letter-spacing: .12em; }
.hero-title { font-size: 44px; line-height: 1.2; font-weight: 800; color: var(--hi); letter-spacing: -1px; margin: 12px 0 16px; text-wrap: balance; }
.hero-title em { font-style: normal; color: var(--accent); }
.hero-sub { color: var(--muted); font-size: 15px; max-width: 620px; margin: 0 0 24px; }
.hero-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.hero-card .hc-top { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; }
.hero-card .hc-big { font-family: var(--num); font-size: 34px; font-weight: 700; color: var(--accent); letter-spacing: -.5px; }
.hero-card .hc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hero-card .hc-grid div { background: var(--sunk); border-radius: 8px; padding: 10px 12px; }
.hero-card .hc-grid span { display: block; font-size: 12px; color: var(--muted); }
.hero-card .hc-grid b { font-family: var(--num); font-size: 16px; color: var(--hi); }
.hc-bar { display: flex; height: 10px; border-radius: 99px; overflow: hidden; background: var(--sunk); }
.hc-bar i { display: block; height: 100%; }
.sec-title { font-size: 18px; color: var(--hi); margin-top: 16px; }
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.step { text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; color: var(--ink); cursor: pointer; display: flex; flex-direction: column; gap: 6px; transition: border-color .15s, transform .15s; }
.step:hover { border-color: var(--accent); transform: translateY(-2px); }
.step-n { font-family: var(--num); font-weight: 700; color: var(--accent); font-size: 13px; }
.step h3 { font-size: 17px; color: var(--hi); }
.step p { margin: 0; font-size: 13px; color: var(--muted); }
.notice { padding: 14px 16px; font-size: 13px; color: var(--muted); }
.notice b { color: var(--hi); margin-right: 8px; }

/* ---------- 02 입력 ---------- */
.planbar { padding: 12px 16px; display: flex; flex-direction: column; gap: 8px; }
.pb-row { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; }
.pb-l { font-weight: 700; color: var(--hi); }
#planSel { width: auto; min-width: 200px; max-width: 100%; font-weight: 600; }
.pb-btns { display: flex; flex-wrap: wrap; gap: 6px; margin-left: auto; }
.pb-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; background: var(--sunk); border-radius: 8px; padding: 8px 10px; }
.pb-form input#nameIn { width: 240px; max-width: 100%; }
.input-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; }
.editor { display: flex; flex-direction: column; overflow: hidden; }
.ph { padding: 12px 16px; border-bottom: 1px solid var(--line); }
.pb { padding: 14px 16px; display: flex; flex-direction: column; gap: 14px; }
.pf { padding: 12px 16px; border-top: 1px solid var(--line); display: flex; gap: 8px; flex-wrap: wrap; align-items: stretch; }
.pf .drop { flex: 1; min-width: 240px; }
.tabs { display: flex; gap: 4px; background: var(--sunk); padding: 3px; border-radius: 8px; }
.tabs button { flex: 1; border: 0; background: transparent; color: var(--muted); font-weight: 600; padding: 7px 8px; border-radius: 6px; cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--accent); color: var(--on-accent); }
.grp h3 { margin: 0 0 8px; font-size: 12px; letter-spacing: .04em; color: var(--muted); font-weight: 600; display: flex; justify-content: space-between; }
.grp h3 span:last-child { font-family: var(--num); color: var(--ink); }
.item { display: grid; gap: 6px; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--sunk); align-items: center; }
.item + .item { margin-top: 6px; }
.item input, .item select { background: var(--surface); }
.i-asset { grid-template-columns: minmax(0, 1fr) 150px 74px 28px; }
.i-flow { grid-template-columns: minmax(0, 1fr) 150px 28px; }
.i-flow .meta { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.basic-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.basic-grid label { font-size: 12px; }
.del { border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 18px; border-radius: 6px; height: 30px; }
.del:hover { color: var(--neg); background: var(--neg-soft); }
.drop { border: 1.5px dashed var(--line); border-radius: 8px; padding: 10px; text-align: center; font-size: 12px; color: var(--muted); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.drop.over, .drop:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.live { padding: 16px; display: flex; flex-direction: column; gap: 12px; position: sticky; top: 72px; }
.live-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.live-kpis div { background: var(--sunk); border-radius: 8px; padding: 8px 10px; }
.live-kpis span { display: block; font-size: 11px; color: var(--muted); }
.live-kpis b { font-family: var(--num); color: var(--hi); font-size: 15px; }
.live-kpis .acc b { color: var(--accent); }

/* ---------- 03 출력 ---------- */
.yearbox { display: flex; align-items: center; gap: 14px; padding: 10px 16px; flex-wrap: wrap; }
.yearbox strong { font-family: var(--num); font-size: 20px; color: var(--accent); min-width: 80px; }
.yearbox input[type=range] { width: 260px; max-width: 100%; accent-color: var(--accent); padding: 0; border: 0; background: transparent; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.kpi { padding: 12px 14px; min-width: 0; }
.kpi .k { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.kpi .v { font-family: var(--num); font-size: 23px; font-weight: 700; color: var(--hi); letter-spacing: -.3px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi .f { font-family: var(--num); font-size: 11px; color: var(--muted2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi.net { background: var(--accent-soft); border-color: var(--accent); }
.kpi.net .v { color: var(--accent); }
.kpi.inc .v { color: var(--pos); }
.kpi.exp .v, .kpi.neg .v { color: var(--neg); }
.tw { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 640px; }
th, td { padding: 7px 10px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
th { font-size: 12px; color: var(--muted); font-weight: 600; background: var(--sunk); }
td { font-family: var(--num); color: var(--ink); }
th:first-child, td:first-child { text-align: left; font-family: var(--font); }
td.sub { padding-left: 24px; }
tr.sum td { font-weight: 700; background: var(--elev); color: var(--hi); }
tr.inc td { color: var(--pos); }
tr.exp td { color: var(--neg); }
tr.net td { font-weight: 700; background: var(--accent-soft); color: var(--accent); }
.sw { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 7px; }
.charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.cbox { position: relative; height: 300px; }
.cbox.sm { height: 220px; }
.pie { max-width: 640px; width: 100%; margin-inline: auto; }

/* ---------- 04 몬테카를로 ---------- */
.mc-layout { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 18px; align-items: start; }
.mc-settings { padding: 16px; display: flex; flex-direction: column; gap: 10px; position: sticky; top: 72px; max-height: calc(100vh - 90px); overflow: auto; }
.mc-set { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.mini-h { font-size: 12px; color: var(--muted); font-weight: 600; margin-top: 6px; }
.mc-main { display: flex; flex-direction: column; gap: 0; min-width: 0; }
.mc-status { font-size: 13px; margin: 0 0 14px; padding: 10px 12px; border-radius: 8px; background: var(--sunk); color: var(--muted); border: 1px solid var(--line); }
.mc-status.ok { color: var(--pos); }
.mc-status.stale { color: var(--accent); }
.legend-key { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--muted); margin-top: 8px; }
.legend-key i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }

/* ---------- 05 조언 ---------- */
.advice-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.chat { display: flex; flex-direction: column; height: calc(100vh - 190px); min-height: 520px; }
.chat-log { flex: 1; overflow: auto; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.msg { max-width: 82%; padding: 12px 14px; border-radius: 12px; white-space: pre-wrap; line-height: 1.6; }
.msg.bot { background: var(--sunk); border: 1px solid var(--line); border-top-left-radius: 4px; align-self: flex-start; }
.msg.bot strong { color: var(--accent); }
.msg.user { background: var(--accent); color: var(--on-accent); font-weight: 600; border-top-right-radius: 4px; align-self: flex-end; }
.msg.typing { color: var(--muted); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 20px 12px; }
.chip { border: 1px solid var(--elev); background: var(--sunk); color: var(--ink); border-radius: 99px; padding: 6px 12px; font-size: 13px; font-weight: 600; cursor: pointer; }
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chat-input { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); }
.health { padding: 18px; display: flex; flex-direction: column; gap: 12px; position: sticky; top: 72px; }
.score { display: flex; align-items: baseline; gap: 6px; }
.score b { font-family: var(--num); font-size: 44px; font-weight: 700; color: var(--accent); }
.metric { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.metric > div:first-child { display: flex; justify-content: space-between; }
.metric b { font-family: var(--num); color: var(--hi); }
.bar { height: 6px; background: var(--sunk); border-radius: 99px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.diag { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.diag li { display: flex; gap: 8px; font-size: 13px; padding: 8px 10px; background: var(--sunk); border-radius: 8px; }
.lv { flex-shrink: 0; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 99px; height: fit-content; margin-top: 1px; }
.lv.good { background: var(--pos-soft); color: var(--pos); }
.lv.warn { background: var(--accent-soft); color: var(--accent); }
.lv.bad { background: var(--neg-soft); color: var(--neg); }

/* ---------- A4 미리보기 ---------- */
.overlay { position: fixed; inset: 0; z-index: 40; background: rgba(0, 0, 0, .78); display: flex; flex-direction: column; }
.overlay-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 10px 20px; background: var(--surface); border-bottom: 1px solid var(--line); color: var(--hi); }
.grow { flex: 1; }
.seg { display: inline-flex; background: var(--sunk); border-radius: 8px; padding: 3px; }
.seg button { border: 0; background: transparent; padding: 5px 12px; border-radius: 6px; font-weight: 600; color: var(--muted); cursor: pointer; }
.seg button.on { background: var(--accent); color: var(--on-accent); }
.a4-stage { flex: 1; overflow: auto; padding: 24px; display: flex; flex-direction: column; align-items: center; gap: 24px; }

/* A4 페이지는 항상 흰 종이 테마 */
.a4 {
  --surface: #FFFFFF; --sunk: #F5F6F8; --elev: #EAECEF; --ink: #1E2329; --hi: #0B0E11; --muted: #5E6673; --muted2: #848E9C;
  --line: #E1E4E8; --accent: #C99400; --accent-soft: #FFF6D6; --pos: #03A66D; --pos-soft: #E6F7F0; --neg: #CF304A; --neg-soft: #FDECEF;
  width: 210mm; height: 297mm; background: #fff; color: var(--ink); position: relative; overflow: hidden; flex-shrink: 0;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .5); font-size: 12px;
}
.a4.landscape { width: 297mm; height: 210mm; }
.a4-inner { padding: 12mm 12mm 14mm; transform-origin: top left; display: flex; flex-direction: column; gap: 10px; }
.a4 .a4-head { display: flex; justify-content: space-between; align-items: flex-end; border-bottom: 3px solid #FCD535; padding-bottom: 8px; }
.a4 .a4-head h1 { font-size: 22px; color: var(--hi); }
.a4 .a4-head span { font-size: 11px; color: var(--muted); }
.a4 .a4-h2 { font-size: 14px; font-weight: 700; color: var(--hi); margin: 4px 0 0; padding-left: 8px; border-left: 4px solid #FCD535; }
.a4 .kpis { gap: 6px; }
.a4 .kpi { padding: 8px 10px; }
.a4 .kpi .v { font-size: 16px; }
.a4 .sec { padding: 10px 12px; }
.a4 .sec h2 { font-size: 13px; margin-bottom: 6px; }
.a4 table { min-width: 0; font-size: 11px; }
.a4 th, .a4 td { padding: 4px 6px; }
.a4 .charts { gap: 10px; }
.a4 .cbox { height: 210px; }
.a4 .diag li { font-size: 11.5px; padding: 6px 8px; }
.a4 .a4-foot { position: absolute; left: 12mm; right: 12mm; bottom: 6mm; display: flex; justify-content: space-between; font-size: 9.5px; color: #848E9C; }

/* ---------- 반응형 ---------- */
@media (max-width: 1100px) {
  .input-layout, .mc-layout, .advice-layout { grid-template-columns: minmax(0, 1fr); }
  .live, .mc-settings, .health { position: static; max-height: none; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero-title { font-size: 32px; }
  .charts { grid-template-columns: minmax(0, 1fr); }
  .plan-chip { display: none; }
}
@media (max-width: 640px) {
  .wrap { padding: 16px 16px 48px; }
  .topbar-in { flex-wrap: wrap; gap: 8px; padding: 10px 16px; }
  .nav { width: 100%; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .i-asset { grid-template-columns: minmax(0, 1fr) 110px 28px; }
  .i-asset select[data-k="rate"] { grid-column: 1 / 3; }
  .basic-grid, .mc-set { grid-template-columns: minmax(0, 1fr); }
  .msg { max-width: 92%; }
}
/* A4 안은 화면 너비와 무관하게 고정 */
.a4 .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.a4 .charts { grid-template-columns: repeat(2, minmax(0, 1fr)); }

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

/* ---------- 인쇄: A4 페이지만 ---------- */
@media print {
  body { background: #fff; }
  body > *:not(.overlay) { display: none !important; }
  .overlay { position: static; background: #fff; display: block; }
  .overlay-bar { display: none !important; }
  .a4-stage { padding: 0; display: block; overflow: visible; }
  .a4 { box-shadow: none; break-after: page; page-break-after: always; }
  .a4:last-child { break-after: auto; page-break-after: auto; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ================= 콘텐츠 페이지 · 푸터 · FAQ (SEO/애드센스용) ================= */
.nav a { color: var(--muted); font-weight: 600; padding: 8px 14px; border-radius: var(--rm); text-decoration: none; white-space: nowrap; }
.nav a:hover { color: var(--hi); background: var(--surface); }
.nav a.on { color: var(--on-accent); background: var(--accent); }
.nav .nav-link { margin-left: 6px; border-left: 1px solid var(--line); border-radius: 0 var(--rm) var(--rm) 0; }
a { color: var(--accent); }
.link-more { font-weight: 600; text-decoration: none; }
.link-more:hover { text-decoration: underline; }

.guide-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.guide-card { display: flex; flex-direction: column; gap: 6px; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; color: var(--ink); transition: border-color .15s; }
.guide-card:hover { border-color: var(--accent); }
.guide-card h3 { font-size: 16px; color: var(--hi); line-height: 1.4; text-wrap: balance; }
.guide-card p { margin: 0; font-size: 13px; color: var(--muted); flex: 1; }
.guide-card span { font-size: 12px; font-weight: 600; color: var(--accent); }

.faq { display: flex; flex-direction: column; gap: 8px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 0 16px; }
.faq summary { cursor: pointer; padding: 14px 0; font-weight: 600; color: var(--hi); }
.faq details[open] summary { border-bottom: 1px solid var(--line); }
.faq details p { color: var(--muted); margin: 12px 0 14px; }

.site-footer { border-top: 1px solid var(--line); background: var(--sunk); margin-top: 40px; }
.footer-in { max-width: 1440px; margin: 0 auto; padding: 32px 20px 16px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 24px; }
.footer-brand { display: flex; flex-direction: column; gap: 8px; }
.footer-brand b { color: var(--hi); font-size: 15px; }
.footer-brand .logo-mark { height: 16px; width: 8px; }
.footer-brand p { margin: 0; font-size: 13px; color: var(--muted); max-width: 320px; }
.footer-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.footer-links div { display: flex; flex-direction: column; gap: 6px; }
.footer-links h4 { margin: 0 0 4px; font-size: 12px; color: var(--muted2); letter-spacing: .06em; }
.footer-links a { color: var(--ink); text-decoration: none; font-size: 13px; }
.footer-links a:hover { color: var(--accent); }
.footer-note { max-width: 1440px; margin: 0 auto; padding: 12px 20px 28px; font-size: 12px; color: var(--muted2); border-top: 1px solid var(--line); }

/* 글 페이지 */
.doc-wrap { max-width: 820px; display: flex; flex-direction: column; gap: 16px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12px; color: var(--muted); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.crumbs i { font-style: normal; color: var(--muted2); }
.doc { display: flex; flex-direction: column; gap: 14px; font-size: 16px; line-height: 1.8; color: var(--ink); min-width: 0; }
.doc h1 { font-size: 32px; line-height: 1.3; font-weight: 800; color: var(--hi); letter-spacing: -.5px; text-wrap: balance; margin-top: 8px; }
.doc h2 { font-size: 21px; color: var(--hi); margin-top: 18px; text-wrap: balance; }
.doc p, .doc ul, .doc ol { margin: 0; }
.doc ul, .doc ol { padding-left: 1.3em; display: flex; flex-direction: column; gap: 6px; }
.doc b { color: var(--hi); }
.doc .lead { font-size: 18px; color: var(--ink); }
.meta-line { font-size: 13px !important; color: var(--muted2); }
.callout { background: var(--accent-soft); border: 1px solid var(--accent); border-radius: var(--rl); padding: 12px 16px; font-size: 14px; }
.table-scroll { overflow-x: auto; }
.doc-table { min-width: 0; font-size: 14px; border: 1px solid var(--line); border-radius: var(--rl); }
.doc-table td, .doc-table th { white-space: normal; text-align: left; vertical-align: top; font-family: var(--font); }
.table-scroll .doc-table { min-width: 640px; }
.formula { display: flex; flex-direction: column; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 18px; font-family: var(--num); }
.formula div { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; }
.formula span { color: var(--muted); font-family: var(--font); }
.formula .total { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 10px; }
.formula .total b { color: var(--accent); font-size: 18px; }
.refs { font-size: 14px; color: var(--muted); }
.contact-card { display: flex; flex-direction: column; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; }
.contact-card .label { font-size: 12px; color: var(--muted); }
.contact-card .email { font-family: var(--num); font-size: 20px; color: var(--accent); user-select: all; overflow-wrap: anywhere; }
.doc-cta { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; justify-content: space-between; margin-top: 18px; background: var(--surface); border: 1px solid var(--accent); border-radius: var(--r); padding: 18px 20px; }
.doc-cta p { margin: 4px 0 0; font-size: 14px; color: var(--muted); }
.doc-cta .btn { text-decoration: none; display: inline-flex; align-items: center; }
.doc .btn { text-decoration: none; display: inline-flex; align-items: center; }
.related { display: flex; flex-direction: column; gap: 12px; margin-top: 28px; }
.related h2 { font-size: 18px; color: var(--hi); }
.related .guide-grid, .doc .guide-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }

@media (max-width: 860px) {
  .guide-grid { grid-template-columns: minmax(0, 1fr); }
  .footer-in { grid-template-columns: minmax(0, 1fr); }
  .doc h1 { font-size: 26px; }
}
@media (max-width: 520px) {
  .footer-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .doc { font-size: 15.5px; }
}
