/* 정보규리 세금 — 잡지·경제지 스타일
   ink: 남색 잉크 / stamp: 도장 빨강 / form: 세금 서식 괘선 */
:root {
  --paper: #ffffff;
  --ink: #1a1f2b;
  --ink-soft: #3d4352;
  --muted: #6a7080;
  --rule: #d6d9e0;
  --rule-strong: #1a1f2b;
  --stamp: #b8232a;
  --note: #f4f5f7;
  --serif: 'Noto Serif KR', 'Nanum Myeongjo', serif;
  --sans: 'IBM Plex Sans KR', 'Apple SD Gothic Neo', sans-serif;
  --measure: 680px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 17px; -webkit-text-size-adjust: 100%; }
body { background: var(--paper); color: var(--ink); font-family: var(--sans); line-height: 1.8; word-break: keep-all; }
a { color: inherit; }
a:focus-visible, button:focus-visible, .faq-q:focus-visible { outline: 2px solid var(--stamp); outline-offset: 3px; }
img { max-width: 100%; }

/* ---------- 마스트헤드 ---------- */
.masthead { border-bottom: 3px double var(--rule-strong); }
.issue-bar { max-width: 1040px; margin: 0 auto; padding: .55rem 1.25rem; display: flex; justify-content: space-between; gap: 1rem; font-family: var(--sans); font-size: .78rem; color: var(--muted); border-bottom: 1px solid var(--rule); }
.issue-bar .issue { color: var(--ink); font-weight: 600; }
.mast-inner { max-width: 1040px; margin: 0 auto; padding: 1.4rem 1.25rem 1rem; display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; }
.mast-title { font-family: var(--serif); font-weight: 800; font-size: 2.6rem; line-height: 1; letter-spacing: -.04em; text-decoration: none; }
.mast-title small { display: block; font-family: var(--sans); font-weight: 500; font-size: .78rem; letter-spacing: 0; color: var(--muted); margin-top: .55rem; }
.mast-nav { display: flex; gap: 1.25rem; font-family: var(--sans); font-size: .9rem; font-weight: 500; }
.mast-nav a { text-decoration: none; padding-bottom: .2rem; border-bottom: 2px solid transparent; }
.mast-nav a:hover, .mast-nav a[aria-current="page"] { border-bottom-color: var(--stamp); }
.menu-toggle { display: none; background: none; border: 1px solid var(--ink); font-family: var(--sans); font-size: .85rem; padding: .3rem .7rem; cursor: pointer; color: var(--ink); }
.mobile-nav { display: none; border-top: 1px solid var(--rule); }
.mobile-nav a { display: block; padding: .8rem 1.25rem; border-bottom: 1px solid var(--rule); font-family: var(--sans); text-decoration: none; }
.mobile-nav.open { display: block; }

/* ---------- 기사 머리 ---------- */
.article-head { max-width: var(--measure); margin: 0 auto; padding: 2.6rem 1.25rem 1.6rem; border-bottom: 1px solid var(--rule); }
.kicker { font-family: var(--sans); font-size: .85rem; font-weight: 600; color: var(--stamp); margin-bottom: .9rem; }
.article-head h1 { font-family: var(--serif); font-weight: 800; font-size: 2.15rem; line-height: 1.32; letter-spacing: -.035em; }
.dek { font-size: 1.12rem; line-height: 1.7; color: var(--ink-soft); margin-top: 1rem; }
.byline { font-family: var(--sans); font-size: .82rem; color: var(--muted); margin-top: 1.3rem; display: flex; flex-wrap: wrap; gap: .35rem 1.1rem; }

/* ---------- 본문 ---------- */
.post-body { max-width: var(--measure); margin: 0 auto; padding: 2rem 1.25rem 3rem; font-size: 1.02rem; }
.post-body p { margin-bottom: 1.15rem; }
.post-body .lead { font-size: 1.15rem; line-height: 1.8; }
.post-body h2 { font-family: var(--serif); font-weight: 800; font-size: 1.45rem; line-height: 1.4; letter-spacing: -.02em; margin: 2.8rem 0 1rem; padding-top: 1rem; border-top: 2px solid var(--rule-strong); }
.post-body h3 { font-weight: 600; font-size: 1.15rem; margin: 1.8rem 0 .6rem; }
.post-body ul, .post-body ol { padding-left: 1.3rem; margin-bottom: 1.2rem; }
.post-body li { margin-bottom: .55rem; }
.post-body li::marker { color: var(--stamp); font-family: var(--sans); font-weight: 600; }
.post-body strong { font-weight: 600; }

/* 공식 사이트 버튼 */
.cta-wrap { margin: 1.6rem 0 2rem; }
.cta-btn { display: block; background: var(--ink); color: #fff; text-decoration: none; text-align: center; font-family: var(--sans); font-weight: 600; font-size: 1rem; padding: 1rem 1.2rem; border-radius: 2px; }
.cta-btn:hover { background: var(--stamp); }
.cta-note { font-family: var(--sans); font-size: .8rem; color: var(--muted); text-align: center; margin-top: .55rem !important; }

/* 세금 서식 괘선 표 */
.table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 1.4rem 0 1.6rem; }
.post-body table { width: 100%; border-collapse: collapse; font-family: var(--sans); font-size: .9rem; line-height: 1.6; font-variant-numeric: tabular-nums; border-top: 3px double var(--rule-strong); border-bottom: 1px solid var(--rule-strong); }
.post-body th, .post-body td { padding: .7rem .75rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--rule); }
.post-body th { font-weight: 600; color: var(--ink); background: var(--note); white-space: nowrap; }
.post-body tr:last-child td, .post-body tr:last-child th { border-bottom: 0; }

/* 요약 상자 = 서식 한 장 */
.highlight-box { border: 1px solid var(--rule-strong); padding: 1.1rem 1.1rem .3rem; margin: 1.8rem 0; position: relative; }
.highlight-box > strong:first-child { display: block; font-family: var(--sans); font-size: .85rem; font-weight: 600; margin-bottom: .2rem; }
.highlight-box .table-wrapper { margin: .6rem 0 .9rem; }
.tip-box { background: var(--note); padding: 1.1rem 1.25rem; margin: 1.6rem 0; }
.tip-box > strong:first-child { display: block; font-family: var(--sans); font-size: .9rem; margin-bottom: .4rem; }
.tip-box ul { margin-bottom: 0; }
.warn-box { border-left: 3px solid var(--stamp); padding: .3rem 0 .3rem 1rem; margin: 1.6rem 0; color: var(--ink-soft); font-size: .98rem; }

/* 목차 */
.toc { border-top: 1px solid var(--rule-strong); border-bottom: 1px solid var(--rule); padding: 1rem 0; margin: 1.8rem 0 .5rem; font-family: var(--sans); font-size: .92rem; }
.toc strong { display: block; font-weight: 600; margin-bottom: .4rem; }
.toc ol { margin: 0; }
.toc li { margin-bottom: .25rem; }
.toc a { text-decoration: none; }
.toc a:hover { color: var(--stamp); }

/* 함께 읽기 */
.next-card { display: block; text-decoration: none; border-top: 1px solid var(--rule-strong); border-bottom: 1px solid var(--rule); padding: 1rem 0; margin: 2rem 0; }
.next-card .icon { display: none; }
.next-card .title { font-family: var(--serif); display: block; font-weight: 800; font-size: 1.15rem; line-height: 1.45; }
.next-card .desc { display: block; font-family: var(--sans); font-size: .85rem; color: var(--muted); margin-top: .3rem; }
.next-card .read { display: block; font-family: var(--sans); font-size: .8rem; font-weight: 600; color: var(--stamp); margin-bottom: .35rem; }
.next-card:hover .title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }

/* FAQ */
.faq-section { border-top: 1px solid var(--rule-strong); }
.faq-item { border-bottom: 1px solid var(--rule); }
.faq-q { display: flex; justify-content: space-between; gap: 1rem; padding: 1rem 0; font-weight: 600; cursor: pointer; }
.faq-q::after { content: "+"; font-family: var(--sans); color: var(--stamp); font-weight: 600; }
.faq-item.open .faq-q::after { content: "−"; }
.faq-a { display: none; padding: 0 0 1.1rem; color: var(--ink-soft); }
.faq-item.open .faq-a { display: block; }

.source { font-family: var(--sans); font-size: .78rem; line-height: 1.7; color: var(--muted); border-top: 1px solid var(--rule); padding-top: .9rem; margin-top: 2rem; }
.source a { color: inherit; }

/* ---------- 표지(허브) ---------- */
.cover { max-width: 1040px; margin: 0 auto; padding: 2.2rem 1.25rem 3rem; display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 2.5rem; }
.cover-lead .kicker { margin-bottom: .7rem; }
.cover-lead h1 { font-family: var(--serif); font-weight: 800; font-size: 3rem; line-height: 1.22; letter-spacing: -.045em; }
.cover-lead .dek { font-size: 1.2rem; max-width: 34em; }
.cover-lead .cta-wrap { max-width: 26rem; }
.story { border-top: 2px solid var(--rule-strong); padding-top: 1rem; margin-top: 2rem; }
.story a { text-decoration: none; }
.story h2 { font-family: var(--serif); font-weight: 800; font-size: 1.5rem; line-height: 1.38; letter-spacing: -.025em; }
.story a:hover h2 { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; }
.story p { color: var(--ink-soft); margin-top: .5rem; }
.story .meta { font-family: var(--sans); font-size: .8rem; color: var(--muted); margin-top: .6rem; }
.cover-side { border-left: 1px solid var(--rule); padding-left: 2rem; }
.cover-side h2 { font-family: var(--sans); font-size: .95rem; font-weight: 600; padding-bottom: .6rem; border-bottom: 3px double var(--rule-strong); }
.ledger { list-style: none; font-family: var(--sans); font-size: .9rem; }
.ledger li { padding: .85rem 0; border-bottom: 1px solid var(--rule); }
.ledger .when { display: block; font-weight: 600; font-variant-numeric: tabular-nums; }
.ledger .what { display: block; color: var(--ink-soft); margin-top: .15rem; }
.ledger .state { display: inline-block; margin-top: .35rem; font-size: .75rem; color: var(--muted); border: 1px solid var(--rule); padding: .05rem .45rem; }
.ledger .state.fixed { color: var(--stamp); border-color: var(--stamp); }
.cover-side .source { margin-top: 1rem; border-top: 0; padding-top: 0; }

/* ---------- 푸터 ---------- */
.site-footer { border-top: 3px double var(--rule-strong); margin-top: 1rem; }
.foot-inner { max-width: 1040px; margin: 0 auto; padding: 1.6rem 1.25rem 2.4rem; font-family: var(--sans); font-size: .82rem; color: var(--muted); line-height: 1.8; }
.foot-inner .foot-title { font-family: var(--serif); font-weight: 800; font-size: 1.2rem; color: var(--ink); margin-bottom: .4rem; }
.foot-inner a { color: var(--ink-soft); }
.foot-inner .disclaimer { margin-top: .8rem; max-width: 46em; }

/* ---------- 반응형 ---------- */
@media (max-width: 820px) {
  .cover { grid-template-columns: 1fr; gap: 1rem; }
  .cover-side { border-left: 0; padding-left: 0; margin-top: 1rem; }
  .cover-lead h1 { font-family: var(--serif); font-size: 2.2rem; }
}
@media (max-width: 640px) {
  html { font-size: 16px; }
  .mast-title { font-size: 2rem; }
  .mast-nav { display: none; }
  .menu-toggle { display: inline-block; }
  .article-head { padding-top: 1.8rem; }
  .article-head h1 { font-family: var(--serif); font-size: 1.7rem; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }

/* 붉은색 포인트: 상단 띠, 호수 표시, 섹션 괘선 (버튼은 남색 유지) */
.masthead { border-top: 6px solid var(--stamp); }
.issue-bar .issue { color: var(--stamp); }
.cover-side h2 { border-bottom-color: var(--stamp); }
.story, .post-body h2 { border-top-color: var(--stamp); }
.post-body table { border-top-color: var(--stamp); }

/* 호 부제 */
.issue-bar .issue-sub { color: var(--ink-soft); font-family: var(--serif); font-weight: 800; }
