/* THE NEURAL TIMES — 신문 미학 스타일시트
   broadsheet 느낌(세리프 제호 · 가는 괘선 · 컬럼)을 현대적으로 정리. 다크모드 지원. */

:root {
  --paper: #f7f4ec;
  --paper-2: #fffdf7;
  --ink: #1a1714;
  --ink-soft: #4a4540;
  --ink-faint: #847c72;
  --rule: #d8d0c0;
  --rule-strong: #1a1714;
  --accent: #8b1e1e;        /* 신문 특유의 진홍 강조 */
  --accent-soft: #b5453f;
  --tag-bg: #ece6d8;
  --card: #fffdf7;
  --shadow: 0 1px 0 rgba(0,0,0,.04), 0 14px 30px -22px rgba(0,0,0,.35);
  --maxw: 1180px;
  /* 한글 가독성 최우선: 본문·제목 모두 Pretendard. 라틴 제호만 세리프(--display). */
  --display: "Source Serif 4", Georgia, "Times New Roman", serif;
  --serif: "Pretendard Variable", "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Inter", "Malgun Gothic", sans-serif;
  --sans: "Pretendard Variable", "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Inter", "Malgun Gothic", sans-serif;
}

[data-theme="dark"] {
  --paper: #14120f;
  --paper-2: #1b1814;
  --ink: #ece6da;
  --ink-soft: #c2bbae;
  --ink-faint: #8b8377;
  --rule: #332e27;
  --rule-strong: #ece6da;
  --accent: #e8736c;
  --accent-soft: #f0928c;
  --tag-bg: #262119;
  --card: #1b1814;
  --shadow: 0 1px 0 rgba(0,0,0,.2), 0 18px 40px -26px rgba(0,0,0,.8);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.6;
}

a { color: inherit; }

::selection { background: var(--accent); color: #fff; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ───────────────────────── 제호 / 마스트헤드 ───────────────────────── */
.masthead {
  border-bottom: 3px double var(--rule-strong);
  background: var(--paper);
  position: relative;
}
.masthead-top {
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--sans);
  font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-faint);
  padding: 9px 0;
  border-bottom: 1px solid var(--rule);
}
.masthead-top .dot { color: var(--accent); }
.masthead-top .right { display: flex; align-items: center; gap: 14px; }
.theme-toggle {
  font: inherit; cursor: pointer; background: none; border: 1px solid var(--rule);
  color: var(--ink-soft); border-radius: 999px; padding: 4px 12px; letter-spacing: .06em;
  text-transform: uppercase; font-size: 10.5px; transition: .15s;
}
.theme-toggle:hover { border-color: var(--rule-strong); color: var(--ink); }

.masthead-title { text-align: center; padding: 18px 0 8px; cursor: pointer; }
.masthead-title h1 {
  margin: 0; font-family: var(--display); font-weight: 800; letter-spacing: .02em;
  font-size: clamp(34px, 7vw, 72px); line-height: .96;
}
.masthead-title .ko {
  font-family: var(--sans); font-weight: 600; letter-spacing: .5em;
  font-size: clamp(10px, 1.6vw, 13px); color: var(--ink-faint);
  margin-top: 8px; text-transform: none; padding-left: .5em;
}
.masthead-sub {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
  font-family: var(--sans); font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-faint); padding: 7px 0; flex-wrap: wrap;
}
.masthead-sub .sep { color: var(--rule-strong); opacity: .5; }
.masthead-sub .tagline { font-style: italic; font-family: var(--serif); letter-spacing: .02em; text-transform: none; font-size: 13px; color: var(--ink-soft); }

/* ───────────────────────── 내비게이션(카테고리) ───────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 30;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
  box-shadow: 0 6px 14px -14px rgba(0,0,0,.5);
}
.nav-inner { display: flex; align-items: center; gap: 4px; overflow-x: auto; padding: 7px 20px; max-width: var(--maxw); margin: 0 auto; scrollbar-width: none; }
.nav-inner::-webkit-scrollbar { display: none; }
.nav-link {
  font-family: var(--sans); font-size: 12.5px; font-weight: 600; letter-spacing: .02em;
  white-space: nowrap; padding: 6px 11px; border-radius: 7px; cursor: pointer;
  color: var(--ink-soft); text-decoration: none; transition: .14s; border: 1px solid transparent;
}
.nav-link:hover { background: var(--tag-bg); color: var(--ink); }
.nav-link.active { color: #fff; background: var(--accent); }
.nav-link .cdot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }

/* ───────────────────────── 날짜 레일 ───────────────────────── */
.daterail {
  display: flex; align-items: center; gap: 8px; padding: 11px 0; border-bottom: 1px solid var(--rule);
  font-family: var(--sans); overflow-x: auto; scrollbar-width: none;
}
.daterail::-webkit-scrollbar { display: none; }
/* 스크롤 힌트: 우측 페이드 — 잘린 탭/칩이 더 있음을 알림 (design-review) */
.nav-inner, .daterail {
  mask-image: linear-gradient(90deg, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, #000 92%, transparent);
}
.daterail .lbl { font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--ink-faint); white-space: nowrap; padding-right: 4px; }
.date-chip {
  font-family: var(--sans); font-size: 12px; font-weight: 600; white-space: nowrap;
  padding: 5px 11px; border: 1px solid var(--rule); border-radius: 999px; cursor: pointer;
  color: var(--ink-soft); background: var(--card); transition: .14s;
}
.date-chip:hover { border-color: var(--rule-strong); color: var(--ink); }
.date-chip.active { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.date-chip .n { font-size: 10px; color: var(--ink-faint); margin-left: 5px; }
.date-chip.active .n { color: var(--paper); opacity: .7; }

/* ───────────────────────── 공통 요소 ───────────────────────── */
.kicker {
  font-family: var(--sans); font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 7px; color: var(--accent);
}
.kicker .cdot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.byline { font-family: var(--sans); font-size: 11.5px; color: var(--ink-faint); letter-spacing: .02em; }
.byline b { color: var(--ink-soft); font-weight: 600; }

.section-rule {
  display: flex; align-items: center; gap: 14px; margin: 30px 0 16px;
}
.section-rule h2 {
  font-family: var(--sans); font-size: 13px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase;
  margin: 0; white-space: nowrap; color: var(--ink);
}
.section-rule::after { content: ""; flex: 1; height: 1px; background: var(--rule-strong); opacity: .35; }

/* ───────────────────────── 1면 레이아웃 ───────────────────────── */
.frontpage { padding: 22px 0 60px; }

.lede {
  display: grid; grid-template-columns: 1.55fr 1fr; gap: 34px;
  padding-bottom: 28px; margin-bottom: 8px; border-bottom: 2px solid var(--rule-strong);
}
.lede-main { cursor: pointer; }
.lede-main h2 {
  font-size: clamp(30px, 4.4vw, 50px); line-height: 1.05; font-weight: 800; letter-spacing: -.01em;
  margin: 12px 0 14px;
}
.lede-main h2:hover { color: var(--accent); }
.lede-deck { font-size: 18px; color: var(--ink-soft); font-style: italic; line-height: 1.5; margin-bottom: 14px; }
.lede-lead { font-size: 16px; color: var(--ink); line-height: 1.68; }
.lede-lead::first-letter {
  float: left; font-weight: 800; font-size: 58px; line-height: .8; padding: 6px 10px 0 0; color: var(--accent);
}
.lede-side { display: flex; flex-direction: column; gap: 18px; }
.lede-side .side-item { border-top: 1px solid var(--rule); padding-top: 14px; cursor: pointer; }
.lede-side .side-item:first-child { border-top: none; padding-top: 0; }
.lede-side .side-item h3 { margin: 7px 0 6px; font-size: 19px; line-height: 1.22; font-weight: 700; }
.lede-side .side-item:hover h3 { color: var(--accent); }
.lede-side .side-item p { margin: 0; font-size: 13.5px; color: var(--ink-soft); line-height: 1.55; }

/* 기사 카드 그리드 */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--rule); }
.card {
  padding: 22px 24px 24px; cursor: pointer; border-bottom: 1px solid var(--rule);
  border-right: 1px solid var(--rule); transition: background .15s; position: relative;
}
.card:nth-child(3n) { border-right: none; }
.card:hover { background: var(--paper-2); }
.card h3 { margin: 10px 0 9px; font-size: 21px; line-height: 1.2; font-weight: 700; letter-spacing: -.005em; }
.card:hover h3 { color: var(--accent); }
.card .deck { font-size: 13.5px; color: var(--ink-soft); line-height: 1.5; margin: 0 0 12px; }
.card .meta { display: flex; align-items: center; gap: 10px; }

@media (max-width: 860px) {
  .lede { grid-template-columns: 1fr; gap: 22px; }
  .grid { grid-template-columns: 1fr 1fr; }
  .card:nth-child(3n) { border-right: 1px solid var(--rule); }
  .card:nth-child(2n) { border-right: none; }
}
@media (max-width: 560px) {
  .grid { grid-template-columns: 1fr; }
  .card { border-right: none !important; }
}

/* ───────────────────────── 리스트(카테고리/날짜 뷰) ───────────────────────── */
.listpage { padding: 8px 0 60px; }
.page-intro { padding: 26px 0 18px; border-bottom: 2px solid var(--rule-strong); margin-bottom: 6px; }
.page-intro h2 { font-size: clamp(26px, 4vw, 40px); margin: 8px 0 8px; font-weight: 800; }
.page-intro p { margin: 0; color: var(--ink-soft); font-size: 15px; max-width: 60ch; }

.story-row {
  display: grid; grid-template-columns: 92px 1fr auto; gap: 20px; align-items: start;
  padding: 20px 0; border-bottom: 1px solid var(--rule); cursor: pointer;
}
.story-row:hover h3 { color: var(--accent); }
.story-row .num {
  font-family: var(--sans); font-weight: 800; font-size: 13px; color: var(--ink-faint);
  letter-spacing: .04em; padding-top: 4px;
}
.story-row h3 { margin: 7px 0 7px; font-size: 23px; line-height: 1.18; font-weight: 700; }
.story-row .deck { margin: 0 0 10px; color: var(--ink-soft); font-size: 14px; line-height: 1.5; }
.story-row .tags { display: flex; gap: 6px; flex-wrap: wrap; }
.story-row .when { font-family: var(--sans); font-size: 12px; color: var(--ink-faint); white-space: nowrap; text-align: right; padding-top: 4px; }
@media (max-width: 640px) {
  .story-row { grid-template-columns: 1fr; gap: 6px; }
  .story-row .num, .story-row .when { padding-top: 0; }
  .story-row .when { text-align: left; }
}

/* 태그 */
.tag {
  font-family: var(--sans); font-size: 11px; font-weight: 600; color: var(--ink-soft);
  background: var(--tag-bg); border-radius: 999px; padding: 3px 9px; white-space: nowrap;
}

/* ───────────────────────── 기사 상세 ───────────────────────── */
.article { padding: 18px 0 70px; }
.breadcrumb { font-family: var(--sans); font-size: 12px; color: var(--ink-faint); padding: 16px 0; display: flex; gap: 8px; align-items: center; }
.breadcrumb a { cursor: pointer; text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .sep { opacity: .5; }

.article-head { max-width: 760px; margin: 0 auto; text-align: center; padding: 14px 0 26px; border-bottom: 1px solid var(--rule); }
.article-head h1 { font-size: clamp(30px, 5vw, 48px); line-height: 1.12; font-weight: 800; letter-spacing: -.01em; margin: 14px 0 16px; }
.article-head .deck { font-size: 19px; font-style: italic; color: var(--ink-soft); line-height: 1.5; margin: 0 auto 18px; max-width: 60ch; }
.article-head .meta-row { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; }
.article-head .meta-row .dot { color: var(--rule-strong); opacity: .5; }

.article-body { max-width: 680px; margin: 0 auto; }
.article-lead {
  font-size: 20px; line-height: 1.6; color: var(--ink); font-weight: 500;
  padding: 28px 0 8px; border-bottom: 1px solid var(--rule); margin-bottom: 22px;
}
.article-body h3 {
  font-family: var(--sans); font-size: 15px; font-weight: 800; letter-spacing: .04em;
  text-transform: uppercase; color: var(--accent); margin: 34px 0 12px;
}
.article-body p { font-size: 18px; line-height: 1.78; margin: 0 0 20px; }
.article-body .col1 p:first-of-type::first-letter,
.article-body > p:first-of-type::first-letter {
  /* drop cap only on lead which is separate; keep paragraphs plain */
}
.article-body ul { margin: 0 0 22px; padding: 0; list-style: none; }
.article-body ul li {
  position: relative; padding: 8px 0 8px 26px; font-size: 17px; line-height: 1.6;
  border-bottom: 1px dotted var(--rule);
}
.article-body ul li::before {
  content: "▸"; position: absolute; left: 4px; top: 8px; color: var(--accent); font-size: 14px;
}
blockquote.pull {
  margin: 30px 0; padding: 8px 0 8px 24px; border-left: 4px solid var(--accent);
  font-size: 23px; line-height: 1.42; font-style: italic; color: var(--ink); font-weight: 500;
}
blockquote.pull cite { display: block; font-size: 12.5px; font-style: normal; font-family: var(--sans); color: var(--ink-faint); margin-top: 12px; letter-spacing: .04em; text-transform: uppercase; }

/* 핵심 정리 박스 */
.takeaways {
  background: var(--card); border: 1px solid var(--rule); border-top: 3px solid var(--accent);
  border-radius: 4px; padding: 20px 22px; margin: 34px 0; box-shadow: var(--shadow);
}
.takeaways h4 { font-family: var(--sans); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; margin: 0 0 12px; color: var(--accent); }
.takeaways ul { margin: 0; padding: 0; list-style: none; }
.takeaways li { position: relative; padding: 7px 0 7px 24px; font-size: 15px; line-height: 1.5; border-bottom: 1px solid var(--rule); }
.takeaways li:last-child { border-bottom: none; }
.takeaways li::before { content: "✓"; position: absolute; left: 2px; color: var(--accent); font-weight: 700; }

/* 출처 */
.sources { margin: 38px 0 10px; border-top: 2px solid var(--rule-strong); padding-top: 18px; }
.sources h4 { font-family: var(--sans); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; margin: 0 0 14px; color: var(--ink); }
.source-item { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px dotted var(--rule); font-family: var(--sans); font-size: 13.5px; }
.source-item a { color: var(--ink); text-decoration: none; transition: .14s; }
.source-item a:hover { color: var(--accent); text-decoration: underline; }
.source-item .ext { margin-left: auto; color: var(--ink-faint); font-size: 11px; }
.src-type {
  font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 4px; white-space: nowrap; min-width: 64px; text-align: center;
}
.src-official { background: #0a6e4a; color: #fff; }
.src-github   { background: #24292f; color: #fff; }
.src-press    { background: #1d4ed8; color: #fff; }
.src-blog     { background: #b45309; color: #fff; }
.src-community { background: #7c3aed; color: #fff; }
.src-reference { background: #64748b; color: #fff; }
[data-theme="dark"] .src-official { background: #2fae84; color: #06281c; }
[data-theme="dark"] .src-github { background: #d0d7de; color: #16191d; }

.disclaimer {
  font-family: var(--sans); font-size: 12.5px; color: var(--ink-faint); line-height: 1.6;
  background: var(--tag-bg); border-radius: 4px; padding: 14px 16px; margin-top: 24px;
}

/* 관련 기사 */
.related { margin-top: 44px; }
.related .rel-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-top: 1px solid var(--rule); }
.related .rel-item { padding: 18px 18px 18px 0; border-bottom: 1px solid var(--rule); cursor: pointer; }
.related .rel-item:nth-child(odd) { padding-right: 24px; border-right: 1px solid var(--rule); }
.related .rel-item:nth-child(even) { padding-left: 24px; }
.related .rel-item h4 { margin: 8px 0 0; font-size: 17px; line-height: 1.25; font-weight: 700; }
.related .rel-item:hover h4 { color: var(--accent); }
@media (max-width: 560px) {
  .related .rel-grid { grid-template-columns: 1fr; }
  .related .rel-item { padding: 16px 0 !important; border-right: none !important; }
}

/* 카테고리 칩(상세 메타용) */
.catpill {
  font-family: var(--sans); font-size: 11px; font-weight: 700; letter-spacing: .04em;
  display: inline-flex; align-items: center; gap: 6px; color: var(--ink-soft);
}
.catpill .cdot { width: 8px; height: 8px; border-radius: 50%; }

/* 푸터 */
.foot { border-top: 3px double var(--rule-strong); padding: 30px 0 50px; margin-top: 30px; }
.foot-inner { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; font-family: var(--sans); }
.foot .brand { font-family: var(--display); font-weight: 800; font-size: 20px; letter-spacing: .02em; }
.foot p { margin: 8px 0 0; font-size: 12.5px; color: var(--ink-faint); line-height: 1.6; max-width: 52ch; }
.foot .cats { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; max-width: 320px; }
.foot .cats span { font-size: 11.5px; color: var(--ink-soft); cursor: pointer; }
.foot .cats span:hover { color: var(--accent); }

/* 비어있음 */
.empty { text-align: center; padding: 70px 20px; color: var(--ink-faint); font-style: italic; font-size: 17px; }

/* ───────────────────────── 강사 필독 ───────────────────────── */
.nav-link.must { color: var(--accent); font-weight: 700; }
.nav-link.must.active { color: #fff; background: var(--accent); }
.nav-link.must .star { margin-right: 4px; }

.mr-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-family: var(--sans); font-size: 10.5px; font-weight: 700; letter-spacing: .04em;
  color: #fff; background: var(--accent); border-radius: 999px; padding: 2px 8px; white-space: nowrap;
}

/* 필독 페이지 */
.mustread-hero {
  border-bottom: 2px solid var(--rule-strong); padding: 26px 0 22px; margin-bottom: 4px;
}
.mustread-hero h2 { font-size: clamp(26px, 4vw, 42px); margin: 10px 0 10px; font-weight: 800; line-height: 1.12; }
.mustread-hero p { margin: 0; color: var(--ink-soft); font-size: 15.5px; line-height: 1.65; max-width: 64ch; }

.mr-item {
  display: grid; grid-template-columns: 46px 1fr; gap: 18px; align-items: start;
  padding: 24px 0; border-bottom: 1px solid var(--rule); cursor: pointer;
}
.mr-item:hover h3 { color: var(--accent); }
.mr-item .mr-no {
  font-family: var(--display); font-weight: 800; font-size: 28px; color: var(--accent);
  line-height: 1; padding-top: 2px;
}
.mr-item h3 { margin: 8px 0 8px; font-size: 23px; line-height: 1.2; font-weight: 700; }
.mr-item .deck { margin: 0 0 12px; color: var(--ink-soft); font-size: 14.5px; line-height: 1.5; }
.mr-item .mr-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
@media (max-width: 560px) {
  .mr-item { grid-template-columns: 1fr; gap: 4px; }
  .mr-item .mr-no { font-size: 22px; }
}

/* 강의 포인트 콜아웃 */
.instructor-note {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--tag-bg); border-left: 3px solid var(--accent);
  border-radius: 0 7px 7px 0; padding: 12px 16px; margin-top: 12px;
  font-family: var(--sans); font-size: 14px; line-height: 1.58; color: var(--ink-soft);
}
.instructor-note .il {
  font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  color: var(--accent); white-space: nowrap; padding-top: 2px;
}
.instructor-note.in-article { margin: 30px 0; font-size: 15px; padding: 16px 18px; }

/* ───────────────────────── 실시간(라이브) · 토스트 ───────────────────────── */
.live {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--sans); font-size: 10.5px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--ink-faint);
  border: 1px solid var(--rule); border-radius: 999px; padding: 3px 9px;
}
.live .live-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.live.live-on { color: #0a8f5b; border-color: rgba(10,143,91,.4); }
.live.live-on .live-dot { background: #12b772; animation: livepulse 1.8s infinite; }
.live.live-poll { color: #b45309; border-color: rgba(180,83,9,.4); }
.live.live-off { color: var(--ink-faint); }
[data-theme="dark"] .live.live-on { color: #2fae84; }
@keyframes livepulse {
  0% { box-shadow: 0 0 0 0 rgba(18,183,114,.55); }
  70% { box-shadow: 0 0 0 6px rgba(18,183,114,0); }
  100% { box-shadow: 0 0 0 0 rgba(18,183,114,0); }
}

.demo-btn {
  font-family: var(--sans); font-size: 10.5px; font-weight: 700; letter-spacing: .04em;
  cursor: pointer; background: none; border: 1px solid var(--rule); color: var(--ink-soft);
  border-radius: 999px; padding: 4px 10px; text-transform: uppercase; transition: .15s;
}
.demo-btn:hover { border-color: var(--accent); color: var(--accent); }
.demo-btn[disabled] { opacity: .5; cursor: default; }

.nt-toast {
  position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 24px);
  z-index: 60; display: flex; align-items: center; gap: 12px;
  background: var(--ink); color: var(--paper); border-radius: 999px;
  padding: 11px 14px 11px 18px; box-shadow: 0 18px 40px -16px rgba(0,0,0,.6);
  font-family: var(--sans); font-size: 13.5px; max-width: min(92vw, 580px);
  opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s;
}
.nt-toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.nt-toast .tdot { width: 9px; height: 9px; border-radius: 50%; background: #ff5a5a; flex: none; animation: livepulse 1.4s infinite; }
.nt-toast .tmsg { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nt-toast .tgo {
  font-family: var(--sans); font-weight: 700; font-size: 12.5px; cursor: pointer; white-space: nowrap;
  background: var(--paper); color: var(--ink); border: none; border-radius: 999px; padding: 5px 12px; flex: none;
}
.nt-toast .tgo:hover { background: #fff; }

/* 속보 배지 */
.breaking-flag {
  display: inline-flex; align-items: center; gap: 4px;
  font-family: var(--sans); font-size: 10px; font-weight: 800; letter-spacing: .06em;
  color: #fff; background: #d11; border-radius: 4px; padding: 2px 7px; text-transform: uppercase; white-space: nowrap;
}
.breaking-flag .bd { width: 6px; height: 6px; border-radius: 50%; background: #fff; animation: livepulse 1.4s infinite; }

/* ───────────────────────── 흐름(스토리라인) ───────────────────────── */
.nav-link.flow { font-weight: 700; }
.nav-link.flow .star { margin-right: 4px; color: var(--accent); }
.nav-link.flow.active { color: #fff; background: var(--accent); }
.nav-link.flow.active .star { color: #fff; }

/* 개요 카드 그리드 */
.tl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-top: 1px solid var(--rule); }
.tl-card { padding: 22px 24px; border-bottom: 1px solid var(--rule); border-right: 1px solid var(--rule); border-left: 3px solid var(--sc); cursor: pointer; transition: background .15s; }
.tl-card:nth-child(2n) { border-right: none; }
.tl-card:hover { background: var(--paper-2); }
.tl-card-top { display: flex; align-items: center; gap: 9px; }
.tl-card-top .tl-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--sc); flex: none; }
.tl-card-top h3 { margin: 0; font-size: 20px; font-weight: 800; letter-spacing: -.01em; }
.tl-card:hover .tl-card-top h3 { color: var(--sc); }
.tl-count { margin-left: auto; font-family: var(--sans); font-size: 11.5px; color: var(--ink-faint); white-space: nowrap; }
.tl-blurb { margin: 8px 0 12px; color: var(--ink-soft); font-size: 14px; line-height: 1.5; }
.tl-flow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.tl-head { font-family: var(--sans); font-size: 12px; color: var(--ink-soft); background: var(--tag-bg); border-radius: 6px; padding: 4px 9px; line-height: 1.3; cursor: pointer; }
.tl-head:hover { color: var(--sc); }
.tl-head .tl-when { font-weight: 700; color: var(--ink-faint); margin-right: 6px; }
.tl-arrow { color: var(--sc); font-size: 12px; opacity: .65; }
@media (max-width: 760px) { .tl-grid { grid-template-columns: 1fr; } .tl-card { border-right: none; } }

/* 스토리 타임라인(시간순) */
.story-hero { border-bottom: 2px solid var(--rule-strong); padding: 16px 0 22px; margin-bottom: 6px; }
.story-hero h1 { font-size: clamp(26px, 4.4vw, 44px); margin: 12px 0 10px; font-weight: 800; line-height: 1.1; }
.story-hero .deck { font-size: 17px; font-style: italic; color: var(--ink-soft); margin: 0 0 12px; }

.story-timeline { position: relative; margin-top: 10px; }
.snode { display: grid; grid-template-columns: 44px 1fr; gap: 14px; cursor: pointer; }
.snode-rail { position: relative; display: flex; justify-content: center; }
.snode-rail::before { content: ""; position: absolute; top: 0; bottom: 0; width: 2px; background: var(--rule); }
.snode:first-child .snode-rail::before { top: 28px; }
.snode:last-child .snode-rail::before { bottom: auto; height: 28px; }
.snode-dot { position: relative; z-index: 1; width: 14px; height: 14px; border-radius: 50%; background: var(--sc); margin-top: 22px; box-shadow: 0 0 0 4px var(--paper); }
.snode-body { padding: 16px 0 22px; border-bottom: 1px solid var(--rule); }
.snode:last-child .snode-body { border-bottom: none; }
.snode-date { font-family: var(--sans); font-size: 12px; font-weight: 700; letter-spacing: .02em; color: var(--ink-faint); margin-bottom: 8px; }
.snode h3 { margin: 8px 0 7px; font-size: 21px; line-height: 1.2; font-weight: 700; }
.snode:hover h3 { color: var(--sc); }
.snode .deck { margin: 0 0 10px; color: var(--ink-soft); font-size: 14px; line-height: 1.5; }

/* 흐름 스트립(기사 상세) */
.story-strip { max-width: 680px; margin: 18px auto 0; display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: var(--card); border: 1px solid var(--rule); border-left: 3px solid var(--sc); border-radius: 4px; padding: 10px 14px; font-family: var(--sans); }
.story-strip .ss-label { font-size: 12.5px; font-weight: 800; color: var(--sc); cursor: pointer; white-space: nowrap; }
.story-strip .ss-pos { font-size: 11px; color: var(--ink-faint); border: 1px solid var(--rule); border-radius: 999px; padding: 2px 8px; }
.story-strip .ss-nav { font-size: 12px; color: var(--ink-soft); cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 26ch; }
.story-strip .ss-nav:hover { color: var(--sc); }
.story-strip .ss-nav.ss-dim { color: var(--ink-faint); cursor: default; }
.story-strip .ss-nav:last-child { margin-left: auto; }
@media (max-width: 560px) { .story-strip .ss-nav { max-width: 100%; margin-left: 0 !important; } }

/* 등장 애니메이션 */
.fade { animation: fade .35s ease both; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* 맨 위로 */
.totop {
  position: fixed; right: 22px; bottom: 22px; z-index: 40;
  width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--rule-strong);
  background: var(--card); color: var(--ink); cursor: pointer; font-size: 18px;
  display: none; align-items: center; justify-content: center; box-shadow: var(--shadow);
}
.totop.show { display: flex; }
