@font-face { font-family: 'Pretendard'; src: url('/assets/fonts/PretendardVariable.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }

:root {
  --paper: #f5f3ee;
  --ink: #111418;
  --muted: #676b72;
  --line: #d8d4cb;
  --brand: #174eca;
  --up: #d22f2a;      /* 상승 빨강 */
  --down: #2a5fd3;    /* 하락 파랑 */
  --hand: 'Nanum Pen Script', 'Pretendard', cursive;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body { background: var(--paper); color: var(--ink); font-family: 'Pretendard', system-ui, sans-serif; font-size: 16px; line-height: 1.6; word-break: keep-all; }
a { color: inherit; }
ol { list-style: none; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 40px; }
.num { font-variant-numeric: tabular-nums; }
.up { color: var(--up); }
.down { color: var(--down); }
.flat { color: var(--ink); }
h2 { font-size: 15px; font-weight: 700; letter-spacing: -.01em; margin-bottom: 14px; }
h2 small { font-weight: 400; color: var(--muted); font-size: 13px; margin-left: 8px; }

/* 머리 */
.top { display: flex; justify-content: space-between; align-items: flex-end; padding-top: 28px; padding-bottom: 18px; border-bottom: 2px solid var(--ink); }
.brand { text-decoration: none; display: flex; align-items: baseline; gap: 12px; }
.brand b { font-size: 34px; font-weight: 900; letter-spacing: -.03em; line-height: 1; }
.brand span { font-size: 17px; font-weight: 600; }
.tagline { font-size: 13px; color: var(--muted); text-align: right; line-height: 1.5; }

/* 진행 단계 */
.timeline { padding: 34px 0 10px; }
.timeline ol { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; position: relative; }
.timeline li { position: relative; padding-top: 26px; font-size: 13px; line-height: 1.45; }
.timeline li::before { content: ''; position: absolute; top: 7px; left: 0; right: 0; border-top: 2px dotted var(--ink); }
.timeline li.done::before { border-top: 3px solid var(--brand); top: 6px; }
.timeline li:last-child::before { right: auto; width: 0; }
.timeline li::after { content: ''; position: absolute; top: 1px; left: 0; width: 12px; height: 12px; border: 2px solid var(--ink); background: var(--paper); border-radius: 50%; }
.timeline li.done::after, .timeline li.now::after { background: var(--brand); border-color: var(--brand); }
.timeline li:last-child { text-align: left; }
.timeline .when { display: block; font-weight: 700; }
.timeline .now .when { color: var(--brand); }
.timeline .now::after { width: 16px; height: 16px; top: -1px; left: -2px; box-shadow: 0 0 0 4px var(--paper), 0 0 0 5px var(--brand); }

/* 큰 숫자 */
.hero { padding: 28px 0 26px; border-bottom: 1px solid var(--line); }
.hero h1 { font-size: clamp(56px, 10vw, 132px); font-weight: 900; letter-spacing: -.045em; line-height: .98; }
.hero .lead { color: var(--ink); }
.kicker { font-size: clamp(18px, 2vw, 24px); font-weight: 500; margin-top: 14px; letter-spacing: -.01em; }
.stats { display: grid; grid-template-columns: repeat(4, auto); justify-content: start; gap: 0; margin-top: 24px; }
.stats div { padding: 2px 34px 2px 0; margin-right: 34px; border-right: 1px solid var(--line); }
.stats div:last-child { border-right: 0; }
.stats dt { font-size: 13px; color: var(--muted); }
.stats dd { font-size: 26px; font-weight: 800; letter-spacing: -.02em; }

/* 그래프 */
.chart-sec { padding: 28px 0 8px; }
.chart { position: relative; width: 100%; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .grid line { stroke: var(--line); stroke-width: 1; }
.chart .zero { stroke: var(--ink); stroke-width: 1; stroke-dasharray: 3 4; }
.chart .axis text { font-size: 12px; fill: var(--muted); font-family: 'Pretendard', sans-serif; }
.chart .line { fill: none; stroke: var(--ink); stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; }
.chart .end { fill: var(--brand); }
.chart .note text { font-family: var(--hand); font-size: 22px; fill: var(--brand); }
.chart .note line { stroke: var(--brand); stroke-width: 1.2; }
.chart .note circle { fill: var(--paper); stroke: var(--brand); stroke-width: 1.5; }

/* 일기 */
.diary { display: grid; grid-template-columns: 1.15fr 1fr; gap: 56px; padding: 40px 0; border-top: 2px solid var(--ink); margin-top: 26px; }
.diary-main .date { font-size: clamp(34px, 4.4vw, 54px); font-weight: 800; letter-spacing: -.035em; line-height: 1.1; }
.diary-main .sub { color: var(--muted); font-size: 15px; margin: 8px 0 22px; }
.diary-main .body { font-size: 20px; line-height: 1.75; letter-spacing: -.01em; }
.diary-main .body ul { margin: 10px 0 0; list-style: none; border-top: 1px solid var(--line); }
.diary-main .body li { border-bottom: 1px solid var(--line); padding: 4px 0; }
.diary-main .body li { font-size: 16px; line-height: 1.8; }
.diary-main .memo { margin-top: 22px; padding-left: 16px; border-left: 3px solid var(--brand); font-size: 17px; }
.diary-main .memo cite { display: block; font-style: normal; color: var(--muted); font-size: 13px; margin-top: 6px; }
.diary-past ol li { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.diary-past ol li:last-child { border-bottom: 1px solid var(--line); }
.diary-past .d { font-weight: 700; }
.diary-past .p { font-weight: 700; text-align: right; }
.diary-past .s { grid-column: 1 / -1; color: var(--muted); font-size: 14px; }
.diary-past button { all: unset; cursor: pointer; display: contents; }

/* 시장별 */
.markets { border-top: 1px solid var(--line); padding: 34px 0; }
.cols { display: grid; grid-template-columns: repeat(3, 1fr); }
.col { padding: 0 32px; border-left: 1px solid var(--line); }
.col:first-child { padding-left: 0; border-left: 0; }
.col h3 { font-size: 30px; font-weight: 800; letter-spacing: -.03em; }
.col .row { display: flex; align-items: baseline; gap: 12px; margin-top: 8px; }
.col .row .k { font-size: 13px; color: var(--muted); min-width: 72px; }
.col .row .v { font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.col .row .v.small { font-size: 16px; font-weight: 600; }
.col .last { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 15px; }
.col .last .k { display: block; font-size: 13px; color: var(--muted); }

/* 지난 매매 */
.recent { border-top: 1px solid var(--line); padding: 34px 0 40px; }
.recent table { width: 100%; border-collapse: collapse; font-size: 15px; }
.recent th { text-align: left; font-size: 13px; font-weight: 600; color: var(--muted); padding: 8px 12px 8px 0; border-bottom: 1px solid var(--ink); }
.recent td { padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); }
.recent td.r { font-weight: 700; }

.foot { border-top: 2px solid var(--ink); padding-top: 18px; padding-bottom: 48px; font-size: 13px; color: var(--muted); }
.foot p + p { margin-top: 4px; }
.foot .maker { margin-top: 12px; }

html, body { overflow-x: hidden; }
main, section, .diary > div, .cols > div { min-width: 0; }

@media (max-width: 860px) {
  .wrap { padding: 0 16px; }
  .hero h1 { font-size: 17vw; }
  .hero .lead { display: block; font-size: .5em; letter-spacing: -.03em; margin-bottom: 4px; }
  .diary-main .memo { overflow-wrap: anywhere; }
  .top { padding-top: 18px; padding-bottom: 12px; }
  .brand b { font-size: 26px; }
  .brand span { font-size: 14px; }
  .tagline { display: none; }
  .timeline ol { grid-template-columns: 1fr 1fr; row-gap: 18px; }
  .timeline li { font-size: 12px; }
  .timeline li:nth-child(2)::before { right: 0; }
  .stats { grid-template-columns: 1fr 1fr; row-gap: 14px; }
  .stats div { border-right: 0; margin-right: 0; padding-right: 0; }
  .stats dd { font-size: 22px; }
  .diary { grid-template-columns: 1fr; gap: 32px; }
  .diary-main .body { font-size: 18px; }
  .cols { grid-template-columns: 1fr; }
  .col { padding: 22px 0 0; border-left: 0; border-top: 1px solid var(--line); margin-top: 22px; }
  .col:first-child { padding-top: 0; border-top: 0; margin-top: 0; }
  .recent table, .recent thead, .recent tbody, .recent tr, .recent td { display: block; }
  .recent thead { display: none; }
  .recent tr { display: grid; grid-template-columns: auto 1fr auto; gap: 0 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .recent td { border: 0; padding: 0; }
  .recent td:nth-child(1) { grid-column: 1 / -1; font-size: 12px; color: var(--muted); }
  .recent td:nth-child(5) { grid-column: 1 / -1; font-size: 13px; color: var(--muted); }
  .chart .note text { font-size: 18px; }
}
