/* 온길에듀뉴스 최종 디자인 — 시안 A(Ivory Broadsheet) 기반 + B의 지표 띠 + C의 맞춤 뉴스 상단 배치
   기존 페이지 컴포넌트(site.css)의 토큰을 같은 체계로 재정의해 전 화면을 한 디자인으로 통일 */
:root {
  --paper: #FBF9F4; --paper-2: #F1EDE3; --ink: #141414; --ink-2: #3B3A36; --muted: #6E6A61; --faint: #A29C90;
  --rule: #DDD6C8; --rule-strong: #141414; --accent: #13294B; --alert: #B3261E; --ok: #1E6B45;
  --og-bg: #141414; --head: var(--serif);
  /* site.css 토큰 매핑 */
  --brand: #13294B; --brand-dark: #0C1C35; --brand-50: #ECEFF4; --brand-100: #D5DCE8; --gold: #B8860B; --red: #B3261E; --green: #1E6B45;
  --line: #DDD6C8; --line-2: #E8E2D6; --bg: #FBF9F4; --bg-soft: #F1EDE3; --r: 0px; --r2: 2px; --wrap: 1240px;
}
body.d-final { background: var(--paper); }

/* 기존 컴포넌트 재정렬 */
.d-final .wrap { max-width: var(--wrap); }
.d-final .page-head h1, .d-final .article-head h1, .d-final .list-article h2, .d-final .sec-head h2, .d-final .cp-head h1,
.d-final .cmx-top h1, .d-final .cal-hero h1, .d-final .tracker-hero h1, .d-final .cal-nav h2, .d-final .year-group > h2,
.d-final .widget h3, .d-final .doc h2, .d-final .uni-head h2, .d-final .related-grid h3, .d-final .top-item h3 { font-family: var(--serif); }
.d-final .article-head h1 { font-size: 38px; font-weight: 800; letter-spacing: -0.055em; line-height: 1.28; }
.d-final .list-article h2 { font-size: 20px; }
.d-final .sec-head, .d-final .widget h3 { border-bottom-color: var(--ink); }
.d-final .thumb { border-radius: 0; }
.d-final .cal-hero, .d-final .tracker-hero, .d-final .cm-hero { background: var(--paper); border-bottom: 1px solid var(--ink); }
.d-final .btn { border-radius: 0; }
.d-final .cmx-write, .d-final .cmx-filter .seg a.on, .d-final .pager .on { background: var(--ink); border-color: var(--ink); }
.d-final .summary-box { background: var(--paper-2); border-top-color: var(--ink); }
.d-final .applies-box { border-color: var(--rule); }
.d-final .applies-box .h { background: var(--paper-2); color: var(--ink); }
.d-final .source-box, .d-final .cm-form, .d-final .form-card, .d-final .cmx-box, .d-final .week-box, .d-final .cal-links, .d-final .uni, .d-final .tr-row, .d-final .dday-card, .d-final .ongil-side, .d-final .cta-card { background: #fff; border-color: var(--rule); border-radius: 0; }
.d-final .prose { color: #1d1c1a; }
.d-final .prose h2 { border-left: 0; padding-left: 0; font-family: var(--serif); }
.d-final .gnb, .d-final .hd, .d-final .ticker, .d-final .drawer { display: none; }

/* 속보 띠 */
.v2-breaking { border-bottom: 1px solid var(--rule); background: var(--paper); }
.v2-breaking .og-wrap { display: flex; gap: 16px; align-items: baseline; padding-top: 8px; padding-bottom: 8px; white-space: nowrap; overflow: hidden; font-weight: 600; font-size: 14.5px; }
.v2-breaking b { color: var(--alert); font-size: 12.5px; }

/* 홈 (시안 A 구조) */
.h-main { padding-top: 18px; }
.h-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: 1px solid var(--ink); }
.h-stat { display: flex; flex-direction: column; padding: 12px 18px; border-left: 1px solid var(--rule); }
.h-stat:first-child { border-left: 0; padding-left: 0; }
.h-stat span { font-size: 12px; color: var(--muted); font-weight: 600; }
.h-stat b { font-size: 26px; font-weight: 900; letter-spacing: -0.04em; line-height: 1.2; font-variant-numeric: tabular-nums; }
.h-stat b small { font-size: 13px; font-weight: 700; margin-left: 2px; }
.h-stat em { font-style: normal; font-size: 11.5px; color: var(--muted); }
.h-stat:hover b { color: var(--accent); }
.h-front { display: grid; grid-template-columns: minmax(0, 6.2fr) minmax(0, 3.4fr) minmax(0, 2.4fr); padding: 20px 0 26px; border-bottom: 1px solid var(--ink); }
.h-front > * { padding: 0 22px; border-left: 1px solid var(--rule); min-width: 0; }
.h-front > :first-child { padding-left: 0; border-left: 0; } .h-front > :last-child { padding-right: 0; }
.h-lead .thumb { aspect-ratio: 16 / 10; margin-bottom: 14px; }
.h-lead h1 { font-family: var(--serif); font-weight: 800; font-size: 38px; line-height: 1.25; letter-spacing: -0.055em; margin: 6px 0 10px; }
.h-lead .dek { font-size: 17px; line-height: 1.55; margin: 0 0 12px; }
.h-points { margin: 0 0 12px; padding: 12px 0 0; border-top: 1px solid var(--rule); list-style: none; display: grid; gap: 4px; font-size: 14.5px; color: var(--ink-2); }
.h-points li::before { content: '— '; color: var(--accent); }
.h-top { padding: 14px 0; border-bottom: 1px solid var(--rule); }
.h-top:first-child { padding-top: 0; } .h-top:last-child { border-bottom: 0; }
.h-top h2 { font-family: var(--serif); font-size: 19px; font-weight: 700; line-height: 1.38; letter-spacing: -0.04em; margin: 3px 0 4px; }
.h-top.big .thumb { margin-bottom: 10px; } .h-top.big h2 { font-size: 23px; }
.h-top .dek { font-size: 14px; margin: 0 0 6px; }
.h-rail-h { font-size: 13px; font-weight: 800; margin: 0 0 6px; padding-bottom: 6px; border-bottom: 2px solid var(--ink); }
.h-rail ol { list-style: none; margin: 0; padding: 0; }
.h-rail li { padding: 9px 0; border-bottom: 1px solid var(--rule); font-size: 14px; font-weight: 600; line-height: 1.45; }
.h-rail li span { display: block; font-size: 11.5px; color: var(--accent); font-weight: 700; }
.h-aud { padding: 20px 0; border-bottom: 1px solid var(--rule); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 28px; align-items: start; }
.h-foryou { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 22px; }
.h-foryou a { display: flex; flex-direction: column; gap: 2px; font-family: var(--serif); font-weight: 700; font-size: 16px; line-height: 1.4; padding-bottom: 10px; border-bottom: 1px solid var(--rule); }
.h-brief { padding: 26px 0; }
.h-brief .brief-cols { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; }
.h-brief .brief-col { padding: 0 18px; border-left: 1px solid var(--rule); }
.h-brief .brief-col:first-child { padding-left: 0; border-left: 0; }
.h-brief .brief-check { background: transparent; padding: 0 0 0 18px; }
.h-two { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 36px; padding-top: 6px; }
.h-charts { display: grid; gap: 26px; }
.h-side { display: flex; flex-direction: column; gap: 28px; }
.h-sections { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin-top: 36px; }
.h-sec { padding: 0 20px; border-left: 1px solid var(--rule); }
.h-sec:first-child { padding-left: 0; border-left: 0; }
.h-sec ul { list-style: none; margin: 0; padding: 0; }
.h-sec li { padding: 9px 0; border-bottom: 1px solid var(--rule); font-size: 15px; font-weight: 600; line-height: 1.45; }
.h-sec li:first-child a { font-family: var(--serif); font-size: 18px; font-weight: 700; }
.h-op { margin-top: 34px; }
.h-op-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.h-op-item { padding: 0 20px; border-left: 1px solid var(--rule); }
.h-op-item:first-child { padding-left: 0; border-left: 0; }
.h-op-item h3 { font-family: var(--serif); font-size: 19px; font-weight: 700; line-height: 1.42; margin: 0 0 6px; }
.h-svc { margin-top: 34px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 2px solid var(--ink); }
.h-svc > div { padding: 14px 18px; border-left: 1px solid var(--rule); }
.h-svc > div:first-child { border-left: 0; padding-left: 0; }
.h-svc strong { display: block; font-family: var(--serif); font-size: 17px; }
.h-svc span { display: block; font-size: 13px; color: var(--muted); margin: 2px 0 6px; }
.h-svc em { font-style: normal; font-size: 12px; color: var(--faint); }
.h-svc a { font-size: 13px; font-weight: 700; color: var(--accent); }

/* 기사 상세 확장 */
.art { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; padding: 8px 0 40px; }
.art-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; color: var(--muted); }
.art-tools { display: flex; flex-wrap: wrap; gap: 6px; }
.art-tools button, .art-tools a { border: 1px solid var(--rule); background: #fff; padding: 6px 11px; font-size: 13px; cursor: pointer; }
.art-tools button[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.toc { position: sticky; top: 16px; border-top: 2px solid var(--ink); padding-top: 10px; }
.toc h2 { font-size: 13px; margin: 0 0 6px; }
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc a { display: block; padding: 5px 0 5px 10px; border-left: 2px solid var(--rule); font-size: 13.5px; color: var(--ink-2); }
.toc a.on { border-left-color: var(--accent); color: var(--accent); font-weight: 700; }
.read-progress { position: fixed; left: 0; top: 0; height: 3px; background: var(--accent); width: 0; z-index: 60; }
.impact { border: 1px solid var(--ink); margin: 30px 0; background: #fff; }
.impact-h { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; padding: 12px 18px; border-bottom: 1px solid var(--rule); }
.impact-h h2 { margin: 0; font-family: var(--serif); font-size: 19px; }
.impact-h small { color: var(--muted); }
.impact form { padding: 12px 18px; display: flex; flex-wrap: wrap; gap: 6px; border-bottom: 1px solid var(--rule); }
.impact form button { border: 1px solid var(--rule); background: #fff; padding: 5px 11px; font-size: 13px; cursor: pointer; }
.impact form button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.impact-body { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.impact-col { padding: 14px 18px; border-left: 1px solid var(--rule); }
.impact-col:first-child { border-left: 0; }
.impact-col h3 { margin: 0 0 6px; font-size: 12.5px; letter-spacing: .02em; }
.impact-col.fact h3 { color: var(--ink); } .impact-col.interp h3 { color: var(--accent); } .impact-col.todo h3 { color: var(--ok); }
.impact-col ul { margin: 0; padding-left: 16px; font-size: 14px; display: grid; gap: 5px; }
.impact-foot { padding: 10px 18px; border-top: 1px solid var(--rule); font-size: 12px; color: var(--muted); }
.ctx-acts { display: grid; gap: 8px; }
.ctx-act { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--rule); background: #fff; font-size: 14px; }
.ctx-act b { font-weight: 700; } .ctx-act small { color: var(--muted); }
.ctx-act.off { color: var(--muted); background: var(--paper-2); }
.rel-list { list-style: none; margin: 0; padding: 0; }
.rel-list li { padding: 9px 0; border-bottom: 1px solid var(--rule); font-size: 14px; }
.rel-list small { display: block; color: var(--muted); font-size: 12px; }
.corr { margin: 26px 0; border-top: 1px solid var(--ink); padding-top: 10px; font-size: 13.5px; }
.corr h2 { font-size: 14px; margin: 0 0 6px; }
.corr li { margin: 3px 0; }

@media (max-width: 1100px) {
  .h-front { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); }
  .h-rail { grid-column: 1 / -1; border-left: 0 !important; padding: 18px 0 0 !important; margin-top: 18px; border-top: 1px solid var(--rule); }
  .h-brief .brief-cols { grid-template-columns: 1fr 1fr; gap: 18px 0; }
  .art { grid-template-columns: 1fr; } .toc { position: static; }
}
@media (max-width: 760px) {
  .h-strip { grid-template-columns: 1fr 1fr; } .h-stat:nth-child(3) { border-left: 0; padding-left: 0; } .h-stat { border-top: 1px solid var(--rule); } .h-stat b { font-size: 21px; }
  .h-front, .h-aud, .h-two, .h-sections, .h-op-row, .h-foryou, .h-svc { grid-template-columns: 1fr; }
  .h-front > *, .h-sec, .h-op-item, .h-svc > div { padding: 0 !important; border-left: 0 !important; }
  .h-sec, .h-op-item, .h-svc > div { padding-top: 14px !important; }
  .h-lead h1 { font-size: 27px; }
  .h-tops { margin-top: 18px; border-top: 1px solid var(--rule); padding-top: 14px !important; }
  .h-brief .brief-cols { grid-template-columns: 1fr; gap: 16px; } .h-brief .brief-col { padding: 0 !important; border-left: 0; }
  .d-final .article-head h1 { font-size: 27px; }
  .impact-body { grid-template-columns: 1fr; } .impact-col { border-left: 0; border-top: 1px solid var(--rule); }
}

.h-lead-title { font-family: var(--serif); font-weight: 800; font-size: 38px; line-height: 1.25; letter-spacing: -0.055em; margin: 6px 0 10px; }
@media (max-width: 760px) { .h-lead-title { font-size: 27px; } }
