/* 블로그 모양. 색·글꼴·간격은 brunch.md 값, 구성은 시안 A(결론부터)에 C(눈금)를 섞은 것.
   모양을 바꾸려면 이 파일만 고치고 python scripts\build_blog.py 를 다시 돌린다. */
:root {
  --bg: #FFFFFF;
  --sub: #FBFBFB;
  --ink: #333333;
  --ink-900: #171717;
  --ink-2: #666666;
  --ink-3: #959595;
  --ink-4: #BBBBBB;
  --line: #DDDDDD;
  --line-2: #EEEEEE;
  --teal: #00C6BE;
  --teal-600: #009C96;
  --teal-700: #007A75;
  --teal-50: #EAFBF9;
  --warn: #8A651E;
  --warn-bg: #FFF7E6;

  --f-display: 'Nanum Myeongjo', 'Batang', 'AppleMyungjo', serif;
  --f-body: 'Noto Sans KR', 'Noto Sans Light', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  --f-ui: 'Pretendard', 'Noto Sans KR', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;

  --reader: 700px;
  --wide: 1040px;
  --gutter: max(16px, env(safe-area-inset-left, 0px));
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--f-body); font-weight: 340; font-size: 16px; line-height: 1.8;
  word-break: keep-all; overflow-wrap: break-word;
}
a { color: inherit; text-decoration: none; }
.nb { white-space: nowrap; }
:focus-visible { outline: 2px solid var(--teal-700); outline-offset: 2px; }
h1, h2, h3, p, ul, ol, figure, blockquote { margin: 0; }

/* 위 띠 */
.top { border-bottom: 1px solid var(--line-2); }
/* 양옆 여백은 안쪽 상자에 둔다. 머리·바닥의 가는 선은 화면 끝까지 닿는다. */
.top-in, .wrap, .foot-in {
  max-width: calc(var(--wide) + 32px); margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.top-in { height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.name { font-family: var(--f-display); font-size: 17px; letter-spacing: -.01em; color: var(--ink-900); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tagline { font-family: var(--f-ui); font-size: 13px; color: var(--ink-3); white-space: nowrap; }
@media (max-width: 560px) { .tagline { display: none; } }

.wrap { padding-bottom: 48px; }
.foot { border-top: 1px solid var(--line-2); }
.foot-in { padding-top: 18px; padding-bottom: 28px; font-family: var(--f-ui); font-size: 12px; color: var(--ink-3); }

/* 곁 정보 */
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0 12px; font-family: var(--f-ui); font-size: 12px; line-height: 20px; color: var(--ink-3); font-weight: 400; }
.badge, .flag { display: inline-block; font-family: var(--f-ui); font-size: 12px; font-weight: 500; line-height: 20px; padding: 0 10px; border-radius: 100px; background: var(--warn-bg); color: var(--warn); }
.flag { font-size: .8em; padding: 0 8px; }

/* 눈금 자: 결론 위에 긋는 가는 선. 짧은 눈금은 8px마다, 긴 눈금은 40px마다 */
.ruler {
  border-top: 1px solid var(--ink);
  background:
    repeating-linear-gradient(90deg, var(--ink) 0 1px, transparent 1px 40px) top left / 100% 10px no-repeat,
    repeating-linear-gradient(90deg, var(--ink-3) 0 1px, transparent 1px 8px) top left / 100% 5px no-repeat;
}

/* 질문(왼쪽 수치) | 결론(오른쪽) 두 칸 */
.split { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 16px 40px; }
.split.nofig { grid-template-columns: minmax(0, 1fr); }
.figcol { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.figcol b { font-family: var(--f-display); font-weight: 400; font-size: clamp(34px, 5.2vw, 56px); line-height: 1.1; letter-spacing: -.03em; color: var(--ink-900); font-variant-numeric: tabular-nums; }
.figcol span { font-family: var(--f-ui); font-size: 12px; line-height: 20px; color: var(--ink-3); font-weight: 400; }
.figcol.plain span { padding-top: 2px; }
.verdict { font-size: 15px; line-height: 1.85; color: var(--ink-2); max-width: 34em; }
.more { display: inline-block; margin-top: 10px; font-family: var(--f-ui); font-size: 14px; font-weight: 400; color: var(--teal-700); border-bottom: 1px solid var(--teal); padding-bottom: 1px; }

/* 첫 화면: 가장 새 글 */
.hero { padding: 32px 0 28px; display: flex; flex-direction: column; gap: 12px; }
.hero h1 { font-family: var(--f-display); font-weight: 400; font-size: clamp(28px, 4.8vw, 50px); line-height: 1.24; letter-spacing: -.02em; color: var(--ink-900); max-width: 17em; text-wrap: balance; }
.hero .split { margin-top: 14px; padding-top: 18px; }
.hero .verdict { font-size: clamp(16px, 1.7vw, 18px); color: var(--ink); }

/* 지난 글 */
.row { padding: 18px 0 20px; border-top: 1px solid var(--line-2); align-items: start; }
.row h2 { font-family: var(--f-display); font-weight: 400; font-size: clamp(18px, 2.3vw, 23px); line-height: 1.5; letter-spacing: -.01em; color: var(--ink-900); text-wrap: balance; }
.row .meta { margin-top: 2px; }
.row .verdict { margin-top: 8px; }
.row .figcol b { font-size: clamp(28px, 3.6vw, 38px); }
.hero h1 a, .row h2 a { background: linear-gradient(var(--teal), var(--teal)) 0 100% / 0 1px no-repeat; transition: background-size .2s ease-out; }
.hero h1 a:hover, .row h2 a:hover { background-size: 100% 1px; }
.empty { padding: 56px 0; display: flex; flex-direction: column; gap: 12px; }
.empty h1 { font-family: var(--f-display); font-weight: 400; font-size: 28px; }
.empty p { color: var(--ink-2); }

@media (max-width: 720px) {
  .split { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .hero { padding-top: 24px; }
}

/* 본문 화면 */
.read { max-width: calc(var(--reader) + 32px); padding-top: 20px; }
.crumb { font-family: var(--f-ui); font-size: 13px; color: var(--ink-3); }
.crumb a { border-bottom: 1px solid var(--line); }
.post-head { display: flex; flex-direction: column; gap: 10px; padding: 18px 0 20px; }
.post-head h1 { font-family: var(--f-display); font-weight: 400; font-size: clamp(27px, 4.4vw, 40px); line-height: 1.28; letter-spacing: -.02em; color: var(--ink-900); text-wrap: balance; }
.verdict-block { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 0 16px; padding: 14px 0 18px; margin-bottom: 8px; }
.verdict-block .tag { font-family: var(--f-ui); font-size: 13px; font-weight: 500; color: var(--ink-900); line-height: 30px; }
.verdict-block p { font-family: var(--f-display); font-size: clamp(17px, 2.2vw, 20px); line-height: 1.75; color: var(--ink-900); }

.prose { display: flex; flex-direction: column; gap: 18px; padding-top: 14px; min-width: 0; font-size: 16.5px; line-height: 1.95; letter-spacing: .005em; }
.prose > * { min-width: 0; }
.prose .lead { color: var(--ink-2); }
.prose h2 { font-family: var(--f-display); font-weight: 400; font-size: clamp(22px, 3vw, 27px); line-height: 1.45; letter-spacing: -.02em; color: var(--ink-900); margin-top: 22px; text-wrap: balance; }
.prose h3 { font-family: var(--f-ui); font-weight: 500; font-size: 14px; color: var(--ink-2); margin-top: 22px; }
.prose a { color: var(--teal-700); text-decoration: underline; text-decoration-color: var(--teal); text-underline-offset: 3px; overflow-wrap: anywhere; }
.prose ul, .prose ol { padding-left: 1.2em; display: flex; flex-direction: column; gap: 8px; }
.prose li { min-width: 0; padding-left: 2px; }
.prose li::marker { color: var(--ink-3); }
.prose .refs { font-size: 14px; line-height: 1.75; color: var(--ink-2); }
.prose strong { font-weight: 600; }
.prose hr { border: 0; border-top: 1px solid var(--line-2); width: 100%; margin: 8px 0; }
.prose blockquote { border-left: 2px solid var(--ink); padding-left: 16px; color: var(--ink-2); }
.prose code { font-size: .92em; background: var(--sub); padding: 0 4px; }

/* 표 */
.tbl { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; min-width: 360px; font-variant-numeric: tabular-nums; font-size: 15px; line-height: 1.6; }
th, td { text-align: left; padding: 9px 14px 9px 0; border-bottom: 1px solid var(--line-2); font-weight: 340; }
th { border-bottom: 1px solid var(--ink); font-family: var(--f-ui); font-size: 13px; font-weight: 500; color: var(--ink-2); }
td.r, th:not(:first-child) { text-align: right; }
td.r { font-weight: 500; }

/* 글 속 그림: 평평하고 각진 면. 색은 아래 이름표(f1, f2, fw …)로 바꾼다.
   f1=청록(첫째 대상), f2=먹색(둘째 대상), fw=황갈색(주의·해석). 글 쪽 SVG는 건드리지 않는다. */
.fig {
  --fig-ink: #333333; --fig-line: #DDDDDD; --fig-muted: #666666;
  --g1: #007A75; --g1s: #EAFBF9;
  --g2: #333333; --g2s: #F0F0F0;
  --gw: #8A651E; --gws: #FFF7E6; --gwt: #8A651E;
  --band: #EEEEEE; --fig-bg: #FFFFFF;
  --on-c1: #FFFFFF; --on-c2: #FFFFFF; --on-w: #FFFFFF;
  margin: 6px 0 2px; display: flex; flex-direction: column; gap: 10px;
}
.fig .scroll { overflow-x: auto; border: 1px solid var(--fig-line); background: var(--fig-bg); padding: 12px; }
.fig svg { display: block; width: 100%; min-width: 520px; height: auto; color: var(--fig-ink); }
.fig svg text { font-family: var(--f-body); }
.fig svg rect { shape-rendering: crispEdges; }
.fig figcaption { font-family: var(--f-ui); font-size: 13px; line-height: 1.7; color: var(--ink-2); border-left: 2px solid var(--ink); padding-left: 12px; font-weight: 400; }
.fig .t { fill: currentColor; } .fig .tm { fill: var(--fig-muted); } .fig .tw { fill: var(--gwt); }
.fig .ton1 { fill: var(--on-c1); } .fig .ton2 { fill: var(--on-c2); } .fig .tonw { fill: var(--on-w); }
.fig .f1 { fill: var(--g1); } .fig .f1s { fill: var(--g1s); }
.fig .f2 { fill: var(--g2); } .fig .f2s { fill: var(--g2s); }
.fig .fw { fill: var(--gw); } .fig .fws { fill: var(--gws); }
.fig .fb { fill: var(--band); } .fig .fs { fill: var(--fig-bg); } .fig .fn { fill: none; }
.fig .k1 { stroke: var(--g1); } .fig .k2 { stroke: var(--g2); } .fig .kw { stroke: var(--gw); } .fig .ki { stroke: var(--fig-ink); }
.fig .kl { stroke: var(--fig-line); } .fig .km { stroke: #959595; } .fig .kt { stroke: currentColor; }

/* 이전·다음 글 */
.pager { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 32px; margin-top: 36px; border-top: 1px solid var(--ink); padding-top: 16px; }
.pager a { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pager span { font-family: var(--f-ui); font-size: 12px; color: var(--ink-3); }
.pager b { font-family: var(--f-display); font-weight: 400; font-size: 17px; line-height: 1.5; color: var(--ink-900); }
.pager .next { grid-column: 2; text-align: right; }
.pager .prev:only-child { grid-column: 1; }
.pager a:hover b { text-decoration: underline; text-decoration-color: var(--teal); text-underline-offset: 3px; }
@media (max-width: 560px) { .pager { grid-template-columns: minmax(0, 1fr); } .pager .next { grid-column: 1; text-align: left; } }

@media (prefers-reduced-motion: reduce) { .hero h1 a, .row h2 a { transition: none; } }
