/* AI플랫폼부 동향분석 시스템
   Pretendard(본문) + Source Serif 4(타이틀) + Lucide(아이콘).
   배경 흰색, 청록 액센트, 인쇄/모바일 친화 */

@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.min.css");
@import url("https://fonts.googleapis.com/css2?family=Source+Serif+4:opsz,wght@8..60,400;8..60,500;8..60,600;8..60,700&display=swap");
@import url("https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500&display=swap");

:root {
  --ink: #0e1116;
  --ink-2: #2a2f36;
  --ink-3: #4a5159;
  --muted: #6b7280;
  --rule: #e5e5e2;
  --rule-strong: #111418;
  --paper: #ffffff;
  --paper-2: #f6f6f3;
  --paper-3: #fafaf7;
  --accent: #00582c;
  --accent-soft: #e2efe7;
  --accent-2: #b78a2e;
  --max-w: 880px;
  --label-letter: 0.14em;
  --serif: "Source Serif 4", "Noto Serif KR", Georgia, "Apple SD Gothic Neo", serif;
  --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: 15px;
  line-height: 1.72;
  font-feature-settings: "ss01", "cv01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

/* ---- topbar ---- */
.topbar {
  border-bottom: 1px solid var(--rule);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(8px);
  -webkit-backdrop-filter: saturate(180%) blur(8px);
  position: sticky; top: 0; z-index: 10;
}
.topbar-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 14px 32px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.topbar a.brand {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}
.topbar a.brand i { color: var(--accent); }
.topbar nav { display: flex; gap: 4px; }
.topbar nav a {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-3);
  text-decoration: none;
}
.topbar nav a:hover { color: var(--accent); background: var(--accent-soft); }

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

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

h1.title {
  font-family: var(--serif);
  font-size: 46px;
  line-height: 1.08;
  letter-spacing: -0.022em;
  margin: 14px 0 0;
  font-weight: 700;
  color: var(--ink);
}
.subtitle {
  font-family: var(--serif);
  color: var(--ink-2);
  font-size: 19px;
  line-height: 1.45;
  margin: 16px 0 0;
  font-weight: 400;
  letter-spacing: -0.005em;
}

/* ---- meta box ---- */
.meta {
  margin: 32px 0 0;
  padding: 18px 0;
  border-top: 1px solid var(--rule-strong);
  border-bottom: 1px solid var(--rule);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 18px 24px;
}
.meta > div { display: flex; flex-direction: column; gap: 4px; }
.meta dt {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: var(--label-letter);
  color: var(--muted);
  font-weight: 600;
}
.meta dt [data-lucide] { width: 11px; height: 11px; color: var(--accent); }
.meta dd { margin: 0; font-size: 14.5px; color: var(--ink); font-weight: 500; font-variant-numeric: tabular-nums; }

/* ---- lead ---- */
.lead {
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.55;
  color: var(--ink-2);
  margin: 40px 0 0;
  padding: 6px 0 6px 20px;
  border-left: 3px solid var(--accent);
  letter-spacing: -0.005em;
}

/* ---- section block ---- */
section.topic { margin-top: 76px; }
section.topic header {
  display: flex; align-items: baseline; justify-content: space-between;
  border-bottom: 1px solid var(--rule-strong);
  padding-bottom: 12px;
  gap: 16px;
}
section.topic .num {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
section.topic h2 {
  font-family: var(--serif);
  font-size: 30px;
  line-height: 1.18;
  margin: 0;
  letter-spacing: -0.012em;
  font-weight: 700;
}
section.topic .topic-summary {
  color: var(--muted);
  font-size: 13.5px;
  margin: 12px 0 24px;
}

h3.section {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: var(--label-letter);
  color: var(--accent);
  font-weight: 700;
  margin: 32px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px dotted var(--rule);
  width: 100%;
}
h3.section [data-lucide] { width: 13px; height: 13px; }

/* ---- tldr ---- */
.tldr {
  background: var(--paper-2);
  border-left: 3px solid var(--accent-2);
  padding: 16px 20px;
  margin: 20px 0 22px;
  font-size: 14.5px;
  color: var(--ink-2);
  border-radius: 0 4px 4px 0;
}
.tldr strong {
  display: block;
  font-size: 10.5px;
  letter-spacing: var(--label-letter);
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 4px;
  font-weight: 700;
}

/* ---- implications (now appears before findings) ---- */
.implications {
  background: #fff;
  border: 1px solid var(--rule);
  border-top: 3px solid var(--accent);
  padding: 18px 22px 16px;
  margin: 18px 0 26px;
  border-radius: 0 0 4px 4px;
  box-shadow: 0 1px 0 rgba(0, 88, 44, 0.04);
}
.implications .label {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: var(--label-letter);
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 10px;
}
.implications .label [data-lucide] { width: 13px; height: 13px; }
.implications ol { margin: 0; padding-left: 22px; }
.implications li { margin-bottom: 10px; font-size: 14.5px; line-height: 1.65; }
.implications li:last-child { margin-bottom: 0; }
.implications li::marker { color: var(--accent); font-weight: 700; }

/* ---- findings ---- */
.findings { margin: 8px 0 0; }
.finding {
  border-top: 1px solid var(--rule);
  padding: 16px 0 14px;
}
.finding:first-child { border-top: none; padding-top: 4px; }
.finding .headline {
  font-weight: 600;
  font-size: 15.5px;
  line-height: 1.45;
  margin: 0 0 6px;
  color: var(--ink);
  letter-spacing: -0.005em;
}
.finding .detail { color: var(--ink-2); margin: 0; }

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

/* ---- footnotes ---- */
.footnotes {
  margin-top: 72px;
  padding-top: 16px;
  border-top: 1px solid var(--rule-strong);
}
.footnotes h3 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: var(--label-letter);
  color: var(--muted);
  margin: 0 0 12px;
}
.footnotes ol {
  padding-left: 22px;
  margin: 0;
  font-size: 12.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.footnotes li { margin-bottom: 5px; line-height: 1.55; word-break: break-all; }
.footnotes a { color: var(--ink-2); text-decoration: none; border-bottom: 1px dotted var(--rule); }
.footnotes a:hover { color: var(--accent); border-bottom-color: var(--accent); }

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

/* ---- index cards ---- */
.report-grid {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}
.report-card {
  position: relative;
  border: 1px solid var(--rule);
  background: #fff;
  padding: 22px 22px 20px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
  border-radius: 6px;
}
.report-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px -16px rgba(0, 88, 44, 0.35);
}
.report-card .kind {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 10.5px;
  letter-spacing: var(--label-letter);
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.report-card .kind [data-lucide] { width: 12px; height: 12px; }
.report-card h3 {
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.3;
  margin: 0;
  letter-spacing: -0.008em;
  color: var(--ink);
  font-weight: 600;
}
.report-card .card-headline {
  font-family: var(--sans);
  font-size: 15.5px;
  line-height: 1.45;
  font-weight: 500;
  color: var(--ink);
  margin: 0;
  letter-spacing: -0.002em;
}
.report-card .range {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.report-card .range [data-lucide] { width: 12px; height: 12px; }
.report-card .topics {
  margin-top: 4px;
  display: flex; flex-wrap: wrap; gap: 6px;
}
.report-card .topics span {
  font-size: 11px;
  border: 1px solid var(--rule);
  padding: 2px 8px;
  border-radius: 99px;
  color: var(--ink-2);
  background: var(--paper-3);
}

/* ---- cumulative wiki layout ---- */
.cumulative-toc {
  margin: 32px 0 0;
  border-top: 1px solid var(--rule-strong);
  border-bottom: 1px solid var(--rule);
  padding: 18px 0;
}
.cumulative-toc h3 {
  font-size: 11px;
  letter-spacing: var(--label-letter);
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 10px;
  font-weight: 700;
}
.cumulative-toc ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.cumulative-toc a {
  color: var(--ink);
  text-decoration: none;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.cumulative-toc a:hover { color: var(--accent); }

.category {
  margin-top: 56px;
  scroll-margin-top: 80px;
}
.category h3.cat-title {
  font-family: var(--serif);
  font-size: 23px;
  border-bottom: 1px solid var(--rule-strong);
  padding-bottom: 8px;
  margin: 0 0 16px;
  letter-spacing: -0.012em;
  font-weight: 700;
  line-height: 1.25;
}
.category .cat-summary { color: var(--ink-2); margin: 0 0 14px; }
.category .points { margin: 0; padding: 0; list-style: none; }
.category .points > li {
  padding: 16px 0 18px;
  border-top: 1px dotted var(--rule);
  font-size: 14.5px;
}
.category .points > li:first-child { border-top: none; padding-top: 6px; }
.category .points .point-text { margin: 0 0 10px; line-height: 1.65; }

.point-sources {
  list-style: none;
  padding: 8px 0 0 16px;
  margin: 0;
  border-left: 2px solid var(--rule);
}
.point-sources li {
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--ink-3);
  padding: 4px 0;
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.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 dotted var(--rule);
  font-weight: 500;
}
.point-sources a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.point-sources .src-meta {
  color: var(--muted);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
}

/* ---- responsive ---- */
@media (max-width: 640px) {
  .page { padding: 36px 20px 72px; }
  .topbar-inner { padding: 12px 20px; }
  h1.title { font-size: 34px; }
  .subtitle { font-size: 17px; }
  .lead { font-size: 17px; }
  section.topic { margin-top: 56px; }
  section.topic h2 { font-size: 24px; }
  .topbar nav a span { display: none; }
}

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