/* 블로그 공통 스타일. 색·글꼴·간격·모서리·그림자는 blog/design/hana-bank.md 가이드 값입니다.
   가이드가 밝은 화면만 정의하므로 밝은 테마 하나만 씁니다. */
:root {
  color-scheme: light;
  --bg-base: #F1F2F4;
  --bg-subtle: #F6F7F9;
  --bg-elevated: #FFFFFF;
  --p50: #E6F5F3;
  --p100: #DDF3EE;
  --p200: #A9DDD6;
  --p300: #27B2A5;
  --p500: #008485;
  --p600: #00706F;
  --p-text: #12927E;
  --text: #222A3B;
  --text2: #4A5160;
  --text3: #6E7277;
  --n500: #8A9099;
  --line: #E5E7EB;
  --line-soft: #EEEEEE;

  /* 그림 안 역할 색: 분배금·기본(pri), 가격 하락(down), 총수익·입금(up), 세금·주의(tax) */
  --pri: #008485;   --pri-s: #E6F5F3;
  --down: #3B6FD8;  --down-s: #EAF1FB;
  --up: #E71064;    --up-s: #FDECEF;
  --tax: #D96A0B;   --tax-s: #FDF1E6;
  --gold: #B88400;  --gold-s: #FFF0C2;

  --shadow-sm: 0 1px 3px rgba(34, 42, 59, 0.08);
  --shadow-md: 2px 2px 20px 0 rgba(0, 0, 0, 0.04);
  --r-md: 10px; --r-lg: 16px; --r-full: 9999px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --font: 'Hana2.0', 'Pretendard', 'Noto Sans KR', -apple-system, 'Segoe UI', 'Malgun Gothic', sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg-base); color: var(--text);
  font-family: var(--font); font-size: 16px; line-height: 1.7; letter-spacing: -0.3px;
  word-break: keep-all; overflow-wrap: break-word;
  padding-block: 12px 56px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--p500); outline-offset: 2px; }
p { margin: 0; }
.page { width: 100%; min-width: 0; max-width: 680px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.page > * { min-width: 0; }

/* 맨 위 줄 */
.top { display: flex; align-items: center; gap: 12px; padding: 6px 4px 0; font-weight: 800; font-size: 15px; letter-spacing: -0.4px; min-height: 40px; }
.brand { text-decoration: none; }
.back { margin-left: auto; display: inline-flex; align-items: center; height: 30px; padding: 0 14px; border-radius: var(--r-full); background: #fff; box-shadow: var(--shadow-sm); font-size: 13px; font-weight: 700; text-decoration: none; flex: none; }

/* 버튼, 칩 */
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.pill { display: inline-flex; align-items: center; justify-content: center; height: 40px; padding: 0 22px; border-radius: var(--r-full); font-size: 14px; font-weight: 700; text-decoration: none; transition: background 150ms var(--ease-out); }
.pill.w { background: #fff; color: var(--text); box-shadow: var(--shadow-sm); }
.pill.w:hover { background: var(--bg-subtle); }
.pill.g { background: var(--p500); color: #fff; }
.pill.g:hover { background: var(--p600); }
.tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: var(--r-full); background: var(--p50); color: var(--p600); font-size: 12px; font-weight: 700; }

/* 결론 카드 (첫 화면의 오늘의 결론, 본문 화면의 이 글의 결론) */
.hero, .conclusion { background: linear-gradient(180deg, var(--p100), #EAF6F3); border-radius: var(--r-lg); padding: 20px; display: flex; flex-direction: column; gap: 6px; }
.kind { font-size: 13px; color: var(--text2); }
.kind b { color: var(--p-text); margin-right: 6px; }
.big { font-size: clamp(23px, 5.6vw, 31px); line-height: 1.3; font-weight: 800; letter-spacing: -1px; margin: 6px 0 2px; text-wrap: balance; }
.sub { font-size: 13px; color: var(--text3); }

/* 주제 칸 */
.topics { background: #fff; border-radius: var(--r-lg); padding: 14px 6px; display: grid; grid-template-columns: repeat(auto-fit, minmax(76px, 1fr)); gap: 4px; }
.topic { border: 0; background: none; font: inherit; font-size: 12px; color: var(--text2); text-align: center; cursor: pointer; padding: 2px 2px 4px; border-radius: 12px; letter-spacing: -0.3px; }
.topic i { display: grid; place-items: center; width: 38px; height: 38px; margin: 0 auto 6px; border-radius: 12px; background: var(--p50); transition: background 150ms var(--ease-out); }
.topic svg { width: 20px; height: 20px; stroke: var(--p500); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.topic[aria-pressed="true"] { color: var(--text); font-weight: 700; }
.topic[aria-pressed="true"] i { background: var(--p500); }
.topic[aria-pressed="true"] svg { stroke: #fff; }

/* 글 목록 */
.list { background: #fff; border-radius: var(--r-lg); overflow: hidden; }
.list-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 6px; font-weight: 700; font-size: 15px; }
.list-head span { font-size: 12px; color: var(--text3); font-weight: 400; }
.row { display: flex; flex-direction: column; gap: 4px; padding: 12px 16px; border-top: 1px solid var(--line-soft); text-decoration: none; transition: background 150ms var(--ease-out); }
.list-head + .row { border-top: 0; }
.row:hover { background: var(--bg-subtle); }
.row strong { font-size: 15px; line-height: 1.5; letter-spacing: -0.4px; }
.row small { font-size: 12px; color: var(--text3); display: flex; gap: 8px; align-items: center; }
.empty { background: #fff; border-radius: var(--r-lg); padding: 24px 20px; color: var(--text2); font-size: 14px; }
.empty strong { display: block; font-size: 16px; color: var(--text); margin-bottom: 4px; }

.foot { padding: 8px 4px 0; font-size: 12px; line-height: 1.6; color: var(--text3); }

/* 본문 화면 */
.post-head { padding: 10px 4px 2px; display: flex; flex-direction: column; gap: 10px; }
.meta { display: flex; gap: 10px; align-items: center; font-size: 13px; color: var(--text3); }
.post h1 { margin: 0; font-size: clamp(25px, 6.2vw, 33px); line-height: 1.35; font-weight: 800; letter-spacing: -0.9px; text-wrap: balance; }
.body { background: #fff; border-radius: var(--r-lg); padding: 28px 24px; font-size: 17px; line-height: 1.9; }
.body > * + * { margin-top: 18px; }
.body h2 { font-size: 21px; line-height: 1.45; font-weight: 800; letter-spacing: -0.6px; margin-top: 40px; text-wrap: balance; }
.body h3 { font-size: 18px; line-height: 1.5; font-weight: 700; margin-top: 28px; }
.body ul, .body ol { padding-left: 1.4em; display: flex; flex-direction: column; gap: 8px; }
.body strong { font-weight: 700; }
.body a { color: var(--p500); }
.body blockquote { margin-left: 0; margin-right: 0; padding: 4px 0 4px 16px; border-left: 3px solid var(--p200); color: var(--text2); }
.body hr { border: 0; border-top: 1px solid var(--line); margin-block: 32px; }
.body code { font-size: 0.92em; background: var(--bg-subtle); padding: 1px 5px; border-radius: 4px; }
.body pre { background: var(--bg-subtle); padding: 14px 16px; border-radius: var(--r-md); overflow-x: auto; font-size: 14px; line-height: 1.6; }
.body pre code { background: none; padding: 0; }
.table-scroll { overflow-x: auto; border-radius: var(--r-md); background: var(--bg-subtle); }
.body table { border-collapse: collapse; width: 100%; min-width: 420px; font-size: 15px; line-height: 1.6; }
.body th, .body td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.body tr:last-child td { border-bottom: 0; }
.body thead th { font-size: 13px; color: var(--text3); font-weight: 700; }
.body td { font-variant-numeric: tabular-nums; }
.todo { display: inline-block; background: var(--tax-s); color: #9A4A00; font-size: 12px; font-weight: 500; line-height: 1.5; padding: 0 6px; border-radius: 4px; white-space: nowrap; vertical-align: 1px; letter-spacing: 0; }
.disclaimer { font-size: 14px; line-height: 1.7; color: var(--text3); border-top: 1px solid var(--line); padding-top: 16px; margin-top: 36px !important; }

/* 초안 미리보기 안내 줄 */
.draft-banner { background: var(--tax-s); color: #9A4A00; border-radius: var(--r-lg); padding: 10px 16px; font-size: 13px; font-weight: 700; line-height: 1.5; }

/* 이전·다음 글 */
.pager { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.pager a { background: #fff; border-radius: var(--r-lg); padding: 14px 16px; text-decoration: none; display: flex; flex-direction: column; gap: 2px; min-width: 0; transition: background 150ms var(--ease-out); }
.pager a:hover { background: var(--bg-subtle); }
.pager small { color: var(--text3); font-size: 12px; }
.pager strong { font-size: 14px; line-height: 1.5; letter-spacing: -0.4px; }
.pager .next { text-align: right; }

/* 본문 속 설명 그림 */
.body figure { margin: 0; background: var(--bg-subtle); border-radius: var(--r-lg); padding: 10px; }
.body figure svg { width: 100%; height: auto; display: block; }
.body figcaption { font-size: 13px; line-height: 1.6; color: var(--text3); padding: 8px 6px 2px; }
.tx { font-family: var(--font); fill: var(--text); font-size: 16px; }
.bd { font-weight: 700; }
.mu { fill: var(--text3); }
.mid { text-anchor: middle; }
.end { text-anchor: end; }
.z13 { font-size: 13px; } .z14 { font-size: 14px; } .z15 { font-size: 15px; }
.z17 { font-size: 17px; } .z18 { font-size: 18px; } .z20 { font-size: 20px; }
.k-pri { fill: var(--pri); } .k-down { fill: var(--down); } .k-up { fill: var(--up); } .k-tax { fill: var(--tax); } .k-surf { fill: #fff; }
.f-pri { fill: var(--pri); } .f-pri-s { fill: var(--pri-s); }
.f-down { fill: var(--down); } .f-down-s { fill: var(--down-s); }
.f-up { fill: var(--up); } .f-up-s { fill: var(--up-s); }
.f-tax { fill: var(--tax); } .f-tax-s { fill: var(--tax-s); }
.f-gold { fill: var(--gold); } .f-gold-s { fill: var(--gold-s); }
.f-surf { fill: #fff; } .f-gray { fill: var(--text3); opacity: .5; } .f-ink { fill: var(--text); } .f-none { fill: none; }
.s-pri { stroke: var(--pri); } .s-down { stroke: var(--down); } .s-up { stroke: var(--up); } .s-tax { stroke: var(--tax); }
.s-gold { stroke: var(--gold); } .s-line { stroke: var(--line); } .s-mu { stroke: var(--text3); } .s-surf { stroke: #fff; }
.w1 { stroke-width: 1; } .w2 { stroke-width: 2; } .w3 { stroke-width: 3; } .w4 { stroke-width: 4; }
.round { stroke-linecap: round; stroke-linejoin: round; }
.dash { stroke-dasharray: 4 4; }

@media (max-width: 560px) {
  .body { padding: 22px 18px; font-size: 16px; }
  .body figure { padding: 6px; }
  .body h2 { font-size: 20px; margin-top: 34px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
