/* AI플랫폼부 동향분석 시스템 — 모던 산세리프 브리핑
   콘텐츠: Pretendard 단일 목소리 / 시스템 라벨·수치: JetBrains Mono.
   단일 액센트(딥그린). 넓은 여백, 부드러운 카드, 인쇄·모바일 친화.
   폰트는 base.html <head> 의 <link> 로 로드한다(여기서 @import 하지 않음). */

:root {
  --ink: #16191e;          /* 본문/제목 */
  --ink-2: #3d444d;        /* 보조 본문/리드 */
  --ink-3: #5b636c;        /* 3차 */
  --muted: #667085;        /* 메타·라벨 (AA 4.5:1↑ on white) */
  --line: #eaecef;         /* 얇은 하이라인 */
  --line-2: #dfe2e6;       /* 약간 강한 구분선 */
  --paper: #ffffff;        /* 페이지 배경 */
  --paper-2: #f6f8f7;      /* 카드/블록 은은한 틴트 */
  --paper-3: #fafbfa;      /* 보조 배경(칩 등) */
  --accent: #00582c;       /* 딥그린 — 단일 액센트 */
  --accent-ink: #084a2a;   /* 틴트 위 텍스트용 진한 그린 */
  --accent-soft: #e7f0ea;  /* 그린 틴트 배경 */
  --accent-line: #bcd6c7;  /* 그린 톤 보더 */
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.04);
  --shadow-md: 0 10px 30px -18px rgba(16, 40, 26, 0.28);
  --max-w: 800px;
  --label-letter: 0.10em;
  --radius: 12px;
  --sans: "Pretendard Variable", "Pretendard", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Apple SD Gothic Neo", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }

html, body { background: var(--paper); }

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17.5px;
  line-height: 1.75;
  font-feature-settings: "ss01", "cv01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  letter-spacing: -0.003em;
}

.page {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 20px 32px 112px;
}

/* mono 유틸: 순수 숫자 식별자에만 적용(한글 라벨은 Pretendard 유지 — mono 폴백/대문자 이슈 회피).
   바이링구얼 라벨(eyebrow/meta dt/h3.section/kind 등)은 Pretendard + uppercase 트래킹으로 처리한다. */
section.topic .num, sup.ref, .topic-nav a .n {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

/* ---- topbar ---- */
.topbar {
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  position: sticky; top: 0; z-index: 10;
}
.topbar-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 16px 32px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.topbar a.brand {
  display: inline-flex; align-items: center; gap: 9px;
  font-weight: 800;
  font-size: 18.5px;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.topbar a.brand i { color: var(--accent); flex-shrink: 0; }
.topbar a.brand span { overflow: hidden; text-overflow: ellipsis; }
.topbar nav { display: flex; gap: 2px; flex-shrink: 0; white-space: nowrap; }
.topbar nav a {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-3);
  text-decoration: none;
  transition: color .15s ease, background .15s ease;
}
.topbar nav a:hover { color: var(--accent); background: var(--accent-soft); }

/* ---- lucide icon defaults ---- */
[data-lucide] {
  width: 15px; height: 15px;
  stroke-width: 1.75;
  vertical-align: -2px;
  flex-shrink: 0;
}

/* ---- headline / hero ---- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: var(--label-letter);
  color: var(--accent);
  font-weight: 700;
}
.eyebrow [data-lucide] { width: 15px; height: 15px; }

h1.title {
  font-size: clamp(35px, 5.7vw, 51px);
  line-height: 1.14;
  letter-spacing: -0.025em;
  margin: 18px 0 0;
  font-weight: 800;
  color: var(--ink);
}
.subtitle {
  color: var(--muted);
  font-size: 20px;
  line-height: 1.5;
  margin: 14px 0 0;
  font-weight: 500;
  letter-spacing: -0.01em;
}

/* ---- meta box ---- */
.meta {
  margin: 36px 0 0;
  padding: 20px 24px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 18px 28px;
}
.meta > div { display: flex; flex-direction: column; gap: 5px; }
.meta dt {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: var(--label-letter);
  color: var(--muted);
  font-weight: 500;
}
.meta dt [data-lucide] { width: 12px; height: 12px; color: var(--accent); }
.meta dd { margin: 0; font-size: 17.5px; color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }

/* ---- lead ---- */
.lead {
  font-size: 19px;
  line-height: 1.68;
  color: var(--ink-2);
  margin: 40px 0 0;
  font-weight: 500;
  letter-spacing: -0.01em;
}

/* ---- topic jump nav (weekly) ---- */
.topic-nav {
  margin: 30px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 14px 16px;
  background: var(--paper-3);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.topic-nav .topic-nav-label {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: var(--label-letter);
  color: var(--muted);
  font-weight: 500;
  margin-right: 4px;
}
.topic-nav a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-2);
  text-decoration: none;
  padding: 6px 13px;
  background: #fff;
  border: 1px solid var(--line-2);
  border-radius: 99px;
  transition: color .15s ease, border-color .15s ease, background .15s ease;
}
.topic-nav a .n {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.topic-nav a:hover { color: var(--accent); border-color: var(--accent-line); background: var(--accent-soft); }

/* ---- section block ---- */
section.topic { margin-top: 72px; scroll-margin-top: 84px; }
section.topic header {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px;
  margin-bottom: 4px;
}
section.topic .num {
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--muted);
  white-space: nowrap;
}
section.topic h2 {
  font-size: 29.5px;
  line-height: 1.22;
  margin: 0;
  letter-spacing: -0.022em;
  font-weight: 800;
  color: var(--ink);
}
section.topic .topic-summary {
  color: var(--muted);
  font-size: 16px;
  margin: 8px 0 26px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

h3.section {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: var(--label-letter);
  color: var(--ink-3);
  font-weight: 700;
  margin: 32px 0 16px;
  width: 100%;
}
h3.section [data-lucide] { width: 16px; height: 16px; color: var(--accent); }

/* ---- tldr (핵심 요약) — 조용한 중성 틴트 ---- */
.tldr {
  background: var(--paper-2);
  border: 1px solid var(--line);
  padding: 18px 22px;
  margin: 22px 0;
  font-size: 17px;
  line-height: 1.68;
  color: var(--ink-2);
  border-radius: var(--radius);
}
.tldr strong {
  display: block;
  font-size: 12px;
  letter-spacing: var(--label-letter);
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
  font-weight: 700;
}

/* ---- implications (시그니처: 의사결정 우선 그린 패널) ---- */
.implications {
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  padding: 22px 26px 20px;
  margin: 22px 0 30px;
  border-radius: var(--radius);
}
.implications .label {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: var(--label-letter);
  color: var(--accent-ink);
  font-weight: 700;
  margin-bottom: 14px;
}
.implications .label [data-lucide] { width: 14px; height: 14px; }
.implications ol { margin: 0; padding: 0; list-style: none; counter-reset: imp; }
.implications li {
  position: relative;
  margin-bottom: 14px;
  padding-left: 30px;
  font-size: 17.5px;
  line-height: 1.62;
  color: var(--ink);
  font-weight: 500;
  counter-increment: imp;
}
.implications li:last-child { margin-bottom: 0; }
.implications li::before {
  content: counter(imp);
  position: absolute;
  left: 0; top: 1px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  width: 20px; height: 20px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  line-height: 1;
}

/* ---- findings (주요 동향) ---- */
.findings { margin: 6px 0 0; }
.finding {
  border-top: 1px solid var(--line);
  padding: 20px 0 4px;
}
.finding:first-child { border-top: none; padding-top: 6px; }
.finding .headline {
  font-weight: 700;
  font-size: 18.5px;
  line-height: 1.45;
  margin: 0 0 8px;
  color: var(--ink);
  letter-spacing: -0.012em;
}
.finding .detail { color: var(--ink-2); margin: 0; font-size: 17px; line-height: 1.7; }

sup.ref {
  font-family: var(--mono);
  font-size: 11px;
  vertical-align: super;
  color: var(--accent);
  margin-left: 2px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
sup.ref a { color: inherit; text-decoration: none; }
sup.ref a:hover { text-decoration: underline; }

/* ---- footnotes ---- */
.footnotes {
  margin-top: 80px;
  padding-top: 22px;
  border-top: 1px solid var(--line-2);
  scroll-margin-top: 84px;
}
.footnotes h3 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: var(--label-letter);
  color: var(--muted);
  margin: 0 0 14px;
  font-weight: 500;
}
.footnotes ol {
  padding-left: 24px;
  margin: 0;
  font-size: 15px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.footnotes li { margin-bottom: 8px; line-height: 1.6; overflow-wrap: anywhere; scroll-margin-top: 84px; padding-left: 4px; }
.footnotes li:target { background: var(--accent-soft); border-radius: 6px; }
.footnotes a { color: var(--ink-2); text-decoration: none; border-bottom: 1px solid var(--line-2); font-weight: 500; }
.footnotes a:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* ---- colophon ---- */
.colophon {
  margin-top: 72px;
  font-size: 14px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding-top: 20px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
}

/* ---- index / cumulative cards ---- */
.report-grid {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(264px, 1fr));
  gap: 18px;
}
.report-card {
  position: relative;
  border: 1px solid var(--line);
  background: #fff;
  padding: 24px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 11px;
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.report-card:hover {
  border-color: var(--accent-line);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.report-card .kind {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 11.5px;
  letter-spacing: var(--label-letter);
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.report-card .kind [data-lucide] { width: 13px; height: 13px; }
.report-card h3 {
  font-size: 22px;
  line-height: 1.3;
  margin: 0;
  letter-spacing: -0.018em;
  color: var(--ink);
  font-weight: 800;
}
.report-card .card-headline {
  font-size: 18px;
  line-height: 1.5;
  font-weight: 600;
  color: var(--ink);
  margin: 0;
  letter-spacing: -0.01em;
}
.report-card .range {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 14.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.report-card .range [data-lucide] { width: 13px; height: 13px; }
.report-card .topics {
  margin-top: 2px;
  display: flex; flex-wrap: wrap; gap: 6px;
}
.report-card .topics span {
  font-size: 12.5px;
  border: 1px solid var(--line-2);
  padding: 3px 10px;
  border-radius: 99px;
  color: var(--ink-3);
  background: var(--paper-3);
}

/* ---- cumulative wiki layout ---- */
.cumulative-toc {
  margin: 40px 0 0;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
}
.cumulative-toc h3 {
  font-size: 12px;
  letter-spacing: var(--label-letter);
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 12px;
  font-weight: 500;
}
.cumulative-toc ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.cumulative-toc a {
  color: var(--ink);
  text-decoration: none;
  font-size: 16.5px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.cumulative-toc a [data-lucide] { color: var(--accent); }
.cumulative-toc a:hover { color: var(--accent); }

/* previous-month key insights bullets (cumulative.html .bullets) */
.bullets { margin: 10px 0 0; padding-left: 20px; }
.bullets li { margin-bottom: 7px; line-height: 1.62; color: var(--ink-2); font-size: 16.5px; }
.bullets li::marker { color: var(--accent); }

.category {
  margin-top: 60px;
  scroll-margin-top: 84px;
}
.category h3.cat-title {
  font-size: 25.5px;
  padding-bottom: 12px;
  margin: 0 0 16px;
  letter-spacing: -0.02em;
  font-weight: 800;
  line-height: 1.28;
  border-bottom: 1px solid var(--line-2);
  color: var(--ink);
}
.category .cat-summary { color: var(--ink-2); margin: 0 0 16px; font-size: 17px; line-height: 1.7; }
.category .points { margin: 0; padding: 0; list-style: none; }
.category .points > li {
  padding: 18px 0 20px;
  border-top: 1px solid var(--line);
  font-size: 17.5px;
}
.category .points > li:first-child { border-top: none; padding-top: 6px; }
.category .points .point-text { margin: 0 0 12px; line-height: 1.68; }

.point-sources {
  list-style: none;
  padding: 12px 0 12px 16px;
  margin: 0;
  border-left: 2px solid var(--accent-line);
  background: var(--paper-3);
  border-radius: 0 8px 8px 0;
}
.point-sources li {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ink-3);
  padding: 4px 12px;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.point-sources li::before {
  content: "";
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  transform: translateY(-1px);
}
.point-sources a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--line-2);
  font-weight: 500;
}
.point-sources a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.point-sources .src-meta {
  color: var(--muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

/* ---- accessibility: keyboard focus + reduced motion ---- */
a:focus-visible,
.report-card:focus-visible,
.topbar nav a:focus-visible,
.topic-nav a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  .report-card, .topic-nav a, .topbar nav a { transition: none !important; }
  .report-card:hover { transform: none; }
}

/* ---- responsive ---- */
@media (max-width: 640px) {
  .page { padding: 14px 20px 80px; }
  .topbar-inner { padding: 12px 18px; gap: 10px; }
  .topbar a.brand { font-size: 16.5px; gap: 7px; }
  .topbar a.brand i { display: none; }
  .topbar nav { gap: 2px; }
  .topbar nav a { padding: 11px 11px; font-size: 14px; gap: 4px; }
  .topbar nav a span { display: none; }
  .topbar nav a [data-lucide] { width: 19px; height: 19px; }
  .subtitle { font-size: 18px; }
  .lead { font-size: 18px; }
  .meta { padding: 18px 20px; gap: 16px 20px; }
  section.topic { margin-top: 56px; }
  section.topic h2 { font-size: 25.5px; }
  .implications { padding: 20px 20px 18px; }
  .implications li { font-size: 17px; }
  .finding .headline { font-size: 18px; }
  .finding .detail { font-size: 17px; }
  .tldr { font-size: 17px; }
  .category .points > li { font-size: 17px; }
  .report-card h3 { font-size: 21px; }
}
@media (max-width: 380px) {
  .topbar a.brand { font-size: 15.5px; }
  .meta { grid-template-columns: 1fr 1fr; }
}

/* ---- print ---- */
@media print {
  :root { --paper: #fff; }
  .topbar, .colophon, .topic-nav { display: none; }
  .page { padding: 0; max-width: none; }
  body { background: #fff; font-size: 11.5px; line-height: 1.55; letter-spacing: 0; }
  h1.title { font-size: 28px; }
  section.topic { page-break-inside: avoid; margin-top: 30px; }
  .meta, .tldr, .cumulative-toc, .topic-nav { background: #fff; }
  .implications { background: #fff; border: 1px solid #999; }
  .implications li::before { background: #000; }
  .report-card { box-shadow: none; break-inside: avoid; }
  a { color: inherit; text-decoration: none; }
  [data-lucide] { display: none !important; }
  .report-grid { grid-template-columns: 1fr 1fr; }
}
