/* 국방 AI(AI+IT) 뉴스레터 아카이브 — 온톨로지 페이지 스타일 */
/* 레이아웃: OSINT 배너 → 제목·지표 → 레이어 탭 → 작업 화면(필터 레일 | 그래프 캔버스 | 오브젝트 뷰) */
/* 레이아웃: 사이트 헤더 → 제목·지표 → 레이어 탭 → 작업 화면(필터 레일 | 그래프 캔버스 | 오브젝트 뷰)
   색과 글꼴은 아카이브 사이트(styles.css)의 남색·회색 팔레트를 따른다. */
:root {
  --bg: #f0f2f5;
  --panel: #ffffff;
  --canvas: #f7f9fc;
  --ink: #1a202c;
  --ink-2: #4a5568;
  --ink-3: #718096;
  --line: #e2e8f0;
  --line-2: #cbd5e0;
  --grid: #d9e0ea;
  --edge: #8b9bb0;
  --heat: #0f2744;
  --accent: #0f2744;
  --accent-2: #1a6eb5;
  --gold: #c8a84b;
  --ok: #2f855a;
  --warn: #b7791f;
  --bad: #c53030;
  --t-org: #3567C8; --t-company: #D4612A; --t-person: #C2498A; --t-country: #2B8A66;
  --t-program: #7553C6; --t-model: #1D8BA4; --t-policy: #B48812; --t-domain: #6C9628;
  --t-event: #C7413A; --t-issue: #5F6B78; --t-article: #8793A0; --t-source: #978F86;
  --f-body: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --f-display: var(--f-body);
  --f-mono: ui-monospace, "SFMono-Regular", "SF Mono", Menlo, Consolas, monospace;
  --r: 8px;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--f-body); font-size: 14px; line-height: 1.55; word-break: keep-all; overflow-wrap: anywhere; }
[hidden] { display: none !important; }
button, input, select { font: inherit; color: inherit; }
code { font-family: var(--f-mono); font-size: .84em; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.muted { color: var(--ink-3); font-weight: 400; }
.num { font-family: var(--f-mono); font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; }
.null { font-family: var(--f-mono); font-size: 12px; color: var(--ink-3); }
.scroll-x { overflow-x: auto; }

.wrap { max-width: 1440px; margin: 0 auto; padding-inline: 24px; }
@media (max-width: 600px) { .wrap { padding-inline: 16px; } }

/* 헤더 */
.top { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px 40px; align-items: end; padding-block: 22px 18px; }
.eyebrow { margin: 0 0 6px; font-size: 12px; color: var(--ink-3); letter-spacing: .02em; }
h1 { font-family: var(--f-display); font-weight: 800; font-size: clamp(24px, 2.6vw, 32px); line-height: 1.2; letter-spacing: -0.02em; margin: 0; text-wrap: balance; }
.lede { margin: 10px 0 0; color: var(--ink-2); max-width: 70ch; }
.stats { display: grid; grid-template-columns: repeat(4, auto); margin: 0; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); }
.stats > div { padding: 9px 18px 10px; border-left: 1px solid var(--line); }
.stats > div:first-child { border-left: 0; }
.stats dt { font-size: 11px; color: var(--ink-3); letter-spacing: .03em; }
.stats dd { margin: 2px 0 0; font-family: var(--f-mono); font-size: 21px; font-weight: 500; font-variant-numeric: tabular-nums; line-height: 1.2; }
.stats dd small { display: block; font-size: 10.5px; font-weight: 400; color: var(--ink-3); }
@media (max-width: 960px) {
  .top { grid-template-columns: minmax(0, 1fr); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats > div:nth-child(3) { border-left: 0; }
  .stats > div:nth-child(n+3) { border-top: 1px solid var(--line); }
}

/* 탭 */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line-2); overflow-x: auto; scrollbar-width: none; margin-bottom: 16px; }
.tab { appearance: none; background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; padding: 10px 14px 9px; font-weight: 500; color: var(--ink-2); cursor: pointer; white-space: nowrap; display: flex; align-items: baseline; gap: 8px; }
.tab small { font-family: var(--f-mono); font-size: 10px; letter-spacing: .08em; color: var(--ink-3); }
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { color: var(--accent); border-bottom-color: var(--accent); font-weight: 700; }

/* 공통 컨트롤 */
.btn { border: 1px solid var(--line-2); background: var(--panel); border-radius: 4px; padding: 4px 10px; font-size: 12px; cursor: pointer; line-height: 1.5; }
.btn:hover { border-color: var(--ink-3); }
.btn-ink { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-ink:hover { opacity: .9; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.chip { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line-2); background: var(--panel); border-radius: 999px; padding: 1px 9px 1px 7px; font-size: 12px; line-height: 1.6; cursor: pointer; max-width: 100%; text-align: left; }
.chip i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.chip:hover { border-color: var(--ink-2); }
.chip .num { font-size: 11px; }
.chip-more { font-size: 12px; color: var(--ink-3); align-self: center; padding: 0 4px; }
.alias { font-family: var(--f-mono); font-size: 11.5px; padding: 0 6px; border-radius: 3px; background: var(--bg); border: 1px solid var(--line); }
.alias.re { border-style: dashed; border-color: var(--line-2); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px 18px; min-width: 0; box-shadow: var(--shadow); }
.card > h2, .sec-title { font-size: 16px; font-weight: 700; margin: 0 0 4px; text-wrap: balance; }
.card-sub { margin: 0 0 14px; color: var(--ink-2); font-size: 13px; max-width: 72ch; }

/* 오브젝트 그래프 작업 화면 */
.explorer { display: grid; grid-template-columns: 250px minmax(0, 1fr) minmax(320px, 390px); border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); box-shadow: var(--shadow); overflow: hidden; height: clamp(600px, calc(100vh - 150px), 940px); }
.rail { border-right: 1px solid var(--line); overflow-y: auto; padding: 14px 14px 20px; display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.rail-more { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.rail-toggle { display: none; }
.rail-sec { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.lbl { margin: 0; font-size: 11px; font-weight: 600; color: var(--ink-3); letter-spacing: .06em; }
.search { position: relative; }
.search input { width: 100%; padding: 7px 10px; border: 1px solid var(--line-2); border-radius: 4px; background: var(--bg); }
.q-results { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: 4px; list-style: none; background: var(--panel); border: 1px solid var(--line-2); border-radius: 6px; box-shadow: 0 10px 28px rgba(0, 0, 0, .14); max-height: 340px; overflow-y: auto; }
.q-results button { display: grid; grid-template-columns: 10px minmax(0, 1fr); gap: 2px 8px; align-items: center; width: 100%; text-align: left; background: none; border: 0; border-radius: 4px; padding: 6px 8px; cursor: pointer; }
.q-results button:hover, .q-results button:focus-visible { background: var(--bg); outline: none; }
.q-results .q-sub { grid-column: 2; font-size: 11px; color: var(--ink-3); }
.q-empty { padding: 8px; font-size: 12px; color: var(--ink-3); }
.sets { display: flex; flex-direction: column; gap: 1px; }
.set { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border-radius: 4px; cursor: pointer; font-size: 13px; }
.set input { margin: 0; accent-color: var(--accent); }
.set:has(input:checked) { background: var(--bg); font-weight: 600; }
.set:has(input:disabled) { color: var(--ink-3); cursor: default; }
.type-filters { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1px; }
.tf { display: grid; grid-template-columns: auto 10px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 3px 6px; border-radius: 4px; cursor: pointer; font-size: 13px; }
.tf input { margin: 0; accent-color: var(--accent); }
.tf i { width: 10px; height: 10px; border-radius: 50%; }
.tf input:not(:checked) ~ * { opacity: .4; }
.tf:hover { background: var(--bg); }
.mini-links { display: flex; gap: 10px; font-size: 12px; }
.mini-links button { background: none; border: 0; padding: 0; color: var(--ink-2); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; font-size: 12px; }
.seg { display: flex; flex-wrap: wrap; gap: 4px; }
.seg button { border: 1px solid var(--line-2); background: var(--panel); border-radius: 999px; padding: 2px 10px; font-size: 12px; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--accent); color: #fff; border-color: var(--accent); }
.range-row { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 8px; align-items: center; font-size: 12px; color: var(--ink-2); }
.range-row select { width: 100%; padding: 4px 6px; border: 1px solid var(--line-2); border-radius: 4px; background: var(--bg); font-size: 12px; }
.chk { display: flex; gap: 8px; align-items: center; font-size: 13px; cursor: pointer; }
.chk input { margin: 0; accent-color: var(--accent); }
.slider { display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: var(--ink-2); }
.slider output { font-family: var(--f-mono); color: var(--ink); font-weight: 500; }
.slider input { width: 100%; margin: 0; accent-color: var(--accent); }
.rail-note { margin: 0; font-size: 11.5px; color: var(--ink-3); line-height: 1.5; }

.stage { position: relative; min-width: 0; display: flex; flex-direction: column; background: var(--canvas); }
.stage-bar { display: flex; justify-content: space-between; align-items: center; gap: 6px 12px; padding: 7px 12px; border-bottom: 1px solid var(--line); font-size: 12px; color: var(--ink-2); background: var(--panel); flex-wrap: wrap; }
.stage-bar .num { color: var(--ink); font-size: 12px; }
.stage-actions { display: flex; gap: 6px; }
.graph-box { position: relative; flex: 1 1 auto; min-height: 0; }
#graph { position: absolute; inset: 0; width: 100%; height: 100%; display: block; background-color: var(--canvas); background-image: radial-gradient(circle, var(--grid) 1px, transparent 1.3px); background-size: 22px 22px; cursor: grab; }
#graph:active { cursor: grabbing; }
#graph .e-co { stroke: var(--edge); }
#graph .e-schema { stroke: var(--ink-2); stroke-opacity: .7; }
#graph .arrow-head { fill: var(--ink-2); }
#graph .e.on { stroke: var(--ink); stroke-opacity: .85; }
#graph .node { cursor: pointer; }
#graph .node .halo { fill: none; stroke: none; }
#graph .node .dot { stroke: var(--canvas); stroke-width: 1.5px; }
#graph .node text { display: none; font-size: 11px; font-weight: 500; fill: var(--ink); text-anchor: middle; paint-order: stroke; stroke: var(--canvas); stroke-width: 3px; stroke-linejoin: round; pointer-events: none; }
#graph .node.lab text, #graph .node.sel text, #graph .node.nb text, #graph .node.hl text, #graph.zoomed .node text { display: block; }
#graph .node.sel .halo { stroke: var(--accent); stroke-width: 2.4px; }
#graph .node.sel text { font-weight: 700; font-size: 12px; }
#graph .node:focus { outline: none; }
#graph .node:focus-visible .halo { stroke: var(--ink); stroke-width: 1.6px; stroke-dasharray: 3 2; }
#graph.hovering .node:not(.hl) { opacity: .18; }
#graph.hovering .e:not(.hl) { opacity: .06; }
#graph .e.hl { stroke-opacity: .95; }
.graph-msg { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; text-align: center; color: var(--ink-2); font-size: 13px; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 12px; padding: 6px 12px; border-top: 1px solid var(--line); background: var(--panel); font-size: 11px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend .dot { width: 8px; height: 8px; }
.legend svg { display: block; }
.lg-co { stroke: var(--edge); stroke-width: 2; }
.lg-sc { stroke: var(--ink-2); stroke-width: 1.4; }
.lg-ar { fill: var(--ink-2); }

/* 오브젝트 뷰 */
.ov { border-left: 1px solid var(--line); overflow-y: auto; padding: 16px 18px 26px; min-width: 0; }
.ov-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ov-type { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--ink-2); flex-wrap: wrap; }
.ov-type code { color: var(--ink-3); }
.ov-close { background: none; border: 1px solid transparent; border-radius: 4px; padding: 0 6px; font-size: 18px; line-height: 1.3; color: var(--ink-3); cursor: pointer; }
.ov-close:hover { border-color: var(--line-2); color: var(--ink); }
.ov-title { font-size: 21px; line-height: 1.3; margin: 8px 0 2px; font-weight: 700; text-wrap: balance; }
.ov-sub { margin: 0; color: var(--ink-2); font-size: 13px; }
.ov-tools { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.ov-sec { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 12px; }
.ov-sec h3 { margin: 0 0 9px; font-size: 12px; font-weight: 600; letter-spacing: .03em; color: var(--ink-2); display: flex; gap: 2px 8px; align-items: baseline; flex-wrap: wrap; }
.ov-sec h3 .muted { font-size: 11.5px; letter-spacing: 0; }
.ov-text { margin: 0; font-size: 13px; color: var(--ink-2); line-height: 1.65; }
.props { margin: 0; display: grid; gap: 7px; }
.prop { display: grid; grid-template-columns: minmax(92px, 36%) minmax(0, 1fr); gap: 10px; font-size: 13px; }
.prop dt { color: var(--ink-3); display: flex; flex-direction: column; line-height: 1.35; }
.prop dt code { font-size: 10.5px; opacity: .9; }
.prop dd { margin: 0; min-width: 0; }
.link-issue { background: none; border: 0; padding: 0; font: inherit; color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 2px; cursor: pointer; }
.link-issue:hover { text-decoration-color: var(--ink); }
.spark { width: 100%; height: auto; display: block; }
.sp-base { stroke: var(--line-2); }
.sp-year { stroke: var(--ink-3); stroke-dasharray: 2 2; }
.sp-bar.out { opacity: .28; }
.sp-hit { fill: transparent; cursor: pointer; }
.sp-hit:hover { fill: var(--ink); fill-opacity: .08; }
.sp-ax { font-size: 9.5px; fill: var(--ink-3); font-family: var(--f-mono); }
.sp-peak { font-size: 10px; fill: var(--ink); font-family: var(--f-mono); font-weight: 600; }
.lk { display: grid; gap: 5px; margin-bottom: 10px; }
.lk:last-child { margin-bottom: 0; }
.lk-h { font-size: 12.5px; color: var(--ink-2); display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; }
.lk-h code { color: var(--ink-3); font-size: 10.5px; }
.lk-h .dir { font-family: var(--f-mono); color: var(--ink-3); }
.co { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.co li { display: grid; grid-template-columns: minmax(0, 1fr) 72px 30px; align-items: center; gap: 8px; }
.co-name { display: flex; align-items: center; gap: 6px; min-width: 0; background: none; border: 0; padding: 0; text-align: left; cursor: pointer; font-size: 13px; line-height: 1.35; }
.co-name:hover { text-decoration: underline; text-underline-offset: 2px; }
.co-name i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.co-bar { height: 6px; background: var(--line); border-radius: 2px; overflow: hidden; }
.co-bar b { display: block; height: 100%; background: var(--ink-2); }
.co .num { text-align: right; color: var(--ink); }
.kws { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 12.5px; }
.kws span { color: var(--ink-2); }
.kws b { font-family: var(--f-mono); font-weight: 500; font-size: 11px; color: var(--ink-3); margin-left: 3px; }
.arts { list-style: none; margin: 0; padding: 0; }
.art { padding: 9px 0; border-bottom: 1px dashed var(--line); }
.art:last-child { border-bottom: 0; }
.art-meta { display: flex; flex-wrap: wrap; gap: 2px 8px; font-size: 11.5px; color: var(--ink-3); font-family: var(--f-mono); }
.art-meta .link-issue { color: var(--ink-2); }
.art-title { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 3px 0 0; font-size: 13.5px; font-weight: 500; line-height: 1.45; cursor: pointer; }
.art-title:hover { text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.art-title::after { content: " +"; color: var(--ink-3); font-family: var(--f-mono); }
.art.open .art-title::after { content: " −"; }
.art-body { padding: 7px 0 2px; display: grid; gap: 7px; }
.art-en { margin: 0; font-size: 12.5px; color: var(--ink-3); }
.art-sum { margin: 0; font-size: 13px; color: var(--ink-2); line-height: 1.65; }
.ext { font-size: 12.5px; font-weight: 600; text-underline-offset: 3px; justify-self: start; }
.more { margin-top: 10px; }
.tbars { display: grid; gap: 6px; }
.tbar { display: grid; grid-template-columns: 96px minmax(0, 1fr) 34px; gap: 8px; align-items: center; font-size: 12.5px; }
.tbar span:first-child { display: flex; align-items: center; gap: 6px; }
.tbar .track { height: 7px; background: var(--line); border-radius: 2px; overflow: hidden; }
.tbar .track b { display: block; height: 100%; }
.tbar .num { text-align: right; color: var(--ink); }
.rank { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; counter-reset: r; }
.rank li { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 6px; align-items: center; counter-increment: r; }
.rank li::before { content: counter(r); font-family: var(--f-mono); font-size: 11px; color: var(--ink-3); text-align: right; }
.hint { margin: 16px 0 0; padding: 10px 12px; border: 1px dashed var(--line-2); border-radius: 4px; font-size: 12.5px; color: var(--ink-2); line-height: 1.6; }
.ov-nav { display: flex; gap: 6px; margin-top: 12px; }

@media (max-width: 1240px) {
  .explorer { grid-template-columns: minmax(0, 1fr) minmax(300px, 360px); grid-template-rows: auto auto; height: auto; }
  .rail { grid-column: 1 / -1; border-right: 0; border-bottom: 1px solid var(--line); gap: 14px; overflow: visible; }
  .rail-more { flex-direction: row; flex-wrap: wrap; gap: 16px 28px; }
  .rail-more > .rail-sec { flex: 1 1 200px; }
  .type-filters { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .stage, .ov { height: clamp(540px, calc(100vh - 170px), 820px); }
}
@media (max-width: 820px) {
  .explorer { grid-template-columns: minmax(0, 1fr); }
  .rail-toggle { display: block; align-self: flex-start; }
  .rail-more { flex-direction: column; gap: 16px; }
  .rail-more.collapsed { display: none; }
  .stage { height: 64vh; min-height: 380px; }
  .ov { height: auto; overflow: visible; border-left: 0; border-top: 1px solid var(--line); }
}

/* 스키마 */
.schema-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(320px, 1fr); gap: 16px; align-items: start; }
@media (max-width: 1100px) { .schema-grid { grid-template-columns: minmax(0, 1fr); } }
#schema { display: block; width: 100%; min-width: 760px; height: auto; }
#schema .iface-box { fill: var(--canvas); stroke: var(--line-2); stroke-dasharray: 6 5; stroke-width: 1.4px; cursor: pointer; }
#schema .iface:hover .iface-box, #schema .iface.on .iface-box { stroke: var(--ink-2); }
#schema .iface-title { font-size: 13px; font-weight: 600; fill: var(--ink); cursor: pointer; }
#schema .iface-sub { font-size: 10.5px; fill: var(--ink-3); font-family: var(--f-mono); cursor: pointer; }
#schema .layer-cap { font-size: 10.5px; fill: var(--ink-3); letter-spacing: .06em; font-family: var(--f-mono); }
#schema .s-node { cursor: pointer; }
#schema .s-node .box { fill: var(--panel); stroke: var(--line-2); stroke-width: 1px; }
#schema .s-node:hover .box { stroke: var(--ink-3); }
#schema .s-node.on .box { stroke: var(--ink); stroke-width: 2px; }
#schema .s-node .nm { font-size: 13.5px; font-weight: 600; fill: var(--ink); }
#schema .s-node .api { font-size: 10.5px; fill: var(--ink-3); font-family: var(--f-mono); }
#schema .s-node .cnt { font-size: 12px; fill: var(--ink-2); font-family: var(--f-mono); }
#schema .s-edge { cursor: pointer; }
#schema .ln { fill: none; stroke: var(--ink-3); stroke-width: 1.3px; }
#schema .ln.derived { stroke-dasharray: 4 4; }
#schema .hit { fill: none; stroke: transparent; stroke-width: 14px; }
#schema .s-edge:hover .ln, #schema .s-edge.on .ln { stroke: var(--ink); stroke-width: 2px; }
#schema .lbl-bg { fill: var(--panel); stroke: var(--line-2); }
#schema .s-edge.on .lbl-bg { stroke: var(--ink); }
#schema .lbl-t { font-size: 10.5px; fill: var(--ink-2); }
#schema .arrow-head { fill: var(--ink-3); }
#schema .s-node:focus, #schema .s-edge:focus, #schema .iface:focus { outline: none; }
#schema .s-node:focus-visible .box, #schema .s-edge:focus-visible .lbl-bg, #schema .iface:focus-visible .iface-box { stroke: var(--ink); stroke-width: 2px; stroke-dasharray: 4 2; }
.td-head { display: flex; gap: 10px; align-items: flex-start; }
.td-head .dot { margin-top: 7px; }
.td-head h3 { margin: 0; font-size: 18px; line-height: 1.35; }
.td-head code { color: var(--ink-3); }
.td-desc { margin: 8px 0 12px; color: var(--ink-2); font-size: 13px; }
.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 0; margin: 0 0 14px; border-top: 1px solid var(--line); }
.kv > div { padding: 7px 10px 7px 0; border-bottom: 1px solid var(--line); }
.kv dt { font-size: 11px; color: var(--ink-3); }
.kv dd { margin: 1px 0 0; font-size: 13px; font-weight: 600; }
.td-h { margin: 16px 0 8px; font-size: 12px; font-weight: 600; letter-spacing: .03em; color: var(--ink-2); }
.ptable { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.ptable th { text-align: left; font-weight: 600; font-size: 11px; color: var(--ink-3); border-bottom: 1px solid var(--line-2); padding: 6px 10px 6px 0; white-space: nowrap; }
.ptable td { border-bottom: 1px solid var(--line); padding: 6px 10px 6px 0; vertical-align: top; }
.ptable td code { white-space: nowrap; }
.ptable .num { font-size: 11.5px; }
.tag { display: inline-block; font-family: var(--f-mono); font-size: 10px; line-height: 1.5; padding: 0 5px; border-radius: 3px; border: 1px solid var(--line-2); color: var(--ink-2); margin-left: 4px; white-space: nowrap; vertical-align: 1px; }
.lt-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.lt-list button { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px dashed var(--line); padding: 4px 0; cursor: pointer; font-size: 12.5px; }
.lt-list button:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
.lt-list code { color: var(--ink-3); font-size: 10.5px; margin-left: 4px; }
.concept { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 640px; }
.concept th, .concept td { text-align: left; padding: 9px 14px 9px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.concept th { font-size: 11px; color: var(--ink-3); font-weight: 600; border-bottom-color: var(--line-2); }
.concept td:first-child { font-weight: 600; white-space: nowrap; }
.concept td:first-child small { display: block; font-family: var(--f-mono); font-weight: 400; font-size: 10.5px; color: var(--ink-3); }
.concept td:last-child { font-family: var(--f-mono); white-space: nowrap; text-align: right; padding-right: 0; }
.concept .go { background: none; border: 0; padding: 0; color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 2px; cursor: pointer; font-size: inherit; }

/* 키네틱 */
.layer-intro { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px 24px; align-items: end; margin-bottom: 16px; }
@media (max-width: 760px) { .layer-intro { grid-template-columns: minmax(0, 1fr); } }
.layer-intro p { margin: 4px 0 0; color: var(--ink-2); max-width: 74ch; }
.sim-note { font-size: 12px; color: var(--ink-2); border: 1px dashed var(--line-2); border-radius: 4px; padding: 6px 10px; }
.kin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 430px), 1fr)); gap: 16px; margin-bottom: 28px; }
.kin-h { font-size: 16px; font-weight: 700; margin: 0 0 12px; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.kin-h small { font-family: var(--f-mono); font-size: 11px; font-weight: 400; color: var(--ink-3); letter-spacing: .04em; }
.act-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.act-head h3 { margin: 0; font-size: 15.5px; }
.act-head code { color: var(--ink-3); }
.role-badge { margin-left: auto; font-size: 11px; border: 1px solid var(--line-2); border-radius: 999px; padding: 0 8px; color: var(--ink-2); white-space: nowrap; }
.act-desc { margin: 6px 0 12px; font-size: 13px; color: var(--ink-2); }
.act-form { display: grid; gap: 10px; }
.fld { display: grid; gap: 4px; min-width: 0; }
.fld label, .fld .fl { font-size: 12px; color: var(--ink-2); display: flex; gap: 4px 8px; flex-wrap: wrap; align-items: baseline; }
.fld label code, .fld .fl code { color: var(--ink-3); font-size: 10.5px; }
.fld input[type="text"], .fld input[type="number"], .fld select { width: 100%; min-width: 0; padding: 6px 8px; border: 1px solid var(--line-2); border-radius: 4px; background: var(--bg); }
.fld-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.sub-h { margin: 4px 0 0; font-size: 11px; font-weight: 600; letter-spacing: .05em; color: var(--ink-3); }
.rules { margin: 0; padding-left: 18px; font-size: 12.5px; color: var(--ink-2); display: grid; gap: 2px; }
.crit { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; font-size: 12.5px; }
.crit li { display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 4px; }
.crit li::before { content: "✓"; color: var(--ok); font-weight: 700; }
.crit li.no { color: var(--ink-2); }
.crit li.no::before { content: "✕"; color: var(--bad); }
.act-btns { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.act-out { margin-top: 12px; }
.act-out:empty { display: none; }
.edits { list-style: none; margin: 0; padding: 10px 12px; display: grid; gap: 5px; font-size: 12.5px; background: var(--bg); border-radius: 4px; }
.edits li { display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 6px; }
.edits b { font-family: var(--f-mono); }
.edits .add b { color: var(--ok); }
.edits .mod b { color: var(--warn); }
.edits .del b { color: var(--bad); }
.edits .keep b { color: var(--ink-3); }
.out-note { margin: 6px 0 0; font-size: 11.5px; color: var(--ink-3); }
.sugg { display: flex; flex-wrap: wrap; gap: 4px; }
.sugg button { border: 1px dashed var(--line-2); background: none; border-radius: 4px; padding: 2px 8px; font-size: 12px; cursor: pointer; text-align: left; }
.sugg button:hover { border-style: solid; border-color: var(--ink-3); }
.sig { display: block; font-family: var(--f-mono); font-size: 12px; background: var(--bg); border-radius: 4px; padding: 6px 10px; color: var(--ink); overflow-x: auto; white-space: nowrap; margin: 6px 0 10px; }
.fn-out { margin-top: 10px; display: grid; gap: 8px; font-size: 13px; }
.fn-out p { margin: 0; }
.mtable { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.mtable th, .mtable td { text-align: left; padding: 5px 10px 5px 0; border-bottom: 1px solid var(--line); vertical-align: middle; }
.mtable th { font-size: 11px; font-weight: 600; color: var(--ink-3); }
.mtable td.r, .mtable th.r { text-align: right; font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.path { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.path .hop { font-family: var(--f-mono); font-size: 10.5px; color: var(--ink-3); }
.roles { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 620px; }
.roles th, .roles td { padding: 9px 12px 9px 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.roles th { font-size: 11px; color: var(--ink-3); font-weight: 600; border-bottom-color: var(--line-2); }
.roles td.c { text-align: center; font-family: var(--f-mono); }
.yes { color: var(--ok); font-weight: 700; }
.no-p { color: var(--ink-3); }

/* 분석 */
.an-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 480px), 1fr)); gap: 16px; margin-bottom: 16px; }
.trow { display: grid; grid-template-columns: 118px 40px minmax(0, 1fr) 46px; gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.trow:last-child { border-bottom: 0; }
.trow .tname { display: flex; align-items: center; gap: 7px; font-weight: 600; }
.trow .track { height: 8px; background: var(--line); border-radius: 2px; overflow: hidden; }
.trow .track b { display: block; height: 100%; }
.trow .num { text-align: right; color: var(--ink); }
.trow .tops { grid-column: 1 / -1; padding-left: 17px; margin-top: -2px; }
.thead { font-size: 11px; color: var(--ink-3); font-weight: 600; border-bottom: 1px solid var(--line-2); }
.stack { display: grid; gap: 10px; margin-bottom: 14px; }
.stack-row { display: grid; gap: 4px; font-size: 12.5px; }
.stack-row .meta { display: flex; justify-content: space-between; gap: 8px; color: var(--ink-2); }
.stack-bar { display: flex; height: 14px; border-radius: 3px; overflow: hidden; background: var(--line); }
.stack-bar b { background: var(--accent); }
.var-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.var-list li { display: grid; gap: 3px; font-size: 12.5px; padding-bottom: 7px; border-bottom: 1px dashed var(--line); }
.var-list li:last-child { border-bottom: 0; }
.var-list .vh { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.var-list .vs { color: var(--ink-3); font-size: 12px; }
.unk { display: flex; flex-wrap: wrap; gap: 4px; }
.unk span { font-size: 12px; border: 1px solid var(--line); border-radius: 3px; padding: 0 6px; color: var(--ink-2); }
.unk b { font-family: var(--f-mono); font-weight: 500; font-size: 10.5px; color: var(--ink-3); margin-left: 3px; }
#heatmap-svg { display: block; width: 100%; min-width: 820px; height: auto; }
.hm-cell { fill: var(--heat); }
.hm-empty { fill: var(--line); fill-opacity: .32; }
.hm-cell:hover, .hm-empty:hover { stroke: var(--ink); stroke-width: 1px; }
.hm-lbl { font-size: 11.5px; fill: var(--ink); cursor: pointer; }
.hm-lbl:hover { text-decoration: underline; }
.hm-axis { font-size: 10px; fill: var(--ink-3); font-family: var(--f-mono); }
.hm-year { stroke: var(--ink-3); stroke-dasharray: 2 3; }
.hm-scale { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--ink-3); margin-top: 8px; flex-wrap: wrap; }
.hm-scale i { display: inline-block; width: 14px; height: 10px; background: var(--heat); border-radius: 1px; }
.src-row { display: grid; grid-template-columns: minmax(0, 150px) minmax(0, 1fr) 40px; gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.src-row:last-child { border-bottom: 0; }
.src-row .track { height: 8px; background: var(--line); border-radius: 2px; overflow: hidden; }
.src-row .track b { display: block; height: 100%; background: var(--t-source); }
.src-row .num { text-align: right; color: var(--ink); }
.src-row .srcs { grid-column: 1 / -1; font-size: 12px; color: var(--ink-3); margin-top: -2px; }
.prose { max-width: 70ch; font-size: 13.5px; color: var(--ink-2); }
.prose h3 { font-size: 13px; color: var(--ink); margin: 16px 0 4px; }
.prose h3:first-child { margin-top: 0; }
.prose p { margin: 0 0 8px; line-height: 1.7; }
.prose ul { margin: 0 0 8px; padding-left: 18px; line-height: 1.7; }

.tabpanel { padding-bottom: 28px; }
.foot { padding-block: 8px 28px; font-size: 12px; color: var(--ink-3); }
.foot p { margin: 0; max-width: 110ch; }
.tip { position: fixed; z-index: 100; max-width: 280px; padding: 7px 10px; background: var(--accent); color: #fff; border-radius: 4px; font-size: 12px; line-height: 1.5; pointer-events: none; box-shadow: 0 6px 18px rgba(0, 0, 0, .18); }
.tip code { color: inherit; opacity: .8; }
.tip-t { margin-left: 6px; opacity: .7; font-size: 11px; }
.err { margin: 16px 0; padding: 12px 14px; border: 1px solid var(--bad); border-radius: 4px; color: var(--ink); background: var(--panel); }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* 사이트 공통 헤더 (index.html 헤더와 같은 모양) */
.site-header { background: linear-gradient(135deg, #0f2744 0%, #1a3a5c 100%); color: #fff; box-shadow: 0 3px 12px rgba(0, 0, 0, 0.25); }
.site-header-in { display: flex; align-items: center; justify-content: space-between; gap: 10px 20px; flex-wrap: wrap; padding: 16px 24px 14px; }
.site-brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; }
.site-icon { font-size: 28px; line-height: 1; }
.site-title { font-size: 20px; font-weight: 700; letter-spacing: -0.3px; }
.site-sub { font-size: 12px; color: rgba(255, 255, 255, 0.65); margin: 4px 0 0 40px; }
.site-nav { display: flex; gap: 4px; padding: 3px; border-radius: 8px; background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.14); }
.site-nav a { color: rgba(255, 255, 255, 0.78); text-decoration: none; font-size: 13px; font-weight: 600; padding: 6px 14px; border-radius: 6px; white-space: nowrap; }
.site-nav a:hover { color: #fff; background: rgba(255, 255, 255, 0.1); }
.site-nav a[aria-current="page"] { background: var(--gold); color: #0f2744; }
.site-nav a:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
@media (max-width: 640px) {
  .site-header-in { padding: 12px 16px 10px; }
  .site-title { font-size: 16px; }
  .site-sub { margin-left: 40px; }
  .site-nav { width: 100%; }
  .site-nav a { flex: 1; text-align: center; }
}
