/* 다섯 시 경제 — 정제된 경제 브리핑 (2026-10-24 v2)
   페이지: 홈(한 줄 소개 + 최신 브리핑), 브리핑, 기사, 날짜별.
   규칙 1. 누를 수 있는 것은 청록색(--link)이다. 누를 수 없는 것은 그 색을 쓰지 않는다.
   규칙 2. 다른 페이지로 가는 목록은 같은 줄 모양(.rows)이고 오른쪽에 › 가 있다.
           같은 페이지 안으로 이동하는 줄(주요 뉴스)은 오른쪽에 ↓ 가 있다.
   규칙 3. 빨강과 파랑은 등락에만 쓴다 (상승 빨강, 하락 파랑). 색만으로 방향을 알리지 않는다: 맨 위 시장 지표는
           부호(+/−)와, 주요 뉴스 줄은 '오른·내린·증가·감소' 같은 말과 함께 쓴다. 맨 위 시장 지표의 흐름 선도 같다.
   규칙 4. 글자 크기: 14(보조) · 15(보조 강조) · 17(본문, 넓은 화면 18) · 20(구역 제목)
           · 21(기사 제목, 넓은 화면 23) · 23(대표 기사 제목, 넓은 화면 25) · 대표 제목(28~34, 넓은 화면 42).
   규칙 5. 굵은 선은 제호 아래 한 번만 쓴다. 큰 구역은 가는 먹색 선, 작은 구역은 여백과 연한 선으로 나눈다.
           상자·그림자·그라데이션·움직임은 쓰지 않는다.
   규칙 6. 누르는 곳은 44px 안팎의 높이를 확보한다. 상단은 화면에 붙지 않는다.
   서체: 제호와 대표 제목은 명조(--serif), 기사 제목과 본문은 고딕(--sans). */
:root {
  color-scheme: light;
  --paper: #fbfaf6;
  --wash: #f2efe8;
  --line: #e4e1d9;
  --rule: #2a2d33;
  --ink: #16181d;
  --ink-2: #3f444d;
  --ink-3: #5f6672;
  --link: #0b6a6a;
  --link-strong: #084f4f;
  --up: #c4261a;
  --down: #1d5fd1;
  --serif: "Noto Serif KR", "AppleMyungjo", "Nanum Myeongjo", serif;
  --sans: "Pretendard Variable", Pretendard, "Apple SD Gothic Neo", "Noto Sans KR", system-ui, sans-serif;
  --fs-s: 14px;
  --fs-m: 15px;
  --fs-body: 17px;
  --fs-h2: 20px;
  --fs-title: 21px;
  --fs-lead: 23px;
  --fs-h1: clamp(28px, 7.6vw, 34px);
  --gutter: 20px;
  --read: 680px;
  --wrap: 760px;
}
@media (min-width: 768px) {
  :root { --gutter: 32px; }
}
@media (min-width: 1080px) {
  :root { --wrap: 1120px; --fs-body: 18px; --fs-title: 23px; --fs-lead: 25px; --fs-h1: 42px; }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 12px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--fs-body);
  line-height: 1.78;
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
strong, b { font-weight: 700; }
a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-strong); text-decoration: underline; text-underline-offset: 4px; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; border-radius: 2px; }
.up { color: var(--up); }
.down { color: var(--down); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip {
  position: absolute; left: 16px; top: -56px; z-index: 50;
  padding: 8px 12px; border-radius: 6px; background: var(--ink); color: #fff; font-size: var(--fs-m);
}
.skip:focus { top: 12px; }
.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

/* ---- 상단: 명조 제호와 메뉴 한 줄, 그 아래 굵은 선 하나. 홈에만 한 줄 소개 ---- */
.masthead .wrap {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; column-gap: 12px;
  padding-block: 6px 8px;
  background: linear-gradient(var(--rule), var(--rule)) center bottom / calc(100% - 2 * var(--gutter)) 2px no-repeat;
}
.brand {
  padding: 8px 0; font-family: var(--serif); font-size: 26px; font-weight: 900; line-height: 1.2;
  letter-spacing: -0.035em; color: var(--ink); white-space: nowrap;
}
.brand:hover { color: var(--ink); text-decoration: none; }
.toplinks { display: flex; margin-right: -10px; }
.toplink {
  display: flex; align-items: center; min-height: 44px; padding: 0 10px;
  font-size: 16px; font-weight: 600; line-height: 1.3; white-space: nowrap;
}
.toplink[aria-current] { color: var(--ink); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.tagline { flex: 0 0 100%; margin: -4px 0 8px; font-size: var(--fs-s); line-height: 1.5; color: var(--ink-2); }
@media (min-width: 1080px) {
  .masthead .wrap { padding-block: 10px 10px; }
  .brand { font-size: 34px; }
  .tagline { margin-top: -6px; }
}

/* ---- 페이지 골격: 읽기 폭 한 칸. 시장·일정(rail)이 있는 브리핑은 1080px부터 오른쪽 보조 열을 쓴다 ---- */
.page { max-width: var(--wrap); margin-inline: auto; padding: 16px var(--gutter) 0; }
.lead, .rail, .body, .tail { max-width: var(--read); }
.rail { margin-top: 28px; padding-top: 14px; border-top: 1px solid var(--rule); }
.tail { margin-top: 48px; }
.tail > * + * { margin-top: 40px; }
@media (min-width: 1080px) {
  .page { padding-top: 36px; }
  .page.has-rail {
    display: grid; grid-template-columns: minmax(0, var(--read)) 300px; column-gap: 64px;
    justify-content: space-between; align-items: start;
  }
  .has-rail > .lead, .has-rail > .body, .has-rail > .tail { grid-column: 1; }
  .has-rail > .rail { grid-column: 2; grid-row: 1 / span 4; max-width: none; margin-top: 4px; }
}
.rail > section + section { margin-top: 32px; }

/* ---- 구역 제목: 모두 같은 크기 ---- */
.quick h2, .sec > h2, .slides-head h2, .market h2, .absent h2, .corrections h2, .others h2, .doc h2 {
  font-size: var(--fs-h2); font-weight: 700; line-height: 1.4; letter-spacing: -0.02em;
}

/* ---- 브리핑 머리: 날짜·판·확인 시각 한 줄 → 대표 제목 → 짧은 의미 ---- */
.dateline { display: flex; flex-wrap: wrap; column-gap: 14px; font-size: var(--fs-m); line-height: 1.6; color: var(--ink-3); }
.dateline > span:first-child { font-weight: 700; color: var(--ink); }
.hero h1 {
  margin-top: 6px; font-family: var(--serif); font-size: var(--fs-h1); font-weight: 700;
  line-height: 1.32; letter-spacing: -0.025em; text-wrap: balance;
}
.summary { margin-top: 12px; max-width: 36em; line-height: 1.72; color: var(--ink-2); text-wrap: pretty; }

/* ---- 날짜 선택: 날짜별 브리핑과 하루치 브리핑 맨 위. 고르면 그날 브리핑으로 간다 ---- */
.pick { display: flex; align-items: center; gap: 12px; margin: 0 0 24px; }
.hero .pick { margin: 18px 0 0; }
.pick label { flex: none; font-size: var(--fs-m); font-weight: 600; color: var(--ink-2); }
.pick select {
  flex: 1; min-width: 0; max-width: 360px; min-height: 44px; padding: 0 38px 0 12px;
  font: inherit; font-size: 16px; font-weight: 600; color: var(--link);
  background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%230b6a6a' stroke-width='1.8'/%3E%3C/svg%3E") no-repeat right 14px center;
  border: 1px solid var(--line); border-radius: 6px; appearance: none; -webkit-appearance: none; cursor: pointer;
}
.pick select:hover { border-color: var(--link); }
.checked { display: flex; flex-wrap: wrap; column-gap: 12px; margin-top: 10px; font-size: var(--fs-s); color: var(--ink-3); }
.checked span { white-space: nowrap; }
.deck { margin-top: 14px; max-width: 38em; font-size: 18px; line-height: 1.66; color: var(--ink-2); text-wrap: pretty; }

/* ---- 주요 뉴스: 줄마다 본문 기사로 이동. 앞의 세 줄이 먼저 눈에 들어오게 ---- */
.quick { margin-top: 24px; padding-top: 14px; border-top: 1px solid var(--rule); }
.quick ol { margin-top: 4px; counter-reset: quick; }
.quick li { counter-increment: quick; border-bottom: 1px solid var(--line); }
.quick li:last-child { border-bottom: 0; }
.quick a {
  position: relative; display: block; min-height: 44px; padding: 10px 26px 10px 28px;
  font-size: 16px; line-height: 1.55; color: var(--ink-2);
}
.quick a::before {
  content: counter(quick); position: absolute; left: 1px; top: 10px;
  font-weight: 700; color: var(--link); font-variant-numeric: tabular-nums;
}
.quick a::after { content: "↓"; content: "↓" / ""; position: absolute; right: 2px; top: 10px; color: var(--link); }
.quick li.top a { font-size: 17px; font-weight: 600; color: var(--ink); }
.quick a:hover { color: var(--ink); background: var(--wash); text-decoration: underline; text-underline-offset: 4px; }

/* ---- 분야별 기사 전문 ---- */
.sec { margin-top: 36px; }
.sec > h2 { padding-top: 12px; border-top: 1px solid var(--rule); }
.item { padding: 16px 0 26px; }
.item + .item { border-top: 1px solid var(--line); }
.item h3 { font-size: var(--fs-title); font-weight: 700; line-height: 1.42; letter-spacing: -0.02em; text-wrap: pretty; }
.item h3 a { display: block; padding: 2px 0; }
.item.lead h3 { font-size: var(--fs-lead); line-height: 1.38; }
.item:target h3 a { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }
.meta-line { margin-top: 6px; font-size: var(--fs-s); line-height: 1.5; color: var(--ink-3); }
.meta-line > * + *::before { content: "·"; margin: 0 6px; }
.meta-line .st { font-weight: 700; color: var(--ink-2); }
.part { margin-top: 14px; }
.item .meta-line + .part, .item h3 + .part { margin-top: 10px; }
.part h2, .part h4 { margin-bottom: 2px; font-size: var(--fs-m); font-weight: 700; line-height: 1.5; color: var(--ink-3); }
.part p { max-width: 38em; line-height: 1.8; text-wrap: pretty; }
.part.why p, .part.recheck p, .part.tip p { color: var(--ink-2); }
.follows { margin-top: 12px; font-size: var(--fs-m); line-height: 1.6; color: var(--ink-3); }
.follows a { font-weight: 600; }
.src { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 14px; margin-top: 14px; font-size: var(--fs-s); color: var(--ink-3); }
.src a { display: inline-block; padding: 12px 0; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }

/* ---- 다른 페이지로 가는 줄: 머리글(작게), 제목(청록), 한 줄. 사이트의 모든 목록이 이 모양이다 ---- */
.rows { border-bottom: 1px solid var(--line); }
.rows li { border-top: 1px solid var(--line); }
.rows a { position: relative; display: block; padding: 12px 28px 12px 0; color: var(--ink); }
.rows a::after {
  content: "›"; position: absolute; right: 2px; top: 50%; transform: translateY(-54%);
  font-size: 24px; line-height: 1; color: var(--link);
}
.rows a:hover { text-decoration: none; background: var(--wash); }
.rows .meta { display: block; font-size: var(--fs-s); line-height: 1.5; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.rows .t { display: block; font-size: 17px; font-weight: 700; line-height: 1.5; letter-spacing: -0.01em; color: var(--link); }
.rows a:hover .t { color: var(--link-strong); text-decoration: underline; text-underline-offset: 4px; }
.rows .line { display: block; margin-top: 2px; font-size: var(--fs-m); line-height: 1.65; color: var(--ink-2); }

/* ---- 맨 위 시장 지표 12개: 이름 / 값 / 등락 / 작은 흐름 선 / 시각.
   좁은 화면은 6개(3칸×2줄)씩 두 쪽을 옆으로 넘기고 다음 쪽이 조금 보인다. 768px부터는 12개가 한 번에 (6칸×2줄).
   흐름 선의 점선은 전 거래일 종가다. 색은 등락 색만 쓴다. ---- */
.ticker { max-width: var(--wrap); margin-inline: auto; padding: 8px var(--gutter) 0; font-variant-numeric: tabular-nums; }
/* position: relative — 칸 안의 화면 낭독용 글자(.sr)가 이 칸 안에서 잘리게 한다. 없으면 화면 밖 둘째 쪽의
   글자가 페이지 폭을 늘려 폰에서 페이지 전체가 옆으로 밀린다. */
.tk-pages {
  position: relative; display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain; scrollbar-width: none;
}
.tk-pages::-webkit-scrollbar { display: none; }
.tk-page { flex: 0 0 90%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 12px; scroll-snap-align: start; }
.tk { display: flex; flex-direction: column; min-width: 0; padding: 8px 0 10px; border-bottom: 1px solid var(--line); }
.tk-n { font-size: var(--fs-s); font-weight: 600; line-height: 1.35; color: var(--ink-2); }
.tk-v { margin-top: 2px; font-size: clamp(15px, 4.4vw, 19px); font-weight: 700; line-height: 1.3; letter-spacing: -0.01em; color: var(--ink); white-space: nowrap; }
.tk-c { font-size: 13px; font-weight: 600; line-height: 1.4; }
.tk-r { white-space: nowrap; }
.tk.up .tk-c, .tk.up .tk-s { color: var(--up); }
.tk.down .tk-c, .tk.down .tk-s { color: var(--down); }
.tk.flat .tk-c, .tk.flat .tk-s { color: var(--ink-3); }
.tk-s { display: block; width: 100%; height: 26px; margin-top: 6px; overflow: visible; }
.tk-s polyline { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.tk-s line { stroke: var(--ink-3); stroke-width: 1; stroke-dasharray: 2 3; opacity: 0.6; vector-effect: non-scaling-stroke; }
.tk-t { margin-top: 4px; font-size: 13px; line-height: 1.4; color: var(--ink-3); white-space: nowrap; }
.tk-src { margin-top: 8px; font-size: 13px; line-height: 1.5; color: var(--ink-3); }
@media (min-width: 768px) {
  .tk-pages { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 12px; overflow: visible; }
  .tk-page { flex: none; }
  .tk-v { font-size: clamp(15px, 2.15vw, 20px); }
}
@media (min-width: 1080px) {
  .ticker { padding-top: 14px; }
}

/* ---- 이번 판 부재 항목: 짧게 ---- */
.absent b { display: block; font-size: var(--fs-m); font-weight: 600; line-height: 1.5; }
.absent .d { display: block; font-size: var(--fs-s); line-height: 1.55; color: var(--ink-3); }
.absent ul { margin-top: 10px; }
.absent li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); }

/* ---- 바로잡습니다(정정), 이전·다음 브리핑. 이전 판 기사는 2026-10-24부터 분야 안에 함께 싣는다 ---- */
.corrections { font-size: var(--fs-m); line-height: 1.7; }
.corrections ul { margin-top: 8px; }
.corrections li + li { margin-top: 6px; }
.corrections time { font-weight: 700; margin-right: 4px; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding-top: 14px; border-top: 1px solid var(--rule); }
.pager a { display: block; padding-bottom: 8px; }
.pager .prev { grid-column: 1; }
.pager .next { grid-column: 2; text-align: right; }
.pager span { display: block; font-size: var(--fs-s); color: var(--ink-3); }
.pager b { display: block; font-size: var(--fs-m); font-weight: 700; line-height: 1.5; text-wrap: balance; }
@media (max-width: 520px) {
  .pager { grid-template-columns: 1fr; }
  .pager .next { grid-column: 1; text-align: left; }
}

/* ---- 기사 페이지 ---- */
.kicker { display: flex; flex-wrap: wrap; column-gap: 14px; font-size: var(--fs-m); }
.kicker span { display: inline-block; padding: 10px 0; font-weight: 700; color: var(--ink-2); }
.kicker a { display: inline-block; padding: 10px 0; }
.article .hero h1 { margin-top: 2px; font-size: clamp(26px, 6.8vw, 32px); line-height: 1.36; }
.article .part { margin-top: 28px; }
.article .part h2 { font-size: 18px; color: var(--ink); }
.story .corrections { margin-top: 32px; }
.body > .others { margin-top: 44px; }
.others .rows { margin-top: 8px; }
.back { font-size: var(--fs-m); font-weight: 600; }
.back a { display: inline-block; padding: 11px 0; }
.back a::after { content: " ›"; }
@media (min-width: 1080px) {
  .article .hero h1 { font-size: 38px; line-height: 1.32; }
}

/* ---- 날짜별 브리핑: 날마다 한 칸, 날짜·판 → 대표 제목 → 짧은 요약 → 기사 줄 ---- */
.day { margin-top: 32px; padding-top: 14px; border-top: 1px solid var(--rule); }
.body > .day:first-child { margin-top: 28px; }
.day .dateline { font-weight: 700; color: var(--ink); }
.day h2 { margin-top: 4px; font-family: var(--serif); font-size: 23px; font-weight: 700; line-height: 1.4; letter-spacing: -0.02em; text-wrap: balance; }
.day h2 a { display: block; padding: 2px 0; }
.day .summary { margin-top: 8px; font-size: 16px; line-height: 1.7; }
.day .rows { margin-top: 14px; }
@media (min-width: 1080px) {
  .day h2 { font-size: 27px; }
}

/* ---- 고정 페이지(지금은 없음)와 안내 ---- */
.doc { margin-top: 40px; }
.doc p { margin-top: 12px; }
.more { margin-top: 8px; font-size: var(--fs-m); font-weight: 600; }
.more a { display: inline-block; padding: 11px 0; }
.more a::after { content: " ›"; }

/* ---- 맨 아래: 가는 선, 명조 이름, RSS, 면책 문구 ---- */
footer { margin-top: 80px; }
footer .wrap {
  padding-block: 18px 48px; font-size: var(--fs-s); line-height: 1.7; color: var(--ink-3);
  background: linear-gradient(var(--rule), var(--rule)) center top / calc(100% - 2 * var(--gutter)) 1px no-repeat;
}
footer .meta { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 20px; font-size: var(--fs-m); }
footer .meta > span:first-child { font-family: var(--serif); font-size: 18px; font-weight: 900; letter-spacing: -0.03em; color: var(--ink); }
footer .meta a { display: inline-block; padding: 10px 8px; margin-inline: -8px; }
footer p + p { margin-top: 4px; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

/* 기사 맨 아래 '읽음' 체크 칸 (assets/read.js). 홈에서는 체크한 기사를 숨긴다. */
.readmark { margin: 16px 0 0; }
.readmark label { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-size: var(--fs-m); color: var(--ink-3); cursor: pointer; }
.readmark input { width: 22px; height: 22px; margin: 0; accent-color: var(--link); cursor: pointer; }
main:not(.show-read) .is-read { display: none; }
.read-restore { margin: 32px 0 0; }
.read-restore button { min-height: 44px; padding: 0 16px; font: inherit; font-size: var(--fs-m); color: var(--link); background: none; border: 1px solid var(--line); border-radius: 6px; cursor: pointer; }

/* 주요 뉴스 상세와 분야별 기사: 기사를 한 장씩 옆으로 넘긴다 (assets/slides.js 가 단추·높이를 맡는다). */
.slides-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; border-top: 1px solid var(--rule); }
.slides-nav { display: flex; align-items: center; gap: 6px; flex: none; }
.slides-nav[hidden] { display: none; }
.slides-nav .slides-count { min-width: 44px; text-align: center; font-size: var(--fs-m); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.slides-nav button { width: 44px; height: 44px; font: inherit; font-size: 24px; line-height: 1; color: var(--link); background: none; border: 1px solid var(--line); border-radius: 6px; cursor: pointer; }
.slides-nav button:disabled { color: var(--line); cursor: default; }
.slides-track {
  position: relative; display: flex; align-items: flex-start; gap: 32px;
  overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  scrollbar-width: none; transition: height .2s ease;
}
.slides-track::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 100%; min-width: 0; scroll-snap-align: start; scroll-snap-stop: always; }
.item.slide + .item.slide { border-top: 0; }
.rank { margin-bottom: 4px; font-size: var(--fs-s); font-weight: 700; color: var(--ink); }
.rank span { margin-left: 8px; font-weight: 400; color: var(--ink-3); }
