/* 똑부러지게 사는 주식투자일기
   기본 틀(색·글꼴·간격)은 design/brunch.md, 첫 화면은 시안 A(장부 일기)+C(기록 눈금자).
   밝은 종이 한 가지 화면. */
:root {
  --paper: #ffffff;
  --text: #333333;
  --text-2: #666666;
  --text-3: #959595;
  --line: #dddddd;
  --line-soft: #eeeeee;
  --subtle: #fbfbfb;
  --teal: #00c6be;
  --teal-deep: #007a75;
  --teal-50: #eafbf9;
  --f-title: "Nanum Myeongjo", "Batang", "AppleMyungjo", serif;
  --f-body: "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --reader: 700px;
  --wide: 900px;
  --date-col: 92px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--text); font-family: var(--f-body); font-weight: 300; font-size: 16px; line-height: 1.9; letter-spacing: .02em; word-break: keep-all; }
img, svg { max-width: 100%; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--teal-deep); outline-offset: 3px; }
.shell {
  max-width: var(--wide); margin: 0 auto; padding-block: 0 72px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.t { font-family: var(--f-title); color: var(--text); letter-spacing: -0.01em; }
.meta { font-size: 12.5px; color: var(--text-3); letter-spacing: 0; }

/* 머리 줄 */
.gnb { display: flex; justify-content: space-between; align-items: center; gap: 12px; height: 72px; border-bottom: 1px solid var(--line-soft); }
.gnb .brand { font-family: var(--f-title); font-weight: 700; font-size: 16px; letter-spacing: 0; }
.gnb nav { display: flex; gap: 20px; font-size: 14px; color: var(--text-2); font-weight: 400; letter-spacing: 0; }
.gnb nav a:hover { color: var(--text); }

/* 첫 화면: 큰 이름 + 눈금자 */
.hero { padding-top: 56px; }
.hero-name { font-family: var(--f-title); font-weight: 800; font-size: clamp(40px, 9.5vw, 84px); line-height: 1.06; letter-spacing: -0.04em; margin: 0; color: var(--text); }
.hero-name span { display: block; font-weight: 400; color: var(--text-2); }
.hero-say { margin: 18px 0 0; max-width: 34em; color: var(--text-2); font-size: 16px; }
.ruler { margin-top: 34px; }
.ruler-head { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; color: var(--text-3); letter-spacing: 0; }
.ruler-head b { color: var(--text); font-weight: 500; }
.ruler-scroll { overflow-x: auto; }
.ruler svg { display: block; width: 100%; min-width: 560px; height: auto; }
.ruler .tick { stroke: var(--line); }
.ruler .axis { stroke: var(--text); }
.ruler .lbl { font-family: var(--f-body); font-size: 11px; fill: var(--text-3); }
.ruler .lbl-today { fill: var(--teal-deep); font-weight: 500; }

/* 최신 글과 날짜 칸 */
.lead { max-width: var(--reader); margin: 44px 0 0; display: grid; grid-template-columns: var(--date-col) 1fr; border-top: 1px solid var(--text); }
.lead > * { min-width: 0; }
.datecol { border-right: 2px solid var(--teal); padding: 16px 14px 16px 0; text-align: right; font-size: 12px; color: var(--text-3); letter-spacing: 0; font-variant-numeric: tabular-nums; line-height: 1.5; }
.datecol b { display: block; font-family: var(--f-title); font-weight: 800; font-size: 34px; color: var(--text); line-height: 1.15; margin: 2px 0; }
.lead-body { padding: 16px 0 20px 20px; }
.lead-body .kicker { font-size: 12.5px; color: var(--teal-deep); font-weight: 400; letter-spacing: 0; }
.lead-body h2 { margin: 4px 0 0; font-weight: 400; font-size: clamp(28px, 5vw, 40px); line-height: 1.25; letter-spacing: -0.025em; text-wrap: balance; }
.lead-body p { margin: 10px 0 0; color: var(--text-2); font-size: 15px; }
.row { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.tag { display: inline-block; font-size: 12.5px; line-height: 1; padding: 7px 11px; border: 1px solid var(--line); border-radius: 40px; color: var(--text-2); font-weight: 400; letter-spacing: 0; }
.tag:hover { border-color: var(--text-3); color: var(--text); }
.tag span { color: var(--text-3); margin-left: 4px; }
.readmore { font-size: 13.5px; color: var(--teal-deep); font-weight: 400; letter-spacing: 0; }
.readmore:hover { text-decoration: underline; text-underline-offset: 3px; }

/* 일지 장부 */
.ledger { max-width: var(--reader); margin-top: 64px; }
.sec-title { font-family: var(--f-title); font-weight: 700; font-size: 17px; margin: 0; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--text); }
.sec-title .meta { font-family: var(--f-body); font-weight: 300; }
.month { margin-top: 26px; }
.month h3 { font-size: 13px; font-weight: 500; color: var(--text-2); margin: 0 0 6px; letter-spacing: 0; }
.entry { display: grid; grid-template-columns: var(--date-col) 1fr auto; align-items: baseline; border-top: 1px solid var(--line-soft); }
.entry:last-child { border-bottom: 1px solid var(--line-soft); }
.entry > * { min-width: 0; }
.entry .d { border-right: 2px solid var(--teal); padding: 15px 14px 15px 0; text-align: right; font-size: 12.5px; color: var(--text-3); letter-spacing: 0; font-variant-numeric: tabular-nums; }
.entry .body { padding: 12px 12px 12px 20px; }
.entry .t { display: block; font-size: 19px; line-height: 1.5; }
.entry .sum { display: block; font-size: 13.5px; color: var(--text-2); line-height: 1.7; margin-top: 2px; }
.entry .r { font-size: 12.5px; color: var(--text-3); letter-spacing: 0; padding-right: 2px; white-space: nowrap; }
a.entry:hover .t { text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 5px; }
.entry.planned .d { border-right-style: dashed; border-right-color: var(--line); }
.entry.planned .t { color: var(--text-2); }
.list-page { margin-top: 32px; }
.list-page .sec-title { font-size: 22px; }
.tag-cloud { margin-top: 18px; }

/* 원칙·태그·구독 */
.about { max-width: var(--reader); margin-top: 72px; }
.rules { list-style: none; margin: 18px 0 0; padding: 0; }
.rules li { display: grid; grid-template-columns: var(--date-col) 1fr; border-top: 1px solid var(--line-soft); }
.rules li:last-child { border-bottom: 1px solid var(--line-soft); }
.rules li > * { min-width: 0; }
.rules .k { border-right: 2px solid var(--teal); padding: 14px 14px 14px 0; text-align: right; font-family: var(--f-title); font-weight: 700; font-size: 15px; color: var(--text); letter-spacing: 0; }
.rules .v { padding: 12px 0 12px 20px; }
.rules .v b { display: block; font-family: var(--f-title); font-weight: 700; font-size: 18px; color: var(--text); letter-spacing: -0.01em; }
.rules .v span { font-size: 14px; color: var(--text-2); }
.tags { max-width: var(--reader); margin-top: 56px; }
.list { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.subscribe { max-width: var(--reader); margin-top: 56px; padding: 22px; background: var(--subtle); border-top: 1px solid var(--line-soft); display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; justify-content: space-between; }
.subscribe p { margin: 0; font-size: 14.5px; color: var(--text-2); max-width: 30em; }
.subscribe p b { font-family: var(--f-title); font-weight: 700; color: var(--text); display: block; font-size: 17px; }
.btn { display: inline-block; font-size: 13.5px; font-weight: 400; letter-spacing: 0; padding: 9px 18px; border-radius: 100px; border: 1px solid var(--teal); color: var(--teal-deep); background: var(--paper); cursor: pointer; font-family: var(--f-body); }
.btn:hover { background: var(--teal-50); }
.copy-msg { font-size: 12.5px; color: var(--teal-deep); min-height: 1.2em; flex-basis: 100%; letter-spacing: 0; overflow-wrap: anywhere; }
.foot { max-width: var(--reader); margin-top: 64px; padding-top: 18px; border-top: 1px solid var(--line-soft); font-size: 12.5px; color: var(--text-3); line-height: 1.8; letter-spacing: 0; }

/* 본문 화면 */
.back { display: inline-block; margin-top: 26px; font-size: 13.5px; color: var(--text-2); font-weight: 400; letter-spacing: 0; }
.back:hover { color: var(--text); }
.post-head { max-width: var(--reader); margin: 28px auto 0; display: grid; grid-template-columns: var(--date-col) 1fr; border-top: 1px solid var(--text); }
.post-head > * { min-width: 0; }
.post-head .title-box { padding: 18px 0 22px 20px; }
.post-head h1 { margin: 0; font-family: var(--f-title); font-weight: 400; font-size: clamp(30px, 6vw, 46px); line-height: 1.24; letter-spacing: -0.03em; color: var(--text); text-wrap: balance; }
.post-head .subtitle { margin: 12px 0 0; font-size: 16px; color: var(--text-2); }
.article { max-width: var(--reader); margin: 40px auto 0; font-size: 17px; line-height: 2; }
.article p { margin: 0 0 22px; }
.article h2 { font-family: var(--f-title); font-weight: 700; font-size: 25px; line-height: 1.45; letter-spacing: -0.02em; margin: 60px 0 18px; color: var(--text); text-wrap: balance; }
.article h3 { font-family: var(--f-title); font-weight: 700; font-size: 20px; margin: 40px 0 12px; }
.article .note { font-size: 13.5px; color: var(--text-3); line-height: 1.8; margin-top: -10px; }
.article strong { font-weight: 500; color: var(--text); }
.article a { color: var(--teal-deep); text-decoration: underline; text-underline-offset: 3px; }
.article ul, .article ol { padding-left: 1.3em; margin: 0 0 22px; }
.article blockquote { margin: 0 0 22px; padding: 4px 0 4px 18px; border-left: 2px solid var(--teal); color: var(--text-2); }
.article .q { list-style: none; padding: 0; margin: 6px 0 26px; }
.article .q li { font-family: var(--f-title); font-size: 19px; line-height: 1.6; padding: 12px 0 12px 18px; border-left: 2px solid var(--teal); margin-bottom: 8px; color: var(--text); letter-spacing: -0.01em; }
.article .refs { font-size: 13px; color: var(--text-2); line-height: 1.8; letter-spacing: 0; }
.article .refs li { overflow-wrap: anywhere; }
.article figure { margin: 28px 0 34px; }
.article figure svg { display: block; width: 100%; height: auto; }
.article figcaption { margin-top: 10px; font-size: 13.5px; color: var(--text-2); line-height: 1.7; letter-spacing: 0; }
.article figcaption .src { display: block; font-size: 12px; color: var(--text-3); margin-top: 2px; }
.fig-legend { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 13px; color: var(--text-2); margin-bottom: 6px; letter-spacing: 0; }
.fig-legend i { display: inline-block; width: 11px; height: 11px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.svg-t { font-family: var(--f-body); fill: var(--text-3); }
.svg-ink { fill: var(--text); }
.article table { display: block; overflow-x: auto; border-collapse: collapse; width: 100%; font-size: 14.5px; letter-spacing: 0; margin: 4px 0 26px; }
.article th, .article td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line-soft); }
.article th { font-size: 12.5px; color: var(--text-3); font-weight: 400; border-bottom-color: var(--text); }
.end { max-width: var(--reader); margin: 48px auto 0; padding-top: 20px; border-top: 1px solid var(--line-soft); }
.end p { margin: 0 0 10px; font-size: 13.5px; color: var(--text-3); line-height: 1.8; letter-spacing: 0; }
.pager { max-width: var(--reader); margin: 44px auto 0; display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--text); }
.pager a { padding: 16px 0; min-width: 0; }
.pager a + a { text-align: right; border-left: 1px solid var(--line-soft); padding-left: 16px; }
.pager .meta { display: block; }
.pager .t { font-size: 17px; line-height: 1.5; }

@media (max-width: 560px) {
  :root { --date-col: 66px; }
  body { font-size: 15px; }
  .gnb { height: 60px; }
  .gnb nav { gap: 14px; font-size: 13px; }
  .gnb nav .opt { display: none; }
  .datecol b { font-size: 26px; }
  .entry { grid-template-columns: var(--date-col) 1fr; }
  .entry .r { display: none; }
  .entry .t { font-size: 17px; }
  .lead-body, .entry .body, .rules .v, .post-head .title-box { padding-left: 14px; }
  .article { font-size: 16px; }
  .pager { grid-template-columns: 1fr; }
  .pager a + a { text-align: left; border-left: none; border-top: 1px solid var(--line-soft); padding-left: 0; }
}
