/* =========================================================
   100세뉴스 — 시니어 독자 화면 스타일
   - 기본 18px / 기사 본문 약 20px / 줄간격 1.8
   - 글자 크기 3단계: html.fs-1(18px) fs-2(20px) fs-3(22px)
   - 대비 4.5:1 이상, 링크 밑줄, 터치 영역 48px 이상, 움직임 없음
   - [미결정] 브랜드 색상: --brand 계열은 임시값
   ========================================================= */

@font-face {
  font-family: "Pretendard";
  src: url("../fonts/PretendardVariable-subset.woff2") format("woff2-variations"),
       url("../fonts/PretendardVariable-subset.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #111111;          /* 제목 */
  --text: #222222;         /* 본문 (흰 바탕 대비 15.9:1) */
  --muted: #4a4a4a;        /* 보조 글자 (8.9:1) */
  --line: #c9c9c9;
  --line-strong: #111111;
  --bg: #ffffff;
  --bg-soft: #f4f4f2;
  --brand: #0b4a7d;        /* 임시 브랜드 남색 (흰 바탕 대비 9.2:1) */
  --brand-dark: #083659;
  --brand-tint: #e8f0f7;
  --accent: #a3161b;       /* 강조 빨강 (7.6:1) */
  --focus: #ffbf00;
  --ok: #1b5e20;
  --error: #a3161b;
  --radius: 6px;
  --gutter: 16px;
  --tap: 48px;
  --bottom-bar-h: 64px;
}

html { font-size: 112.5%; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html.fs-2 { font-size: 125%; }
html.fs-3 { font-size: 137.5%; }

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", "맑은 고딕", sans-serif;
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text);
  background: var(--bg);
  word-break: keep-all;
  overflow-wrap: break-word;
}

img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.4; margin: 0; font-weight: 700; }
p { margin: 0 0 .8em; }
ul, ol { margin: 0; padding: 0; }

a { color: var(--brand); text-decoration: underline; text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--brand-dark); text-decoration-thickness: 2px; }

/* 키보드 포커스: 두껍고 분명하게 */
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; box-shadow: 0 0 0 6px var(--focus); border-radius: 2px; }
main:focus { outline: none; box-shadow: none; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 8px; top: -100px; z-index: 100;
  background: var(--ink); color: #fff; padding: 12px 20px; font-weight: 700; border-radius: var(--radius);
}
.skip-link:focus { top: 8px; color: #fff; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter); }
.container.narrow { max-width: 820px; }

.env-banner { background: #fff3cd; color: #5c4400; text-align: center; font-size: .85rem; padding: 4px; border-bottom: 1px solid #e0c56a; }

/* ---------- 버튼 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4em;
  min-height: var(--tap); min-width: var(--tap); padding: 0 1.1em;
  font: inherit; font-size: .95rem; font-weight: 600; line-height: 1.3;
  color: var(--ink); background: #fff; border: 2px solid var(--ink); border-radius: var(--radius);
  cursor: pointer; text-decoration: none;
}
.btn:hover { background: var(--bg-soft); color: var(--ink); }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.btn-block { display: flex; width: 100%; }
.btn-lg { min-height: 56px; font-size: 1.05rem; }

/* ---------- 머리말 ---------- */
.topbar { background: var(--bg-soft); border-bottom: 1px solid var(--line); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; flex-wrap: wrap; }
.today { margin: 0; color: var(--muted); font-size: .9rem; }

.fs-control { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.fs-control-label { font-size: .85rem; color: var(--muted); margin-right: 2px; }
.fs-btn {
  min-height: var(--tap); min-width: var(--tap); padding: 0 .8em;
  font: inherit; font-size: .85rem; font-weight: 600; color: var(--ink);
  background: #fff; border: 2px solid var(--line); border-radius: var(--radius); cursor: pointer;
}
.fs-btn[data-fs="2"] { font-size: .95rem; }
.fs-btn[data-fs="3"] { font-size: 1.05rem; }
.fs-btn[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }

.masthead { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px 24px; padding-top: 20px; padding-bottom: 16px; }
.logo { margin: 0; font-size: 2.1rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; }
.logo-link { color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; min-height: var(--tap); }
.logo-link:hover { color: var(--brand); }
.tagline { margin: 0; color: var(--muted); font-size: .95rem; border-left: 2px solid var(--line); padding-left: 16px; }

.search-form { display: flex; gap: 8px; }
.search-form input[type="search"] {
  min-height: var(--tap); width: 100%; min-width: 0; padding: 0 14px;
  font: inherit; font-size: 1rem; color: var(--ink);
  border: 2px solid var(--muted); border-radius: var(--radius); background: #fff;
}
.masthead-search { width: 360px; }

.main-nav { border-top: 3px solid var(--line-strong); border-bottom: 1px solid var(--line); background: #fff; }
.main-nav-list { list-style: none; display: flex; flex-wrap: wrap; }
.main-nav-list a {
  display: flex; align-items: center; min-height: 56px; padding: 0 18px;
  color: var(--ink); font-size: 1.05rem; font-weight: 700; text-decoration: none;
  border-bottom: 4px solid transparent;
}
.main-nav-list a:hover { text-decoration: underline; }
.main-nav-list a[aria-current="page"] { border-bottom-color: var(--brand); color: var(--brand); }
.main-nav-list li:first-child a { padding-left: 0; }
.nav-report { margin-left: auto; }
.nav-report a { color: var(--accent); }

/* ---------- 공통 블록 ---------- */
main { display: block; padding: 24px 0 48px; }

.layout-2col { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; margin-top: 32px; }

.block { margin-bottom: 40px; }
.block-title { font-size: 1.25rem; padding: 10px 0; margin-bottom: 4px; border-top: 3px solid var(--line-strong); }
.block-title a { color: var(--ink); text-decoration: none; display: flex; justify-content: space-between; align-items: center; min-height: var(--tap); }
.block-title a:hover .more { text-decoration: underline; }
.block-title .more { font-size: .85rem; font-weight: 600; color: var(--brand); text-decoration: underline; }

.box { background: var(--bg-soft); border-radius: var(--radius); padding: 20px; margin-bottom: 24px; }
.box-title { font-size: 1.1rem; margin-bottom: 12px; }

.kicker { margin: 0 0 6px; font-size: .9rem; font-weight: 700; color: var(--brand); }
.kicker a { color: var(--brand); }
.label-top { display: inline-block; background: var(--accent); color: #fff; padding: 0 8px; border-radius: 3px; margin-right: 6px; }

.empty { padding: 40px 0; color: var(--muted); }
.result-count { color: var(--muted); font-size: .95rem; }

/* ---------- 헤드라인·주요기사 ---------- */
.top-news { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 32px; }
.headline-thumb img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--radius); }
.headline-body { padding-top: 16px; }
.headline-title { font-size: 1.75rem; letter-spacing: -.01em; margin-bottom: 10px; }
.headline-title a { color: var(--ink); text-decoration: none; }
.headline-title a:hover { text-decoration: underline; }
.headline-sub { font-weight: 600; color: var(--ink); }
.headline-summary { color: var(--text); }

.featured { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 20px; align-content: start; }

/* ---------- 카드 ---------- */
.card { position: relative; }
.card-title { font-size: 1.1rem; line-height: 1.45; margin-bottom: 6px; }
.card-title a { color: var(--ink); text-decoration: none; }
.card-title a:hover { text-decoration: underline; color: var(--brand-dark); }
.card-summary { color: var(--text); font-size: .95rem; margin-bottom: 4px; }
.card-meta { margin: 0; font-size: .85rem; color: var(--muted); display: flex; gap: 10px; flex-wrap: wrap; }
.card-cat { font-weight: 700; color: var(--brand); }

.card--grid .card-thumb img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius); margin-bottom: 10px; }

.list .card--list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.list .card--list.has-thumb { grid-template-columns: 200px minmax(0, 1fr); }
.card--list .card-thumb img { width: 200px; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius); }
.card--list .card-title { font-size: 1.2rem; }

.section-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 0 28px; align-items: start; }
.section-grid .card--grid { grid-row: span 3; padding-top: 12px; }
.section-grid .card--title { padding: 14px 0; border-bottom: 1px solid var(--line); }
.section-grid .card--title .card-title { font-size: 1.05rem; margin-bottom: 2px; }

/* 많이 본 기사 */
.rank-list { list-style: none; counter-reset: none; }
.rank-list li { display: grid; grid-template-columns: 2em 1fr; gap: 8px; padding: 10px 0; border-top: 1px solid var(--line); }
.rank-list li:first-child { border-top: 0; }
.rank { font-weight: 700; font-size: 1.15rem; color: var(--accent); line-height: 1.5; }
.rank-list a { color: var(--ink); font-weight: 600; text-decoration: none; }
.rank-list a:hover { text-decoration: underline; }
.report-box p { font-size: .95rem; }
.report-phone { margin: 12px 0 0; }

/* ---------- 위치 표시·페이지 머리 ---------- */
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; font-size: .9rem; color: var(--muted); }
.breadcrumb li + li::before { content: "›"; margin-right: 6px; color: var(--muted); }
.breadcrumb a { color: var(--muted); display: inline-flex; min-height: 40px; align-items: center; }
.page-head { margin: 8px 0 8px; padding-bottom: 12px; border-bottom: 3px solid var(--line-strong); }
.page-title { font-size: 1.9rem; margin-bottom: 8px; }
.page-desc { color: var(--muted); }

/* ---------- 기사 상세 ---------- */
.article-head { padding-bottom: 16px; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.article-title { font-size: 2rem; letter-spacing: -.015em; line-height: 1.35; margin-bottom: 12px; }
.article-subtitle { font-size: 1.15rem; font-weight: 600; color: var(--ink); border-left: 4px solid var(--brand); padding-left: 14px; margin: 16px 0; }
.byline { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: center; color: var(--muted); font-size: .95rem; margin-top: 12px; }
.byline p { margin: 0; }
.byline-author a { font-weight: 700; color: var(--ink); }
.article-tools { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.share { display: flex; gap: 8px; flex-wrap: wrap; }
.share-status { min-height: 1.8em; margin: 8px 0 0; color: var(--ok); font-weight: 600; }

.lead-image { margin: 0 0 24px; }
.lead-image img { width: 100%; border-radius: var(--radius); }

.article-body { font-size: 1.1rem; line-height: 1.85; color: var(--text); }
.article-body p { margin: 0 0 1.2em; }
.article-body h2 { font-size: 1.3rem; margin: 1.8em 0 .7em; }
.article-body h3 { font-size: 1.15rem; margin: 1.5em 0 .6em; }
.article-body h4 { font-size: 1.05rem; margin: 1.3em 0 .5em; }
.article-body ul, .article-body ol { padding-left: 1.4em; margin: 0 0 1.2em; }
.article-body li { margin-bottom: .4em; }
.article-body img { margin: 1.4em auto; border-radius: var(--radius); }
.article-body figure { margin: 1.6em 0; }
.article-body figure img { margin: 0 auto; }
.article-body figcaption { font-size: .9rem; color: var(--muted); margin-top: 8px; line-height: 1.6; }
.article-body blockquote { margin: 1.5em 0; padding: 12px 20px; background: var(--bg-soft); border-left: 4px solid var(--muted); }
.article-body table { width: 100%; border-collapse: collapse; margin: 1.4em 0; font-size: .95rem; display: block; overflow-x: auto; }
.article-body th, .article-body td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.article-body th { background: var(--bg-soft); }
.article-body iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; margin: 1.4em 0; }
.article-body hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.article-body mark, .search-results mark { background: #fff1a8; color: var(--ink); padding: 0 2px; }

.press-note { font-size: .95rem; color: var(--muted); background: var(--bg-soft); padding: 12px 16px; border-radius: var(--radius); }

.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0; }
.tags a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); text-decoration: none; font-size: .9rem; }
.tags a:hover { border-color: var(--ink); text-decoration: underline; }

.article-foot { border-top: 3px solid var(--line-strong); padding-top: 16px; margin: 32px 0 40px; font-size: .95rem; }
.reporter-box a { color: var(--ink); }
.article-copyright, .article-correction { color: var(--muted); font-size: .9rem; }

/* ---------- 검색 ---------- */
.search-page-form { display: block; margin: 16px 0 24px; }
.search-row { display: flex; gap: 8px; }
.search-results { list-style: none; }
.search-item { padding: 20px 0; border-bottom: 1px solid var(--line); }
.hint-list { padding-left: 1.2em; }

/* ---------- 기자 ---------- */
.reporter-head { display: flex; gap: 24px; align-items: flex-start; padding: 16px 0 24px; border-bottom: 3px solid var(--line-strong); margin-bottom: 8px; }
.reporter-photo { width: 120px; height: 120px; object-fit: cover; border-radius: 50%; }
.reporter-role { color: var(--muted); margin: 0 0 4px; }

/* ---------- 폼 ---------- */
.form { margin-top: 16px; }
.field { margin: 0 0 24px; border: 0; padding: 0; }
.field-label { display: block; font-weight: 700; color: var(--ink); margin-bottom: 6px; font-size: 1rem; }
.req { color: var(--accent); font-weight: 600; font-size: .9rem; }
.field-help { color: var(--muted); font-size: .9rem; margin: 0 0 6px; }
.field input[type="text"], .field textarea {
  width: 100%; min-height: var(--tap); padding: 10px 14px;
  font: inherit; color: var(--ink); border: 2px solid var(--muted); border-radius: var(--radius); background: #fff;
}
.field textarea { line-height: 1.7; resize: vertical; }
.field [aria-invalid="true"] { border-color: var(--error); }
.field-error { color: var(--error); font-weight: 600; margin: 6px 0 0; font-size: .95rem; }
.field-error::before { content: "⚠ "; }
.consent { background: var(--bg-soft); padding: 16px 20px; border-radius: var(--radius); }
.consent legend { float: left; width: 100%; padding: 0; }
.consent-list { clear: both; padding-left: 1.2em; margin-bottom: 8px; font-size: .95rem; }
.check { display: inline-flex; align-items: center; gap: 12px; min-height: var(--tap); cursor: pointer; font-weight: 600; }
.check input { width: 28px; height: 28px; accent-color: var(--brand); }
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.notice { padding: 16px 20px; border-radius: var(--radius); margin: 16px 0 24px; border: 2px solid; }
.notice p:last-child { margin: 0; }
.notice-success { border-color: var(--ok); background: #eef7ee; color: #123d15; }
.notice-error { border-color: var(--error); background: #fdf0f0; color: #6b0f12; }

/* ---------- 쪽 이동 ---------- */
.pagination ul { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 32px 0 8px; }
.pagination a, .pagination span[aria-current] {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: var(--tap); min-height: var(--tap); padding: 0 12px;
  border: 2px solid var(--line); border-radius: var(--radius); color: var(--ink); font-weight: 600; text-decoration: none;
}
.pagination a:hover { border-color: var(--ink); text-decoration: underline; }
.pagination span[aria-current] { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ---------- 고정 페이지·오류 ---------- */
.static-page { margin-top: 8px; }
.static-page .page-title { padding-bottom: 12px; border-bottom: 3px solid var(--line-strong); margin-bottom: 24px; }
.page-updated { color: var(--muted); font-size: .9rem; margin-top: 32px; }
.error-page { padding-top: 24px; }
.link-grid { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; margin-top: 12px; }
.link-grid a { display: flex; align-items: center; min-height: var(--tap); padding: 0 14px; border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); font-weight: 600; }

/* ---------- 바닥글 ---------- */
.site-footer { background: #1d1d1d; color: #ececec; padding: 32px 0 40px; font-size: .9rem; line-height: 1.7; }
.site-footer a { color: #ffffff; }
.footer-links ul { list-style: none; display: flex; flex-wrap: wrap; gap: 0 4px; border-bottom: 1px solid #4a4a4a; padding-bottom: 12px; margin-bottom: 20px; }
.footer-links a { display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 12px 0 0; margin-right: 8px; }
.footer-links strong { font-weight: 700; color: #ffe08a; }
.footer-title { font-size: 1.1rem; font-weight: 700; color: #fff; margin-bottom: 8px; }
.legal-info { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 24px; margin: 0 0 16px; }
.legal-info div { display: flex; align-items: center; gap: 8px; } /* 전화번호 링크(터치 48px)와 글자 높이 맞춤 */
.legal-info dt { color: #bdbdbd; }
.legal-info dt::after { content: ""; }
.legal-info dd { margin: 0; color: #fff; }
.legal-info .missing, .site-footer .missing { background: #ffe08a; color: #1d1d1d; padding: 0 6px; border-radius: 3px; font-weight: 700; }
.correction-notice { color: #e0e0e0; }
.copyright { color: #bdbdbd; margin: 16px 0 0; font-size: .85rem; }

/* ---------- 모바일 하단 바 ---------- */
.bottom-bar { display: none; }
.section-sheet[hidden] { display: none; }

@media (max-width: 1024px) {
  .layout-2col { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .top-news { grid-template-columns: minmax(0, 1fr); }
  .masthead { grid-template-columns: 1fr; }
  .tagline { border-left: 0; padding-left: 0; }
  .masthead-search { width: 100%; }
}

@media (max-width: 720px) {
  :root { --gutter: 16px; }
  body { padding-bottom: calc(var(--bottom-bar-h) + env(safe-area-inset-bottom, 0px)); }

  .topbar-inner { justify-content: center; }
  .today { display: none; }
  .masthead { padding-top: 12px; padding-bottom: 12px; text-align: center; }
  .logo { font-size: 1.8rem; }
  .logo-link { justify-content: center; }
  .masthead-search { display: none; } /* 하단 바 '검색' 으로 대체 */

  .main-nav-list { display: grid; grid-template-columns: repeat(3, 1fr); }
  .main-nav-list a { justify-content: center; padding: 0 6px; font-size: 1rem; min-height: var(--tap); border-bottom-width: 3px; }
  .main-nav-list li:first-child a { padding-left: 6px; }
  .nav-report { display: none; } /* 모바일은 하단 바 "분야" 시트에서 제보 */

  .headline-title { font-size: 1.45rem; }
  .featured { grid-template-columns: minmax(0, 1fr); }
  .featured .card--grid.has-thumb { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 14px; }
  .featured .card--grid .card-thumb img { margin: 0; }

  .list .card--list.has-thumb { grid-template-columns: minmax(0, 1fr) 110px; }
  .list .card--list.has-thumb .card-thumb { order: 2; }
  .card--list .card-thumb img { width: 110px; }
  .card--list .card-title { font-size: 1.1rem; }
  .card--list .card-summary { display: none; }

  .section-grid { grid-template-columns: minmax(0, 1fr); }
  .section-grid .card--grid { grid-row: auto; }

  .article-title { font-size: 1.6rem; }
  .page-title { font-size: 1.6rem; }
  .article-tools { flex-direction: column; }
  .reporter-head { flex-direction: column; gap: 12px; }

  .bottom-bar {
    display: grid; grid-template-columns: repeat(4, 1fr);
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    min-height: var(--bottom-bar-h); padding-bottom: env(safe-area-inset-bottom, 0px);
    background: #fff; border-top: 2px solid var(--ink);
  }
  .bb-item {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    min-height: var(--bottom-bar-h); padding: 4px 0;
    font: inherit; font-size: .8rem; font-weight: 700; color: var(--ink);
    background: none; border: 0; text-decoration: none; cursor: pointer;
  }
  .bb-item svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  .bb-item[aria-current="page"], .bb-item[aria-expanded="true"] { color: var(--brand); background: var(--brand-tint); }

  .section-sheet { position: fixed; inset: 0 0 calc(var(--bottom-bar-h) + env(safe-area-inset-bottom, 0px)) 0; z-index: 49; background: rgba(0, 0, 0, .55); display: flex; align-items: flex-end; }
  .section-sheet-inner { width: 100%; background: #fff; padding: 20px var(--gutter) 16px; border-radius: 12px 12px 0 0; max-height: 80vh; overflow-y: auto; }
  .section-sheet-title { font-weight: 700; font-size: 1.1rem; margin-bottom: 8px; }
  .section-sheet ul { list-style: none; margin-bottom: 12px; }
  .section-sheet li a { display: flex; align-items: center; min-height: 56px; border-bottom: 1px solid var(--line); color: var(--ink); font-weight: 600; font-size: 1.05rem; }
}

@media print {
  .site-header, .bottom-bar, .section-sheet, .col-side, .article-tools, .related, .skip-link, .env-banner, .footer-links { display: none !important; }
  body { padding: 0; font-size: 12pt; }
  .layout-2col { display: block; }
  .site-footer { background: none; color: #000; }
  .site-footer a, .legal-info dd, .legal-info dt { color: #000; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}

/* ---------- 터치 영역 보강: 카드·순위 목록은 줄 전체를 누를 수 있게(48px 이상) ---------- */
.card, .rank-list li, .search-item { position: relative; }
.card-title a::after, .rank-list a::after, .search-item .card-title a::after { content: ""; position: absolute; inset: 0; }
.card-title a:focus-visible, .rank-list a:focus-visible { outline: none; box-shadow: none; }
.card:focus-within, .rank-list li:focus-within, .search-item:focus-within { outline: 3px solid var(--ink); outline-offset: 2px; box-shadow: 0 0 0 6px var(--focus); border-radius: 2px; }
.card-thumb { position: relative; z-index: 1; }
.legal-info a, .correction-notice a, .report-phone a { display: inline-flex; align-items: center; min-height: var(--tap); }

/* ---------- 기사 본문 꾸밈(HTML 직접 입력용 class — Purifier::ALLOWED_CLASSES 와 같게 유지) ---------- */
.article-body .lead { font-size: 1.15em; font-weight: 600; color: var(--ink); line-height: 1.75; }
.article-body .box { margin: 1.5em 0; padding: 16px 20px; border: 2px solid var(--line); border-radius: var(--radius); background: #fff; }
.article-body .box > :last-child { margin-bottom: 0; }
.article-body .box-info { border-color: var(--brand); background: var(--brand-tint); color: var(--brand-dark); }
.article-body .box-warn { border-color: var(--accent); background: #fdf0f0; color: #6b0f12; }
.article-body .box-point { border: 0; border-left: 6px solid var(--ink); background: var(--bg-soft); }
.article-body .text-center { text-align: center; }
.article-body .text-right { text-align: right; }
.article-body .img-full, .article-body img.img-full { width: 100%; }
.article-body .img-full img { width: 100%; }
.article-body .img-half, .article-body img.img-half { max-width: 50%; margin-left: auto; margin-right: auto; }
.article-body .source { font-size: .9em; color: var(--muted); }
.article-body .table-compact th, .article-body .table-compact td { padding: 4px 8px; }
.article-body a[target="_blank"]::after { content: " (새 창)"; font-size: .8em; color: var(--muted); }
.article-body pre { white-space: pre-wrap; background: var(--bg-soft); padding: 12px 16px; border-radius: var(--radius); font-size: .9em; }
.article-body dl dt { font-weight: 700; margin-top: .6em; }
.article-body dl dd { margin: 0 0 .4em 1em; }
@media (max-width: 720px) { .article-body .img-half, .article-body img.img-half { max-width: 100%; } }

/* =========================================================
   신문형 레이아웃(머리말·첫 화면 3단·광고) — 2026-10 개편
   기존 규칙보다 뒤에 두어 덮어쓴다. 시니어 기준(글자·대비·48px·움직임 없음) 유지.
   ========================================================= */

/* 머리말: 로고 | 분야 메뉴 | 검색·제보 */
.header-main { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px 24px; min-height: 92px; }
.site-header .logo { font-size: 2.1rem; }
.site-header .main-nav { border: 0; background: none; }
.site-header .main-nav-list { justify-content: center; gap: 0 4px; }
.site-header .main-nav-list a { min-height: var(--tap); padding: 0 14px; font-size: 1.1rem; border-bottom: 3px solid transparent; }
.site-header .main-nav-list li:first-child a { padding-left: 14px; }
.site-header .main-nav-list a:hover { text-decoration: none; border-bottom-color: var(--ink); }
.site-header .main-nav-list a[aria-current="page"] { border-bottom-color: var(--brand); }
.header-tools { display: flex; gap: 4px; }
.tool-link {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-width: 56px; min-height: 56px; padding: 4px 8px; color: var(--ink); font-size: .8rem; font-weight: 700; text-decoration: none; border-radius: var(--radius);
}
.tool-link svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tool-link:hover, .tool-link[aria-current="page"] { background: var(--bg-soft); color: var(--brand); }
.tool-report { color: var(--accent); }

/* 굵은 선 아래 이슈 바 + 날짜·글자 크기 */
.subbar { display: flex; align-items: center; justify-content: space-between; gap: 8px 24px; flex-wrap: wrap; min-height: 56px;
  /* 굵은 선은 본문 폭(여백 제외)에 맞춘다 */
  background: linear-gradient(var(--line-strong), var(--line-strong)) var(--gutter) 0 / calc(100% - 2 * var(--gutter)) 3px no-repeat; padding-top: 3px; }
.site-header { border-bottom: 1px solid var(--line); }
.subbar .tagline { border: 0; padding: 0; }
.issue-bar ul { list-style: none; display: flex; flex-wrap: wrap; align-items: center; }
.issue-bar li { display: flex; align-items: center; }
.issue-bar li + li::before { content: ""; width: 1px; height: 14px; background: var(--line); margin: 0 4px; }
.issue-bar a { display: inline-flex; align-items: center; gap: 6px; min-height: var(--tap); padding: 0 10px; color: var(--ink); font-weight: 600; font-size: .95rem; text-decoration: none; }
.issue-bar li:first-child a { padding-left: 0; }
.issue-bar a:hover { text-decoration: underline; }
.issue-pin { color: var(--accent); font-size: .7em; }
.subbar-right { display: flex; align-items: center; gap: 16px; margin-left: auto; }
.subbar-right .today { font-size: .9rem; color: var(--ink); }

/* 첫 화면 3단 */
main { padding-top: 20px; }
.hero { position: relative; display: grid; grid-template-columns: 240px minmax(0, 1fr) 280px; gap: 32px; align-items: start; }
.hero-left { display: grid; gap: 24px; }
.card--stack .card-thumb img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius); margin-bottom: 10px; }
.card--stack .card-title { font-size: 1.1rem; line-height: 1.45; }

.hero-banner { position: relative; display: block; border-radius: var(--radius); overflow: hidden; background: var(--brand-dark); text-decoration: none; }
.hero-banner img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; display: block; }
.hero-main.no-thumb .hero-banner { min-height: 120px; }
.hero-badge {
  position: absolute; left: 16px; top: 16px; padding: 6px 14px;
  background: var(--accent); color: #fff; font-weight: 700; font-size: .95rem; border-radius: 4px; line-height: 1.4;
}
.hero-title { font-size: 2rem; line-height: 1.35; letter-spacing: -.02em; margin: 18px 0 10px; }
.hero-title a { color: var(--ink); text-decoration: none; }
.hero-title a:hover { text-decoration: underline; }
.hero-sub { font-size: 1.05rem; color: var(--text); padding-left: 1em; text-indent: -1em; margin-bottom: 6px; }
.hero-sub::before { content: "• "; color: var(--muted); }

.side-list { list-style: none; }
.card--side { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); }
.card--side:first-child { padding-top: 0; }
.card--side.has-thumb { grid-template-columns: minmax(0, 1fr) 96px; }
.card--side .card-title { font-size: 1rem; font-weight: 600; line-height: 1.5; margin: 0; }
.side-thumb { width: 96px; height: 64px; object-fit: cover; border-radius: 4px; }

/* 아래 영역 */
.home-lower { margin-top: 40px; }
.lead-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; border-top: 3px solid var(--line-strong); margin-bottom: 40px; }
.card--lead { padding: 18px 0; border-bottom: 1px solid var(--line); }
.card--lead .card-title { font-size: 1.35rem; line-height: 1.4; margin-bottom: 10px; }
.card--lead .card-summary { color: var(--muted); }

.side-block { margin-bottom: 28px; }
.side-block-title { border-top: 3px solid var(--line-strong); font-size: 1.15rem; }
.side-block-title a { display: flex; align-items: center; justify-content: space-between; min-height: 56px; color: var(--ink); text-decoration: none; }
.side-block-title svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.side-block-title a:hover { color: var(--brand); }
.opinion-list { list-style: none; }
.opinion-list li { border-top: 1px solid var(--line); }
.opinion-list a { display: flex; align-items: center; min-height: 56px; padding: 8px 0; color: var(--ink); font-weight: 600; text-decoration: none; line-height: 1.5; }
.opinion-list a:hover { text-decoration: underline; }

/* 광고: 고정 이미지 + '광고' 표시 */
.ad { margin: 0 0 28px; text-align: center; }
.ad-label { margin: 0 0 4px; font-size: .75rem; color: var(--muted); letter-spacing: .1em; }
.ad img { display: block; margin: 0 auto; max-width: 100%; height: auto; border: 1px solid var(--line); }
.ad a:focus-visible { display: inline-block; }
.ad-rail { display: none; }
@media (min-width: 1600px) {
  .ad-rail { display: block; position: absolute; top: 0; left: calc(100% + 40px); width: 160px; margin: 0; }
  .ad-rail-fallback { display: none; }
}

@media (max-width: 1200px) {
  .hero { grid-template-columns: 200px minmax(0, 1fr) 240px; gap: 24px; }
  .hero-title { font-size: 1.7rem; }
}
@media (max-width: 1024px) {
  .header-main { grid-template-columns: auto auto; justify-content: space-between; padding-top: 8px; }
  .site-header .main-nav { grid-column: 1 / -1; grid-row: 2; }
  .site-header .main-nav-list { justify-content: flex-start; }
  .site-header .main-nav-list li:first-child a { padding-left: 0; }
  .hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "main main" "left right"; }
  .hero-main { grid-area: main; }
  .hero-left { grid-area: left; }
  .hero-right { grid-area: right; }
}
@media (max-width: 720px) {
  .header-main { grid-template-columns: 1fr; justify-items: center; min-height: 0; }
  .header-tools { display: none; } /* 하단 바 '검색'·분야 시트 '제보' 로 대체 */
  .site-header .main-nav { width: 100%; }
  .site-header .main-nav-list a { justify-content: center; padding: 0 6px; font-size: 1rem; }
  .site-header .main-nav-list li:first-child a { padding-left: 6px; }
  .subbar { justify-content: center; }
  .issue-bar { width: 100%; overflow-x: auto; }
  .issue-bar ul { flex-wrap: nowrap; }
  .issue-bar a { white-space: nowrap; }
  .subbar-right { margin: 0 auto; }
  .subbar-right .today { display: none; }
  .hero { grid-template-columns: minmax(0, 1fr); grid-template-areas: "main" "right" "left"; gap: 24px; }
  .hero-title { font-size: 1.5rem; }
  .hero-left { grid-template-columns: 1fr 1fr; gap: 16px; }
  .card--stack .card-title { font-size: 1rem; }
  .lead-pair { grid-template-columns: minmax(0, 1fr); }
  .card--lead .card-title { font-size: 1.2rem; }
}
@media print {
  .ad, .header-tools, .subbar { display: none !important; }
  .hero { display: block; }
}

/* 로고(이미지) */
.logo-img { display: block; height: 52px; width: auto; }
.footer-logo { display: block; height: 40px; width: auto; }
@media (max-width: 720px) { .logo-img { height: 44px; } }
