/* Pulse — dashboard styles. Dark-first, glass surfaces, validated chart palette. */
:root {
  color-scheme: dark;
  --bg: #0b0f1a;
  --bg-2: #0f1524;
  --surface-1: #121a2b;
  --surface-2: #182236;
  --glass: rgba(18, 26, 43, 0.72);
  --border: rgba(148, 163, 184, 0.14);
  --border-strong: rgba(148, 163, 184, 0.28);
  --text: #e6e9f2;
  --text-2: #b6bfd1;
  --muted: #7c879c;
  --accent: #8b5cf6;
  --accent-2: #22d3ee;
  --accent-grad: linear-gradient(120deg, #a78bfa 0%, #8b5cf6 40%, #22d3ee 100%);
  --good: #0ca30c; --warn: #fab219; --bad: #d03b3b;
  /* categorical (validated dark set) */
  --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --s5: #d55181; --s6: #9085e9;
  /* sequential violet ramp (low → high) */
  --seq1: #3b2a6e; --seq2: #4c3592; --seq3: #5d3fb6; --seq4: #7250d8; --seq5: #8b6cf0; --seq6: #a99bff;
  --map-empty: #1a2236; --heat-empty: #141c2e;
  --radius: 18px; --radius-sm: 12px;
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Sora', 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f6fb; --bg-2: #eef1f8; --surface-1: #ffffff; --surface-2: #f7f8fc;
  --glass: rgba(255, 255, 255, 0.78);
  --border: rgba(15, 23, 42, 0.08); --border-strong: rgba(15, 23, 42, 0.18);
  --text: #0f172a; --text-2: #334155; --muted: #64748b;
  --accent: #7c3aed; --accent-2: #0891b2;
  --accent-grad: linear-gradient(120deg, #7c3aed 0%, #6d28d9 40%, #0891b2 100%);
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100; --s5: #e87ba4; --s6: #4a3aa7;
  --seq1: #e9e3ff; --seq2: #cfc2ff; --seq3: #b19dff; --seq4: #8f74f5; --seq5: #6f4fe0; --seq6: #4c2fbf;
  --map-empty: #e3e7f0; --heat-empty: #eef0f6;
  --shadow: 0 10px 40px rgba(15, 23, 42, 0.08);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: var(--font); background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.45; min-height: 100vh; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
input, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* background orbs */
.bg-orbs { position: fixed; inset: 0; overflow: hidden; z-index: -1; pointer-events: none; }
.bg-orbs i { position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.28; animation: drift 28s ease-in-out infinite alternate; }
.bg-orbs i:nth-child(1) { width: 60vw; height: 60vw; left: -20vw; top: -25vw; background: #6d28d9; }
.bg-orbs i:nth-child(2) { width: 45vw; height: 45vw; right: -15vw; top: 10vh; background: #0e7490; animation-delay: -9s; }
.bg-orbs i:nth-child(3) { width: 40vw; height: 40vw; left: 30vw; bottom: -25vw; background: #be185d; animation-delay: -18s; opacity: 0.14; }
:root[data-theme="light"] .bg-orbs i { opacity: 0.14; }
@keyframes drift { from { transform: translate(0, 0) scale(1); } to { transform: translate(6vw, 4vh) scale(1.12); } }
@media (prefers-reduced-motion: reduce) { .bg-orbs i, .blip-ring, .pin-ring, .live-dot::after, .feed-item { animation: none !important; } }

.glass { background: var(--glass); backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%); border: 1px solid var(--border); }

/* ---------- login ---------- */
.login { position: fixed; inset: 0; display: grid; place-items: center; padding: 20px; }
.login-card { width: 100%; max-width: 380px; padding: 36px 32px; border-radius: 24px; text-align: center; box-shadow: var(--shadow); }
.login-mark { width: 64px; height: 64px; }
.login h1 { font-family: var(--display); font-weight: 800; font-size: 40px; letter-spacing: -1.5px; margin: 8px 0 0; background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.login p { margin: 2px 0 24px; }
.field { display: block; text-align: left; margin-bottom: 14px; }
.field span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; font-weight: 500; }
.field input, .input { width: 100%; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text); outline: none; }
.field input:focus, .input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.25); }
.err { color: #f87171; margin-top: 12px; font-size: 13px; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 12px; border: 1px solid var(--border-strong); background: var(--surface-2); font-weight: 600; transition: transform .15s, box-shadow .15s, background .15s; }
.btn:hover { transform: translateY(-1px); background: var(--surface-1); }
.btn.primary { width: 100%; justify-content: center; background: var(--accent-grad); border: none; color: #fff; box-shadow: 0 8px 24px rgba(139, 92, 246, 0.35); }
.btn.small { padding: 6px 12px; font-size: 12px; width: auto; }
.btn.danger { color: #f87171; }
.icon-btn { width: 36px; height: 36px; display: inline-grid; place-items: center; border-radius: 10px; border: 1px solid var(--border); background: transparent; color: var(--text-2); transition: background .15s, color .15s; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface-2); font-weight: 600; font-size: 13px; white-space: nowrap; transition: border-color .15s; }
.pill:hover { border-color: var(--border-strong); }
.pill .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent-grad); }

/* ---------- header ---------- */
.app { min-height: 100vh; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 14px; padding: 10px 20px; border-left: none; border-right: none; border-top: none; }
.brand { display: flex; align-items: center; gap: 9px; margin-right: 6px; }
.brand img { width: 30px; height: 30px; }
.brand-word { font-family: var(--display); font-weight: 800; font-size: 22px; letter-spacing: -1px; background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.site-pick, .range-pick { position: relative; }
.menu { position: absolute; top: calc(100% + 8px); left: 0; min-width: 240px; padding: 6px; border-radius: 14px; background: var(--surface-1); border: 1px solid var(--border-strong); box-shadow: var(--shadow); z-index: 50; display: flex; flex-direction: column; max-height: 70vh; overflow: auto; }
.range-pick .menu { left: auto; right: 0; }
.menu button, .menu a { text-align: left; padding: 9px 12px; border-radius: 9px; border: none; background: transparent; display: flex; align-items: center; gap: 10px; font-weight: 500; }
.menu button:hover, .menu a:hover { background: var(--surface-2); }
.menu button.active { color: var(--accent-2); }
.menu .dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.menu-custom { display: grid; grid-template-columns: 1fr 1fr auto; gap: 6px; padding: 8px 10px 6px; border-top: 1px solid var(--border); margin-top: 4px; align-items: end; }
.menu-custom label { font-size: 11px; color: var(--muted); display: flex; flex-direction: column; gap: 3px; }
.menu-custom input { padding: 5px 7px; border-radius: 8px; border: 1px solid var(--border-strong); background: var(--surface-2); font-size: 12px; }
.tabs { display: flex; gap: 2px; margin-left: 4px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { padding: 8px 12px; border-radius: 10px; color: var(--text-2); font-weight: 600; font-size: 13px; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; transition: background .15s, color .15s; }
.tabs a:hover { background: var(--surface-2); color: var(--text); }
.tabs a.active { background: var(--surface-2); color: var(--text); box-shadow: inset 0 -2px 0 var(--accent); }
.live-count { font-family: var(--mono); font-size: 11px; padding: 1px 7px; border-radius: 999px; background: rgba(34, 197, 94, 0.16); color: #4ade80; font-weight: 600; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }

/* ---------- filter chips ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 12px 20px 0; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px 5px 10px; border-radius: 999px; background: rgba(139, 92, 246, 0.14); border: 1px solid rgba(139, 92, 246, 0.35); font-size: 12px; font-weight: 600; }
.chip .k { color: var(--muted); font-weight: 500; }
.chip button { border: none; background: transparent; padding: 0 2px; color: var(--muted); line-height: 1; }
.chip button:hover { color: var(--text); }
.chip-clear { font-size: 12px; color: var(--muted); border: none; background: none; padding: 4px 8px; }
.chip-clear:hover { color: var(--text); }

/* ---------- layout ---------- */
.main { padding: 18px 20px 40px; max-width: 1480px; width: 100%; margin: 0 auto; flex: 1; }
.grid { display: grid; gap: 16px; }
.grid.kpis { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.map-row { grid-template-columns: 1.6fr 1fr; }
.grid + .grid, .card + .grid, .grid + .card { margin-top: 16px; }
@media (max-width: 1200px) { .grid.kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } .grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 820px) { .grid.two, .grid.three, .grid.map-row { grid-template-columns: 1fr; } .grid.kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .tabs { order: 10; width: 100%; } .top { flex-wrap: wrap; } .main { padding: 14px 12px 40px; } }

.card { background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); position: relative; overflow: hidden; transition: transform .2s, border-color .2s; }
.card:hover { border-color: var(--border-strong); }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.card-head h3 { margin: 0; font-family: var(--display); font-size: 15px; font-weight: 600; letter-spacing: -0.2px; }
.card-head .sub { color: var(--muted); font-size: 12px; }
.card-head .spacer { flex: 1; }
.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); }
.seg button { padding: 4px 10px; border-radius: 8px; border: none; background: transparent; font-size: 12px; font-weight: 600; color: var(--muted); }
.seg button.active { background: var(--surface-1); color: var(--text); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25); }
.link-btn { border: none; background: none; color: var(--accent-2); font-weight: 600; font-size: 12px; padding: 0; }
.link-btn:hover { text-decoration: underline; }

/* ---------- KPI tiles ---------- */
.kpi { padding: 16px 18px 12px; cursor: pointer; }
.kpi.active { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), var(--shadow); }
.kpi .label { font-size: 12px; color: var(--muted); font-weight: 500; display: flex; align-items: center; gap: 6px; }
.kpi .value { font-family: var(--display); font-size: 28px; font-weight: 700; letter-spacing: -1px; margin: 4px 0 2px; font-variant-numeric: tabular-nums; }
.kpi .delta { font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; gap: 3px; padding: 1px 7px; border-radius: 999px; }
.delta.up { color: #4ade80; background: rgba(34, 197, 94, 0.12); }
.delta.down { color: #f87171; background: rgba(239, 68, 68, 0.12); }
.delta.flat { color: var(--muted); background: var(--surface-2); }
.delta.inverse.up { color: #f87171; background: rgba(239, 68, 68, 0.12); }
.delta.inverse.down { color: #4ade80; background: rgba(34, 197, 94, 0.12); }
.kpi .spark { position: absolute; right: 10px; bottom: 8px; width: 90px; height: 30px; opacity: 0.9; }

/* ---------- charts ---------- */
.chart { display: block; overflow: visible; }
.chart .grid { stroke: var(--border); stroke-dasharray: 3 4; }
.chart .axis { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.chart .axis.strong { fill: var(--text-2); font-weight: 600; }
.chart .crosshair { stroke: var(--border-strong); stroke-width: 1; }
.chart-empty { fill: var(--muted); font-size: 13px; }
.hist-bar:hover, .heat-cell:hover { filter: brightness(1.25); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--text-2); }
.legend-item { display: inline-flex; align-items: center; gap: 6px; }
.legend-item b { color: var(--text); font-variant-numeric: tabular-nums; }
.legend i, .tip i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }
.legend-item.clickable { cursor: pointer; } .legend-item.clickable:hover span { text-decoration: underline; }
.chart-legend { display: flex; gap: 14px; font-size: 12px; color: var(--text-2); }
.chart-legend i { width: 14px; height: 3px; border-radius: 2px; display: inline-block; margin-right: 6px; vertical-align: middle; }
.donut-wrap { display: flex; gap: 18px; align-items: center; }
.donut { width: 132px; height: 132px; flex: none; }
.donut-seg { transition: stroke-width .15s; } .donut-seg:hover { stroke-width: 18; }
.donut-center { fill: var(--text); font-family: var(--display); font-weight: 700; font-size: 20px; }
.donut-sub { fill: var(--muted); font-size: 10px; }
.donut-wrap .legend { flex-direction: column; gap: 8px; }

/* bar list */
.bar-row { display: flex; align-items: center; gap: 12px; padding: 4px 0; }
.bar-row.clickable { cursor: pointer; }
.bar-row.clickable:hover .bar-fill { filter: brightness(1.2); }
.bar-row.clickable:hover .bar-text { text-decoration: underline; text-decoration-color: var(--accent-2); }
.bar-track { position: relative; flex: 1; height: 30px; border-radius: 8px; overflow: hidden; }
.bar-fill { position: absolute; inset: 0 auto 0 0; opacity: 0.22; border-radius: 8px; transition: width .5s cubic-bezier(.2,.8,.2,1); }
.bar-label { position: absolute; inset: 0; display: flex; align-items: center; gap: 8px; padding: 0 10px; font-weight: 500; overflow: hidden; }
.bar-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-sub { color: var(--muted); font-size: 11px; white-space: nowrap; }
.bar-icon { font-size: 15px; line-height: 1; flex: none; }
.bar-vals { display: flex; align-items: baseline; gap: 10px; font-variant-numeric: tabular-nums; flex: none; }
.bar-value { font-weight: 600; min-width: 34px; text-align: right; }
.bar-share { color: var(--muted); font-size: 11px; min-width: 32px; text-align: right; }
.bar-extra { color: var(--muted); font-size: 11px; }
.empty { color: var(--muted); text-align: center; padding: 26px 10px; font-size: 13px; }

/* tooltip */
.tip { position: fixed; left: 0; top: 0; z-index: 100; pointer-events: none; background: var(--surface-1); border: 1px solid var(--border-strong); border-radius: 10px; padding: 8px 11px; font-size: 12px; box-shadow: var(--shadow); max-width: 280px; }
.tip b { color: var(--text); } .tip div { display: flex; align-items: center; gap: 6px; color: var(--text-2); margin-top: 3px; } .tip i { margin-right: 2px; }

/* world map */
.map-wrap { position: relative; }
.world { width: 100%; height: auto; display: block; }
.country { stroke: var(--bg); stroke-width: 0.5; transition: filter .15s; }
.country.has-data:hover { filter: brightness(1.35); }
.blip-core, .pin-core { fill: var(--accent-2); }
.blip-ring, .pin-ring { fill: none; stroke: var(--accent-2); stroke-width: 2; animation: ring 1.8s ease-out infinite; }
.pin-core { fill: #4ade80; } .pin-ring { stroke: #4ade80; }
@keyframes ring { 0% { r: 4; opacity: 0.9; } 100% { r: 22; opacity: 0; } }

/* ---------- live ---------- */
.live-hero { display: grid; grid-template-columns: 300px 1fr; gap: 16px; }
.live-big { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 26px 20px; }
.live-num { font-family: var(--display); font-size: 72px; font-weight: 800; letter-spacing: -3px; line-height: 1; background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.live-dot { position: relative; width: 12px; height: 12px; border-radius: 50%; background: #4ade80; display: inline-block; margin-right: 8px; }
.live-dot::after { content: ''; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid #4ade80; animation: ring2 1.6s ease-out infinite; }
@keyframes ring2 { 0% { transform: scale(0.6); opacity: 1; } 100% { transform: scale(1.8); opacity: 0; } }
.feed { display: flex; flex-direction: column; gap: 6px; max-height: 560px; overflow: auto; padding-right: 4px; }
.feed-item { display: grid; grid-template-columns: 58px 26px 1fr auto; gap: 10px; align-items: center; padding: 9px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); animation: slide-in .35s cubic-bezier(.2,.8,.2,1); cursor: pointer; }
.feed-item:hover { border-color: var(--border-strong); }
.feed-item.new { box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.45); }
.feed-time { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.feed-flag { font-size: 18px; line-height: 1; text-align: center; }
.feed-main { min-width: 0; }
.feed-main .path { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed-main .meta { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed-site { font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 999px; background: var(--surface-1); border: 1px solid var(--border); white-space: nowrap; }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 999px; background: var(--surface-1); border: 1px solid var(--border); color: var(--text-2); }
.tag.ev { background: rgba(217, 89, 38, 0.15); color: #f59e6b; border-color: rgba(217, 89, 38, 0.35); }
.tag.new { background: rgba(34, 211, 238, 0.14); color: #67e8f9; border-color: rgba(34, 211, 238, 0.35); }
@keyframes slide-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: 0.6px; color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.tbl th.sortable { cursor: pointer; } .tbl th.sortable:hover { color: var(--text); } .tbl th.sorted { color: var(--accent-2); }
.tbl td { padding: 10px; border-bottom: 1px solid var(--border); vertical-align: middle; white-space: nowrap; }
.tbl tr.row { cursor: pointer; transition: background .12s; } .tbl tr.row:hover { background: var(--surface-2); }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl .primary { font-weight: 600; }
.tbl .sub { color: var(--muted); font-size: 12px; }
.flag { font-size: 17px; margin-right: 6px; vertical-align: -1px; }
.ip { font-family: var(--mono); font-size: 12px; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar .input { width: 280px; padding: 8px 12px; }
.pager { display: flex; gap: 8px; align-items: center; justify-content: flex-end; margin-top: 12px; color: var(--muted); font-size: 12px; }

/* ---------- drawer / modal ---------- */
.drawer, .modal { position: fixed; inset: 0; z-index: 60; }
.drawer-backdrop, .modal-backdrop { position: absolute; inset: 0; background: rgba(5, 8, 16, 0.55); backdrop-filter: blur(3px); }
.drawer-panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(640px, 100%); padding: 26px 26px 40px; overflow: auto; border-radius: 24px 0 0 24px; animation: drawer-in .3s cubic-bezier(.2,.8,.2,1); }
@keyframes drawer-in { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.drawer-close, .modal-close { position: absolute; top: 14px; right: 14px; }
.modal-card { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(760px, calc(100% - 24px)); max-height: calc(100vh - 40px); overflow: auto; border-radius: 24px; padding: 26px 28px; }
.profile { display: flex; gap: 16px; align-items: center; margin-bottom: 18px; }
.avatar { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; font-size: 28px; background: var(--surface-2); border: 1px solid var(--border); flex: none; }
.profile h2 { margin: 0; font-family: var(--display); font-size: 20px; letter-spacing: -0.4px; }
.profile .sub { color: var(--muted); font-size: 13px; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 14px 0 18px; }
.fact { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; }
.fact .k { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; }
.fact .v { font-weight: 600; margin-top: 2px; word-break: break-word; }
.fact .v.mono { font-size: 12px; }
h4.section { font-family: var(--display); font-size: 13px; margin: 18px 0 8px; color: var(--text-2); text-transform: uppercase; letter-spacing: 0.8px; }
.timeline { border-left: 2px solid var(--border-strong); margin-left: 8px; padding-left: 16px; display: flex; flex-direction: column; gap: 10px; }
.tl-session { position: relative; }
.tl-session::before { content: ''; position: absolute; left: -22px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent-2); box-shadow: 0 0 0 3px var(--bg); }
.tl-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-weight: 600; }
.tl-head .when { color: var(--muted); font-weight: 500; font-size: 12px; }
.tl-events { margin: 6px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 3px; }
.tl-events li { display: grid; grid-template-columns: 52px 1fr auto; gap: 10px; font-size: 12px; padding: 5px 8px; border-radius: 8px; background: var(--surface-2); }
.tl-events li .t { font-family: var(--mono); color: var(--muted); }
.tl-events li .d { color: var(--muted); font-variant-numeric: tabular-nums; }
.tl-events li.ev { background: rgba(217, 89, 38, 0.1); }
pre.snippet { background: var(--bg-2); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; font-family: var(--mono); font-size: 12px; overflow: auto; margin: 6px 0 0; white-space: pre-wrap; word-break: break-all; }
.site-card { display: flex; flex-direction: column; gap: 10px; }
.site-card .name { font-family: var(--display); font-weight: 600; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.site-card .name .dot { width: 10px; height: 10px; border-radius: 50%; }
.site-stats { display: flex; gap: 18px; }
.site-stats div { display: flex; flex-direction: column; } .site-stats b { font-family: var(--display); font-size: 20px; } .site-stats span { font-size: 11px; color: var(--muted); }
.site-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.form-row { display: grid; grid-template-columns: 1fr 1fr 1.4fr auto; gap: 8px; align-items: end; }
.form-row label { font-size: 11px; color: var(--muted); display: flex; flex-direction: column; gap: 4px; }
.iplist { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--surface-1); border: 1px solid var(--border-strong); padding: 10px 16px; border-radius: 12px; box-shadow: var(--shadow); z-index: 90; font-weight: 500; }
.foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 20px 24px; font-size: 12px; color: var(--muted); }
.foot img { vertical-align: -2px; margin-right: 4px; }
.foot a { color: var(--text-2); }
.skeleton { height: 120px; border-radius: 12px; background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-1) 50%, var(--surface-2) 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.tabs-inline { display: flex; gap: 4px; flex-wrap: wrap; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; font-size: 13px; } .kv span:nth-child(odd) { color: var(--muted); }

/* country code badge */
.cc { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 18px; padding: 0 5px; border-radius: 6px; font-family: var(--mono); font-size: 10px; font-weight: 600; letter-spacing: 0.4px; color: hsl(var(--h, 260) 90% 85%); background: hsl(var(--h, 260) 60% 30% / 0.55); border: 1px solid hsl(var(--h, 260) 70% 55% / 0.5); vertical-align: middle; line-height: 1; }
:root[data-theme="light"] .cc { color: hsl(var(--h, 260) 70% 28%); background: hsl(var(--h, 260) 80% 92%); border-color: hsl(var(--h, 260) 60% 70%); }
.cc-unknown, .cc-local { color: var(--muted); background: var(--surface-2); border-color: var(--border-strong); }
.avatar .cc { min-width: 40px; height: 26px; font-size: 14px; border-radius: 9px; }
.feed-flag .cc { min-width: 30px; }
