/* 서고 공통 디자인 — 설계서 docs/superpowers/specs/2026-10-10-blog-ui-design.md
   색·글꼴·폭은 맨 위 :root 에만 적는다. 화면 파일에는 색 코드를 쓰지 않는다. */

:root {
  /* 바탕 */
  --leather: #3B2719;       /* 머리 부분·꼬리말 */
  --leather-deep: #2D1D12;  /* 대표 글 표지·요점 상자 */
  --cream: #F3EBDD;         /* 본문 */
  --paper: #FBF6EC;         /* 카드·접는 상자 */
  --tab-back: #CDB896;      /* 뒤에 꽂힌 탭 */
  --tag-bg: #E9DCC1;        /* 꼬리표 */

  /* 글씨 — 괄호는 크림 바탕 대비(기준 4.5) */
  --ink: #2A1E16;           /* 제목·본문 (13.69) */
  --ink-body: #33261C;      /* 긴 문단 (12.36) */
  --ink-deck: #5A4838;      /* 부제·요약 (7.33) */
  --ink-soft: #6D5A49;      /* 날짜·출처 (5.53) */
  --brass-text: #7E5F2B;    /* 놋쇠색 글씨 — 크림·종이 바탕에서만 (4.98) */
  --tab-back-ink: #4A3726;  /* 뒤 탭·꼬리표 글씨 */

  /* 가죽 위 글씨 */
  --gold: #C9A66B;          /* 이름·핵심 숫자·금박 선 */
  --on-leather: #D9CBB3;    /* 가죽 위 보조 글씨 */
  --on-deep: #D8CAB4;       /* 짙은 가죽 위 문단 */
  --on-deep-soft: #B9A588;  /* 짙은 가죽 위 보조 글씨 */
  --on-deep-title: #F6EEDF; /* 짙은 가죽 위 제목 */

  /* 장식 — 글씨에 쓰지 않는다 */
  --brass: #9A7740;
  --rule: #CDBDA8;
  --hair: #E2D6C4;
  --tab-back-line: #B39A70;
  --tag-line: #CDB894;
  --card-line: #E1D4BF;
  --catalog-red: #B5483C;
  --spine-finance: #2F4B3C; /* 책등: 기업 재무검토 */
  --spine-economy: #7A2E25; /* 책등: 경제이슈 */
  --gilt: rgba(201, 166, 107, .55);
  --gilt-faint: rgba(201, 166, 107, .22);
  --gilt-line: rgba(201, 166, 107, .35);
  --shadow-card: 0 1px 0 rgba(60, 40, 15, .08), 0 8px 16px -10px rgba(60, 40, 15, .4);
  --shadow-cover: 0 12px 26px -16px rgba(40, 20, 8, .7);
  --shadow-hole: inset 0 1px 2px rgba(60, 40, 15, .35);

  /* 숫자·그래프 */
  --loss: #A63E2C;
  --margin-line: #2563A8;   /* 마진율 곡선·% 글자 - 갈색 막대·적갈색 적자와 색약에서도 구분(일반 19.1·색약 17.8, 크림 바탕 글자 대비 5.17) */
  --bar: #6B4A33;
  --bar-muted: #9C8877;
  --axis: #BFAF98;

  /* 글꼴 — 마루 부리는 굵기마다 이름이 따로라 굵은 글씨는 이름으로 고른다 */
  --font-name: 'Song Myung', serif;
  --font: 'MaruBuri', serif;
  --font-bold: 'MaruBuriBold', 'MaruBuri', serif;

  --wrap: 1100px;
}

/* ── 기초 ── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  word-break: keep-all;          /* 한글 낱말 중간에서 줄을 바꾸지 않는다 */
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  font-synthesis: none;          /* 가짜 굵게 금지 */
  text-wrap: pretty;             /* 문단·목록: 마지막 줄에 낱말 하나만 남지 않게(아래 요소가 모두 물려받는다) */
  display: flex; flex-direction: column; min-height: 100vh;
}
h1, h2, h3, p, ol, ul, dl, dd, figure { margin: 0; padding: 0; }
h1, h2, h3, .row-title { text-wrap: balance; }   /* 제목: 줄 길이를 고르게(전역 제약 7) */
ol, ul { list-style: none; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--brass-text); outline-offset: 2px; }
b, strong { font-weight: normal; font-family: var(--font-bold); }
button { font: inherit; }
.wrap { max-width: var(--wrap); margin: 0 auto; }
main { flex: 1 0 auto; width: 100%; }   /* 내용이 짧아도 꼬리말이 창 바닥에. margin:0 auto 로 가운데 놓인 칸이 줄어들지 않게 폭을 준다 */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ── 머리 부분 + 종이 탭 ── */
.site-head { background: var(--leather); padding: 12px 12px 0; }
.head-frame {
  border: 1px solid var(--gilt);
  outline: 1px solid var(--gilt-faint);
  outline-offset: 3px;
  padding: 20px 28px 18px;
  text-align: center;
}
.head-name { display: inline-flex; align-items: center; gap: 20px; font-family: var(--font-name); font-size: 40px; line-height: 1.1; color: var(--gold); }
.vine { flex: none; width: 96px; height: 23px; overflow: visible; }   /* 제목 양옆 덩굴(사용자 결정 2026-10-18) - 왼쪽은 거울로 뒤집어 이름 쪽에서 바깥으로 뻗는다 */
.vine-l { transform: scaleX(-1); }
.vine .stem, .vine .curl { fill: none; stroke: var(--gold); stroke-width: 1.3; stroke-linecap: round; stroke-opacity: .8; }
.vine .leaf { fill: var(--gold); opacity: .75; transform-box: fill-box; transform-origin: 0 90%; }
@media (prefers-reduced-motion: no-preference) {   /* 홈을 열 때만(site.js 0번이 .grow) 한 번: 줄기 → 잎이 차례로 → 끝 덩굴손 */
  .site-head.grow .vine .stem { stroke-dasharray: 1; animation: line-draw 1.4s ease-out both; }
  .site-head.grow .vine .curl { stroke-dasharray: 1; animation: line-draw .6s ease-out 1.25s both, fade-in 1ms linear 1.25s both; }   /* 그리기 전 둥근 끝이 점으로 미리 보이지 않게 */
  .site-head.grow .vine .leaf { animation: mo-pop .5s ease-out calc(.2s + var(--d) * .19s) both; }
}
.head-name span { letter-spacing: .12em; word-spacing: -.35em; padding-left: .12em; }   /* 『 글자 안의 여백만큼 띄어쓰기를 좁힌다 */
.head-name:hover { text-decoration: none; }
.head-desc { margin-top: 8px; color: var(--on-leather); font-size: 12.5px; letter-spacing: .2em; }
.tabs { position: relative; display: flex; align-items: flex-end; gap: 6px; padding: 16px 20px 0; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
  flex: none;
  white-space: nowrap;
  padding: 8px 16px 7px;
  font-size: 13.5px;
  color: var(--tab-back-ink);
  background: var(--tab-back);
  border: 1px solid var(--tab-back-line);
  border-bottom: none;
  border-radius: 8px 8px 0 0;
}
.tabs a:hover { text-decoration: none; filter: brightness(1.06); }
.tabs a[aria-current] { padding-top: 10px; color: var(--ink); background: var(--cream); border-color: var(--cream); font-family: var(--font-bold); filter: none; }   /* 지금 쪽(page)·지금 분류(true, 글 화면·회사 글 모음) */
.site-head :focus-visible, .site-foot :focus-visible { outline-color: var(--gold); }
.tabs a:focus-visible, .consonants a:focus-visible { outline: 2px solid var(--ink); outline-offset: -4px; }   /* 옆으로 밀리는 줄은 바깥 선을 자르므로 안쪽에. 금색은 뒤 탭 위에서 안 보여(1.19:1) 진한 글씨색 */

/* ── 꼬리말 ── */
.site-foot { background: var(--leather); color: var(--on-leather); }
.site-foot .wrap { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 22px 32px; font-size: 12.5px; line-height: 1.7; }
.foot-name { font-family: var(--font-name); font-size: 20px; letter-spacing: .12em; word-spacing: -.35em; color: var(--gold); }
.foot-links a + a::before { content: '·'; display: inline-block; margin: 0 8px; color: var(--on-deep-soft); }

/* ── 목록·색인·소개 공통 머리글 ── */
.page { max-width: 860px; margin: 0 auto; padding: 36px 32px 48px; }
.page-kicker { font-size: 12.5px; letter-spacing: .16em; color: var(--brass-text); }
.page-title { margin: 6px 0 8px; font-family: var(--font-bold); font-weight: normal; font-size: 30px; line-height: 1.35; text-wrap: balance; }
.page-desc { font-size: 15.5px; line-height: 1.75; color: var(--ink-deck); text-wrap: pretty; }
.page-count { margin-top: 10px; padding-bottom: 18px; border-bottom: 1px solid var(--rule); font-size: 12.5px; color: var(--ink-soft); }

/* ── 휴대폰(720px 미만): 공통 ── */
@media (max-width: 719px) {
  .site-head { padding: 8px 8px 0; }
  .head-frame { padding: 12px 10px 10px; }
  .head-name { gap: 12px; font-size: 26px; }
  .vine { width: 44px; height: 11px; }
  .head-desc { margin-top: 4px; font-size: 10.5px; letter-spacing: .1em; }
  .tabs {
    padding: 10px 6px 0;
    -webkit-mask-image: linear-gradient(to right, #000 80%, transparent);
    mask-image: linear-gradient(to right, #000 80%, transparent);
  }
  .tabs.at-end { -webkit-mask-image: none; mask-image: none; }
  .tabs a { padding: 7px 13px 6px; font-size: 13px; }
  .tabs a[aria-current] { padding-top: 9px; }
  .page { padding: 20px 16px 28px; }
  .page-title { font-size: 25px; }
  .site-foot .wrap { flex-direction: column; align-items: flex-start; padding: 20px 18px; }
}

/* ── 가죽 표지 상자(홈 대표 글·글 본문 '이 글의 요점') ── */
.leather-box {
  display: block;
  padding: 30px 30px 26px;
  color: var(--on-deep);
  background: var(--leather-deep);
  outline: 1px solid var(--gilt);
  outline-offset: -11px;
  box-shadow: var(--shadow-cover);
}
a.leather-box:hover { text-decoration: none; }
a.leather-box:hover .cover-title { text-decoration: underline; text-underline-offset: 4px; }
.leather-box:focus-visible { outline: 2px solid var(--brass-text); outline-offset: 3px; }
.kicker-gold { font-size: 12px; letter-spacing: .18em; color: var(--gold); }
.cover-title { margin: 10px 0 12px; font-family: var(--font-bold); font-weight: normal; font-size: 24px; line-height: 1.42; color: var(--on-deep-title); text-wrap: balance; }
.cover-sum { font-size: 14.5px; line-height: 1.8; text-wrap: pretty; }
.cover-meta { margin-top: 14px; font-size: 12px; color: var(--on-deep-soft); }
.figs { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--gilt-line); }
.figs dt { font-size: 11.5px; color: var(--on-deep-soft); }
.figs dd { margin-top: 3px; font-family: var(--font-bold); font-size: 17px; color: var(--gold); }

/* ── 책등 항목(글 카드)·책등 줄(짧은 목록) ── */
.spine { display: block; padding: 12px 15px; background: var(--paper); border: 1px solid var(--card-line); border-left: 6px solid var(--spine-finance); }
.spine.economy { border-left-color: var(--spine-economy); }
.spine-cat { font-size: 11.5px; letter-spacing: .1em; color: var(--ink-soft); }
.spine-title { margin: 3px 0 5px; font-family: var(--font-bold); font-size: 15px; line-height: 1.5; text-wrap: balance; }
.spine-date { font-size: 12px; color: var(--ink-soft); }
a.spine:hover { text-decoration: none; }
a.spine:hover .spine-title { text-decoration: underline; }
.sec-head { display: flex; justify-content: space-between; align-items: baseline; padding-bottom: 8px; border-bottom: 1.5px solid var(--ink); }
.sec-head h2 { font-family: var(--font-bold); font-weight: normal; font-size: 17px; }
.sec-head a { font-size: 12.5px; color: var(--brass-text); }
.row { position: relative; display: flex; align-items: baseline; gap: 12px; padding: 11px 0 11px 14px; border-bottom: 1px solid var(--hair); }
.row::before { content: ''; position: absolute; left: 0; top: 13px; bottom: 13px; width: 3px; background: var(--spine-finance); }
.row.economy::before { background: var(--spine-economy); }
.row-title { flex: 1; font-size: 15px; line-height: 1.5; }
.row-date { white-space: nowrap; font-size: 12px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
a.row:hover { text-decoration: none; }
a.row:hover .row-title { text-decoration: underline; }

/* ── 홈 ── */
.home { max-width: var(--wrap); margin: 0 auto; padding: 30px 32px 44px; }
.home-top { display: grid; grid-template-columns: 1.25fr 1fr; gap: 20px; }
.home-side { display: flex; flex-direction: column; gap: 12px; }
.home-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; margin-top: 38px; }
.home-top > :only-child, .home-cols > :only-child { grid-column: 1 / -1; }   /* 비는 칸을 숨기면 남은 칸이 줄을 다 쓴다(2단계 설계서 10.2) */
.strip { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 38px; padding: 15px 20px; background: var(--paper); border: 1px solid var(--rule); }
.strip-label { font-family: var(--font-bold); font-size: 13px; letter-spacing: .12em; color: var(--brass-text); }
.strip-co { font-size: 14px; border-bottom: 1px dotted var(--brass); }
a.strip-co:hover { text-decoration: none; border-bottom-style: solid; }
.strip-all { margin-left: auto; font-size: 12.5px; color: var(--brass-text); }

@media (max-width: 719px) {
  .home { padding: 20px 16px 28px; }
  .home-top, .home-cols { grid-template-columns: 1fr; }
  .home-cols { gap: 26px; margin-top: 28px; }
  .leather-box { padding: 24px 22px 20px; outline-offset: -8px; }
  .cover-title { font-size: 20px; }
  .figs dt { font-size: 11px; }
  .figs dd { font-size: 15px; }
  .strip-all { margin-left: 0; }
}

/* ── 분류 목록·회사별 글 모음 ── */
.month { margin: 26px 0 2px; font-family: var(--font-bold); font-weight: normal; font-size: 13px; letter-spacing: .12em; color: var(--brass-text); }
.post-row { display: grid; grid-template-columns: 64px 1fr; gap: 18px; padding: 16px 0; border-bottom: 1px solid var(--hair); }
.post-row-date { padding-top: 4px; font-size: 13px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.post-row-title { font-family: var(--font-bold); font-weight: normal; font-size: 18px; line-height: 1.5; text-wrap: balance; }
.post-row-sum { margin: 4px 0 8px; font-size: 14.5px; line-height: 1.75; color: var(--ink-deck); text-wrap: pretty; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags span { padding: 1px 8px; font-size: 11.5px; color: var(--tab-back-ink); background: var(--tag-bg); border: 1px solid var(--tag-line); border-radius: 3px; }
.more-btn { display: block; margin: 26px auto 0; padding: 9px 22px; font-size: 14px; color: var(--ink-soft); background: var(--paper); border: 1px solid var(--rule); border-radius: 3px; }
.more-btn:disabled { opacity: .55; cursor: not-allowed; }

@media (max-width: 719px) {
  .post-row { grid-template-columns: 1fr; gap: 2px; }
  .post-row-title { font-size: 17px; }
}

/* ── 기업별 찾기 ── */
.consonants { display: flex; flex-wrap: wrap; gap: 6px; margin: 20px 0 4px; }
.consonants a, .consonants span {
  min-width: 36px;
  padding: 5px 6px 4px;
  text-align: center;
  font-family: var(--font-bold);
  font-size: 16px;
  color: var(--ink);
  background: linear-gradient(var(--paper), var(--tag-bg));
  border: 1.5px solid var(--brass);
  border-radius: 3px;
}
.consonants span { opacity: .32; }   /* 다룬 회사가 없는 자음 — 누를 수 없는 장식이라 화면 읽기 프로그램에서 숨기고(aria-hidden), 글씨 대비 기준(WCAG 1.4.3)의 예외로 둔다 */
.consonants a:hover { text-decoration: none; background: var(--tag-bg); }
.ix-head { margin: 26px 0 12px; padding-bottom: 4px; border-bottom: 1px solid var(--rule); font-family: var(--font-bold); font-weight: normal; font-size: 24px; color: var(--brass-text); scroll-margin-top: 12px; }
.cards3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.cards3 > li, .related > li { display: grid; }   /* 목록 칸(li) 안의 카드가 칸 높이를 채워 한 줄의 카드 높이가 같다 */

/* ── 색인 카드(회사 카드·용어 풀이) ── */
.catalog { position: relative; display: block; padding: 12px 16px 30px; background: var(--paper); border-radius: 2px; box-shadow: var(--shadow-card); }
.catalog::after { content: ''; position: absolute; left: 50%; bottom: 9px; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: var(--cream); box-shadow: var(--shadow-hole); }
.catalog-top { display: flex; justify-content: space-between; margin-bottom: 8px; padding-bottom: 6px; border-bottom: 1.5px solid var(--catalog-red); font-size: 11.5px; color: var(--ink-soft); }
.catalog-name { font-family: var(--font-bold); font-size: 17px; }
.catalog-line { margin-top: 4px; font-size: 13px; line-height: 1.6; color: var(--ink-deck); }
a.catalog:hover { text-decoration: none; }
a.catalog:hover .catalog-name { text-decoration: underline; }

/* ── 소개 ── */
.about p { font-size: 16.5px; line-height: 1.9; color: var(--ink-body); text-wrap: pretty; }
.about h2 { margin: 30px 0 8px; font-family: var(--font-bold); font-weight: normal; font-size: 19px; }
.about li { position: relative; padding: 6px 0 6px 16px; font-size: 16px; line-height: 1.85; color: var(--ink-body); text-wrap: pretty; }
.about li::before { content: ''; position: absolute; left: 0; top: 17px; width: 6px; height: 6px; background: var(--brass); }
.about .notice { margin-top: 28px; padding: 16px 20px; font-size: 15px; line-height: 1.85; background: var(--paper); border: 1px solid var(--rule); border-left: 4px solid var(--brass); }

@media (max-width: 719px) {
  .consonants { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .consonants::-webkit-scrollbar { display: none; }
  .consonants a, .consonants span { flex: none; }
  .cards3 { grid-template-columns: 1fr; }
}

/* ── 글 본문 ── */
.article-wrap { display: grid; grid-template-columns: minmax(0, 680px) 220px; justify-content: center; gap: 52px; max-width: var(--wrap); margin: 0 auto; padding: 40px 32px 52px; }
.sample-band { margin-bottom: 18px; padding: 8px 12px; font-size: 13px; color: var(--loss); background: var(--paper); border: 1px solid currentColor; border-radius: 3px; }
.sample-tag { display: inline-block; margin-right: 6px; padding: 0 5px; font-size: 11px; color: var(--loss); border: 1px solid currentColor; border-radius: 3px; vertical-align: 1px; }
.kicker { font-size: 13px; letter-spacing: .14em; color: var(--brass-text); }
.post-title { margin: 10px 0 12px; font-family: var(--font-bold); font-weight: normal; font-size: 34px; line-height: 1.4; letter-spacing: -.01em; text-wrap: balance; }
.post-deck { font-size: 18px; line-height: 1.75; color: var(--ink-deck); text-wrap: pretty; }
.post-meta { margin-top: 14px; padding-bottom: 22px; border-bottom: 1px solid var(--rule); font-size: 13px; color: var(--ink-soft); }

/* 이 글의 요점 */
.summary { margin: 28px 0 36px; padding: 26px 30px 22px; outline-offset: -10px; }
.summary-title { margin-bottom: 10px; font-family: var(--font-bold); font-size: 12.5px; letter-spacing: .18em; color: var(--gold); }
.summary ol { counter-reset: point; }
.summary li { position: relative; margin: 4px 0; padding-left: 26px; font-size: 16px; line-height: 1.75; color: var(--on-deep-title); text-wrap: pretty; }
.summary li::before { counter-increment: point; content: counter(point); position: absolute; left: 2px; top: 0; font-family: var(--font-bold); font-size: 15px; color: var(--gold); }
.summary .figs dd { font-size: 19px; }
.summary .figs .fig-note { margin-top: 2px; font-family: var(--font); font-size: 11.5px; color: var(--on-deep-soft); }   /* 경제이슈 숫자 3칸의 기준(시점·비교) */

/* 소제목·문단(본문 바로 아래 것만 — 그래프·표·카드 안의 글씨는 따로 정한다) */
.post-body > h2 { display: flex; align-items: baseline; gap: 12px; margin: 42px 0 14px; font-family: var(--font-bold); font-weight: normal; font-size: 23px; line-height: 1.45; text-wrap: balance; scroll-margin-top: 16px; }
.post-body > h2 .num { font-size: 22px; color: var(--brass-text); }
.post-body > p { margin-bottom: 20px; font-size: 18px; line-height: 1.9; color: var(--ink-body); text-wrap: pretty; }
/* 글 문장은 왼쪽 맞춤, 낱말은 끊지 않고 통째로 다음 줄로(body 의 word-break: keep-all). 2026-10-18의 양쪽 맞춤은 좁은 칸(휴대폰·요점 상자)에서 띄어쓰기가 크게 벌어져 되돌렸다(사용자 결정 2026-10-19) */

/* 그래프 */
.figure { margin: 26px 0 10px; }
.charts { display: grid; grid-template-columns: 1fr 1fr; gap: 34px; }
.chart-title { margin-bottom: 2px; font-family: var(--font-bold); font-size: 14.5px; }
.chart-title small { font-family: var(--font); font-size: 12.5px; color: var(--ink-soft); }
.legend { display: flex; gap: 14px; min-height: 18px; margin: 4px 0 2px; font-size: 12px; color: var(--ink-soft); }
.legend span::before { content: ''; display: inline-block; width: 10px; height: 10px; margin-right: 5px; border-radius: 2px; vertical-align: -1px; }
.legend .key-gain::before { background: var(--bar-muted); }
.legend .key-loss::before { background: var(--loss); }
.chart { display: block; width: 100%; max-width: 349px; height: auto; overflow: visible; }   /* 막대 22칸 × 배율 ≤ 24px(설계서 7절) */
.chart .grid { stroke: var(--hair); stroke-width: 1; }
.chart .base { stroke: var(--axis); stroke-width: 1; }
.chart text { font-family: var(--font); font-size: 11px; fill: var(--ink-soft); font-variant-numeric: tabular-nums; }
.chart .tick { text-anchor: end; }
.chart .year { text-anchor: middle; }
.chart .val { text-anchor: middle; font-family: var(--font-bold); font-size: 11.5px; fill: var(--ink); }
.chart .bar { fill: var(--bar); }
.chart .gain { fill: var(--bar-muted); }
.chart .loss { fill: var(--loss); }
.chart path:hover { opacity: .82; }
.figcaption { margin-top: 10px; font-size: 12.5px; color: var(--ink-soft); }
.charts.one { grid-template-columns: 1fr; }
.post-body > .figure + p { margin-top: 26px; }   /* 절 머리 그래프 바로 아래 문단 */
.chart .mline { fill: none; stroke: var(--margin-line); stroke-width: 1.8; stroke-linecap: round; }   /* 매출 대비 % 곡선(막대와 0선 공유) */
.chart .mdot { fill: var(--cream); stroke: var(--margin-line); stroke-width: 1.6; }
.chart .mval { text-anchor: middle; font-family: var(--font-bold); font-size: 10.5px; fill: var(--margin-line); }
.chart.combo .val, .chart.combo .mval { paint-order: stroke; stroke: var(--cream); stroke-width: 3px; stroke-linejoin: round; }   /* 선·막대 위에서도 읽히게 글자 테두리 */
.chart .rtick { text-anchor: start; fill: var(--margin-line); }   /* 오른쪽 % 눈금(마진율 선) */
/* 그래프 모션: site.js 가 내려와 화면에 들어온 그래프에 ready → play(위로 올라갔다 다시 내려오면 한 번 더 - 3단계 설계서 7절). 자바스크립트가 없으면 처음부터 다 그려진 그림 */
.chart.anim path.bar, .chart.anim path.gain, .chart.anim path.loss { transform-box: view-box; transform-origin: 0 var(--z); }
.chart.anim.ready path.bar, .chart.anim.ready path.gain, .chart.anim.ready path.loss { transform: scaleY(0); }
.chart.anim.ready .mline { stroke-dasharray: 1; stroke-dashoffset: 1; }
.chart.anim.ready .val, .chart.anim.ready .mval, .chart.anim.ready .mdot, .chart.anim.ready .rtick { opacity: 0; }
.chart.anim.play path.bar, .chart.anim.play path.gain, .chart.anim.play path.loss { animation: bar-rise .75s cubic-bezier(.34, 1.45, .64, 1) calc(var(--i) * 80ms) both; }
.chart.anim.play .mline { stroke-dasharray: 1; animation: line-draw 1s ease-out .55s both; }
.chart.anim.play .mdot, .chart.anim.play .mval, .chart.anim.play .rtick { animation: fade-in .35s ease-out 1.3s both; }
.chart.anim.play .val { animation: fade-in .35s ease-out .6s both; }
@keyframes bar-rise { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes line-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
/* ── 경제이슈 모션 그림(3단계 설계서 6절). site.js 가 ready(움직이기 전) → play(움직임)를 붙인다.
      자바스크립트가 없거나 '움직임 줄이기'면 클래스가 붙지 않아 처음부터 다 그려진 그림 ── */
.mo-figure .chart-title { margin-bottom: 6px; }
@keyframes mo-pop { 0% { opacity: 0; transform: scale(.3); } 70% { opacity: 1; transform: scale(1.35); } 100% { transform: scale(1); } }
@keyframes mo-ring { from { opacity: .7; transform: scale(1); } to { opacity: 0; transform: scale(3.2); } }
@keyframes mo-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes mo-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes mo-shaft { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes mo-tug { 0% { top: 50%; } 30%, 45% { top: var(--lose); } 100% { top: var(--end); } }
/* A 꺾은선 */
.mo-line { display: block; width: 100%; height: auto; overflow: visible; }   /* 본문 폭까지(사용자 결정 2026-10-19) - 넓은 화면은 아래 @media 로 글자·점·선을 줄인다 */
.mo-line text { font-family: var(--font); font-size: 10.5px; fill: var(--ink-soft); font-variant-numeric: tabular-nums; }
.mo-line .hl-band { fill: var(--tag-bg); }
.mo-line .zero { stroke: var(--axis); stroke-width: 1; }
.mo-line .ln { fill: none; stroke: var(--margin-line); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.mo-line .ln2 { stroke: var(--bar-muted); stroke-width: 1.6; }
.mo-line .dot { fill: var(--cream); stroke: var(--margin-line); stroke-width: 1.6; }
.mo-line .dot2 { stroke: var(--bar-muted); }
.mo-line .hl-dot { fill: var(--margin-line); transform-box: fill-box; transform-origin: center; }
.mo-line .hl-ring { fill: none; stroke: var(--margin-line); stroke-width: 1.5; opacity: 0; transform-box: fill-box; transform-origin: center; }
.mo-line .hl-val { font-family: var(--font-bold); font-size: 13px; fill: var(--margin-line); }
.mo-line .hl-tag rect { fill: var(--leather-deep); }
.mo-line .hl-tag text { font-size: 12px; fill: var(--on-deep-title); text-anchor: middle; }
.mo-line .xl text { text-anchor: middle; }
.mo-line.ready .ln { stroke-dasharray: 1; stroke-dashoffset: 1; }
.mo-line.ready :is(.dot, .pv, .pv2, .hl-band, .hl-dot, .hl-val, .hl-tag) { opacity: 0; }
.mo-line.play .ln { stroke-dasharray: 1; animation: line-draw 1.2s ease-out both; }
.mo-line.play :is(.dot, .pv) { animation: fade-in .3s ease-out both; animation-delay: calc(var(--d) * 120ms + 150ms); }
.mo-line.play .hl-band { animation: fade-in .5s ease-out 1.2s both; }
.mo-line.play .hl-dot { animation: mo-pop .45s ease-out 1.2s both; }
.mo-line.play .hl-ring { animation: mo-ring 1.1s ease-out 1.55s 2; }
.mo-line.play :is(.hl-val, .hl-tag, .pv2) { animation: fade-in .4s ease-out 1.45s both; }
@media (min-width: 720px) {   /* 넓은 화면: 그림이 본문 폭(680px)까지 약 1.9배로 커지므로 글자·점·선을 줄여 휴대폰과 비슷한 크기로 */
  .mo-line text { font-size: 6.8px; }
  .mo-line .xl text { font-size: 6.8px !important; }   /* 좁은 칸에서 줄인 가로축 글자(글자마다 준 style)도 넓은 화면에서는 같게 */
  .mo-line .hl-val { font-size: 8.4px; }
  .mo-line .hl-tag { transform: scale(.62); transform-box: fill-box; transform-origin: center; }
  .mo-line .ln { stroke-width: 1.3; }
  .mo-line .ln2 { stroke-width: 1; }
  .mo-line .dot { r: 2px; stroke-width: 1; }
  .mo-line :is(.hl-dot, .hl-ring) { r: 3.2px; }
  .mo-line .zero { stroke-width: .6; }
}
.legend .key-ln::before, .legend .key-ln2::before { height: 2px; width: 14px; border-radius: 0; vertical-align: 3px; }
.legend .key-ln::before { background: var(--margin-line); }
.legend .key-ln2::before { background: var(--bar-muted); }
/* D 가로 막대 */
.mo-bars { margin: 6px 0 0; padding: 0; list-style: none; }
.mo-bars li { display: grid; grid-template-columns: 6em 1fr 4.6em; align-items: center; gap: 10px; padding: 5px 0; font-size: 14px; }
.mo-bar-name { text-align: right; line-height: 1.35; }
.mo-bar-track { position: relative; height: 14px; }
.mo-bar { position: absolute; top: 0; bottom: 0; left: var(--x); width: var(--w); border-radius: 2px; background: var(--bar-muted); transform-origin: left center; }
.mo-bars .neg .mo-bar { transform-origin: right center; }
.mo-bars .hot .mo-bar { background: var(--loss); }
.mo-bar-val { font-variant-numeric: tabular-nums; color: var(--ink-soft); }
.mo-bars .hot .mo-bar-val { font-family: var(--font-bold); color: var(--loss); }
/* 음수가 있으면 0선(가운데): 줄마다 칸 높이 끝까지 이어 긋는다(이름이 여러 줄인 줄에서도 끊기지 않게 li 바깥은 잘라 낸다) */
.mo-bars:has(.neg) li { overflow: hidden; }
.mo-bars:has(.neg) .mo-bar-track::before { content: ''; position: absolute; left: 50%; top: -40px; bottom: -40px; width: 2px; margin-left: -1px; background: var(--axis); }
.mo-bars.ready .mo-bar { transform: scaleX(0); }
.mo-bars.ready .mo-bar-val { opacity: 0; }
.mo-bars.play .mo-bar { animation: mo-grow .6s cubic-bezier(.2, .8, .3, 1) both; animation-delay: calc(var(--i) * 90ms); }
.mo-bars.play .mo-bar-val { animation: fade-in .3s ease-out both; animation-delay: calc(var(--i) * 90ms + .5s); }
/* B 흐름도: 칸 아래 화살표 = 줄기(::before) + 머리(::after), 다음 칸이 뜨기 직전(--n − 0.3초)에 그려진다 */
.mo-flow { max-width: 460px; margin: 4px auto 0; padding: 0; list-style: none; }
.mo-step { position: relative; display: flex; flex-direction: column; gap: 3px; margin-top: 30px; padding: 11px 16px; text-align: center;
  background: var(--paper); border: 1.5px solid var(--brass); border-radius: 4px; }
.mo-step:first-child { margin-top: 0; }
.mo-step b { font-family: var(--font-bold); font-weight: normal; font-size: 16px; line-height: 1.45; color: var(--ink); }
.mo-step span { font-size: 13.5px; line-height: 1.5; color: var(--ink-soft); }
.mo-step.mid { border: 2px solid var(--margin-line); }
.mo-step.end { border: 2px solid var(--loss); }
.mo-step:not(:last-child)::before { content: ''; position: absolute; left: 50%; top: calc(100% + 3px); width: 2px; height: 14px; margin-left: -1px;
  background: var(--brass-text); transform-origin: top; }
.mo-step:not(:last-child)::after { content: ''; position: absolute; left: 50%; top: calc(100% + 16px); margin-left: -7px;
  border: 7px solid transparent; border-top: 9px solid var(--brass-text); border-bottom: 0; }
.mo-flow.ready .mo-step { opacity: 0; transform: translateY(8px); }
.mo-flow.ready .mo-step::before { transform: scaleY(0); }
.mo-flow.ready .mo-step::after { opacity: 0; }
.mo-flow.play .mo-step { animation: mo-rise .45s ease-out both; animation-delay: var(--t); }
.mo-flow.play .mo-step::before { animation: mo-shaft .3s ease-out both; animation-delay: calc(var(--n) - .3s); }
.mo-flow.play .mo-step::after { animation: fade-in .15s ease-out both; animation-delay: calc(var(--n) - .05s); }
/* C 힘겨루기: 점은 끝자리(--end)가 기본 - 재생 때만 가운데(50%) → 진 쪽(--lose) → 끝자리 */
.mo-tug { display: grid; grid-template-columns: 1fr 76px 1fr; grid-template-areas: "up axis down" "res res res"; column-gap: 12px; row-gap: 14px; }
.mo-tug-side.up { grid-area: up; text-align: right; }
.mo-tug-side.down { grid-area: down; }
.mo-tug-head { margin-bottom: 4px; font-family: var(--font-bold); font-size: 13px; color: var(--ink); }
.mo-tug-side ul { margin: 0; padding: 0; list-style: none; }
.mo-tug-side li { margin: 8px 0; font-size: 14px; line-height: 1.5; }
.mo-tug-side.up li { color: var(--loss); }
.mo-tug-side.down li { color: var(--margin-line); }
.mo-tug-axis { grid-area: axis; position: relative; min-height: 170px; }
.mo-tug-axis::before { content: ''; position: absolute; left: 50%; top: 6px; bottom: 6px; width: 2px; margin-left: -1px; background: var(--axis); }
.mo-tug-base { position: absolute; left: 2px; right: 2px; top: 50%; border-top: 1px dashed var(--bar-muted); }
.mo-tug-base span { position: absolute; left: 0; right: 0; bottom: 9px; text-align: center; font-size: 11px; color: var(--ink-soft);
  background: var(--cream); }   /* 바탕색을 깔아 세로 눈금이 글자를 가로지르지 않게 */
.mo-tug.rise .mo-tug-base span { bottom: auto; top: 9px; }   /* 오름: 끝 점이 점선 위로 가서 끝 값 글자와 겹치므로 처음 값 글자는 점선 아래로(마크업이 rise 를 단다) */
.mo-tug-dot { position: absolute; left: 50%; top: var(--end); width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: var(--ink); }
.mo-tug-dot span { position: absolute; left: 50%; top: 17px; transform: translateX(-50%); white-space: nowrap;
  font-family: var(--font-bold); font-size: 12px; color: var(--ink); background: var(--cream); }
.mo-tug-result { grid-area: res; text-align: center; font-size: 14px; line-height: 1.6; color: var(--ink); }
.mo-tug.ready .mo-tug-dot { top: 50%; }
.mo-tug.ready :is(li, .mo-tug-result, .mo-tug-dot span, .mo-tug-base span) { opacity: 0; }   /* 처음 값 글자도 점이 자리를 잡은 뒤에(점이 진 쪽 자리에서 쉴 때 글자를 가리지 않게) */
.mo-tug.play li { animation: fade-in .35s ease-out both; animation-delay: var(--t); }
.mo-tug.play .mo-tug-dot { animation: mo-tug 2.2s cubic-bezier(.45, 0, .3, 1) .25s both; }
.mo-tug.play :is(.mo-tug-result, .mo-tug-dot span, .mo-tug-base span) { animation: fade-in .4s ease-out 2.4s both; }
.legend .key-line { color: var(--margin-line); }
.legend .key-line::before { height: 2px; width: 14px; border-radius: 0; vertical-align: 3px; background: var(--margin-line); }
/* 절 머리 주요 일정 표 */
.timeline-figure { margin-bottom: 22px; }
.timeline { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.timeline th, .timeline td { padding: 8px 10px; border-bottom: 1px solid var(--hair); text-align: left; vertical-align: top; }
.timeline thead th { font-family: var(--font-bold); font-weight: normal; font-size: 13px; color: var(--ink-soft); border-bottom-color: var(--rule); }
.timeline tbody th { font-weight: normal; white-space: nowrap; color: var(--brass-text); font-variant-numeric: tabular-nums; }

/* 접는 상자(자세한 재무제표·위쪽 접힌 차례) — 브라우저 기본 details */
.fold { margin: 16px 0 34px; background: var(--paper); border: 1px solid var(--rule); border-radius: 4px; }
.fold > summary { display: flex; align-items: center; gap: 10px; padding: 13px 18px; list-style: none; cursor: pointer; font-family: var(--font-bold); font-size: 15.5px; }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary::before { content: '▸'; color: var(--brass-text); transition: transform .2s; }
.fold[open] > summary::before { transform: rotate(90deg); }
.fold[open] > summary { border-bottom: 1px solid var(--hair); }
.fold-meta { margin-left: auto; white-space: nowrap; font-family: var(--font); font-size: 12.5px; color: var(--ink-soft); }
.when-open { display: none; }
.fold[open] .when-closed { display: none; }
.fold[open] .when-open { display: inline; }
.table-scroll { overflow-x: auto; padding: 4px 18px 0; }
.fin { width: 100%; min-width: 520px; border-collapse: collapse; font-size: 14.5px; font-variant-numeric: tabular-nums; }
.fin th, .fin td { padding: 8px 10px; border-bottom: 1px solid var(--hair); }
.fin thead th { font-family: var(--font-bold); font-weight: normal; font-size: 13px; text-align: right; color: var(--ink-soft); border-bottom-color: var(--rule); }
.fin thead th:first-child, .fin tbody th { text-align: left; }
.fin tbody th { font-weight: normal; white-space: nowrap; }
.fin td { text-align: right; white-space: nowrap; }
.fin .group th { padding-top: 16px; font-family: var(--font-bold); font-size: 12.5px; letter-spacing: .1em; color: var(--brass-text); border-bottom-color: var(--rule); }
.fin .key th, .fin .key td { font-family: var(--font-bold); }
.fin .neg { color: var(--loss); }
.fin .ratio th, .fin .ratio td { padding-top: 2px; font-size: 13px; color: var(--ink-soft); }   /* 이익 줄 아래 매출 대비 % */
.fin .ratio th { padding-left: 22px; }
.fin .ratio .neg { color: var(--loss); }
.fin .with-ratio th, .fin .with-ratio td { border-bottom: none; }   /* 금액 줄과 바로 아래 비율 줄 사이에는 선 없음 */
.fin .sub th { padding-left: 22px; }   /* 잉여현금흐름의 세부 항목(영업활동현금흐름·CAPEX) */
.table-note { padding: 10px 18px 14px; font-size: 12px; color: var(--ink-soft); }

/* 용어 풀이(색인 카드) */
.gloss { margin: 8px 0 34px; padding: 14px 22px 30px; }
.gloss .catalog-name { margin-bottom: 3px; font-size: 16.5px; }
.gloss-text { font-size: 15.5px; line-height: 1.8; color: var(--ink-body); }

/* 글 끝 */
.sources { margin-top: 8px; padding-top: 14px; border-top: 1px solid var(--rule); font-size: 13px; line-height: 1.8; color: var(--ink-soft); }
.sources a { text-decoration: underline; text-underline-offset: 3px; }
.web-sources { margin: 4px 0; padding-left: 20px; list-style: decimal; }   /* 웹 출처 - 번호는 글의 숫자 확인 메모가 가리킨다 */
.cite { font-size: .7em; line-height: 0; }   /* 본문 출처 번호 위첨자 - 누르면 글 끝 출처로 */
.cite a { padding: 0 1px; color: var(--brass-text); text-decoration: none; font-variant-numeric: tabular-nums; }
.cite a:hover, .cite a:focus-visible { text-decoration: underline; }
.cite a, .web-sources li { scroll-margin-top: 90px; }   /* 이동했을 때 위쪽 머리에 가리지 않게 */
.web-sources li:target, .cite a:target { background: var(--tag-bg); border-radius: 3px; }   /* 방금 이동해 온 자리 */
.cite-back { margin-left: 6px; white-space: nowrap; color: var(--brass-text); }
.post-tags { margin: 16px 0 34px; }
.related-title { margin-bottom: 10px; font-family: var(--font-bold); font-size: 13px; letter-spacing: .14em; color: var(--brass-text); }
.related { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* 옆 칸: 이 글의 차례 */
.post-aside { padding-top: 6px; }
.aside-sticky { position: sticky; top: 20px; padding-left: 18px; border-left: 1px solid var(--rule); }
.aside-title { margin-bottom: 8px; font-family: var(--font-bold); font-size: 12.5px; letter-spacing: .14em; color: var(--brass-text); }
.aside-gap { margin-top: 30px; }
.toc a { display: flex; gap: 9px; padding: 6px 0; font-size: 14px; line-height: 1.55; color: var(--ink-soft); text-wrap: balance; }
.toc a:hover { color: var(--ink); text-decoration: none; }
.toc .n { min-width: 12px; font-family: var(--font-bold); color: var(--brass-text); }
.toc a[aria-current="true"] { font-family: var(--font-bold); color: var(--ink); }
.aside-list li { padding: 6px 0; border-bottom: 1px dotted var(--rule); font-size: 13.5px; line-height: 1.55; color: var(--ink-soft); }
.aside-more { display: inline-block; margin-top: 10px; font-size: 12.5px; color: var(--brass-text); }
.toc-inline { display: none; margin: 16px 0 0; }
.toc-inline .toc { padding: 6px 18px 10px; }

@media (prefers-reduced-motion: reduce) {
  .fold > summary::before { transition: none; }
}

/* 1024px 미만: 옆 차례 → 제목 아래 접힌 차례 */
@media (max-width: 1023px) {
  .article-wrap { grid-template-columns: minmax(0, 680px); }
  .post-aside { display: none; }
  .toc-inline { display: block; }
}

@media (max-width: 719px) {
  .article-wrap { padding: 22px 18px 28px; }
  .kicker { font-size: 12px; }
  .post-title { font-size: 24px; }
  .post-deck { font-size: 15.5px; }
  .post-meta { padding-bottom: 16px; font-size: 12px; }
  .summary { margin: 18px 0 26px; padding: 20px 20px 18px; outline-offset: -8px; }
  .summary li { font-size: 15px; }
  .summary .figs dd { font-size: 16px; }
  .post-body > h2 { margin-top: 34px; font-size: 20px; }
  .post-body > p { font-size: 16.5px; line-height: 1.85; }
  .charts, .related { grid-template-columns: 1fr; }
  .charts { gap: 18px; }
  .fold > summary { padding: 12px 14px; font-size: 14.5px; }
  .fold-meta-more { display: none; }
  .table-scroll { padding: 4px 0 0; }
  .fin { min-width: 470px; font-size: 13.5px; }
  .fin th:first-child { position: sticky; left: 0; z-index: 1; padding-left: 14px; background: var(--paper); box-shadow: 1px 0 0 var(--hair); }
  .table-note { padding: 10px 14px 12px; }
  .summary .figs .fig-note { font-size: 10.5px; }
  .mo-bars li { grid-template-columns: 5em 1fr 4.4em; gap: 8px; font-size: 13px; }
  .mo-step b { font-size: 15px; }
  .mo-tug { grid-template-columns: 1fr 60px 1fr; column-gap: 8px; }
  .mo-tug-side li { font-size: 13px; }
  .mo-tug-dot span { width: 56px; white-space: normal; text-align: center; }   /* 끝 값이 단위 붙은 긴 값(배럴당 97.7달러)이면 가운데 칸(60px) 밖으로 나가 옆 글을 덮는다 - 칸 안에서 줄을 바꾼다 */
  .mo-tug.rise .mo-tug-dot span { line-height: 1.3; }   /* 오름은 끝 점이 점선에 가까워(눈금 170px이면 점선까지 34px) 두 줄(1.6배면 38px)이 되면 점선을 가린다 - 줄 간격을 줄여 점선 위에 둔다 */
}
