:root {
  --bg: #fafafa;
  --bg-soft: #f1f5f9;
  --card: #ffffff;
  --card-hover: #ffffff;
  --ink: #0f172a;
  --text: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --line-soft: #f1f5f9;
  --brand: #0d9488;
  --brand-strong: #0f766e;
  --brand-2: #0284c7;
  --brand-soft: #e6f6f4;
  --brand-border: #99e0d6;
  --brand-grad: linear-gradient(135deg, #14b8a6 0%, #06b6d4 50%, #0ea5e9 100%);
  --warn: #d97706;
  --warn-soft: #fff7ed;
  --warn-border: #fed7aa;
  --danger: #dc2626;
  --danger-soft: #fef2f2;
  --danger-border: #fecaca;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.04);
  --shadow-hover: 0 4px 12px rgba(15, 23, 42, 0.07), 0 16px 32px rgba(15, 23, 42, 0.08);
  --grid-line: rgba(13, 148, 136, 0.055);
  --header-glass: rgba(255, 255, 255, 0.86);
  --radius-lg: 24px;
  --radius-md: 14px;
  --radius-pill: 9999px;
  --font-sans: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

[data-theme="dark"] {
  --bg: #0b1416;
  --bg-soft: #152326;
  --card: #111c1f;
  --card-hover: #152428;
  --ink: #e6f4f1;
  --text: #cbd5d4;
  --muted: #8aa0a0;
  --line: #1f2e31;
  --line-soft: #182629;
  --brand: #2dd4bf;
  --brand-strong: #14b8a6;
  --brand-2: #38bdf8;
  --brand-soft: rgba(45, 212, 191, 0.12);
  --brand-border: rgba(45, 212, 191, 0.35);
  --warn: #fbbf24;
  --warn-soft: rgba(251, 191, 36, 0.14);
  --warn-border: rgba(251, 191, 36, 0.32);
  --danger: #f87171;
  --danger-soft: rgba(248, 113, 113, 0.14);
  --danger-border: rgba(248, 113, 113, 0.32);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35), 0 8px 24px rgba(0, 0, 0, 0.28);
  --shadow-hover: 0 6px 16px rgba(0, 0, 0, 0.45), 0 16px 36px rgba(0, 0, 0, 0.45);
  --grid-line: rgba(45, 212, 191, 0.045);
  --header-glass: rgba(11, 20, 22, 0.86);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font-sans); background: var(--bg); color: var(--text);
  line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
.tabular { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }

/* Shared Helpers */
.card-title { font-size: 16px; font-weight: 700; color: var(--ink); margin: 0; }
.meta { font-size: 12px; color: var(--muted); }
.price { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-weight: 700; color: var(--ink); }
.link-brand { color: var(--brand-strong); font-weight: 600; font-size: 13px; }
[data-theme="dark"] .link-brand { color: var(--brand); }
.link-brand:hover { text-decoration: underline; }
.stack-8 { display: flex; flex-direction: column; gap: 8px; }
.stack-12 { display: flex; flex-direction: column; gap: 12px; }
.kv-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; font-size: 12.5px; }
.kv-label { color: var(--muted); font-size: 12px; }
.kv-val { font-weight: 600; color: var(--ink); }
.title-icon {
  width: 32px; height: 32px; border-radius: 10px;
  background: var(--brand-soft); color: var(--brand-strong);
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
[data-theme="dark"] .title-icon { color: var(--brand); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: var(--card); border-bottom: 1px solid transparent;
  transition: background 0.2s, border-color 0.2s, backdrop-filter 0.2s;
}
.site-header.scrolled {
  background: var(--header-glass); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom-color: var(--line);
}
.header-inner {
  max-width: 1280px; margin: 0 auto; padding: 0 24px;
  height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 14px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; color: var(--ink); font-size: 16px; flex-shrink: 0; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--brand-soft); border: 1px solid var(--brand-border);
  display: inline-flex; align-items: center; justify-content: center; overflow: hidden; padding: 3px;
}
.brand-mark img { width: 100%; height: 100%; object-fit: contain; display: block; }
.brand-name { font-weight: 700; letter-spacing: -0.01em; color: var(--ink); }
.brand-gradient-text {
  background: var(--brand-grad); -webkit-background-clip: text; background-clip: text;
  color: transparent; font-weight: 800; margin-right: 2px;
}
.nav-links { display: flex; align-items: center; gap: 3px; overflow-x: auto; scrollbar-width: none; }
.nav-links::-webkit-scrollbar { display: none; }
.nav-link {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 11px; border-radius: var(--radius-pill);
  font-size: 13.5px; font-weight: 500; color: var(--text); white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.nav-link:hover { background: var(--bg-soft); color: var(--ink); }
.nav-link.active { background: var(--brand-soft); color: var(--brand-strong); font-weight: 600; }
[data-theme="dark"] .nav-link.active { color: var(--brand); }
.nav-badge-danger {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: var(--radius-pill);
  background: var(--danger-soft); color: var(--danger); border: 1px solid var(--danger-border); line-height: 1.3;
}
.nav-badge-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--danger); }
.header-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.header-search-btn {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px;
  border-radius: var(--radius-pill); border: 1px solid var(--line); background: var(--bg);
  color: var(--muted); font-size: 12.5px; transition: border-color 0.15s, color 0.15s;
}
.header-search-btn:hover { border-color: var(--brand-border); color: var(--ink); }
.kbd-hint {
  font-family: var(--font-mono); font-size: 11px; padding: 1px 5px; border-radius: 5px;
  border: 1px solid var(--line); background: var(--card); color: var(--muted);
}
.mock-pill {
  font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: var(--radius-pill);
  background: var(--warn-soft); color: var(--warn); border: 1px solid var(--warn-border);
}
.icon-btn {
  width: 36px; height: 36px; border-radius: var(--radius-pill);
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center;
  transition: background 0.15s, border-color 0.15s;
}
.icon-btn:hover { background: var(--bg-soft); border-color: var(--brand-border); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 16px; border-radius: var(--radius-pill);
  font-size: 13px; font-weight: 600; white-space: nowrap;
  transition: transform 0.15s, background 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.btn-primary { background: var(--brand-strong); color: #ffffff; border: 1px solid var(--brand-strong); }
.btn-primary:hover { background: var(--brand); border-color: var(--brand); transform: translateY(-1px); }
[data-theme="dark"] .btn-primary { background: var(--brand); border-color: var(--brand); color: #04201d; }
[data-theme="dark"] .btn-primary:hover { background: var(--brand-strong); border-color: var(--brand-strong); }
.btn-outline { background: var(--card); color: var(--ink); border: 1px solid var(--line); }
.btn-outline:hover { background: var(--bg-soft); border-color: var(--brand-border); }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.hamburger { display: none; }

/* Mobile Drawer */
.drawer-backdrop {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(0, 0, 0, 0.45); backdrop-filter: blur(4px);
  opacity: 0; pointer-events: none; transition: opacity 0.2s;
}
.drawer-backdrop.open { opacity: 1; pointer-events: auto; }
.mobile-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(300px, 84vw); z-index: 90;
  background: var(--card); border-left: 1px solid var(--line);
  padding: 20px; display: flex; flex-direction: column; gap: 10px;
  transform: translateX(100%); transition: transform 0.22s ease;
}
.mobile-drawer.open { transform: translateX(0); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.drawer-nav { display: flex; flex-direction: column; gap: 4px; overflow-y: auto; flex: 1; }
.drawer-nav .nav-link { padding: 10px 14px; font-size: 15px; }

/* Home Hero */
.hero-grid-bg {
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 80% 0%, var(--brand-soft), transparent 50%),
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: 100% 100%, 32px 32px, 32px 32px;
  border-bottom: 1px solid var(--line);
}
.home-hero { padding: 40px 0 36px; display: grid; grid-template-columns: 1.45fr 1fr; gap: 28px; align-items: center; }
.hero-eyebrow { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 14px; }
.hero-title {
  margin: 0 0 12px; font-size: clamp(28px, 3.6vw, 42px); line-height: 1.18;
  font-weight: 800; letter-spacing: -0.02em; color: var(--ink);
}
.hero-title .muted-part { color: var(--muted); font-weight: 700; }
.hero-desc { margin: 0 0 18px; color: var(--muted); font-size: 15px; max-width: 600px; }
.hero-search-box {
  display: flex; align-items: center; gap: 10px; max-width: 520px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-pill);
  padding: 6px 8px 6px 16px; box-shadow: var(--shadow-sm);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.hero-search-box:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.hero-search-box input { border: 0; background: transparent; outline: none; flex: 1; font-size: 14px; min-width: 0; }
.hero-stats { display: flex; flex-direction: column; gap: 12px; align-items: flex-end; }
.stat-card-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: 100%; max-width: 400px; }
.stat-mini-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-md);
  padding: 14px 16px; box-shadow: var(--shadow-sm);
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.stat-mini-label { font-size: 12px; color: var(--muted); }
.stat-mini-val { font-size: 24px; font-weight: 800; color: var(--ink); line-height: 1.2; }
.status-time-pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px;
  border-radius: var(--radius-pill); background: var(--card); border: 1px solid var(--line);
  font-size: 12px; color: var(--text); box-shadow: var(--shadow-sm);
}
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }

/* Pills (Strictly 4 variants) */
.pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: var(--radius-pill);
  font-size: 12px; font-weight: 600; line-height: 1.4; white-space: nowrap;
}
.pill-xs { padding: 2px 8px; font-size: 11px; font-weight: 500; }
.pill-brand { background: var(--brand-soft); color: var(--brand-strong); border: 1px solid var(--brand-border); }
[data-theme="dark"] .pill-brand { color: var(--brand); }
.pill-warn { background: var(--warn-soft); color: var(--warn); border: 1px solid var(--warn-border); }
.pill-danger { background: var(--danger-soft); color: var(--danger); border: 1px solid var(--danger-border); }
.pill-neutral { background: var(--bg-soft); color: var(--text); border: 1px solid var(--line); }

/* Cards & Reveal */
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.card-hover:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); background: var(--card-hover); border-color: var(--brand-border); }
.card-pad { padding: 24px; }
.reveal { opacity: 0; transform: translateY(12px); transition: opacity 0.45s ease, transform 0.45s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .card-hover:hover { transform: none; }
}

/* Main Workspace */
.section { padding: 28px 0; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.section-title { margin: 0; font-size: 20px; font-weight: 700; color: var(--ink); display: flex; align-items: center; gap: 10px; }
.section-sub { font-size: 13px; color: var(--muted); }
.workspace-grid { display: grid; grid-template-columns: minmax(0, 1.95fr) minmax(342px, 1fr); gap: 24px; align-items: start; }

/* Avatar & Medals */
.avatar-sq {
  width: 40px; height: 40px; border-radius: 12px; color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 16px; flex-shrink: 0;
}
.rank-circle {
  width: 28px; height: 28px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; background: var(--bg-soft); color: var(--text);
  border: 1px solid var(--line);
}
.rank-1 { background: var(--card); border: 1.5px solid #d97706; color: #d97706; }
.rank-2 { background: var(--card); border: 1.5px solid #64748b; color: #64748b; }
.rank-3 { background: var(--card); border: 1.5px solid #b45309; color: #b45309; }

/* Home Table & Mobile Cards */
.rank-table { width: 100%; border-collapse: collapse; }
.rank-table th {
  text-align: left; font-size: 12px; font-weight: 600; color: var(--muted);
  padding: 12px 14px; border-bottom: 1px solid var(--line);
}
.rank-table td { padding: 14px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.rank-table tr:last-child td { border-bottom: 0; }
.rank-table tbody tr { transition: background 0.15s; }
.rank-table tbody tr:hover { background: var(--bg-soft); }
.airport-cell { display: flex; align-items: center; gap: 12px; }
.airport-name { font-weight: 700; color: var(--ink); font-size: 15px; display: block; }
.airport-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.action-stack { display: flex; flex-direction: column; gap: 6px; align-items: stretch; min-width: 104px; }
.mobile-rank-cards { display: none; }

/* Sidebar & Commerce Zone */
.sidebar-stack { display: flex; flex-direction: column; gap: 20px; }
.promo-dark-card {
  border-radius: var(--radius-lg); padding: 24px; color: #fff;
  background: radial-gradient(circle at 88% 12%, rgba(45, 212, 191, 0.35), transparent 44%),
    linear-gradient(135deg, #062a2e 0%, #0b3b4a 55%, #0c3a5c 100%);
  box-shadow: var(--shadow-sm);
}
.promo-eyebrow { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; color: #5eead4; margin-bottom: 8px; }
.promo-title { margin: 0 0 8px; font-size: 20px; font-weight: 800; color: #fff; line-height: 1.3; }
.promo-desc { margin: 0 0 18px; font-size: 13px; color: rgba(255, 255, 255, 0.8); }
.promo-cta {
  display: inline-flex; align-items: center; gap: 6px; padding: 9px 18px;
  border-radius: var(--radius-pill); background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.24); color: #fff; font-size: 13px; font-weight: 600;
}
.promo-cta:hover { background: rgba(255, 255, 255, 0.24); }

.commerce-card { padding: 20px; }
.commerce-highlights { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 12px 0 14px; }
.commerce-hl-item {
  display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center;
  padding: 8px 6px; border-radius: 10px; background: var(--bg-soft); font-size: 11px; font-weight: 600; color: var(--text);
}
.sponsor-row {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--bg);
  transition: background 0.15s, border-color 0.15s;
}
.sponsor-row:hover { background: var(--brand-soft); border-color: var(--brand-border); }
.recruit-box {
  margin-top: 12px; padding: 14px; border-radius: var(--radius-md);
  background: var(--brand-soft); border: 1px solid var(--brand-border);
}
.recruit-perks { list-style: none; padding: 0; margin: 8px 0 12px; display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--text); }
.recruit-perks li { display: flex; align-items: center; gap: 6px; }

.tool-mini-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-md);
  transition: background 0.15s, border-color 0.15s;
}
.tool-mini-item:hover { background: var(--brand-soft); border-color: var(--brand-border); }

/* Grids */
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.grid-5 { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.grid-6 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }

.mini-rank-row {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 0; border-bottom: 1px solid var(--line-soft); font-size: 13px;
}
.mini-rank-row:last-child { border-bottom: 0; }

/* FAQ Accordion */
.tab-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.tab-pill {
  padding: 6px 14px; border-radius: var(--radius-pill); font-size: 13px; font-weight: 600;
  border: 1px solid var(--line); background: var(--card); color: var(--text);
}
.tab-pill.active { background: var(--brand-strong); color: #fff; border-color: var(--brand-strong); }
[data-theme="dark"] .tab-pill.active { background: var(--brand); color: #04201d; border-color: var(--brand); }
.faq-list { display: flex; flex-direction: column; gap: 10px; }
.faq-item { border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--card); overflow: hidden; }
.faq-q {
  width: 100%; padding: 15px 18px; text-align: left;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  font-weight: 600; font-size: 14px; color: var(--ink);
}
.faq-a { padding: 0 18px 16px; font-size: 13.5px; color: var(--muted); display: none; }
.faq-item.open .faq-a { display: block; }
.faq-item.open .faq-chevron { transform: rotate(180deg); }
.faq-chevron { transition: transform 0.2s; flex-shrink: 0; }

/* Unified Subpage Hero */
.sub-hero {
  position: relative; overflow: hidden;
  border-radius: var(--radius-lg); padding: 32px; color: #fff;
  background: radial-gradient(circle at 88% 12%, rgba(45, 212, 191, 0.35), transparent 42%),
    linear-gradient(135deg, #062a2e 0%, #0b3b4a 55%, #0c3a5c 100%);
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; align-items: center;
  margin-top: 20px; box-shadow: var(--shadow-sm);
}
.sub-hero::after {
  content: ""; position: absolute; right: -20px; bottom: -20px; width: 180px; height: 180px;
  background: url(../img/lbrid-logo.svg) no-repeat center / contain;
  opacity: 0.08; pointer-events: none; mix-blend-mode: luminosity;
}
.sub-hero h1 { margin: 8px 0 10px; font-size: clamp(24px, 3vw, 34px); line-height: 1.2; font-weight: 800; color: #fff; }
.sub-hero p { margin: 0; font-size: 14px; opacity: 0.86; }
.glass-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; position: relative; z-index: 1; }
.glass-tile {
  padding: 14px; border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.glass-label { font-size: 11px; opacity: 0.78; margin-bottom: 4px; }
.glass-val { font-size: 20px; font-weight: 800; }

/* Filter Bar & Popover */
.filter-bar {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 16px; margin-top: 20px; box-shadow: var(--shadow-sm);
}
.filter-top { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.input-box {
  height: 38px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--bg); color: var(--ink); font-size: 13px; outline: none;
}
.input-box:focus { border-color: var(--brand); }
.search-input { flex: 1; min-width: 220px; }
.price-input { width: 88px; }
.filter-pills-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; align-items: center; }
.popover-wrap { position: relative; }
.filter-pill-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px;
  border-radius: var(--radius-pill); border: 1px solid var(--line); background: var(--bg);
  font-size: 13px; font-weight: 500;
}
.filter-pill-btn.active { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-strong); }
[data-theme="dark"] .filter-pill-btn.active { color: var(--brand); }
.popover-menu {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 40;
  min-width: 210px; max-height: 260px; overflow-y: auto;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-md);
  padding: 8px; box-shadow: var(--shadow-hover); display: none;
}
.popover-menu.open { display: block; }
.popover-opt {
  display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 8px;
  font-size: 13px; cursor: pointer;
}
.popover-opt:hover { background: var(--bg-soft); }

/* Ranking & Risk Cards */
.ranking-card { display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 20px; }
.score-box { text-align: center; padding: 12px 8px; border-radius: var(--radius-md); background: var(--bg-soft); border: 1px solid var(--line); }
.score-num { font-size: 24px; font-weight: 800; color: var(--ink); line-height: 1.1; }
.delta-up { font-size: 11px; color: var(--brand-strong); font-weight: 600; }
[data-theme="dark"] .delta-up { color: var(--brand); }
.delta-down { font-size: 11px; color: var(--danger); font-weight: 600; }

.risk-card { display: grid; grid-template-columns: 150px minmax(0, 1fr) 170px; overflow: hidden; }
.risk-side { background: #0b1f24; color: #fff; padding: 20px; display: flex; flex-direction: column; justify-content: center; gap: 6px; }
.risk-score { font-size: 28px; font-weight: 800; color: #f87171; line-height: 1.1; }
.risk-body { padding: 20px; }
.risk-actions { padding: 20px; display: flex; flex-direction: column; justify-content: center; gap: 8px; border-left: 1px solid var(--line-soft); }

/* Detail Page */
.detail-top-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(290px, 1fr); gap: 24px; }
.progress-track { height: 8px; border-radius: var(--radius-pill); background: var(--bg-soft); overflow: hidden; }
.progress-fill { height: 100%; border-radius: var(--radius-pill); background: var(--brand-grad); }
.chart-wrap { position: relative; }
.chart-tooltip {
  position: absolute; pointer-events: none; z-index: 15;
  padding: 6px 10px; border-radius: 8px; background: var(--ink); color: var(--card);
  font-size: 12px; font-weight: 600; white-space: nowrap; display: none;
  transform: translate(-50%, -100%); margin-top: -8px;
}
.plan-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.plan-table th, .plan-table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line-soft); }
.plan-table th { color: var(--muted); font-weight: 600; font-size: 12px; }

/* Tools Orbit */
.orbit-box { position: relative; width: 140px; height: 140px; margin: 0 auto; display: flex; align-items: center; justify-content: center; z-index: 1; }
.orbit-ring { position: absolute; inset: 0; border-radius: 50%; border: 2px dashed rgba(45, 212, 191, 0.5); animation: tools-orbit 14s linear infinite; }
.orbit-dot { position: absolute; top: -5px; left: 50%; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: #2dd4bf; }
@keyframes tools-orbit { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .orbit-ring { animation: none; } }

/* Apply Form */
.form-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.form-field label { font-size: 13px; font-weight: 600; color: var(--ink); }
.form-textarea { min-height: 96px; padding: 10px 12px; resize: vertical; }
.form-error { font-size: 12px; color: var(--danger); min-height: 16px; }

/* Global Search Command Palette */
.search-backdrop {
  position: fixed; inset: 0; z-index: 100; background: rgba(15, 23, 42, 0.52);
  backdrop-filter: blur(4px); display: none; align-items: flex-start; justify-content: center; padding: 72px 16px 24px;
}
.search-backdrop.open { display: flex; }
.search-modal {
  width: 100%; max-width: 640px; background: var(--card); border: 1px solid var(--line);
  border-radius: 20px; box-shadow: var(--shadow-hover); overflow: hidden;
  display: flex; flex-direction: column; max-height: 78vh;
}
.search-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.search-head input { flex: 1; border: 0; background: transparent; outline: none; font-size: 15px; color: var(--ink); }
.search-results { overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 12px; }
.search-group-title { font-size: 11px; font-weight: 700; color: var(--muted); padding: 0 8px 6px; text-transform: uppercase; letter-spacing: 0.05em; }
.search-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 10px; border-radius: 10px; font-size: 13.5px; color: var(--ink);
}
.search-item:hover, .search-item.active { background: var(--brand-soft); }
.search-item mark { background: var(--brand-soft); color: var(--brand-strong); padding: 0 2px; border-radius: 3px; font-weight: 700; }
[data-theme="dark"] .search-item mark { color: var(--brand); }

/* Footer & Toast */
.site-footer {
  margin-top: 40px; padding: 40px 0 32px; border-top: 1px solid var(--line);
  background-color: var(--bg);
  background-image:
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: 32px 32px;
}
.footer-inner { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; font-size: 13px; color: var(--text); }
.footer-links a:hover { color: var(--brand-strong); }
.toast-root { position: fixed; bottom: 24px; right: 24px; z-index: 120; display: flex; flex-direction: column; gap: 8px; }
.toast-item { background: var(--ink); color: var(--card); padding: 10px 16px; border-radius: 12px; font-size: 13px; font-weight: 600; box-shadow: var(--shadow-hover); }

/* Non-intrusive Wide-screen Side-rail Ads (>=1600px, IAB 160x600) */
.side-rail-ad {
  display: none;
  position: fixed; top: max(76px, calc(50vh - 315px)); z-index: 35;
  width: 160px; padding: 14px 10px 12px; border-radius: 16px;
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  text-align: center; opacity: 0.94; transition: opacity 0.18s, border-color 0.18s, transform 0.18s;
}
.side-rail-ad.is-network {
  width: 168px; padding: 6px 3px 6px; overflow: visible; max-height: none; opacity: 1;
}
.side-rail-ad:hover { opacity: 1; border-color: var(--brand-border); transform: translateY(-2px); }
.side-rail-ad.is-network:hover { transform: none; }
.side-rail-ad.is-left { left: 12px; }
.side-rail-ad.is-right { right: 12px; }
.side-rail-ad.is-recruit { border-style: dashed; background: var(--bg); }
.side-rail-head {
  display: flex; align-items: center; justify-content: space-between; gap: 4px; padding: 0 4px 6px;
}
.side-rail-close {
  position: absolute; top: 4px; right: 6px; width: 18px; height: 18px; border-radius: 50%;
  font-size: 12px; line-height: 18px; color: var(--muted); text-align: center; z-index: 2;
}
.side-rail-head .side-rail-close { position: static; }
.side-rail-close:hover { background: var(--bg-soft); color: var(--ink); }
.side-rail-embed { width: 160px; margin: 0 auto; overflow: visible; }
.side-rail-embed iframe { display: block; border: 0; max-width: 100%; }
.side-rail-title { font-size: 13px; font-weight: 700; color: var(--ink); margin: 8px 0 4px; word-break: break-word; }
.side-rail-desc { font-size: 11px; color: var(--muted); line-height: 1.45; margin-bottom: 10px; }
@media (min-width: 1600px) { .side-rail-ad { display: block; } }

/* Homepage Mid Banner (728x90 IAB) */
.mid-banner-section { padding: 8px 0 20px; }
.mid-banner-card {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 14px 20px; border-radius: var(--radius-lg); background: var(--card);
  border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}
.mid-banner-card.is-recruit { border-style: dashed; background: var(--bg); }
.mid-banner-stage {
  width: 100%; max-width: 100%; min-height: 90px; margin: 0 auto;
  display: flex; align-items: center; justify-content: center; overflow: visible;
}
.mid-banner-stage > * { max-width: 100%; margin: 0 auto; }
.mid-banner-stage iframe, .mid-banner-stage img { max-width: 100%; border: 0; display: block; }
.sidebar-ad-embed { width: 100%; overflow: visible; display: flex; justify-content: center; }
.sidebar-ad-embed iframe { display: block; border: 0; max-width: 100%; }

/* Responsive Breakpoints */
@media (max-width: 1099px) {
  .workspace-grid, .detail-top-grid, .sub-hero, .home-hero { grid-template-columns: 1fr; }
  .hero-stats { align-items: flex-start; }
  .grid-4, .kv-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-5, .grid-3, .grid-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .risk-card { grid-template-columns: 1fr; }
  .risk-actions { border-left: 0; border-top: 1px solid var(--line-soft); flex-direction: row; }
}

@media (max-width: 767px) {
  .container, .header-inner { padding: 0 16px; }
  .nav-links, .header-cta-desktop, .header-search-text, .kbd-hint { display: none; }
  .header-search-btn { width: 36px; padding: 0; justify-content: center; }
  .hamburger { display: inline-flex; }
  .rank-table-wrap { display: none; }
  .mobile-rank-cards { display: flex; flex-direction: column; gap: 12px; }
  .grid-2, .grid-3, .grid-4, .grid-5, .grid-6, .kv-grid { grid-template-columns: 1fr; }
  .ranking-card { grid-template-columns: 1fr; }
  .sub-hero { padding: 22px; }
  .card-pad { padding: 18px; }
}

/* Block 3: Scenario strip, PK compare bar & modal, sub-audit, code preview */
.scenario-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 1100px) { .scenario-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .scenario-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.scenario-card { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); text-decoration: none; transition: border-color .15s, transform .15s; }
.scenario-card:hover { border-color: var(--brand); transform: translateY(-1px); }
.scenario-card strong { font-size: 13.5px; color: var(--ink); }
.scenario-card span { font-size: 12px; color: var(--muted); }
.scenario-card.is-risk:hover { border-color: var(--danger); }

.alt-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 820px) { .alt-grid { grid-template-columns: 1fr; } }

.compare-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; background: var(--card); border-top: 1px solid var(--line); box-shadow: 0 -8px 24px rgba(0,0,0,0.16); padding: 10px 16px; }
.compare-bar-inner { max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.compare-modal-backdrop { position: fixed; inset: 0; z-index: 120; background: rgba(0,0,0,0.55); display: grid; place-items: center; padding: 16px; }
.compare-modal { width: min(960px, 100%); max-height: 86vh; overflow: auto; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 20px; }

.privacy-banner { padding: 12px 14px; border-radius: 12px; background: var(--bg-soft); border: 1px solid var(--brand); font-size: 13px; color: var(--ink); line-height: 1.6; }
.audit-bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 12.5px; }
.audit-bar-row > span:first-child { width: 84px; color: var(--ink); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.code-preview { margin: 0; padding: 14px; border-radius: 12px; background: var(--bg-soft); border: 1px solid var(--line); font-family: var(--mono); font-size: 12px; color: var(--ink); overflow-x: auto; line-height: 1.55; }

.home-audit-box { border-color: var(--brand); }
.scene-top3-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 1100px) { .scene-top3-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .scene-top3-grid { grid-template-columns: 1fr; } }
.scene-top3-card { padding: 14px; border-radius: 14px; }

.home-rank-card { display: flex; flex-direction: column; }
.home-rank-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line-soft); display: flex; justify-content: space-between; align-items: center; font-size: 13px; }
.mid-banner-card.is-recruit { width: 100%; min-height: 90px; margin: 0 auto; border: 1.5px dashed var(--line); }
.free-node-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: 10px; background: var(--bg-soft); }
.btn-xs { padding: 4px 8px; font-size: 11.5px; border-radius: 8px; }
