/* 온길 디자인 시스템 v2 — 공통 구조 (토큰은 각 시안 CSS가 정의) */
:root {
  --paper: #ffffff; --paper-2: #f6f6f4; --ink: #14171c; --ink-2: #3a3f47; --muted: #6b7079; --faint: #9aa0a8;
  --rule: #e3e3df; --rule-strong: #14171c; --accent: #12305f; --accent-ink: #ffffff; --link: #12305f;
  --alert: #c8102e; --ok: #0c7a4b;
  --serif: 'MaruBuri', 'Noto Serif KR', 'Apple SD Gothic Neo', serif;
  --sans: 'Pretendard Variable', Pretendard, -apple-system, 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', sans-serif;
  --head: var(--serif); --wrap: 1240px; --gut: max(20px, env(safe-area-inset-left, 0px));
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.6; letter-spacing: -0.015em; word-break: keep-all; overflow-wrap: anywhere; overflow-x: clip; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.skip { position: absolute; left: -999px; top: 0; z-index: 100; background: var(--ink); color: #fff; padding: 8px 12px; }
.skip:focus { left: 8px; }
.og-wrap { max-width: var(--wrap); margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
.muted { color: var(--muted); }
.hl:hover, a.hl:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }

/* ── 글로벌 헤더 (온길 공통) ── */
.og-bar { background: var(--og-bg, #0f141c); color: var(--og-fg, #e8eaed); font-size: 13.5px; }
.og-bar-in { display: flex; align-items: center; gap: 22px; height: 44px; }
.og-home { display: flex; align-items: center; gap: 7px; font-weight: 800; letter-spacing: -0.03em; font-size: 15px; }
.og-home img { border-radius: 5px; }
.og-svc { display: flex; align-items: center; gap: 2px; height: 100%; }
.og-svc a, .og-svc .off { position: relative; display: flex; align-items: center; height: 100%; padding: 0 12px; color: var(--og-fg-2, #aab0b9); font-weight: 600; }
.og-svc a:hover { color: #fff; }
.og-svc a.on { color: #fff; }
.og-svc a.on::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: 0; height: 2px; background: var(--og-accent, #fff); }
.og-svc .off { color: var(--og-fg-3, #6f7680); cursor: default; }
.og-svc .off em { font-style: normal; font-size: 10.5px; margin-left: 5px; padding: 0 5px; border: 1px solid currentColor; border-radius: 2px; line-height: 1.5; }
.og-tools { margin-left: auto; display: flex; align-items: center; gap: 2px; }
.og-tool { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border: 0; background: none; color: var(--og-fg-2, #aab0b9); cursor: pointer; font-size: 13px; }
.og-tool:hover { color: #fff; }
.og-my { color: #fff; font-weight: 700; }
.og-all { border-left: 1px solid rgba(255,255,255,.14); margin-left: 6px; padding-left: 14px; }
.og-dot { position: absolute; top: 3px; left: 20px; min-width: 15px; height: 15px; border-radius: 8px; background: var(--alert); color: #fff; font-size: 10px; display: grid; place-items: center; padding: 0 3px; }
.og-panel { border-top: 1px solid rgba(255,255,255,.1); background: var(--og-bg, #0f141c); }
.og-panel-in { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; padding-top: 18px; padding-bottom: 22px; }
.og-svc-card { display: flex; flex-direction: column; gap: 4px; padding: 6px 18px 6px 0; }
.og-svc-card strong { color: #fff; font-size: 15px; }
.og-svc-card span { color: var(--og-fg-2, #aab0b9); font-size: 13px; }
.og-svc-card a { color: #fff; font-weight: 700; font-size: 13px; margin-top: 6px; }
.og-svc-card em { font-style: normal; color: var(--og-fg-3, #6f7680); font-size: 12.5px; margin-top: 6px; }

/* ── 로컬(에듀뉴스) 내비게이션 ── */
.ln { background: var(--paper); border-bottom: 1px solid var(--rule); }
.ln-in { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding-top: 22px; padding-bottom: 14px; }
.ln-brand { display: flex; flex-direction: column; }
.ln-ko { font-family: var(--head); font-weight: 800; font-size: 34px; letter-spacing: -0.05em; line-height: 1.1; color: var(--ink); }
.ln-ko em { font-style: normal; color: var(--accent); }
.ln-sub { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.ln-date { font-size: 13px; color: var(--muted); text-align: right; }
.ln-nav { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--rule-strong); }
.ln-nav ul { list-style: none; margin: 0; padding: 0; display: flex; }
.ln-sec a { display: block; padding: 12px 14px; font-weight: 700; font-size: 15.5px; position: relative; }
.ln-sec li:first-child a { padding-left: 0; }
.ln-sec a.on::after { content: ''; position: absolute; left: 14px; right: 14px; bottom: -1px; height: 3px; background: var(--accent); }
.ln-sec li:first-child a.on::after { left: 0; }
.ln-tools a { display: block; padding: 6px 10px; font-size: 13.5px; color: var(--ink-2); font-weight: 600; }
.ln-tools a:hover, .ln-sec a:hover { color: var(--accent); }

/* ── 공통 타이포·블록 ── */
.kick { font-size: 12.5px; font-weight: 700; color: var(--accent); letter-spacing: 0; }
.kick.alert { color: var(--alert); }
.dek { color: var(--ink-2); }
.byl { font-size: 12.5px; color: var(--muted); }
.sec-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; border-top: 2px solid var(--rule-strong); padding-top: 10px; margin-bottom: 14px; }
.sec-h h2 { margin: 0; font-family: var(--head); font-size: 21px; font-weight: 800; letter-spacing: -0.04em; }
.sec-h a { font-size: 13px; color: var(--muted); }
.sec-h a:hover { color: var(--accent); }
.thumb { aspect-ratio: 3 / 2; overflow: hidden; background: var(--paper-2); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }

/* 브리핑 */
.brief-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; border-top: 2px solid var(--rule-strong); padding-top: 10px; margin-bottom: 12px; }
.brief-head h2 { margin: 0; font-family: var(--head); font-size: 21px; font-weight: 800; letter-spacing: -0.04em; }
.brief-date { font-size: 13px; color: var(--muted); }
.brief-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px 28px; }
.brief-col h3 { margin: 0 0 8px; font-size: 13px; font-weight: 800; color: var(--muted); letter-spacing: .02em; }
.brief-col ol, .brief-col ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.brief-col ol { counter-reset: b; }
.brief-col ol li { counter-increment: b; padding-left: 22px; position: relative; }
.brief-col ol li::before { content: counter(b); position: absolute; left: 0; top: 0; font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums; }
.brief-col li > a { font-weight: 600; font-size: 15px; line-height: 1.45; }
.brief-col li > a:hover { color: var(--accent); }
.brief-src { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.brief-src a { text-decoration: underline; text-underline-offset: 2px; }
.brief-day { font-size: 12.5px; font-weight: 700; color: var(--accent); margin-right: 6px; font-variant-numeric: tabular-nums; }
.brief-check { background: var(--paper-2); padding: 12px 14px; }
.brief-note { margin: 14px 0 0; font-size: 12px; color: var(--faint); }

/* 독자 유형 */
.aud h2 { margin: 0 0 10px; font-family: var(--head); font-size: 19px; font-weight: 800; }
.aud-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.aud-chips button { border: 1px solid var(--rule); background: var(--paper); padding: 7px 13px; font-size: 14px; font-weight: 600; cursor: pointer; border-radius: 2px; }
.aud-chips button:hover { border-color: var(--ink); }
.aud-chips button.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.aud-chips .clear { color: var(--muted); }
.aud-note { margin: 8px 0 0; font-size: 12px; color: var(--muted); }
.aud-note a { text-decoration: underline; }

/* 정책 추적 */
.trk-list { list-style: none; margin: 0; padding: 0; }
.trk-list li a { display: grid; grid-template-columns: 88px minmax(0, 1fr) auto; grid-template-areas: "yr t st" "yr tg tg"; gap: 2px 12px; padding: 11px 0; border-bottom: 1px solid var(--rule); }
.trk-yr { grid-area: yr; font-size: 12.5px; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
.trk-list strong { grid-area: t; font-size: 15px; font-weight: 600; }
.trk-tg { grid-area: tg; font-size: 12.5px; color: var(--muted); }
.trk-st { grid-area: st; font-size: 11.5px; font-weight: 700; padding: 0 6px; border: 1px solid var(--rule); height: fit-content; }
.st-시행중 { color: var(--ok); border-color: currentColor !important; } .st-확정 { color: var(--accent); border-color: currentColor !important; }
.st-예고, .st-예정 { color: #8a5a00; } .st-폐지 { color: var(--faint); text-decoration: line-through; }

/* 일정 */
.csat { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; padding: 10px 0 12px; border-bottom: 1px solid var(--rule); }
.csat-l { font-size: 13px; color: var(--muted); font-weight: 600; }
.csat b { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -0.03em; }
.csat.pending b { font-size: 16px; color: var(--ink-2); }
.csat span:last-child { font-size: 12.5px; color: var(--muted); }
.sch-list { list-style: none; margin: 0; padding: 0; }
.sch-list li { display: grid; grid-template-columns: 70px minmax(0, 1fr) auto; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--rule); font-size: 14px; }
.sch-d { font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; font-size: 13px; }
.sch-c { font-size: 11.5px; color: var(--muted); }

/* 차트 */
.chart { margin: 0; }
.chart-title { font-weight: 800; font-size: 16px; letter-spacing: -0.03em; }
.chart-desc { margin: 4px 0 8px; font-size: 13.5px; color: var(--muted); }
.chart-plot { position: relative; min-height: 40px; }
.chart-plot svg { display: block; overflow: visible; }
.chart .grid { stroke: var(--rule); stroke-width: 1; }
.chart .tick { font-size: 11px; fill: var(--muted); font-family: var(--sans); }
.chart .lbl { font-size: 12.5px; fill: var(--ink); font-family: var(--sans); }
.chart .val { font-size: 11.5px; fill: var(--ink-2); font-family: var(--sans); font-weight: 600; }
.chart .inbar { font-size: 11px; fill: #fff; font-weight: 700; font-family: var(--sans); pointer-events: none; }
.chart .mark { cursor: pointer; }
.chart .mark:hover, .chart .mark:focus { opacity: .82; outline: none; }
.chart-tip { position: absolute; display: none; pointer-events: none; background: var(--ink); color: var(--paper); font-size: 12.5px; line-height: 1.5; padding: 6px 9px; white-space: nowrap; z-index: 5; }
.chart-table { overflow-x: auto; margin-top: 8px; }
.chart-table table { border-collapse: collapse; width: 100%; font-size: 13px; }
.chart-table th, .chart-table td { padding: 6px 8px; border-bottom: 1px solid var(--rule); text-align: left; }
.chart-table th { font-weight: 700; color: var(--muted); }
.chart-meta { display: flex; flex-wrap: wrap; gap: 2px 12px; margin-top: 8px; font-size: 11.5px; color: var(--muted); }
.chart-meta a { text-decoration: underline; text-underline-offset: 2px; }
.chart-tbtn { margin-left: auto; border: 1px solid var(--rule); background: var(--paper); font-size: 11.5px; padding: 2px 8px; cursor: pointer; }
.chart.is-drawn .chart-table[hidden] { display: none; }
figure.chart:not(.is-drawn) .chart-table { display: block !important; }

/* 푸터 */
.ft { margin-top: 56px; border-top: 1px solid var(--rule-strong); background: var(--paper); font-size: 13px; color: var(--ink-2); }
.ft-in { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px 40px; padding-top: 28px; padding-bottom: 36px; }
.ft-brand { display: flex; gap: 10px; align-items: center; }
.ft-brand img { border-radius: 8px; }
.ft-brand strong { display: block; font-family: var(--head); font-size: 18px; }
.ft-brand span { font-size: 12px; color: var(--muted); }
.ft-links { display: flex; flex-wrap: wrap; gap: 6px 18px; align-self: center; }
.ft-links a:hover { color: var(--accent); }
.ft-legal { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px 20px; margin: 0; color: var(--muted); }
.ft-legal div { display: flex; gap: 6px; } .ft-legal dt { font-weight: 600; } .ft-legal dd { margin: 0; }
.ft-copy { grid-column: 1 / -1; margin: 0; color: var(--faint); font-size: 12px; }

@media (max-width: 900px) {
  .og-svc { overflow-x: auto; scrollbar-width: none; } .og-svc::-webkit-scrollbar { display: none; }
  .og-tool span { display: none; } .og-all { display: none; } .og-home span { display: none; }
  .og-bar-in { gap: 8px; }
  .og-panel-in { grid-template-columns: 1fr 1fr; }
  .ln-in { padding-top: 14px; padding-bottom: 10px; }
  .ln-ko { font-size: 26px; } .ln-date { display: none; }
  .ln-nav { flex-direction: column; align-items: stretch; }
  .ln-nav ul { overflow-x: auto; scrollbar-width: none; } .ln-nav ul::-webkit-scrollbar { display: none; }
  .ln-sec a, .ln-tools a { white-space: nowrap; }
  .ln-tools { border-top: 1px solid var(--rule); }
  .ft-in { grid-template-columns: 1fr; }
}
@media (max-width: 480px) { .og-svc .off em { display: none; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

.chart-legend { list-style: none; margin: 4px 0 8px; padding: 0; display: flex; gap: 14px; font-size: 12.5px; color: var(--ink-2); }
.chart-legend i { display: inline-block; width: 10px; height: 10px; margin-right: 5px; vertical-align: -1px; }

/* 글로벌 헤더 좁은 화면 보정: 서비스명 줄바꿈 금지, 서비스 목록만 가로 스크롤, 도구는 아이콘만 */
.og-svc a, .og-svc .off, .og-tool { white-space: nowrap; flex-shrink: 0; }
.og-svc { min-width: 0; flex: 0 1 auto; }
.og-tools { flex-shrink: 0; }
@media (max-width: 900px) {
  .og-svc a, .og-svc .off { padding: 0 9px; }
  .og-svc a.on::after { left: 9px; right: 9px; }
  .og-all { display: inline-flex; border-left: 0; margin-left: 0; padding-left: 8px; font-size: 0; }
  .og-all::before { content: '전체'; font-size: 12.5px; }
  .og-my { font-size: 12.5px; padding: 0 6px; }
}
@media (max-width: 420px) {
  .og-bar-in { gap: 4px; }
  .og-svc a, .og-svc .off { padding: 0 7px; font-size: 13px; }
  .og-tool { padding: 0 6px; }
  .og-tools a[href="/my#saved"] { display: none; }
}
