/* ARCH NOW — 해외 뉴스 빅데이터 분석 플랫폼
   A2UI 기본 카탈로그(Card·Row·Column·List·Tabs·Modal·Button·TextField·ChoicePicker·DateTimeInput·CheckBox)
   구현 가이드의 시각 규칙을 바닐라 CSS 로 옮긴 것. 색·간격은 참고 화면(흰 바탕·남색 주조)을 따른다. */
:root {
  --bg: #f6f7f9; --surface: #ffffff; --line: #e3e6eb; --line-strong: #cfd4dc;
  --text: #1b1f27; --text-2: #5a6372; --text-3: #8a93a3;
  --primary: #22407a; --primary-hover: #1a3364; --primary-soft: #eaf0fb; --accent: #2f6fde;
  --danger: #d53b3b; --ok: #12833a;
  --radius: 10px; --radius-sm: 6px; --shadow: 0 1px 2px rgba(16,24,40,.05), 0 1px 3px rgba(16,24,40,.06);
  --series-1: #257de0; --series-2: #f47230; --series-3: #00b894;
  --pos: #257de0; --neu: #b9bec7; --neg: #ec4647;
  font-family: "Pretendard Variable", Pretendard, -apple-system, "Segoe UI", "Malgun Gothic", sans-serif;
  color: var(--text); background: var(--bg); font-size: 15px; line-height: 1.55;
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
.hidden { display: none !important; }
.muted { color: var(--text-2); } .caption { font-size: .8em; color: var(--text-3); }
.nowrap { white-space: nowrap; } .ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Header ---------- */
.gnb { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
.gnb-top { max-width: 1440px; margin: 0 auto; padding: 0 28px; height: 68px; display: flex; align-items: center; gap: 32px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; white-space: nowrap; cursor: pointer; }
.brand .logo { width: 34px; height: 34px; }
.brand small { display: block; font-size: 11px; font-weight: 600; color: var(--accent); letter-spacing: .12em; }
.topnav { display: flex; gap: 6px; flex: 1; justify-content: center; height: 100%; }
.topnav a { display: flex; align-items: center; padding: 0 26px; font-weight: 600; font-size: 16px; color: #333b48; border-bottom: 3px solid transparent; }
.topnav a:hover { color: var(--primary); }
.topnav a.active { color: var(--primary); border-bottom-color: var(--primary); }
.tools { display: flex; align-items: center; gap: 6px; }
.tool-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border: 0; background: none; border-radius: var(--radius-sm); font-weight: 600; cursor: pointer; color: #333b48; position: relative; }
.tool-btn:hover { background: var(--bg); }
.tool-btn .badge { position: absolute; top: 2px; right: 2px; background: var(--danger); color: #fff; font-size: 10px; min-width: 16px; height: 16px; border-radius: 8px; display: grid; place-items: center; padding: 0 4px; }
.gnb-sub { border-top: 1px solid var(--line); }
.gnb-sub-in { max-width: 1440px; margin: 0 auto; padding: 0 28px; height: 44px; display: flex; align-items: center; justify-content: space-between; font-size: 14px; }
.gnb-sub .who { display: flex; align-items: center; gap: 8px; color: var(--text-2); }
.gnb-sub .right { display: flex; gap: 4px; }
.icon { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon.sm { width: 15px; height: 15px; }

/* ---------- Layout ---------- */
.page { max-width: 1440px; margin: 0 auto; padding: 28px; display: grid; grid-template-columns: 260px 1fr; gap: 28px; align-items: start; }
.page.full { grid-template-columns: 1fr; }
.lnb { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px 22px; position: sticky; top: 132px; }
.lnb h3 { margin: 4px 0 10px; font-size: 13px; color: var(--text-3); font-weight: 600; letter-spacing: .04em; }
.lnb a { display: block; padding: 13px 4px; border-bottom: 1px solid var(--line); font-weight: 600; color: #333b48; }
.lnb a:last-child { border-bottom: 0; }
.lnb a:hover { color: var(--primary); }
.lnb a.active { color: var(--primary); }
.lnb a.active::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--primary); margin: 0 8px 2px 0; vertical-align: middle; }
.content { min-width: 0; }
.crumb { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); margin-bottom: 10px; }
.page-title { font-size: 28px; font-weight: 800; margin: 4px 0 6px; letter-spacing: -.01em; }
.page-desc { color: var(--text-2); margin: 0 0 20px; }

/* ---------- A2UI: Card / Row / Column / Divider ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.card + .card, .stack > * + * { margin-top: 16px; }
.grid > .card, .grid > * { margin-top: 0 !important; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; } .row.end { justify-content: flex-end; } .row.top { align-items: flex-start; }
.col { display: flex; flex-direction: column; gap: 8px; }
.grow { flex: 1; min-width: 0; }
.divider { height: 1px; background: var(--line); margin: 16px 0; border: 0; }
.grid { display: grid; gap: 16px; }
.grid.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
h2.section { font-size: 18px; margin: 0 0 12px; font-weight: 700; }

/* ---------- A2UI: Button ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 40px; padding: 0 18px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: var(--surface); font-weight: 600; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--bg); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; min-width: 110px; }
.btn.primary:hover { background: var(--primary-hover); }
.btn.ghost { border-color: transparent; background: none; }
.btn.danger { color: var(--danger); border-color: #f1c4c4; }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.on { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); }

/* ---------- A2UI: TextField / ChoicePicker / DateTimeInput / CheckBox ---------- */
.input, .select, textarea.input { height: 42px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 0 12px; background: var(--surface); width: 100%; min-width: 0; }
textarea.input { height: auto; padding: 10px 12px; resize: vertical; }
.input:focus, .select:focus { outline: 2px solid var(--primary-soft); border-color: var(--primary); }
.field { display: flex; align-items: center; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); height: 42px; padding: 0 12px; gap: 8px; }
.field .lbl { font-weight: 700; font-size: 14px; white-space: nowrap; }
.field input { border: 0; outline: 0; height: 100%; flex: 1; min-width: 0; background: none; }
.with-icon { position: relative; } .with-icon .icon { position: absolute; right: 12px; top: 12px; color: var(--text-3); pointer-events: none; }
.radio-row { display: flex; gap: 18px; align-items: center; margin-top: 8px; }
.radio-row label, .check { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-size: 14px; }
.radio-row input { width: 18px; height: 18px; accent-color: var(--primary); }
.chip-check { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); cursor: pointer; font-size: 14px; user-select: none; }
.chip-check input { display: none; }
.chip-check::before { content: "✓"; color: var(--text-3); font-weight: 700; }
.chip-check.on { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.chip-check.on::before { color: var(--primary); }

/* 검색 조건 폼 */
.search-form { padding: 22px 26px; }
.sf-row { display: grid; grid-template-columns: 110px 1fr; gap: 14px; padding: 9px 0; align-items: start; }
.sf-row > .sf-label { font-weight: 700; padding-top: 10px; font-size: 15px; }
.sf-inline { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.sf-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 12px; padding-top: 14px; border-top: 1px solid var(--line); }
.sf-more { display: none; } .search-form.open .sf-more { display: grid; }
.toggle-more { display: block; margin: 6px auto 0; border: 0; background: none; color: var(--text-3); cursor: pointer; }

/* ---------- A2UI: Tabs ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; flex-wrap: wrap; }
.tabs button { border: 0; background: none; padding: 10px 16px; font-weight: 600; color: var(--text-2); border-bottom: 2px solid transparent; cursor: pointer; margin-bottom: -1px; }
.tabs button.active { color: var(--primary); border-bottom-color: var(--primary); }
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); overflow: hidden; }
.seg button { border: 0; background: var(--surface); padding: 7px 18px; cursor: pointer; font-weight: 600; color: var(--text-2); }
.seg button + button { border-left: 1px solid var(--line-strong); }
.seg button.active { background: var(--primary-soft); color: var(--primary); }

/* ---------- 태그 · 배지 ---------- */
.tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 4px; font-size: 12px; font-weight: 700; background: #f2f4f7; color: #4a5160; white-space: nowrap; }
.tag.cat { background: #fdeceb; color: #c53030; }
.tag.lang { background: #eef3fd; color: #2a5bb8; }
.tag.paid { background: #fff4e0; color: #9a5b00; }
.tag.pos { background: #e8f1fd; color: #1b64be; } .tag.neg { background: #fdecec; color: #b42727; } .tag.neu { background: #f1f2f4; color: #555d6b; }
.tag.ok { background: #e7f6ec; color: var(--ok); } .tag.err { background: #fdecec; color: #b42727; }
.tag.dl { background: #efe9fd; color: #5a3fc0; }

/* ---------- 대시보드: 오늘의 주요소식 ---------- */
.dash-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.dash-head h1 { font-size: 22px; margin: 0; font-weight: 800; display: flex; align-items: center; gap: 12px; }
.dash-head h1 a { font-size: 14px; font-weight: 600; color: var(--text-2); }
.kpis { display: flex; gap: 18px; color: var(--text-2); font-size: 14px; margin-top: 6px; }
.kpis b { color: var(--accent); }
.news-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.news-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 10px; cursor: pointer; transition: border-color .15s, box-shadow .15s; min-height: 260px; }
.news-card:hover { border-color: var(--primary); box-shadow: 0 4px 14px rgba(34,64,122,.08); }
.news-card .rank { font-size: 12px; color: var(--text-3); font-weight: 700; }
.news-card h3 { margin: 0; font-size: 16px; line-height: 1.4; font-weight: 700; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-card .count { align-self: flex-end; color: var(--accent); font-weight: 700; font-size: 13px; }
.news-card ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; border-top: 1px solid var(--line); padding-top: 10px; }
.news-card li { font-size: 13px; }
.news-card li .t { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #333b48; }
.news-card li .s { font-size: 12px; color: var(--text-3); font-weight: 600; }

/* ---------- A2UI: List (기사 목록) ---------- */
.result-head { display: flex; justify-content: space-between; align-items: center; margin: 22px 0 10px; gap: 12px; flex-wrap: wrap; }
.result-head .total b { color: var(--accent); }
.alist { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.aitem { display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; padding: 16px 20px; border-bottom: 1px solid var(--line); cursor: pointer; }
.aitem:last-child { border-bottom: 0; }
.aitem:hover { background: #fafbfc; }
.aitem .tt { font-weight: 700; font-size: 16px; }
.aitem .ot { color: var(--text-2); font-size: 13px; }
.aitem .sm { color: var(--text-2); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.aitem .meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 13px; color: var(--text-3); }
.aitem .side { text-align: right; font-size: 13px; color: var(--text-3); white-space: nowrap; }
.empty { padding: 48px; text-align: center; color: var(--text-3); }
.pager { display: flex; justify-content: center; gap: 4px; margin: 18px 0; }
.pager button { min-width: 36px; height: 36px; border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius-sm); cursor: pointer; }
.pager button.active { background: var(--primary); color: #fff; border-color: var(--primary); }

table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; background: var(--surface); }
.tbl th, .tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.tbl th { background: #f8f9fb; font-weight: 700; color: var(--text-2); font-size: 13px; white-space: nowrap; }
.tbl tr:hover td { background: #fafbfc; }
.tbl-wrap { border: 1px solid var(--line); border-radius: var(--radius); overflow: auto; }

/* ---------- 상세 ---------- */
.detail h1 { font-size: 26px; margin: 8px 0 6px; line-height: 1.35; }
.detail .orig { color: var(--text-2); font-size: 16px; margin: 0 0 14px; }
.detail .metaline { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; color: var(--text-2); font-size: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.detail .body { white-space: pre-wrap; line-height: 1.8; font-size: 15.5px; }
.kv { display: grid; grid-template-columns: 110px 1fr; gap: 8px 12px; font-size: 14px; }
.kv dt { color: var(--text-3); font-weight: 600; } .kv dd { margin: 0; }
.md h1 { font-size: 24px; } .md h2 { font-size: 19px; margin-top: 26px; border-bottom: 1px solid var(--line); padding-bottom: 6px; } .md h3 { font-size: 16px; }
.md table { border-collapse: collapse; margin: 10px 0; font-size: 14px; } .md th, .md td { border: 1px solid var(--line); padding: 6px 10px; }
.md th { background: #f8f9fb; } .md code { background: #f2f4f7; padding: 1px 5px; border-radius: 4px; }
.md p, .md li { line-height: 1.75; }

/* ---------- A2UI: Modal ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(16,24,40,.45); display: grid; place-items: center; z-index: 100; padding: 20px; }
.modal { background: var(--surface); border-radius: 14px; width: min(720px, 100%); max-height: 88vh; overflow: auto; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.modal header { display: flex; justify-content: space-between; align-items: center; padding: 16px 22px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); }
.modal header h3 { margin: 0; font-size: 18px; }
.modal .mbody { padding: 20px 22px; }
.modal footer { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 22px; border-top: 1px solid var(--line); }
.form-grid { display: grid; grid-template-columns: 120px 1fr; gap: 10px 14px; align-items: center; }
.form-grid label { font-weight: 600; font-size: 14px; }

/* ---------- 드롭다운(알림) ---------- */
.pop { position: absolute; right: 0; top: 44px; width: 380px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 12px 30px rgba(0,0,0,.12); z-index: 50; max-height: 70vh; overflow: auto; }
.pop .ph { padding: 12px 16px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; font-weight: 700; }
.pop .pi { padding: 10px 16px; border-bottom: 1px solid var(--line); font-size: 13px; cursor: pointer; }
.pop .pi.unread { background: #f5f8ff; }
.pop .pi:hover { background: var(--bg); }

/* ---------- 토스트 ---------- */
#toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: #1f2633; color: #fff; padding: 12px 20px; border-radius: 8px; z-index: 200; font-size: 14px; opacity: 0; transition: opacity .2s; pointer-events: none; max-width: 80vw; }
#toast.show { opacity: 1; }

/* ---------- 로그인 ---------- */
.login-wrap { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(160deg, #eef2f9 0%, #f8f9fb 60%); }
.login { width: 400px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 36px; box-shadow: 0 10px 40px rgba(16,24,40,.08); }
.login h1 { font-size: 20px; margin: 14px 0 4px; } .login p { color: var(--text-2); margin: 0 0 22px; font-size: 14px; }
.login .col { gap: 12px; }

/* ---------- AI 검색 ---------- */
.ai-wrap { display: grid; grid-template-columns: 240px 1fr; gap: 20px; height: calc(100vh - 170px); min-height: 520px; }
.ai-side { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; overflow: auto; }
.ai-side .conv { padding: 9px 10px; border-radius: 6px; cursor: pointer; font-size: 14px; display: flex; justify-content: space-between; gap: 6px; }
.ai-side .conv:hover, .ai-side .conv.active { background: var(--primary-soft); }
.ai-main { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; min-height: 0; }
.ai-msgs { flex: 1; overflow: auto; padding: 22px 26px; display: flex; flex-direction: column; gap: 18px; }
.msg { max-width: 860px; } .msg.user { align-self: flex-end; background: var(--primary); color: #fff; padding: 10px 16px; border-radius: 14px 14px 2px 14px; }
.msg.bot { align-self: flex-start; width: 100%; }
.msg.bot .bubble { background: #f7f8fa; border: 1px solid var(--line); border-radius: 2px 14px 14px 14px; padding: 14px 18px; }
.cite { display: inline-grid; place-items: center; min-width: 18px; height: 18px; font-size: 11px; font-weight: 700; background: var(--primary-soft); color: var(--primary); border-radius: 4px; margin: 0 2px; cursor: pointer; vertical-align: 2px; padding: 0 3px; }
.sources { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; margin-top: 10px; }
.src { border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; font-size: 13px; cursor: pointer; background: var(--surface); }
.src:hover, .src.hl { border-color: var(--primary); }
.src .n { font-weight: 700; color: var(--primary); margin-right: 4px; }
.ai-input { border-top: 1px solid var(--line); padding: 14px 18px; display: flex; gap: 8px; align-items: flex-end; }
.ai-input textarea { flex: 1; min-height: 46px; max-height: 160px; }
.mic.rec { background: #fdecec; border-color: var(--danger); color: var(--danger); animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(213,59,59,.12); } }
.suggest { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.suggest button { border: 1px solid var(--line-strong); background: var(--surface); border-radius: 20px; padding: 8px 14px; cursor: pointer; font-size: 14px; }
.suggest button:hover { border-color: var(--primary); color: var(--primary); }

/* ---------- 차트 ---------- */
.chart { width: 100%; position: relative; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.tbl td, .tbl th { word-break: keep-all; }
.tbl td.nw, .tbl th { white-space: nowrap; }
.chart .axis text, .chart text { font-size: 11px; fill: var(--text-2); font-family: inherit; }
.chart .grid-line { stroke: #eceef2; }
.chart .baseline { stroke: #c9ced6; }
.chart .hit { fill: transparent; cursor: pointer; }
.viz-tip { position: fixed; pointer-events: none; background: #1f2633; color: #fff; font-size: 12px; padding: 7px 10px; border-radius: 6px; z-index: 300; white-space: nowrap; display: none; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--text-2); margin: 6px 0 2px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.chart-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.chart-head h3 { margin: 0; font-size: 15px; }
.linkbtn { border: 0; background: none; color: var(--text-3); cursor: pointer; font-size: 12px; text-decoration: underline; }
.wordcloud { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: baseline; }
.wordcloud a { color: var(--primary); font-weight: 700; } .wordcloud a:hover { text-decoration: underline; }
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat .v { font-size: 26px; font-weight: 800; } .stat .k { color: var(--text-2); font-size: 13px; }

/* ---------- 관계도 ---------- */
.graph-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; }
@media (max-width: 1180px) { .graph-layout { grid-template-columns: 1fr; } .graph-side { max-height: none; } }
.graph-box { position: relative; height: 620px; background: #fbfcfd; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.graph-box svg { width: 100%; height: 100%; cursor: grab; display: block; }
.graph-box .node circle { stroke: #fff; stroke-width: 2; transition: opacity .15s; }
.graph-box .node text { fill: var(--text); pointer-events: none; font-weight: 600; paint-order: stroke; stroke: #fbfcfd; stroke-width: 4px; stroke-linejoin: round; transition: opacity .15s; }
.graph-box .node.nolabel text { opacity: 0; }
.graph-box svg.zoomed .node.nolabel text, .graph-box .node.hl text, .graph-box .node:hover text { opacity: 1; }
.graph-box .link { stroke: #b4bfd0; stroke-opacity: .45; stroke-linecap: round; transition: stroke-opacity .15s; }
.graph-box svg.dim .node:not(.hl) { opacity: .15; }
.graph-box svg.dim .link { stroke-opacity: .06; }
.graph-box svg.dim .link.hl { stroke: #6f7f99; stroke-opacity: .85; }
.graph-box .node.me circle { stroke: #1f2937; stroke-width: 2.5; }
.graph-zoom { position: absolute; right: 10px; top: 10px; display: flex; gap: 4px; }
.graph-zoom .btn { min-width: 34px; background: #fff; }
.graph-note { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--muted, #5b6472); }
.graph-side { max-height: 620px; overflow: auto; }
.graph-top { list-style: none; margin: 0; padding: 0; counter-reset: g; }
.graph-top li { display: flex; align-items: center; gap: 8px; padding: 7px 2px; border-bottom: 1px solid var(--line); cursor: pointer; font-size: 14px; counter-increment: g; }
.graph-top li::before { content: counter(g); width: 18px; color: #8a93a3; font-size: 12px; text-align: right; }
.graph-top li i { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.graph-top li span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.graph-top li b { color: #5b6472; font-weight: 600; font-size: 13px; }
.graph-top li:hover { background: #f5f7fa; }
.row.wrap { flex-wrap: wrap; }

.spinner { width: 18px; height: 18px; border: 2px solid var(--line-strong); border-top-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading { padding: 40px; text-align: center; color: var(--text-3); }

@media (max-width: 1280px) { .news-grid { grid-template-columns: repeat(3, minmax(0,1fr)); } }
@media (max-width: 1000px) {
  .page { grid-template-columns: 1fr; } .lnb { position: static; } .topnav a { padding: 0 12px; }
  .news-grid, .grid.c3, .grid.c4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .ai-wrap { grid-template-columns: 1fr; height: auto; } .ai-side { display: none; }
}
@media (max-width: 700px) { .topnav { display: none; } .news-grid, .grid.c2, .grid.c3, .grid.c4 { grid-template-columns: 1fr; } .sf-row { grid-template-columns: 1fr; } }

/* 번역 모델 */
.tag.mt { background: #eaf2fd; color: #1b5fb5; }
.mtinfo { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 10px 12px; margin: 8px 0 12px; background: var(--bg-soft, #f5f7fa); border-radius: 8px; font-size: 13px; }
.mtinfo details { width: 100%; }
.mtinfo summary { cursor: pointer; color: var(--muted, #5b6472); }
.terms { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.term { display: inline-flex; gap: 6px; align-items: center; padding: 3px 8px; border: 1px solid var(--line, #e3e6eb); border-radius: 6px; font-size: 12px; background: #fff; }
.term i { font-style: normal; color: #8a93a3; }
pre.prompt { white-space: pre-wrap; font-size: 12px; background: #fff; border: 1px solid var(--line, #e3e6eb); border-radius: 8px; padding: 10px; max-height: 260px; overflow: auto; }
h3.sub { font-size: 14px; margin: 0 0 6px; }
textarea.input { width: 100%; height: auto; padding: 10px 12px; line-height: 1.6; resize: vertical; font-family: inherit; }
