/* StockClone 디자인 시스템 (2026-06-09 리뉴얼)
   레퍼런스: Uxerplan (hero + gradient) · Nexion (미니멀) · Toss 분위기

   - 한글: Pretendard Variable
   - 영어/숫자: Geist Sans + Geist Mono
   - 아이콘: Lucide (inline SVG, stroke 1.5)
   - 톤: 흑/회색 베이스, 인디고 강조, 펄 그라디언트 액센트
*/

@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable.css');
@import url('https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700;800&family=Geist+Mono:wght@400;500;600&display=swap');

:root {
  /* ─── Colors (neutral-first) ─── */
  --bg:          #fafafa;
  --bg-soft:     #f4f4f5;
  --bg-card:     #ffffff;
  --bg-dark:     #0a0a0a;
  --bg-dark-2:   #18181b;

  --ink:         #0a0a0a;   /* primary text — 더 진하게 */
  --ink-2:       #2a2a2e;   /* secondary text — 또렷하게 */
  --ink-3:       #52525b;   /* tertiary — 또렷하게 (기존 #71717a) */
  --ink-4:       #8a8a93;   /* muted — 또렷하게 (기존 #a1a1aa) */
  --ink-5:       #c4c4cc;   /* very muted */

  /* 테두리는 사실상 제거 — 거의 보이지 않게 (그림자로 카드 구분) */
  --line:        #f0f0f2;
  --line-2:      #f6f6f8;

  /* Navbar (디자인 핸드오프 Option 4) */
  --nav-line:    #eeeeee;   /* 연한 테두리 */
  --muted:       #6b7280;

  /* Accent — 카카오뱅크 톤 (청록 → 노랑 그라디언트) */
  --accent:      #00b8c4;   /* 청록 (텍스트/포인트용 — 노랑은 흰배경서 안보임) */
  --accent-2:    #ffd900;   /* 카카오 옐로 */
  --accent-soft: #e6fafb;   /* 청록 연한 배경 */
  --accent-grad: linear-gradient(135deg, #00d2c8 0%, #7be000 45%, #ffe000 100%);

  /* Up / Down (한국 주식 컨벤션 — 빨강=상승) */
  --up:          #ef4444;
  --up-soft:     #fef2f2;
  --down:        #3b82f6;
  --down-soft:   #eff6ff;

  /* Pearl gradient (카카오뱅크 톤 — 청록/연두/노랑) */
  --pearl-1:     radial-gradient(at 80% 0%, rgba(0, 210, 200, 0.14) 0%, transparent 60%);
  --pearl-2:     radial-gradient(at 50% 30%, rgba(123, 224, 0, 0.16) 0%, transparent 60%);
  --pearl-3:     radial-gradient(at 50% 30%, rgba(255, 224, 0, 0.18) 0%, transparent 60%);

  /* Radii */
  --r-sm:        8px;
  --r:           12px;
  --r-lg:        20px;
  --r-xl:        28px;

  /* Shadows */
  --shadow-sm:   0 1px 2px rgba(0,0,0,0.04);
  --shadow:      0 4px 14px rgba(0,0,0,0.05);
  --shadow-lg:   0 12px 32px rgba(0,0,0,0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Pretendard Variable', 'Geist', -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.55;
  font-feature-settings: 'ss01', 'ss02', 'cv01', 'cv11';
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font: inherit; color: inherit; }

/* ═══════════════════════════════════════
   타이포 스케일 — 8단계
   ═══════════════════════════════════════ */
.t-display { font-size: 56px; line-height: 1.05; letter-spacing: -2px; font-weight: 500; }
.t-h1      { font-size: 36px; line-height: 1.15; letter-spacing: -1.2px; font-weight: 600; }
.t-h2      { font-size: 26px; line-height: 1.2;  letter-spacing: -0.6px; font-weight: 600; }
.t-h3      { font-size: 18px; line-height: 1.3;  letter-spacing: -0.2px; font-weight: 600; }
.t-body    { font-size: 14px; line-height: 1.55; }
.t-sm      { font-size: 13px; line-height: 1.5;  color: var(--ink-2); }
.t-xs      { font-size: 12px; line-height: 1.45; color: var(--ink-3); }
.t-micro   { font-size: 11px; line-height: 1.4;  color: var(--ink-3); letter-spacing: 0.2px; }

/* 영어 / 숫자 강조 */
.font-sans { font-family: 'Geist', 'Pretendard Variable', sans-serif; }
.font-mono { font-family: 'Geist Mono', monospace; font-variant-numeric: tabular-nums; }
.tabular   { font-variant-numeric: tabular-nums; }

/* ═══════════════════════════════════════
   Topbar — Navbar Option 4 (스월 로고 + 지수칩 + 라이브 티커)
   디자인 핸드오프(claude.ai/design) 구현. 연한 테두리 #f0f1f4.
   ═══════════════════════════════════════ */
/* 내비 고정 래퍼 */
#topbar { position: sticky; top: 0; z-index: 100; }

.site-nav {
  position: sticky; top: 0; z-index: 100;
  background: #fff;
  border-bottom: 1px solid var(--nav-line, #f0f1f4);
}

.nav-bar {
  display: flex; align-items: center;
  height: 65px; max-width: 1340px; margin: 0 auto;
  padding: 0 26px; gap: 8px;
}
.nav-brand { display: flex; align-items: center; gap: 11px; flex: none; cursor: pointer; text-decoration: none; color: var(--ink); }
.nav-mark {
  width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center; flex: none; background: #0c0e12;
}
.nav-mark svg { width: 23px; height: 20px; display: block; }
.nav-word { font-size: 16px; font-weight: 800; letter-spacing: -0.035em; }

.nav-links { display: flex; align-items: center; gap: 2px; margin-left: 18px; }
.nav-links .nav-link {
  font-size: 13px; font-weight: 500; color: #56606e; text-decoration: none;
  padding: 9px 14px; border-radius: 10px; transition: .16s ease; white-space: nowrap;
}
.nav-links .nav-link:hover { color: var(--ink); background: #f1f3f6; }
.nav-links .nav-link.active { color: var(--ink); font-weight: 600; background: #f1f3f6; }
.nav-spacer { flex: 1; }

/* 지수칩 — KOSPI·KOSDAQ 는 한 자리 flip, NASDAQ·USD/KRW 는 고정 */
.nav-indices { display: flex; align-items: center; gap: 16px; flex: none; margin-left: 50px; margin-right: 4px; }
/* flip 영역 (KOSPI ↔ KOSDAQ) */
.nav-idx-flip {
  position: relative; display: block;
  width: 150px; height: 20px; overflow: hidden;
}
.nav-idx-flip .nav-idx {
  position: absolute; inset: 0;
  transform: translateY(100%); opacity: 0;
  transition: transform .55s cubic-bezier(.22,.61,.36,1), opacity .4s ease;
}
.nav-idx-flip .nav-idx.is-current { transform: translateY(0); opacity: 1; }
.nav-idx-flip .nav-idx.is-leaving { transform: translateY(-100%); opacity: 0; }
/* 공통 칩 */
.nav-idx {
  display: flex; align-items: baseline; gap: 6px;
  font-size: 12px; font-weight: 600; white-space: nowrap;
}
/* 고정 칩 사이 구분선 */
.nav-idx-fixed { padding-left: 16px; border-left: 1px solid var(--nav-line, #f0f1f4); }
.nav-idx .nm { color: var(--muted, #6b7280); font-weight: 600; }
.nav-idx .pos { color: #089463; font-size: 12px; }
.nav-idx .neg { color: #e0453a; font-size: 12px; }

/* 검색 */
.nav-search {
  display: flex; align-items: center; gap: 9px; height: 35px; margin-left: 18px; padding: 0 13px;
  border-radius: 11px; background: #f3f4f7; border: 1px solid transparent;
  color: #9aa3af; font-size: 12px; min-width: 170px; transition: .18s ease; cursor: text;
}
.nav-search:hover { background: #eef0f3; }
.nav-search:focus-within { background: #fff; border-color: var(--ink); color: var(--ink); }
.nav-search svg { width: 16px; height: 16px; flex: none; stroke: currentColor; }
.nav-search input { border: 0; outline: 0; background: none; font: inherit; color: var(--ink); width: 100%; }
.nav-search input::placeholder { color: #9aa3af; }
.nav-kbd {
  font-family: 'Geist Mono', monospace; font-size: 10px; color: #9aa3af;
  border: 1px solid var(--nav-line, #f0f1f4); padding: 1px 5px; border-radius: 4px; flex: none;
}

/* 라이브 티커 띠 */
.nav-ticker {
  height: 38px; border-top: 1px solid var(--nav-line, #f0f1f4); background: #fafbfc;
  display: flex; align-items: center; overflow: hidden; position: relative;
}
.nav-ticker .track {
  display: flex; gap: 34px; white-space: nowrap; padding-left: 26px;
  animation: nav-ticker-scroll 70s linear infinite;
}
.nav-ticker:hover .track { animation-play-state: paused; }
.nav-ticker .tick { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; text-decoration: none; color: inherit; }
.nav-ticker .tick:hover .sym { text-decoration: underline; }
.nav-ticker .tick .sym { color: #525a66; }
.nav-ticker .tick .pos { color: #089463; }
.nav-ticker .tick .neg { color: #e0453a; }
@keyframes nav-ticker-scroll { to { transform: translateX(-50%); } }
/* reduced-motion 에서도 라이브 시세 띠는 천천히 흐름 (멈추지 않음) */
@media (prefers-reduced-motion: reduce) { .nav-ticker .track { animation-duration: 120s !important; } }

@media (max-width: 1100px) {
  .nav-indices { display: none; }       /* 좁은 화면: 지수칩 숨김 */
}
@media (max-width: 760px) {
  .nav-links { display: none; }
}

/* ═══════════════════════════════════════
   Layout
   ═══════════════════════════════════════ */
.layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 32px;
  padding: 32px;
  max-width: 1480px;
  margin: 0 auto;
}
.layout.single { grid-template-columns: 1fr; max-width: 1080px; }
.layout.narrow { grid-template-columns: 1fr; max-width: 800px; }
@media (max-width: 1100px) { .layout { grid-template-columns: 1fr; } }

/* ═══════════════════════════════════════
   Cards
   ═══════════════════════════════════════ */
.card {
  background: var(--bg-card);
  border-radius: var(--r-lg);
  border: none;                                  /* 테두리 삭제 */
  box-shadow: 0 1px 2px rgba(0,0,0,0.03), 0 8px 24px rgba(0,0,0,0.04);
  padding: 24px;
  margin-bottom: 16px;
}
.card-soft {
  background: var(--bg-soft);
  border: none; box-shadow: none;
}
.card-dark {
  background: var(--bg-dark);
  color: white;
  border: none;
}
.card-pearl {
  position: relative;
  background:
    var(--pearl-1),
    var(--bg-card);
  border: none;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03), 0 8px 24px rgba(0,0,0,0.04);
  overflow: hidden;
}
.card-pearl.green { background: var(--pearl-2), var(--bg-card); }
.card-pearl.amber { background: var(--pearl-3), var(--bg-card); }

.card-row { display: flex; justify-content: space-between; align-items: center; }
.card h2 { font-size: 17px; font-weight: 600; letter-spacing: -0.3px; margin-bottom: 14px; }
.card h3 { font-size: 14px; font-weight: 600; letter-spacing: -0.1px; margin-bottom: 10px; color: var(--ink-2); }

/* ═══════════════════════════════════════
   Hero (Uxerplan 스타일 — 어두운 그라디언트)
   ═══════════════════════════════════════ */
.hero {
  background: linear-gradient(135deg, #0a0a0a 0%, #1e1b4b 35%, #581c87 65%, #1e3a8a 100%);
  color: white;
  border-radius: var(--r-xl);
  padding: 56px 48px;
  position: relative;
  overflow: hidden;
  margin-bottom: 28px;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(at 30% 20%, rgba(168, 85, 247, 0.4) 0%, transparent 50%),
              radial-gradient(at 75% 80%, rgba(59, 130, 246, 0.3) 0%, transparent 50%);
  pointer-events: none;
}
.hero > * { position: relative; z-index: 1; }
.hero .badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 500;
  color: rgba(255,255,255,0.8);
  margin-bottom: 20px;
}
.hero h1 {
  font-size: 56px; line-height: 1.05; letter-spacing: -2px;
  font-weight: 500; max-width: 800px;
}
.hero h1 .accent {
  background: linear-gradient(135deg, #93c5fd 0%, #c084fc 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero .desc {
  margin-top: 28px;
  max-width: 520px;
  font-size: 14px; line-height: 1.6;
  color: rgba(255,255,255,0.7);
  margin-left: auto;
  text-align: right;
}
.hero .cta-row {
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.15);
  display: flex; align-items: center; gap: 14px;
}
.hero .cta {
  display: inline-flex; align-items: center; gap: 8px;
  color: white; font-size: 13px; font-weight: 500;
  letter-spacing: 1px; text-transform: uppercase;
}

/* ═══════════════════════════════════════
   Tabs
   ═══════════════════════════════════════ */
.tabs {
  display: flex; gap: 28px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
}
.tab {
  padding: 14px 2px;
  color: var(--ink-3);
  font-size: 14px; font-weight: 500;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.15s;
}
.tab:hover { color: var(--ink-2); }
.tab.active { color: var(--ink); font-weight: 600; border-bottom-color: var(--ink); }

/* ═══════════════════════════════════════
   Pills / Chips
   ═══════════════════════════════════════ */
.pill-row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.pill {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 7px 14px;
  font-size: 13px;
  color: var(--ink-2);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.12s;
}
.pill:hover { background: var(--bg-soft); }
.pill.active {
  background: var(--ink); color: white; border-color: var(--ink);
  font-weight: 500;
}

.chip {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--bg-soft);
  color: var(--ink-2);
  font-size: 11px; font-weight: 500;
  padding: 3px 8px; border-radius: 6px;
}
.chip.accent { background: var(--accent-soft); color: var(--accent); }
.chip.up   { background: var(--up-soft); color: var(--up); }
.chip.down { background: var(--down-soft); color: var(--down); }

/* ═══════════════════════════════════════
   Buttons (3번 이미지 톤)
   ═══════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 22px;
  border-radius: 100px;
  font-weight: 500; font-size: 14px;
  transition: all 0.15s;
  font-family: inherit;
}
.btn-dark {
  background: var(--ink);
  color: white;
}
.btn-dark:hover { background: var(--bg-dark-2); }

.btn-light {
  background: var(--bg-soft);
  color: var(--ink);
}
.btn-light:hover { background: var(--line); }

.btn-ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
}
.btn-ghost:hover { border-color: var(--ink); }

.btn-full { width: 100%; padding: 14px; font-size: 15px; }

/* ═══════════════════════════════════════
   Ticker icon
   ═══════════════════════════════════════ */
.ticker-icon {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: white;
  border: 1px solid var(--line-2);
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}
.ticker-icon img { width: 100%; height: 100%; object-fit: contain; }
.ticker-icon .initials {
  display: none;
  width: 100%; height: 100%;
  align-items: center; justify-content: center;
  font-family: 'Geist', sans-serif;
  font-size: 11px; font-weight: 600;
  color: var(--ink-2);
  background: var(--bg-soft);
  position: absolute; top: 0; left: 0;
}

/* ═══════════════════════════════════════
   Up / Down
   ═══════════════════════════════════════ */
.txt-up   { color: var(--up); }
.txt-down { color: var(--down); }
.bg-up    { background: var(--up-soft); color: var(--up); padding: 3px 7px; border-radius: 5px; font-weight: 600; }
.bg-down  { background: var(--down-soft); color: var(--down); padding: 3px 7px; border-radius: 5px; font-weight: 600; }

/* ═══════════════════════════════════════
   Empty / Loading
   ═══════════════════════════════════════ */
.empty {
  padding: 32px 16px;
  text-align: center;
  color: var(--ink-3);
  font-size: 13px;
  display: flex; flex-direction: column; gap: 10px; align-items: center;
}
.empty svg { color: var(--ink-4); }
.loading { padding: 32px; text-align: center; color: var(--ink-3); }

/* ═══════════════════════════════════════
   Sidebar — account card (4번 이미지 톤)
   ═══════════════════════════════════════ */
.account-card {
  background: var(--bg-card);
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  padding: 22px 24px;
  margin-bottom: 16px;
}
.account-card .head-row {
  display: flex; align-items: center; gap: 10px; margin-bottom: 18px;
}
.account-card .head-row .icon-circle {
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--accent-grad);
  display: flex; align-items: center; justify-content: center;
  color: white;
}
.account-card .head-row .name { font-size: 14px; font-weight: 600; letter-spacing: -0.2px; }
.account-card .head-row .tier-chip {
  font-family: 'Geist Mono', monospace;
  font-size: 10px; padding: 2px 6px;
  background: var(--bg-soft); border-radius: 4px;
  color: var(--ink-3); margin-left: 4px;
}
.account-card .cash-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  padding: 12px 14px; background: var(--bg-soft);
  border-radius: var(--r); margin-bottom: 22px;
}
.account-card .cash-grid .lbl { font-size: 11px; color: var(--ink-3); margin-bottom: 2px; font-family: 'Geist', sans-serif; font-weight: 500; }
.account-card .cash-grid .val { font-size: 14px; font-weight: 600; font-family: 'Geist', sans-serif; font-variant-numeric: tabular-nums; }

.account-card .invest-lbl {
  font-size: 12px; color: var(--ink-3); margin-bottom: 4px;
  font-family: 'Geist', sans-serif; font-weight: 500;
  letter-spacing: 0.3px; text-transform: uppercase;
}
.account-card .invest-amt {
  font-family: 'Geist', sans-serif;
  font-size: 25px; font-weight: 700; letter-spacing: -1.2px;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.account-card .invest-pnl {
  font-family: 'Geist', sans-serif;
  font-size: 13px; font-weight: 600;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}
.account-card .invest-pnl.up   { color: var(--up); }
.account-card .invest-pnl.down { color: var(--down); }

.account-card .divider {
  border-top: 1px solid var(--line);
  margin: 22px 0 16px;
}

/* Position row */
.position-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line-2);
}
.position-item:last-child { border-bottom: none; }
.position-item .info { flex: 1; min-width: 0; }
.position-item .info .name { font-size: 14px; font-weight: 600; letter-spacing: -0.1px; }
.position-item .info .sub  {
  font-size: 11px; color: var(--ink-3); margin-top: 2px;
  font-family: 'Geist', sans-serif;
}
.position-item .value      { text-align: right; flex-shrink: 0; }
.position-item .value .amt {
  font-family: 'Geist', sans-serif;
  font-weight: 600; font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.position-item .value .dlt {
  font-family: 'Geist', sans-serif;
  font-size: 12px; font-weight: 500;
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}
.position-item .value .dlt.up   { color: var(--up); }
.position-item .value .dlt.down { color: var(--down); }

/* ═══════════════════════════════════════
   Status pill
   ═══════════════════════════════════════ */
.status-pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; color: var(--ink-3);
  font-family: 'Geist', sans-serif;
}
.status-pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-5); }
.status-pill.green .dot { background: #22c55e; }

/* Section header */
.section-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px;
}
.section-header h2 { font-size: 18px; font-weight: 600; letter-spacing: -0.3px; margin: 0; }
.section-header .meta { color: var(--ink-3); font-size: 12px; font-family: 'Geist', sans-serif; }

/* ═══════════════════════════════════════
   Form
   ═══════════════════════════════════════ */
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block; font-size: 12px; color: var(--ink-3);
  margin-bottom: 6px; font-weight: 500;
  font-family: 'Geist', sans-serif;
  letter-spacing: 0.3px; text-transform: uppercase;
}
.form-group input,
.form-group select {
  width: 100%; padding: 14px 16px;
  border: 1px solid var(--line); border-radius: var(--r);
  font-size: 15px; background: var(--bg-card);
  font-family: 'Geist', 'Pretendard Variable', sans-serif;
  font-variant-numeric: tabular-nums;
  transition: border-color 0.15s;
}
.form-group input:focus,
.form-group select:focus { outline: none; border-color: var(--ink); }

/* Risk pills */
.risk-pills { display: flex; gap: 8px; }
.risk-pill {
  flex: 1; padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  text-align: center; cursor: pointer;
  font-weight: 500; transition: all 0.15s;
}
.risk-pill.active {
  border-color: var(--ink); background: var(--ink); color: white;
}
.risk-pill .desc {
  font-size: 11px; color: var(--ink-3); margin-top: 4px;
  font-weight: 400;
  font-family: 'Geist', sans-serif;
}
.risk-pill.active .desc { color: rgba(255,255,255,0.7); }

/* Progress bar */
.progress-bar { width: 100%; height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--accent-grad); transition: width 0.5s; }

/* ═══════════════════════════════════════
   Lucide icon helper
   ═══════════════════════════════════════ */
.icon { width: 16px; height: 16px; flex-shrink: 0; stroke: currentColor; }
.icon-sm { width: 12px; height: 12px; }
.icon-lg { width: 20px; height: 20px; }
.icon-xl { width: 24px; height: 24px; }

/* Reason highlight */
.reason-item {
  display: flex; gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-2);
}
.reason-item:last-child { border-bottom: none; }
.reason-item .reason-ic {
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--bg-soft);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-2); flex-shrink: 0;
}
.reason-item .reason-text {
  flex: 1; font-size: 13.5px; line-height: 1.5; color: var(--ink);
}
.reason-item .reason-sub {
  font-size: 11.5px; color: var(--ink-3); margin-top: 4px;
  font-family: 'Geist', sans-serif;
}

/* Toggle/expand button */
.btn-mini {
  font-size: 11px; font-weight: 500;
  color: var(--ink-2);
  padding: 6px 12px;
  background: var(--bg-soft);
  border-radius: 100px;
  display: inline-flex; align-items: center; gap: 4px;
  transition: all 0.12s;
  font-family: 'Geist', sans-serif;
}
.btn-mini:hover { background: var(--line); color: var(--ink); }

/* ═══════════════════════════════════════
   KG insight panel (1번 이미지 톤)
   ═══════════════════════════════════════ */
.kg-insight {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 0;
  background: var(--bg-dark);
  color: white;
  border-radius: var(--r-xl);
  overflow: hidden;
  min-height: 540px;
  position: relative;
}
.kg-insight-panel {
  background: rgba(255,255,255,0.04);
  border-right: 1px solid rgba(255,255,255,0.08);
  padding: 24px;
  display: flex; flex-direction: column; gap: 16px;
}
.kg-insight-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--r);
  padding: 14px 16px;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255,255,255,0.85);
}
.kg-insight-card .title {
  font-size: 11px; color: rgba(255,255,255,0.5);
  font-weight: 500; margin-bottom: 8px;
  letter-spacing: 0.5px; text-transform: uppercase;
  font-family: 'Geist', sans-serif;
}
.kg-insight-card strong { color: white; font-weight: 600; }
.kg-insight-card a {
  color: #93c5fd; text-decoration: underline;
  text-underline-offset: 2px;
}
.kg-insight-card .keyword {
  display: inline-block;
  padding: 1px 6px; border-radius: 4px;
  font-size: 11.5px; font-weight: 500;
  color: white;
}
.kg-insight-card .keyword.amber { background: #f59e0b; color: #18181b; }
.kg-insight-card .keyword.pink  { background: #ec4899; }
.kg-insight-card .keyword.blue  { background: #3b82f6; }
.kg-insight-card .keyword.green { background: #22c55e; color: #18181b; }
.kg-graph { position: relative; min-height: 540px; }
.kg-graph #cy { width: 100%; height: 100%; }

/* Loading shimmer */
@keyframes shimmer {
  0%   { background-position: -200px 0; }
  100% { background-position: 200px 0; }
}
.shimmer {
  background: linear-gradient(90deg, var(--line-2) 0%, var(--bg-soft) 50%, var(--line-2) 100%);
  background-size: 400px 100%;
  animation: shimmer 1.4s infinite linear;
}

/* ═══════ 공용 푸터 (renderFooter) ═══════ */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg-soft, #fafafa);
  margin-top: 48px;
  padding: 40px 32px 48px;
}
.site-footer .foot-inner {
  max-width: 1480px; margin: 0 auto;
  display: flex; flex-wrap: wrap; gap: 28px 64px;
  justify-content: space-between; align-items: flex-start;
}
.site-footer .foot-brand { max-width: 380px; }
.site-footer .foot-brand .logo {
  font-weight: 800; font-size: 16px; letter-spacing: -0.035em;
  display: flex; align-items: center; gap: 11px; margin-bottom: 12px;
}
.site-footer .foot-brand .logo .fmark {
  width: 34px; height: 34px; border-radius: 10px;
  background: #0c0e12;
  display: grid; place-items: center; color: #fff;
}
.site-footer .foot-brand .logo .fmark svg { width: 23px; height: 20px; display: block; }
.site-footer .foot-brand p {
  font-size: 12.5px; color: var(--ink-3); line-height: 1.75; margin: 0;
}
.site-footer .foot-col h4 {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--ink-3); font-weight: 600; margin: 0 0 12px;
  font-family: 'Geist', sans-serif;
}
.site-footer .foot-col a {
  display: block; font-size: 13px; color: var(--ink-2);
  text-decoration: none; padding: 5px 0;
}
.site-footer .foot-col a:hover { color: var(--accent, #5b6df0); }
.site-footer .foot-bottom {
  max-width: 1480px; margin: 30px auto 0; padding-top: 22px;
  border-top: 1px solid var(--line); display: flex; flex-wrap: wrap;
  justify-content: space-between; gap: 12px;
  font-size: 11.5px; color: var(--ink-4, #a1a1aa);
}
.site-footer .foot-bottom .disclaimer { max-width: 760px; line-height: 1.65; }

/* ═══════ 그래프 뷰 전환 탭 (지식그래프 ↔ 영향력 분석) ═══════ */
.graph-viewtabs {
  display: flex; gap: 4px; padding: 12px 32px 0;
  max-width: 1480px; margin: 0 auto;
}
.graph-viewtabs .gv-tab {
  font-size: 13px; font-weight: 600; color: var(--ink-3);
  padding: 8px 16px; border-radius: 100px; text-decoration: none;
  transition: all 0.15s;
  border: none; background: transparent; cursor: pointer;
  font-family: inherit; line-height: 1.2;
}
.graph-viewtabs .gv-tab:hover { background: var(--bg-soft); color: var(--ink); }
.graph-viewtabs .gv-tab.active { background: var(--ink); color: #fff; }
/* analysis(다크) 위에서는 톤 반전 */
body[data-theme="dark"] .graph-viewtabs .gv-tab { color: #94a3b8; }
body[data-theme="dark"] .graph-viewtabs .gv-tab:hover { background: #1a1a2e; color: #fff; }
body[data-theme="dark"] .graph-viewtabs .gv-tab.active { background: #5b6df0; color: #fff; }

/* ─── 테스트(데모) 안내 배너 — 전 페이지 상단(renderTopbar) ─── */
.test-banner {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 18px;
  background: #fff7ed;                 /* amber-50 */
  border-bottom: 1px solid #fed7aa;    /* amber-200 */
  color: #9a3412;                      /* amber-800 */
  font-size: 12.5px; line-height: 1.45;
  font-family: 'Pretendard Variable', -apple-system, sans-serif;
}
.test-banner b { font-weight: 700; }
.test-banner .tb-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #f59e0b; flex: none;
  box-shadow: 0 0 0 3px rgba(245,158,11,0.20);
}
body[data-theme="dark"] .test-banner {
  background: #2a1c0c; border-bottom-color: #5a3a14; color: #fbbf24;
}
