/* OwlRank — dark tech / agent-site aesthetic */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg: #07090f;
  --bg-elevated: #0c1019;
  --surface: rgba(18, 24, 38, 0.72);
  --surface-solid: #121826;
  --surface-hover: rgba(28, 36, 56, 0.9);
  --text: #e8ecf4;
  --text-secondary: #9aa3b5;
  --text-muted: #6b7385;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --accent: #5b8cff;
  --accent-2: #7c5cff;
  --accent-glow: rgba(91, 140, 255, 0.35);
  --accent-soft: rgba(91, 140, 255, 0.12);
  --accent-mid: #7aa2ff;
  --success: #3ecf8e;
  --warn: #e8b86d;
  --warn-bg: rgba(232, 184, 109, 0.08);
  --warn-border: rgba(232, 184, 109, 0.25);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --shadow: 0 0 0 1px var(--border), 0 8px 32px rgba(0, 0, 0, 0.35);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: "JetBrains Mono", "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  --max: 1120px;
  --max-wide: 1200px;
  --nav-h: 64px;
  --grid-line: rgba(255, 255, 255, 0.035);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-font-smoothing: antialiased; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -2;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(91, 140, 255, 0.18), transparent 55%),
    radial-gradient(ellipse 50% 40% at 90% 10%, rgba(124, 92, 255, 0.12), transparent 50%),
    radial-gradient(ellipse 40% 30% at 10% 60%, rgba(91, 140, 255, 0.06), transparent 50%),
    var(--bg);
}
body::after {
  content: "";
  position: fixed; inset: 0; z-index: -1;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, black 20%, transparent 75%);
  pointer-events: none;
}
a { color: var(--accent-mid); text-decoration: none; transition: color .15s; }
a:hover { color: #a8c4ff; text-decoration: none; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes pulseGlow {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}
.anim-fade-up { animation: fadeUp 0.6s ease both; }
.anim-delay-1 { animation-delay: 0.08s; }
.anim-delay-2 { animation-delay: 0.16s; }
.anim-delay-3 { animation-delay: 0.24s; }
.anim-delay-4 { animation-delay: 0.32s; }

.nav {
  position: sticky; top: 0; z-index: 100;
  height: var(--nav-h);
  background: rgba(7, 9, 15, 0.75);
  backdrop-filter: blur(16px) saturate(1.2);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: var(--max-wide);
  margin: 0 auto; padding: 0 24px; height: 100%;
  display: flex; align-items: center; gap: 32px;
}
.logo {
  display: flex; align-items: center; gap: 10px;
  color: var(--text); text-decoration: none; flex-shrink: 0;
}
.logo:hover { color: var(--text); }
.logo svg { width: 30px; height: 30px; }
.logo-text {
  font-weight: 700; font-size: 1.05rem; letter-spacing: -0.03em;
  background: linear-gradient(135deg, #fff 40%, #a8c4ff);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.nav-links { display: flex; align-items: center; gap: 2px; flex: 1; }
.nav-links a {
  color: var(--text-secondary);
  font-size: .875rem; font-weight: 500;
  padding: 7px 14px; border-radius: var(--radius-sm);
  text-decoration: none; transition: color .15s, background .15s;
}
.nav-links a:hover { color: var(--text); background: rgba(255,255,255,.04); }
.nav-links a.active {
  color: var(--text);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px rgba(91, 140, 255, 0.2);
}
.nav-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.lang-toggle {
  display: flex; border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); overflow: hidden;
  background: rgba(255,255,255,.03);
}
.lang-toggle button {
  border: none; background: transparent;
  padding: 5px 10px; font-size: .72rem; font-weight: 600;
  color: var(--text-muted); cursor: pointer; font-family: inherit;
}
.lang-toggle button.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: inherit; font-size: .875rem; font-weight: 600;
  padding: 9px 18px; border-radius: var(--radius-sm);
  border: 1px solid transparent; cursor: pointer;
  text-decoration: none; transition: all .18s; white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: 0 0 24px var(--accent-glow), inset 0 1px 0 rgba(255,255,255,.15);
}
.btn-primary:hover { filter: brightness(1.1); color: #fff; box-shadow: 0 0 32px var(--accent-glow); }
.btn-primary:disabled, .btn:disabled { opacity: 0.5; cursor: not-allowed; filter: none; box-shadow: none; }
.btn-ghost {
  background: rgba(255,255,255,.03);
  color: var(--text-secondary);
  border-color: var(--border-strong);
}
.btn-ghost:hover { background: rgba(255,255,255,.06); color: var(--text); border-color: rgba(255,255,255,.2); }
.btn-lg { padding: 13px 24px; font-size: .9375rem; border-radius: 10px; }
.btn-block { width: 100%; }

.main { max-width: var(--max); margin: 0 auto; padding: 32px 24px 80px; }
.page-header { margin-bottom: 28px; }
.page-header h1 {
  font-size: 1.75rem; font-weight: 750; letter-spacing: -0.04em;
  margin-bottom: 8px; line-height: 1.25;
}
.page-header p { color: var(--text-secondary); font-size: .95rem; max-width: 580px; }

/* Landing */
.landing { max-width: var(--max-wide); margin: 0 auto; padding: 0 24px 96px; }
.hero { padding: 72px 0 56px; text-align: center; position: relative; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 14px 5px 8px; border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: rgba(255,255,255,.03);
  font-size: .75rem; font-weight: 500; color: var(--text-secondary);
  margin-bottom: 28px;
}
.hero-badge .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--success); box-shadow: 0 0 8px var(--success);
  animation: pulseGlow 2s ease infinite;
}
.hero h1 {
  font-size: clamp(2.25rem, 5.5vw, 3.75rem);
  font-weight: 800; letter-spacing: -0.045em; line-height: 1.1;
  margin-bottom: 20px; max-width: 860px;
  margin-left: auto; margin-right: auto;
}
.hero h1 .grad {
  background: linear-gradient(135deg, #fff 20%, var(--accent-mid) 55%, var(--accent-2) 90%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-lead {
  font-size: 1.125rem; color: var(--text-secondary);
  max-width: 580px; margin: 0 auto 36px; line-height: 1.65;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-bottom: 48px; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 8px 32px; justify-content: center; padding-top: 8px; }
.hero-stat { text-align: center; }
.hero-stat strong { display: block; font-size: 1.25rem; font-weight: 700; letter-spacing: -0.02em; color: var(--text); }
.hero-stat span { font-size: .75rem; color: var(--text-muted); }

.section { padding: 56px 0; }
.section-label {
  font-size: .72rem; font-weight: 650;
  text-transform: uppercase; letter-spacing: .08em;
  color: var(--accent-mid); margin-bottom: 12px;
}
.section-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 750; letter-spacing: -0.035em;
  margin-bottom: 12px; line-height: 1.25;
}
.section-desc { color: var(--text-secondary); font-size: 1rem; max-width: 560px; margin-bottom: 36px; }
.section-center { text-align: center; }
.section-center .section-desc { margin-left: auto; margin-right: auto; }

.vision-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 800px) { .vision-grid { grid-template-columns: 1fr; } }

.glass-card {
  background: var(--surface); backdrop-filter: blur(12px);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 24px; box-shadow: var(--shadow);
  transition: border-color .2s, transform .2s, background .2s;
}
.glass-card:hover {
  border-color: rgba(91, 140, 255, 0.3);
  background: var(--surface-hover); transform: translateY(-2px);
}
.glass-card .icon {
  width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-soft); border: 1px solid rgba(91, 140, 255, 0.2);
  margin-bottom: 16px; color: var(--accent-mid);
}
.glass-card h3 { font-size: 1.05rem; font-weight: 650; letter-spacing: -0.02em; margin-bottom: 8px; }
.glass-card p { font-size: .875rem; color: var(--text-secondary); line-height: 1.55; }

.agent-showcase { display: grid; grid-template-columns: 1fr 1.1fr; gap: 28px; align-items: center; }
@media (max-width: 860px) { .agent-showcase { grid-template-columns: 1fr; } }
.code-window {
  background: #0a0e18; border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: 0 0 0 1px rgba(91,140,255,.08), 0 24px 48px rgba(0,0,0,.4);
}
.code-window-bar {
  display: flex; align-items: center; gap: 6px;
  padding: 12px 16px; border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,.02);
}
.code-window-bar .dot { width: 10px; height: 10px; border-radius: 50%; }
.code-window-bar .dot.r { background: #ff5f57; }
.code-window-bar .dot.y { background: #febc2e; }
.code-window-bar .dot.g { background: #28c840; }
.code-window-bar .title { margin-left: 10px; font-size: .7rem; color: var(--text-muted); font-family: var(--mono); }
.code-window pre {
  padding: 20px; font-family: var(--mono); font-size: .8rem;
  line-height: 1.7; color: #c8d0e0; overflow-x: auto; margin: 0;
}
.code-window .cm { color: #5a6578; }
.code-window .kw { color: #c792ea; }
.code-window .str { color: #c3e88d; }
.code-window .fn { color: #82aaff; }
.code-window .num { color: #f78c6c; }
.code-window .prop { color: #7fdbca; }

.feature-list { list-style: none; margin-top: 20px; }
.feature-list li {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: .9rem; color: var(--text-secondary); padding: 8px 0;
}
.feature-list li svg { flex-shrink: 0; margin-top: 3px; color: var(--accent-mid); }

.cta-band {
  margin-top: 40px; padding: 40px; border-radius: var(--radius-lg);
  border: 1px solid var(--border-strong);
  background: linear-gradient(135deg, rgba(91,140,255,.1), rgba(124,92,255,.08)), var(--surface);
  text-align: center; position: relative; overflow: hidden;
}
.cta-band h2 { font-size: 1.5rem; font-weight: 750; letter-spacing: -0.03em; margin-bottom: 10px; }
.cta-band p { color: var(--text-secondary); margin-bottom: 24px; max-width: 440px; margin-left: auto; margin-right: auto; }
.cta-band .btns { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.free-pill {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 20px; font-size: .8125rem; color: var(--text-muted);
}
.free-pill strong { color: var(--success); font-weight: 600; }

/* Filters / rankings */
.filters {
  background: var(--surface); backdrop-filter: blur(12px);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; margin-bottom: 20px; box-shadow: var(--shadow);
}
.search-row { margin-bottom: 14px; }
.search-input {
  width: 100%; padding: 11px 14px 11px 42px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  font-size: .9375rem; font-family: inherit;
  background: rgba(0,0,0,.25) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%236b7385' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Cpath d='M11 11l3.5 3.5'/%3E%3C/svg%3E") 14px center no-repeat;
  color: var(--text); outline: none;
}
.search-input:focus { border-color: rgba(91, 140, 255, 0.5); box-shadow: 0 0 0 3px var(--accent-soft); }
.search-input::placeholder { color: var(--text-muted); }
.filter-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.filter-group label {
  display: block; font-size: .68rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .05em;
  color: var(--text-muted); margin-bottom: 5px;
}
.filter-group select {
  width: 100%; padding: 8px 10px; border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); font-size: .8125rem; font-family: inherit;
  background: rgba(0,0,0,.25); color: var(--text); cursor: pointer; outline: none;
}
.filter-group select:focus { border-color: rgba(91, 140, 255, 0.5); }
.filter-group select:disabled { opacity: .4; cursor: not-allowed; }
.filter-group select option { background: #121826; }
.rank-note {
  display: flex; align-items: flex-start; gap: 10px;
  margin-top: 14px; padding: 10px 12px;
  background: var(--accent-soft); border: 1px solid rgba(91, 140, 255, 0.15);
  border-radius: var(--radius-sm); font-size: .8125rem; color: var(--accent-mid); line-height: 1.45;
}
.rank-note svg { flex-shrink: 0; margin-top: 2px; }
.list-meta { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; font-size: .8125rem; color: var(--text-muted); }
.rank-table-wrap {
  background: var(--surface); backdrop-filter: blur(12px);
  border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
}
.rank-table { width: 100%; border-collapse: collapse; }
.rank-table th {
  text-align: left; padding: 11px 14px; font-size: .68rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted);
  background: rgba(0,0,0,.25); border-bottom: 1px solid var(--border);
}
.rank-table td { padding: 13px 14px; border-bottom: 1px solid var(--border); font-size: .875rem; vertical-align: middle; }
.rank-table tr:last-child td { border-bottom: none; }
.rank-table tbody tr { cursor: pointer; transition: background .12s; }
.rank-table tbody tr:hover { background: rgba(91, 140, 255, 0.06); }
.rank-table tbody tr.selected { background: var(--accent-soft); }
.rank-table tbody tr.locked { opacity: .45; cursor: default; }
.rank-table tbody tr.locked:hover { background: transparent; }
.col-rank { width: 64px; font-variant-numeric: tabular-nums; font-weight: 600; color: var(--text-secondary); font-family: var(--mono); font-size: .8rem; }
.col-site { min-width: 180px; }
.site-name { font-weight: 600; color: var(--text); display: block; }
.site-domain { font-size: .75rem; color: var(--text-muted); font-family: var(--mono); }
.col-geo { color: var(--text-secondary); font-size: .8125rem; }
.col-score { width: 88px; font-variant-numeric: tabular-nums; font-weight: 600; font-family: var(--mono); color: var(--accent-mid); }
.badge {
  display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: .7rem; font-weight: 550;
  background: rgba(255,255,255,.04); color: var(--text-secondary); border: 1px solid var(--border);
}
.badge-l1 { background: var(--accent-soft); color: var(--accent-mid); border-color: rgba(91, 140, 255, 0.2); }
.badge-v2 { background: rgba(52, 211, 153, .12); color: #34d399; border-color: rgba(52, 211, 153, .25); }
.badge-sub { margin-left: 4px; font-size: .62rem; color: var(--text-muted); background: transparent; }
.col-cat .badge { margin: 1px 0; }
.col-cat { white-space: nowrap; }
.col-cat .badge-sub { display: inline-block; margin-left: 4px; margin-top: 0; }
.cat-arrow { margin: 0 3px; color: var(--text-muted); font-size: .72rem; }
.lock-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 18px; background: var(--warn-bg); border: 1px solid var(--warn-border);
  border-radius: var(--radius); margin-top: 16px;
}
.lock-banner[hidden], .login-demo-banner[hidden] { display: none; }
.lock-banner-text { font-size: .875rem; color: var(--warn); }
.lock-banner-text strong { color: var(--text); }
.layout-split { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
@media (max-width: 860px) {
  .layout-split { grid-template-columns: 1fr; }
}
@media (min-width: 641px) and (max-width: 1100px) {
  .rank-table .col-geo, .rank-table .col-cat { display: none; }
}
.detail-panel {
  background: var(--surface); backdrop-filter: blur(12px);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow);
  position: sticky; top: calc(var(--nav-h) + 16px);
  display: flex; flex-direction: column;
}
.detail-empty { color: var(--text-muted); font-size: .875rem; text-align: center; padding: 32px 8px; }
.detail-panel h2 { font-size: 1.125rem; font-weight: 700; margin-bottom: 4px; letter-spacing: -0.02em; }
.detail-domain { font-size: .8125rem; color: var(--text-muted); margin-bottom: 16px; font-family: var(--mono); }
.detail-grid { display: grid; gap: 12px; }
.detail-item label {
  display: block; font-size: .68rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); margin-bottom: 2px;
}
.detail-item span { font-size: .875rem; color: var(--text); }
.detail-score { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); order: 2; }
.detail-comments { order: 1; }
.detail-correction { order: 5; margin-top: 16px; border-top: 1px solid var(--border); padding-top: 12px; }
.detail-correction summary { cursor: pointer; color: var(--text-secondary); font-size: .78rem; font-weight: 600; }
.detail-correction summary:hover { color: var(--text); }
.detail-correction-note { margin: 9px 0; color: var(--text-muted); font-size: .7rem; line-height: 1.45; }
.detail-correction-form { margin-top: 10px; }
.detail-error-vote { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin: 10px 0; }
.detail-error-vote .detail-author-label { width: 100%; margin: 0; }
.detail-vote-option { display: inline-flex; align-items: center; gap: 6px; color: var(--text-secondary); font-size: .78rem; cursor: pointer; }
.detail-vote-option input { width: auto; margin: 0; accent-color: var(--accent-mid); }
.detail-error-reason[hidden], .detail-error-other[hidden] { display: none; }
.detail-correction-form input:not([type="radio"]), .detail-correction-form select, .detail-correction-form textarea {
  width: 100%; padding: 8px 10px; border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); background: rgba(0,0,0,.25); color: var(--text);
  font-family: inherit; font-size: .8rem; outline: none; margin-bottom: 4px;
}
.detail-correction-form select { color-scheme: dark; }
.detail-correction-form select option { background-color: #121826; color: #e5e7eb; }
.detail-correction-form textarea { min-height: 66px; resize: vertical; }
.detail-correction-form input:not([type="radio"]):focus, .detail-correction-form select:focus, .detail-correction-form textarea:focus {
  border-color: rgba(91, 140, 255, 0.5); box-shadow: 0 0 0 3px var(--accent-soft);
}
.detail-correction-trap { position: absolute; left: -9999px; width: 1px !important; height: 1px; }
.detail-correction-form .detail-comment-actions { margin-top: 8px; }
.detail-correction-form .btn:disabled { opacity: .65; cursor: wait; }
.score-big {
  font-size: 1.75rem; font-weight: 750; letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--accent-mid), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.score-label { font-size: .75rem; color: var(--text-muted); margin-top: 2px; }

.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 28px; }
@media (max-width: 760px) { .pricing-grid { grid-template-columns: 1fr; } }
.price-card {
  background: var(--surface); backdrop-filter: blur(12px);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 28px 24px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; transition: border-color .2s, transform .2s;
}
.price-card:hover { transform: translateY(-2px); }
.price-card.featured {
  border-color: rgba(91, 140, 255, 0.45);
  box-shadow: 0 0 0 1px rgba(91, 140, 255, 0.25), 0 0 40px rgba(91, 140, 255, 0.12);
  background: linear-gradient(180deg, rgba(91,140,255,.08), transparent 40%), var(--surface);
}
.price-card .tier-name { font-size: .75rem; font-weight: 650; color: var(--accent-mid); text-transform: uppercase; letter-spacing: .06em; }
.price-card .tier-price { font-size: 2.25rem; font-weight: 750; letter-spacing: -0.04em; margin: 10px 0 6px; }
.price-card .tier-price span { font-size: .875rem; font-weight: 400; color: var(--text-muted); }
.price-card .tier-desc { font-size: .8125rem; color: var(--text-secondary); margin-bottom: 20px; }
.price-card ul { list-style: none; flex: 1; margin-bottom: 22px; }
.price-card ul li {
  font-size: .875rem; padding: 7px 0; color: var(--text-secondary);
  padding-left: 22px; position: relative;
}
.price-card ul li::before {
  content: ""; position: absolute; left: 2px; top: 13px;
  width: 12px; height: 7px;
  border-left: 2px solid var(--accent-mid); border-bottom: 2px solid var(--accent-mid);
  transform: rotate(-45deg);
}
.free-tier {
  background: var(--surface); border: 1px dashed var(--border-strong);
  border-radius: var(--radius); padding: 22px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.free-tier h3 { font-size: 1rem; font-weight: 650; margin-bottom: 4px; }
.free-tier p { font-size: .875rem; color: var(--text-secondary); }

.api-section {
  background: var(--surface); backdrop-filter: blur(12px);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; margin-bottom: 20px; box-shadow: var(--shadow);
}
.api-section h2 { font-size: 1.125rem; font-weight: 700; margin-bottom: 8px; letter-spacing: -0.02em; }
.api-section > p { color: var(--text-secondary); font-size: .875rem; margin-bottom: 16px; }
.code-block {
  background: #0a0e18; color: #c8d0e0; border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 16px 18px;
  font-family: var(--mono); font-size: .8rem; line-height: 1.65; overflow-x: auto; white-space: pre;
}
.param-table { width: 100%; border-collapse: collapse; margin-top: 12px; }
.param-table th, .param-table td {
  text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--border); font-size: .8125rem;
}
.param-table th {
  font-size: .68rem; text-transform: uppercase; letter-spacing: .05em;
  color: var(--text-muted); font-weight: 600; background: rgba(0,0,0,.25);
}
.param-table code {
  font-family: var(--mono); font-size: .75rem;
  background: rgba(91,140,255,.1); color: var(--accent-mid);
  padding: 2px 6px; border-radius: 4px;
}

.login-wrap { max-width: 400px; margin: 56px auto; }
.login-card {
  background: var(--surface); backdrop-filter: blur(16px);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 36px 28px; box-shadow: var(--shadow);
}
.login-card h1 { font-size: 1.5rem; font-weight: 750; letter-spacing: -0.03em; margin-bottom: 6px; text-align: center; }
.login-card .sub { text-align: center; color: var(--text-secondary); font-size: .875rem; margin-bottom: 28px; }
.btn-google {
  width: 100%; background: rgba(255,255,255,.04);
  border: 1px solid var(--border-strong); color: var(--text); padding: 11px 16px; font-weight: 600;
}
.btn-google:hover { background: rgba(255,255,255,.08); color: var(--text); }
.btn-google svg { width: 18px; height: 18px; }
.divider {
  display: flex; align-items: center; gap: 12px;
  margin: 22px 0; color: var(--text-muted); font-size: .75rem;
}
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: .8125rem; font-weight: 550; margin-bottom: 6px; color: var(--text-secondary); }
.form-group input {
  width: 100%; padding: 11px 12px; border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); font-size: .9375rem; font-family: inherit;
  outline: none; background: rgba(0,0,0,.25); color: var(--text);
}
.form-group input:focus { border-color: rgba(91, 140, 255, 0.5); box-shadow: 0 0 0 3px var(--accent-soft); }
.form-group select, .form-group textarea {
  width: 100%; padding: 11px 12px; border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); font-size: .9375rem; font-family: inherit;
  outline: none; background: rgba(0,0,0,.25); color: var(--text);
}
.form-group textarea { min-height: 110px; resize: vertical; }
.form-group select:focus, .form-group textarea:focus { border-color: rgba(91, 140, 255, 0.5); box-shadow: 0 0 0 3px var(--accent-soft); }
.site-submit-card { max-width: 620px; }
#feedback-result { max-width: 620px; }
.site-submit-card .btn[type="submit"] { min-width: 136px; }
.site-submit-card .btn[type="submit"]:disabled { opacity: .6; cursor: wait; }
.site-submit-extra { margin: 2px 0 20px; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.site-submit-extra summary { display: flex; align-items: center; gap: 8px; padding: 12px 14px; color: var(--text-secondary); cursor: pointer; list-style: none; font-size: .875rem; }
.site-submit-extra summary::-webkit-details-marker { display: none; }
.site-submit-extra summary:hover, .site-submit-extra[open] summary { color: var(--text); }
.site-submit-extra summary span { margin-left: auto; color: var(--text-muted); font-size: .75rem; }
.site-submit-extra-fields { padding: 2px 14px 4px; }
.site-submit-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.site-submit-card select { color-scheme: dark; background: #101827; color: #eaf0ff; }
.site-submit-card select option { background: #1b2740; color: #eaf0ff; }
.site-submit-card select optgroup { background: #101827; color: #a9bff3; font-weight: 650; }
.site-submit-card select option:checked { background: #304574; color: #fff; }
@media (max-width: 600px) { .site-submit-grid { grid-template-columns: 1fr; gap: 0; } }
.comment-item { padding: 14px 0; border-bottom: 1px solid var(--border); }
.comment-item:last-child { border-bottom: 0; }
.comment-head { display: flex; justify-content: space-between; gap: 10px; font-size: .78rem; color: var(--text-muted); margin-bottom: 6px; }
.comment-body { white-space: pre-wrap; font-size: .9rem; line-height: 1.6; }
.comment-rating { color: #fbbf24; letter-spacing: 1px; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; order: 3; }
.detail-comments { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); }
.detail-comments-head { display: flex; align-items: center; gap: 8px; font-size: .88rem; color: var(--text-secondary); }
.detail-comments-head strong { color: var(--text); }
.detail-comments-head span { color: var(--text-muted); font-size: .72rem; }
.detail-comments-list { max-height: 220px; overflow-y: auto; margin: 8px 0 12px; }
.detail-comments .comment-item { padding: 9px 0; }
.detail-comments .comment-head { font-size: .7rem; gap: 6px; flex-wrap: wrap; }
.detail-comments .comment-body { font-size: .82rem; line-height: 1.5; }
.detail-review-label { font-size: .86rem; font-weight: 650; margin: 14px 0 9px; color: var(--text); }
.detail-author-label, .detail-rating-field legend { display: block; font-size: .72rem; color: var(--text-secondary); margin: 8px 0 5px; }
.detail-rating-field { border: 0; padding: 0; margin: 0 0 10px; }
.detail-rating-stars { display: flex; align-items: center; gap: 4px; }
.detail-rating-option { position: relative; display: inline-flex; cursor: pointer; color: #64748b; font-size: 1.65rem; line-height: 1; transition: color .12s ease, transform .12s ease; }
.detail-rating-option:hover, .detail-rating-option:has(input:focus-visible) { color: #fbbf24; transform: translateY(-1px); }
.detail-rating-option.is-selected { color: #fbbf24; }
.detail-rating-option input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.detail-rating-option input:focus-visible + span { outline: 2px solid var(--accent-mid); outline-offset: 3px; border-radius: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.detail-comment-form input:not([type="radio"]), .detail-comment-form select, .detail-comment-form textarea {
  width: 100%; padding: 8px 10px; border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); background: rgba(0,0,0,.25); color: var(--text);
  font-family: inherit; font-size: .8rem; outline: none;
}
.detail-comment-form textarea { min-height: 76px; resize: vertical; margin-top: 0; }
.detail-comment-form input:not([type="radio"]):focus, .detail-comment-form select:focus, .detail-comment-form textarea:focus {
  border-color: rgba(91, 140, 255, 0.5); box-shadow: 0 0 0 3px var(--accent-soft);
}
.detail-comment-actions { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.detail-comment-actions .btn { padding: 7px 12px; font-size: .78rem; }
#detail-comment-status { font-size: .72rem; color: var(--text-muted); }
#detail-comment-status:empty { display: none; }
.detail-comment-actions .btn:disabled { opacity: .65; cursor: wait; }
.login-note { margin-top: 16px; font-size: .75rem; color: var(--text-muted); text-align: center; }
.toast {
  display: none; margin-top: 14px; padding: 10px 12px;
  background: var(--accent-soft); color: var(--accent-mid);
  border: 1px solid rgba(91,140,255,.2); border-radius: var(--radius-sm);
  font-size: .8125rem; text-align: center;
}
.toast.show { display: block; }

.footer {
  border-top: 1px solid var(--border); padding: 28px 24px;
  text-align: center; font-size: .75rem; color: var(--text-muted);
}
.footer a { color: var(--text-muted); }
.footer a:hover { color: var(--text-secondary); }
.legal-notice {
  max-width: 720px;
  margin: 0 auto 16px;
  padding: 12px 14px;
  text-align: left;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 180, 80, 0.06);
  font-size: .75rem;
  line-height: 1.55;
  color: var(--text-secondary);
}
.legal-notice strong {
  display: block;
  margin-bottom: 6px;
  color: var(--warn, #e8a838);
  font-weight: 600;
}

@media (max-width: 640px) {
  .nav-inner { padding: 0 16px; gap: 12px; }
  .nav-links { display: none; }
  .main, .landing { padding-left: 16px; padding-right: 16px; }
  .hero { padding-top: 48px; }
  .col-geo, .col-cat { display: none; }
  .rank-table th:nth-child(3), .rank-table th:nth-child(4),
  .rank-table td:nth-child(3), .rank-table td:nth-child(4) { display: none; }
  .mobile-nav {
    display: flex; justify-content: center; gap: 2px; flex-wrap: wrap;
    padding: 10px 12px 0; max-width: var(--max); margin: 0 auto;
  }
  .mobile-nav a {
    font-size: .78rem; padding: 6px 10px; color: var(--text-secondary);
    border-radius: var(--radius-sm); font-weight: 500;
  }
  .mobile-nav a.active { color: var(--text); background: var(--accent-soft); }
  .cta-band { padding: 28px 20px; }
}
@media (min-width: 641px) { .mobile-nav { display: none; } }

/* Keep the full navigation visible until it would crowd the header. */
@media (min-width: 641px) and (max-width: 980px) {
  .nav-links { display: none; }
  .mobile-nav {
    display: flex;
    justify-content: center;
    gap: 2px;
    flex-wrap: wrap;
    padding: 10px 12px 0;
    max-width: var(--max);
    margin: 0 auto;
  }
  .mobile-nav a {
    font-size: .78rem;
    padding: 6px 10px;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    font-weight: 500;
  }
  .mobile-nav a.active { color: var(--text); background: var(--accent-soft); }
}


/* —— Browse directory IA —— */
.main-wide { max-width: var(--max-wide); }
.browse-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 20px;
  align-items: start;
}
@media (max-width: 900px) {
  .browse-shell { grid-template-columns: 1fr; }
}
.browse-nav {
  background: var(--surface);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 10px;
  box-shadow: var(--shadow);
  position: sticky;
  top: calc(var(--nav-h) + 16px);
}
.browse-mode {
  width: 100%;
  display: flex; align-items: center; gap: 12px;
  text-align: left;
  padding: 12px 12px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  font-family: inherit;
  transition: background .15s, border-color .15s, color .15s;
  margin-bottom: 4px;
}
.browse-mode:hover { background: rgba(255,255,255,.04); color: var(--text); }
.browse-mode.active {
  background: var(--accent-soft);
  border-color: rgba(91, 140, 255, 0.25);
  color: var(--text);
}
.bm-icon {
  width: 32px; height: 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.04);
  font-size: .9rem; flex-shrink: 0;
}
.browse-mode.active .bm-icon { background: rgba(91,140,255,.15); }
.bm-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.bm-text strong { font-size: .875rem; font-weight: 650; letter-spacing: -0.01em; }
.bm-text small { font-size: .7rem; color: var(--text-muted); font-weight: 400; }

.browse-dir {
  margin-top: 10px; padding-top: 10px;
  border-top: 1px solid var(--border);
  max-height: min(52vh, 420px);
  overflow-y: auto;
}
.browse-dir-title {
  font-size: .68rem; font-weight: 650;
  text-transform: uppercase; letter-spacing: .06em;
  color: var(--text-muted); padding: 4px 8px 8px;
}
.browse-group { margin-bottom: 8px; }
.browse-group-label {
  font-size: .7rem; font-weight: 600; color: var(--accent-mid);
  padding: 6px 8px 4px; letter-spacing: .02em;
}
.browse-item {
  width: 100%;
  display: block; text-align: left;
  padding: 7px 10px; border: none; border-radius: 6px;
  background: transparent; color: var(--text-secondary);
  font-family: inherit; font-size: .8125rem; cursor: pointer;
  transition: background .12s, color .12s;
}
.browse-item:hover { background: rgba(255,255,255,.05); color: var(--text); }
.browse-item.active {
  background: rgba(91,140,255,.15); color: var(--text); font-weight: 550;
}
.browse-item.indent { padding-left: 18px; font-size: .78rem; }
.browse-back {
  width: 100%; text-align: left; border: none; background: transparent;
  color: var(--accent-mid); font-family: inherit; font-size: .75rem;
  font-weight: 550; padding: 4px 8px 10px; cursor: pointer;
}
.browse-back:hover { color: #a8c4ff; }

.browse-toolbar {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
  margin-bottom: 12px;
}
.browse-crumb {
  flex: 1; min-width: 160px;
  font-size: .875rem; color: var(--text-secondary); font-weight: 500;
}
.browse-crumb strong { color: var(--text); }
.browse-search { flex: 1; min-width: 200px; max-width: 360px; }

.advanced-panel {
  margin-top: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255,255,255,.02);
  overflow: hidden;
}
.advanced-panel summary {
  list-style: none; cursor: pointer;
  padding: 14px 18px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px;
  font-size: .875rem; font-weight: 600; color: var(--text-secondary);
  user-select: none;
}
.advanced-panel summary::-webkit-details-marker { display: none; }
.advanced-panel summary::before {
  content: "▸"; color: var(--text-muted); font-size: .75rem;
  transition: transform .15s;
}
.advanced-panel[open] summary::before { transform: rotate(90deg); }
.advanced-panel summary:hover { color: var(--text); background: rgba(255,255,255,.02); }
.adv-hint {
  font-size: .72rem; font-weight: 400; color: var(--text-muted);
}
.advanced-body { padding: 0 18px 18px; border-top: 1px solid var(--border); padding-top: 16px; }
.adv-note {
  font-size: .8125rem; color: var(--warn); margin-bottom: 14px;
  padding: 10px 12px; background: var(--warn-bg);
  border: 1px solid var(--warn-border); border-radius: var(--radius-sm);
}


/* —— Portal channel tabs (news-portal style) —— */
.portal-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border-bottom: 1px solid var(--border-strong);
  margin-bottom: 0;
  background: rgba(255,255,255,.02);
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 0 8px;
  overflow-x: auto;
}
.portal-tab {
  position: relative;
  appearance: none;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  padding: 14px 22px;
  cursor: pointer;
  white-space: nowrap;
  transition: color .15s;
}
.portal-tab:hover { color: var(--text); }
.portal-tab.active {
  color: var(--text);
}
.portal-tab.active::after {
  content: "";
  position: absolute;
  left: 12px; right: 12px; bottom: -1px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 2px 2px 0 0;
  box-shadow: 0 0 12px var(--accent-glow);
}

.portal-channel {
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  background: var(--surface);
  backdrop-filter: blur(12px);
  padding: 16px 18px 18px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}
.portal-channel-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 12px;
}
.portal-channel-label {
  font-size: .72rem; font-weight: 650;
  text-transform: uppercase; letter-spacing: .06em;
  color: var(--text-muted);
}
.portal-channel-clear {
  appearance: none; border: 1px solid var(--border-strong);
  background: rgba(255,255,255,.03);
  color: var(--text-secondary); font-family: inherit;
  font-size: .75rem; font-weight: 550;
  padding: 4px 10px; border-radius: 6px; cursor: pointer;
}
.portal-channel-clear:hover { color: var(--text); border-color: rgba(255,255,255,.25); }

.portal-channel-body { }
.channel-group { margin-bottom: 14px; }
.channel-group:last-child { margin-bottom: 0; }
.channel-group-title {
  font-size: .8rem; font-weight: 650; color: var(--accent-mid);
  margin-bottom: 8px; padding-bottom: 4px;
  border-bottom: 1px solid var(--border);
}
.channel-chips {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.channel-chip {
  appearance: none; border: 1px solid var(--border-strong);
  background: rgba(255,255,255,.03);
  color: var(--text-secondary);
  font-family: inherit; font-size: .8125rem; font-weight: 500;
  padding: 7px 14px; border-radius: 999px; cursor: pointer;
  transition: background .12s, border-color .12s, color .12s, box-shadow .12s;
}
.channel-chip:hover {
  color: var(--text); border-color: rgba(91,140,255,.35);
  background: rgba(91,140,255,.08);
}
.channel-chip.active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 16px var(--accent-glow);
}
.channel-chip.sub {
  font-size: .78rem; padding: 5px 12px;
  border-style: dashed; opacity: .95;
}
.channel-chip.sub3 {
  font-size: .72rem; padding: 4px 10px;
  border-style: dotted; opacity: .85;
}
.channel-l1-block { margin-bottom: 16px; }
.channel-l1-block:last-child { margin-bottom: 0; }
.channel-l1-name {
  font-size: .875rem; font-weight: 650; color: var(--text);
  margin-bottom: 8px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 0;
}
.channel-l1-name:hover { color: var(--accent-mid); }
.channel-l1-name .tag {
  font-size: .65rem; font-weight: 600; color: var(--text-muted);
  border: 1px solid var(--border); padding: 1px 6px; border-radius: 4px;
}


/* —— Rankings UX polish —— */
.portal-tabs {
  box-shadow: inset 0 -1px 0 var(--border-strong);
}
.portal-tab {
  font-size: 1rem;
  padding: 16px 26px;
}
.portal-tab:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.channel-search {
  width: 100%;
  max-width: 280px;
  margin-bottom: 12px;
  padding: 8px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: rgba(0,0,0,.25);
  color: var(--text);
  font-family: inherit;
  font-size: .8125rem;
  outline: none;
}

/* Ranking filters replace the expanded country and industry channel panels. */
.advanced-panel.ranking-filters {
  margin: 0 0 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.ranking-filters .filter-group input {
  width: 100%; padding: 8px 10px; border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); font-size: .8125rem; font-family: inherit;
  background: rgba(0,0,0,.25); color: var(--text); outline: none;
}
.ranking-filters .filter-group input:focus { border-color: rgba(91, 140, 255, 0.5); }
.ranking-filters .filter-group input:disabled { opacity: .4; cursor: not-allowed; }
.advanced-filter-actions {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 10px; margin-top: 14px;
}
.advanced-filter-actions a { color: var(--accent-mid); font-size: .78rem; text-decoration: none; }
.advanced-filter-actions a:hover { color: var(--text); }
.channel-search:focus {
  border-color: rgba(91,140,255,.5);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.channel-group.collapsed .channel-chips { display: none; }
.channel-group-title {
  cursor: pointer;
  display: flex; align-items: center; justify-content: space-between;
  user-select: none;
}
.channel-group-title .chev {
  font-size: .65rem; color: var(--text-muted); transition: transform .15s;
}
.channel-group.collapsed .channel-group-title .chev { transform: rotate(-90deg); }
.channel-chip .count {
  margin-left: 6px; font-size: .7rem; opacity: .7; font-variant-numeric: tabular-nums;
}
.channel-loading, .list-state {
  padding: 28px 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: .875rem;
}
.list-state.error { color: var(--warn); }
.list-state .retry {
  margin-top: 12px;
}

.spinner {
  width: 22px; height: 22px;
  border: 2px solid rgba(255,255,255,.12);
  border-top-color: var(--accent-mid);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  margin: 0 auto 12px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.skeleton-rows td {
  padding: 14px !important;
}
.skeleton-bar {
  height: 12px; border-radius: 4px;
  background: linear-gradient(90deg, rgba(255,255,255,.04), rgba(255,255,255,.1), rgba(255,255,255,.04));
  background-size: 200% 100%;
  animation: shimmer 1.2s ease infinite;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.load-more-wrap {
  display: flex; justify-content: center; padding: 18px 0 4px;
}
.lock-banner.strong {
  margin-top: 16px;
  background: linear-gradient(135deg, rgba(232,184,109,.12), rgba(91,140,255,.08));
  border: 1px solid var(--warn-border);
  flex-wrap: wrap;
}
.lock-banner .lock-actions {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.detail-desc {
  font-size: .8125rem; color: var(--text-secondary);
  line-height: 1.5; margin-bottom: 14px;
}
.detail-link {
  display: inline-block; margin-top: 12px; font-size: .8125rem;
}


.snapshot-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 4px;
  padding: 10px 14px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,.02);
  font-size: .75rem;
  color: var(--text-muted);
  line-height: 1.4;
}
.snapshot-bar strong { color: var(--text-secondary); font-weight: 600; }
.snapshot-bar .snap-sep { margin: 0 6px; opacity: .4; }
.snapshot-bar .snap-note { color: var(--accent-mid); }
.snapshot-bar .snap-trial strong { color: var(--ok, #3dd68c); }
.snapshot-bar .snap-unk-link { color: var(--accent-mid); }
.snapshot-bar .snap-unk-link:hover { color: var(--text); }
.channel-chip small {
  font-size: .65rem; opacity: .65; margin-left: 4px; font-weight: 500;
}
.channel-more {
  font-size: .75rem; color: var(--text-muted); align-self: center; padding: 0 8px;
}

.login-demo-banner {
  margin: -12px 0 22px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--warn-border);
  background: var(--warn-bg);
  color: var(--warn);
  font-size: .75rem;
  line-height: 1.45;
  text-align: center;
}

/* Separate country and industry filters; option menus float over the list. */
.portal-tabs {
  margin-bottom: 12px; border: 1px solid var(--border); border-radius: var(--radius);
  overflow-y: hidden;
}
.ranking-filter-panel {
  position: relative; z-index: 3; padding: 16px 18px; margin-bottom: 16px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow);
}
.ranking-filter-panel[hidden] { display: none; }
.country-filter-grid { grid-template-columns: minmax(140px, .8fr) repeat(3, minmax(0, 1fr)); }
.industry-filter-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.country-panel-bottom { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-top: 10px; }
.admin-filter-details { flex: 1; min-width: 0; }
.admin-filter-details summary { display: inline-block; cursor: pointer; color: var(--text-secondary); font-size: .78rem; padding: 7px 0; }
.admin-filter-details summary:hover { color: var(--text); }
.deeper-admin-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 10px; }
.ranking-filter-panel .filter-group input {
  width: 100%; padding: 8px 10px; border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); font-size: .8125rem; font-family: inherit;
  background: #101827; color: var(--text); outline: none;
}
.ranking-filter-panel .filter-group input:disabled { opacity: .45; cursor: not-allowed; }
.ranking-panel-actions { display: flex; justify-content: flex-end; margin-top: 14px; }
.filter-group-picker { position: relative; min-width: 0; }
.option-picker { position: relative; }
.option-picker summary {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  min-height: 36px; padding: 8px 10px; list-style: none; cursor: pointer;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: #101827; color: var(--text); font-size: .8125rem;
}
.option-picker summary::-webkit-details-marker { display: none; }
.option-picker[open] summary, .option-picker summary:focus-visible { border-color: var(--accent); outline: none; }
.option-picker.disabled summary { opacity: .45; cursor: not-allowed; }
.picker-value { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picker-popover {
  position: absolute; top: calc(100% + 6px); left: 50%; transform: translateX(-50%);
  width: min(680px, calc(100vw - 48px)); max-height: 360px; overflow-y: auto;
  z-index: 20; padding: 12px; border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); background: #101827; box-shadow: 0 18px 48px rgba(0,0,0,.55);
}
.industry-filter-grid > :first-child .picker-popover { left: 0; transform: none; }
.industry-filter-grid > :last-child .picker-popover { left: auto; right: 0; transform: none; }
.country-filter-grid > :nth-child(2) .picker-popover { left: 0; transform: none; }
.country-filter-grid > :last-child .picker-popover { left: auto; right: 0; transform: none; }
.picker-search { margin-bottom: 10px; }
.picker-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.picker-option {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  min-width: 0; min-height: 34px; padding: 7px 9px; border: 1px solid transparent;
  border-radius: 7px; background: #1b2740; color: var(--text);
  font: inherit; font-size: .78rem; text-align: left; cursor: pointer;
}
.picker-option:hover, .picker-option:focus-visible { border-color: var(--accent); background: #25365b; outline: none; }
.picker-option.selected { border-color: var(--accent); background: var(--accent-soft); }
.picker-option[hidden] { display: none; }
.picker-option-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picker-option-count { flex: none; color: #bdd0ff; font-size: .72rem; font-variant-numeric: tabular-nums; }
@media (max-width: 760px) {
  .country-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .industry-filter-grid { grid-template-columns: 1fr; }
  .picker-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .picker-popover, .industry-filter-grid > :first-child .picker-popover,
  .industry-filter-grid > :last-child .picker-popover,
  .country-filter-grid > :nth-child(2) .picker-popover,
  .country-filter-grid > :last-child .picker-popover {
    left: 50%; right: auto; transform: translateX(-50%);
  }
  .country-filter-grid > :nth-child(odd) .picker-popover { left: 0; right: auto; transform: none; }
  .country-filter-grid > :nth-child(even) .picker-popover { left: auto; right: 0; transform: none; }
}
