/* =============================================================================
   OneFirmIntel, Design System
   Modern SaaS aesthetic (Vercel/Linear-inspired) on the existing indigo brand.
   ========================================================================== */

:root {
  /* Brand (from the legacy app) */
  --indigo: #4338CA;
  --indigo-600: #4f46e5;
  --indigo-400: #818cf8;
  --indigo-soft: #EEF2FF;
  --indigo-border: #C7D2FE;
  --gold: #B45309;
  --ok: #15803D;
  --danger: #B91C1C;

  /* Neutral ramp */
  --ink: #0B1220;
  --slate-900: #0f172a;
  --slate-700: #334155;
  --slate-500: #64748b;
  --slate-400: #94a3b8;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50:  #f8fafc;
  --white: #ffffff;

  /* Semantic tokens (light) */
  --bg: var(--white);
  --bg-subtle: var(--slate-50);
  --surface: var(--white);
  --text: var(--ink);
  --text-muted: var(--slate-500);
  --border: var(--slate-200);
  --ring: rgba(79, 70, 229, 0.35);

  /* Type */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Fraunces', Georgia, serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  /* Radii & shadows */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 24px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .08);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, .08), 0 2px 4px rgba(15, 23, 42, .04);
  --shadow-lg: 0 20px 40px -12px rgba(15, 23, 42, .18);
  --shadow-glow: 0 0 0 1px rgba(79,70,229,.1), 0 18px 50px -12px rgba(79,70,229,.35);

  --maxw: 1140px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; background: linear-gradient(180deg, #ffffff, #f5f7fc); }
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text);
  background: transparent;   /* let the fixed background globe show through */
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---- Ambient background globe (site-wide) -------------------------------- */
.globe-bg {
  position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: -1; pointer-events: none; opacity: .8;
}
h1,h2,h3,h4 { line-height: 1.15; letter-spacing: -.02em; margin: 0 0 .5em; font-weight: 700; }
a { color: inherit; text-decoration: none; }
img, svg { max-width: 100%; display: block; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.mono { font-family: var(--font-mono); }
.muted { color: var(--text-muted); }

/* ---- Buttons ------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font: 600 14px/1 var(--font-sans);
  padding: 12px 18px; border-radius: var(--r-md);
  border: 1px solid transparent; cursor: pointer;
  transition: transform .08s ease, box-shadow .2s ease, background .2s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: linear-gradient(180deg, var(--indigo-600), var(--indigo));
  color: #fff; box-shadow: var(--shadow-sm);
}
.btn-primary:hover { box-shadow: var(--shadow-glow); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: var(--slate-50); }
.btn-lg { padding: 15px 26px; font-size: 15px; border-radius: var(--r-lg); }
.btn-block { width: 100%; justify-content: center; }

/* ---- Navbar -------------------------------------------------------------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(180%) blur(12px);
  background: rgba(255,255,255,.72);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 700; letter-spacing: -.02em; font-size: 18px; }
.brand img { width: 39px; height: 39px; }   /* logo +50% */
.nav-menu { display: flex; align-items: center; gap: 28px; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { font-size: 14px; color: var(--slate-700); font-weight: 500; }
.nav-links a:hover { color: var(--ink); }
.nav-cta { display: flex; align-items: center; gap: 12px; }
.nav-burger { display: none; flex-direction: column; gap: 5px; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav-burger span { display: block; width: 22px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .2s, opacity .2s; }
.nav-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---- Hero ---------------------------------------------------------------- */
.hero {
  position: relative; overflow: hidden;
  padding: 96px 0 80px;
  background:
    radial-gradient(900px 500px at 50% -10%, rgba(79,70,229,.10), transparent 60%),
    linear-gradient(180deg, #fff, var(--slate-50));
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(15,23,42,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15,23,42,.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(700px 400px at 50% 0%, #000, transparent 75%);
  pointer-events: none;
}
.hero-inner { position: relative; text-align: center; max-width: 760px; margin: 0 auto; }
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 500; color: var(--indigo);
  background: var(--indigo-soft); border: 1px solid var(--indigo-border);
  padding: 6px 14px; border-radius: 999px; margin-bottom: 22px;
}
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px rgba(21,128,61,.18); }
.hero h1 { font-size: clamp(34px, 5.4vw, 60px); }
.hero h1 .grad {
  background: linear-gradient(120deg, var(--indigo-600), var(--indigo-400));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p.lede { font-size: clamp(16px, 2.2vw, 20px); color: var(--text-muted); max-width: 620px; margin: 18px auto 30px; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-trust { margin-top: 34px; font-size: 13px; color: var(--slate-400); }

/* ---- Stat strip ---------------------------------------------------------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--border); border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--border); margin-top: 56px; }
.stat { background: var(--surface); padding: 26px 20px; text-align: center; }
.stat .num { font-family: var(--font-display); font-size: 30px; font-weight: 600; color: var(--ink); }
.stat .lbl { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

/* ---- Sections ------------------------------------------------------------ */
.section { padding: 84px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 52px; }
.section-head .eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--indigo); }
.section-head h2 { font-size: clamp(26px, 3.6vw, 40px); margin-top: 12px; }
.section-head p { color: var(--text-muted); font-size: 17px; }

/* ---- Feature cards ------------------------------------------------------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 28px;
  transition: transform .15s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--indigo-border); }
.card .ico { width: 44px; height: 44px; border-radius: var(--r-md); display: grid; place-items: center; background: var(--indigo-soft); color: var(--indigo); margin-bottom: 18px; }
.card h3 { font-size: 18px; }
.card p { color: var(--text-muted); font-size: 14.5px; margin: 0; }

/* ---- Pricing ------------------------------------------------------------- */
.pricing { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; align-items: stretch; }
.price-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); padding: 32px; display: flex; flex-direction: column; }
.price-card.featured { border-color: var(--indigo); box-shadow: var(--shadow-glow); position: relative; }
.price-card.featured .badge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--indigo); color: #fff; font-size: 12px; font-weight: 600; padding: 5px 14px; border-radius: 999px; }
.price-card h3 { font-size: 16px; color: var(--text-muted); font-weight: 600; }
.price-card .amount { font-family: var(--font-display); font-size: 44px; font-weight: 600; margin: 8px 0; }
.price-card .amount span { font-family: var(--font-sans); font-size: 15px; color: var(--text-muted); font-weight: 500; }
.price-card ul { list-style: none; padding: 0; margin: 22px 0; display: grid; gap: 12px; }
.price-card li { display: flex; gap: 10px; font-size: 14.5px; color: var(--slate-700); }
.price-card li svg { color: var(--ok); flex-shrink: 0; }
.price-card .btn { margin-top: auto; }

/* ---- App shell (portal / admin) ----------------------------------------- */
.shell { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.sidebar { background: var(--ink); color: #cbd5e1; padding: 22px 16px; position: sticky; top: 0; height: 100vh; }
.sidebar .brand { color: #fff; margin-bottom: 28px; padding: 0 8px; }
.sidebar nav { display: grid; gap: 4px; }
.sidebar nav a { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: var(--r-sm); font-size: 14px; font-weight: 500; color: #94a3b8; }
.sidebar nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.sidebar nav a.active { background: var(--indigo); color: #fff; }
.main { padding: 32px 36px; background: var(--bg-subtle); }
.page-title { font-size: 24px; margin-bottom: 4px; }
.page-sub { color: var(--text-muted); margin-bottom: 28px; }

/* ---- Metric cards (dashboards) ------------------------------------------ */
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px,1fr)); gap: 18px; margin-bottom: 28px; }
.metric { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 22px; }

/* --- Credit packs (reuse price-card look) --------------------------------- */
.pack-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(188px, 1fr)); gap: 18px; align-items: stretch; }
.pack-enterprise { border-style: dashed; }
.pack-enterprise .amount { color: var(--indigo); }
/* --- Use cases --- */
.usecase-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.usecase-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); padding: 26px; transition: box-shadow .2s, border-color .2s, transform .2s; }
.usecase-card:hover { box-shadow: var(--shadow-md); border-color: var(--indigo-border); transform: translateY(-2px); }
.usecase-card .uc-ic { font-size: 26px; }
.usecase-card h3 { margin: 12px 0 2px; font-size: 18px; }
.usecase-card .uc-who { font-size: 12.5px; font-weight: 600; color: var(--indigo); text-transform: uppercase; letter-spacing: .04em; }
.usecase-card p { margin: 10px 0 0; font-size: 14px; color: var(--slate-700); }
.usecase-cta { display: flex; align-items: center; justify-content: space-between; gap: 22px; flex-wrap: wrap; margin-top: 34px; padding: 28px 32px; border-radius: var(--r-xl); background: var(--indigo-soft); border: 1px solid var(--indigo-border); }
.usecase-cta h3 { margin: 0 0 4px; }
.usecase-cta-actions { display: flex; gap: 12px; flex-wrap: wrap; }
@media (max-width: 900px) { .usecase-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .usecase-grid { grid-template-columns: 1fr; } }

/* --- Directory (programmatic SEO) --- */
.dir-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.dir-tile { display: flex; flex-direction: column; gap: 4px; padding: 18px 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); text-decoration: none; color: inherit; transition: border-color .15s, box-shadow .15s, transform .15s; }
.dir-tile:hover { border-color: var(--indigo-border); box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.dir-tile strong { font-size: 16px; }
.dir-tile .muted { font-size: 12.5px; }
.dir-cats { display: flex; flex-wrap: wrap; gap: 9px; }
.dir-cat-chip { padding: 8px 14px; border: 1px solid var(--border); border-radius: 999px; font-size: 13.5px; font-weight: 500; color: var(--slate-700); text-decoration: none; background: #fff; }
.dir-cat-chip:hover { border-color: var(--indigo-border); background: var(--indigo-soft); color: var(--indigo); }

/* --- Top-N list --- */
.top-list { list-style: none; counter-reset: t; margin: 0; padding: 8px 0; }
.top-list li { display: flex; align-items: center; gap: 14px; padding: 12px 20px; border-bottom: 1px solid var(--slate-100); }
.top-list li:last-child { border-bottom: none; }
.top-rank { flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--indigo-soft); color: var(--indigo); font-weight: 700; font-size: 13px; display: grid; place-items: center; }
.top-name { flex: 1; font-weight: 600; }
.top-name a { color: var(--ink); }

/* --- Blog --- */
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px,1fr)); gap: 20px; }
.blog-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 22px; text-decoration: none; color: inherit; transition: box-shadow .2s, transform .2s, border-color .2s; }
.blog-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: var(--indigo-border); }
.blog-card .b-date { font-size: 12px; color: var(--text-muted); }
.blog-card h3 { margin: 6px 0 8px; font-size: 18px; }
.blog-card p { font-size: 14px; color: var(--slate-700); margin: 0; }
.blog-article { max-width: 760px; margin: 0 auto; }
.blog-article h2 { font-size: 22px; margin: 28px 0 10px; }
.blog-article p { font-size: 16px; line-height: 1.75; color: var(--slate-700); margin: 0 0 14px; }
.blog-article .lede { font-size: 18px; color: var(--ink); }

/* --- FAQ (GEO) --- */
.uc-article { margin-top: 30px; }
.uc-article h3 { font-size: 19px; margin: 26px 0 8px; }
.uc-article p { font-size: 15px; line-height: 1.7; color: var(--slate-700); margin: 0 0 12px; }
.faq { padding: 8px 22px 22px; }
.faq-q { font-weight: 600; font-size: 15px; color: var(--ink); margin-top: 16px; }
.faq-a { font-size: 14px; color: var(--slate-700); margin-top: 5px; line-height: 1.6; }

/* --- Use-case detail --- */
.uc-examples { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 18px 20px; margin-bottom: 30px; }
.uc-examples-h { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--indigo); margin-bottom: 10px; }
.uc-example { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 14px; border-radius: var(--r-md); border: 1px solid var(--border); text-decoration: none; color: inherit; margin-top: 8px; transition: border-color .15s, background .15s; }
.uc-example:hover { border-color: var(--indigo); background: var(--indigo-soft); }
.uc-example strong { display: block; font-size: 15px; color: var(--ink); }
.uc-example .muted { font-size: 12.5px; }
.uc-example-go { font-size: 13.5px; font-weight: 600; color: var(--indigo); white-space: nowrap; }
.grid-2-prose { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; margin-top: 6px; }
.grid-2-prose h3 { font-size: 17px; margin: 0 0 8px; }
.uc-helps { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.uc-helps li { display: flex; gap: 10px; font-size: 14px; color: var(--slate-700); }
.uc-helps li svg { color: var(--ok); flex-shrink: 0; margin-top: 2px; }
.uc-related { display: flex; gap: 10px; flex-wrap: wrap; }
.uc-related-chip { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border: 1px solid var(--border); border-radius: 999px; font-size: 13.5px; font-weight: 500; color: var(--slate-700); text-decoration: none; }
.uc-related-chip:hover { border-color: var(--indigo-border); background: var(--indigo-soft); color: var(--indigo); }
@media (max-width: 720px) { .grid-2-prose { grid-template-columns: 1fr; gap: 18px; } }

/* --- Resources --- */
.resource-card { display: flex; flex-direction: column; text-decoration: none; color: inherit; transition: box-shadow .2s, border-color .2s, transform .2s; }
.resource-card:hover { box-shadow: var(--shadow-md); border-color: var(--indigo-border); transform: translateY(-2px); }
.res-tag { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--indigo); }
.resource-card h3 { margin: 8px 0 6px; font-size: 18px; }
.resource-card p { margin: 0 0 14px; font-size: 14px; color: var(--slate-700); flex: 1; }
.res-go { font-size: 13.5px; font-weight: 600; color: var(--indigo); }
.resource-soon { opacity: .9; }

/* --- Methodology --- */
.method-tiers { display: grid; gap: 12px; margin-top: 8px; }
.method-tier { display: grid; grid-template-columns: 70px 1fr 64px; align-items: center; gap: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 18px 20px; }
.method-tier .mt-star { font-size: 18px; color: var(--indigo); font-weight: 700; }
.method-tier strong { font-size: 16px; }
.method-tier p { margin: 4px 0 0; font-size: 13.5px; color: var(--text-muted); }
.method-tier .mt-pct { font-family: var(--font-display); font-size: 20px; font-weight: 600; text-align: right; color: var(--slate-700); }
.method-tier.muted-tier .mt-star { color: var(--slate-400); }
.method-tiers + .prose h3 { margin-top: 22px; }

.dash-search { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--border); border-radius: 999px; padding: 8px 8px 8px 18px; box-shadow: var(--shadow-sm); }
.dash-search svg { color: var(--slate-400); flex-shrink: 0; }
.dash-search input { flex: 1; border: none; outline: none; font: 400 15px var(--font-sans); background: transparent; min-width: 0; }
.dash-search .btn { border-radius: 999px; }
.welcome-benefits { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.welcome-benefits .wb { display: flex; gap: 12px; align-items: flex-start; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 16px; }
.welcome-benefits .wb-ic { font-size: 20px; color: var(--indigo); flex-shrink: 0; }
.welcome-benefits .wb strong { display: block; font-size: 14px; }
.welcome-benefits .wb span { font-size: 12.5px; color: var(--text-muted); }
@media (max-width: 820px) { .welcome-benefits { grid-template-columns: repeat(2, 1fr); } }
.pack-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); padding: 26px 22px; display: flex; flex-direction: column; position: relative; }
.pack-card.featured { border-color: var(--indigo); box-shadow: var(--shadow-glow); }
.pack-card.featured .badge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--indigo); color: #fff; font-size: 12px; font-weight: 600; padding: 5px 14px; border-radius: 999px; }
.pack-card h3 { font-size: 15px; color: var(--text-muted); font-weight: 600; margin: 0; }
.pack-card .amount { font-family: var(--font-display); font-size: 40px; font-weight: 600; margin: 6px 0 2px; }
.pack-card .pack-credits { font-size: 15px; color: var(--ink); }
.pack-card .pack-per { font-size: 12.5px; margin: 2px 0 14px; }
.pack-card ul { list-style: none; padding: 0; margin: 6px 0 18px; display: grid; gap: 9px; }
.pack-card li { display: flex; gap: 9px; font-size: 13.5px; color: var(--slate-700); }
.pack-card li svg { color: var(--ok); flex-shrink: 0; }
.pack-card .btn { margin-top: auto; }
@media (max-width: 900px) { .pack-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .pack-grid { grid-template-columns: 1fr; } }

/* --- Search reveal (credit model) ---------------------------------------- */
.row-owned { background: rgba(34,197,94,0.05); }
.saved-tick { color: var(--ok); font-weight: 700; }
.reveal-cb { width: 16px; height: 16px; accent-color: var(--indigo); cursor: pointer; }
.locked-detail { color: var(--slate-400); letter-spacing: 1px; font-size: 13px; }
.lock-mini { letter-spacing: 0; }
.full-detail { font-size: 13px; color: var(--slate-700); }
.reveal-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 22px; margin-top: 18px; position: sticky; bottom: 16px; box-shadow: var(--shadow-md); flex-wrap: wrap; }
/* --- Company profile --- */
.company-facts { display: grid; grid-template-columns: 140px 1fr; gap: 10px 18px; padding: 20px 22px; font-size: 14px; }
.company-facts .cf-k { color: var(--text-muted); font-size: 13px; }
.company-facts .cf-v { color: var(--ink); font-weight: 500; }

/* --- Faceted results layout --- */
.results-layout { display: grid; grid-template-columns: 244px minmax(0, 1fr); gap: 22px; align-items: start; }
/* minmax(0,1fr) + min-width:0 stop the table's intrinsic (min-content) width, 
   e.g. a long revealed address after payment, from blowing the grid track out
   past the viewport and widening the whole page. */
.results-main { min-width: 0; }
.facets { display: grid; gap: 16px; position: sticky; top: 16px; }
.facet-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 16px; }
.facet-h { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); margin-bottom: 10px; }
.facet-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 10px; border-radius: var(--r-sm); font-size: 13.5px; color: var(--slate-700); text-decoration: none; }
.facet-row:hover { background: var(--slate-50); }
.facet-row.on { background: var(--indigo-soft); color: var(--indigo); font-weight: 600; }
.facet-n { font-variant-numeric: tabular-nums; font-size: 12.5px; color: var(--text-muted); }
.facet-row.on .facet-n { color: var(--indigo); }
.facet-bar-row { display: grid; grid-template-columns: 88px 1fr 48px; align-items: center; gap: 8px; padding: 4px 0; }
.facet-bar-name { font-size: 12.5px; color: var(--slate-700); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.facet-bar { height: 7px; background: var(--slate-100); border-radius: 999px; overflow: hidden; }
.facet-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--indigo-600), var(--indigo-400)); border-radius: 999px; }
.facet-bar-n { font-size: 12px; text-align: right; font-variant-numeric: tabular-nums; color: var(--text-muted); }
.facet-note { font-size: 11px; color: var(--text-muted); margin: 10px 0 0; }
.facet-cta strong { font-size: 14px; } .facet-cta p { font-size: 12.5px; margin: 6px 0 12px; }
@media (max-width: 880px) { .results-layout { grid-template-columns: minmax(0, 1fr); } .facets { position: static; grid-template-columns: 1fr 1fr; display: grid; } .facet-cta { display: none; } }

.blur-row { filter: blur(4px); opacity: .55; pointer-events: none; }
.results-panel.has-wall { position: relative; }
.export-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.lock-overlay-inline { text-align: center; padding: 40px 24px; margin-top: 18px; }
.lock-overlay-inline .lock-ico { font-size: 30px; }
.lock-overlay-inline h3 { margin: 8px 0 6px; }
.lock-overlay-inline .lock-actions { display: flex; gap: 12px; justify-content: center; margin-top: 16px; flex-wrap: wrap; }
.metric .k { font-size: 13px; color: var(--text-muted); font-weight: 500; }
.metric .v { font-size: 30px; font-weight: 700; letter-spacing: -.02em; margin-top: 6px; }
.metric .delta { font-size: 13px; margin-top: 6px; font-weight: 600; }
.metric .delta.up { color: var(--ok); } .metric .delta.down { color: var(--danger); }

/* ---- Tables -------------------------------------------------------------- */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; }
.panel-head { padding: 18px 22px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.panel-head h3 { margin: 0; font-size: 16px; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
table.tbl th { text-align: left; padding: 12px 22px; color: var(--text-muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid var(--border); }
table.tbl td { padding: 14px 22px; border-bottom: 1px solid var(--slate-100); }
table.tbl tr:last-child td { border-bottom: none; }
.badge-status { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; }
.badge-status.active { background: var(--ok-soft, #F0FDF4); color: var(--ok); }
.badge-status.past_due, .badge-status.canceled { background: #FEF2F2; color: var(--danger); }

/* ---- Forms / auth -------------------------------------------------------- */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; background:
  radial-gradient(700px 400px at 50% -10%, rgba(79,70,229,.12), transparent 60%), var(--slate-50); padding: 24px; }
.auth-card { width: 100%; max-width: 420px; background: #fff; border: 1px solid var(--border); border-radius: var(--r-xl); padding: 36px; box-shadow: var(--shadow-lg); }
.auth-card h1 { font-size: 24px; text-align: center; }
.auth-card .sub { text-align: center; color: var(--text-muted); margin-bottom: 26px; font-size: 14.5px; }
/* --- Analytics league bars ----------------------------------------------- */
.lg-row { display: grid; grid-template-columns: 180px 1fr 130px; align-items: center; gap: 14px; padding: 7px 0; }
.lg-name { font-size: 14px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lg-bar { height: 12px; background: var(--slate-100); border-radius: 999px; overflow: hidden; }
.lg-bar span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--indigo-600), var(--indigo-400)); }
.lg-val { font-size: 13.5px; font-variant-numeric: tabular-nums; text-align: right; color: var(--slate-700); }
@media (max-width: 600px) { .lg-row { grid-template-columns: 110px 1fr 90px; gap: 8px; } .lg-name { font-size: 12.5px; } }

.oauth-btns { display: grid; gap: 10px; margin-bottom: 18px; }
.btn-oauth { background: #fff; border: 1px solid var(--border); color: var(--ink); font-weight: 600; gap: 10px; }
.btn-oauth:hover { border-color: var(--indigo-border); background: var(--slate-50); }
.btn-oauth .oa-ic { display: inline-flex; width: 20px; height: 20px; align-items: center; justify-content: center; font-weight: 700; color: var(--indigo); }
.oauth-divider { display: flex; align-items: center; text-align: center; color: var(--text-muted); font-size: 12px; margin: 4px 0 18px; }
.oauth-divider::before, .oauth-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.oauth-divider span { padding: 0 12px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--slate-700); }
.field input, .field select {
  width: 100%; padding: 11px 13px; border: 1px solid var(--border); border-radius: var(--r-md);
  font: 400 15px var(--font-sans); background: #fff; transition: border .15s, box-shadow .15s;
}
.field input:focus, .field select:focus { outline: none; border-color: var(--indigo-600); box-shadow: 0 0 0 4px var(--ring); }
.flash { padding: 12px 16px; border-radius: var(--r-md); font-size: 14px; margin-bottom: 18px; }
.flash.error { background: #FEF2F2; color: var(--danger); border: 1px solid #FECACA; }
.flash.success { background: #F0FDF4; color: var(--ok); border: 1px solid #BBF7D0; }

/* ---- Footer -------------------------------------------------------------- */
.footer { border-top: 1px solid var(--border); padding: 48px 0; color: var(--text-muted); font-size: 14px; background: var(--slate-50); }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 32px; }
.footer h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--slate-400); margin-bottom: 14px; }
.footer a { display: block; padding: 4px 0; color: var(--slate-700); }
.footer a:hover { color: var(--ink); }
.footer-bottom { margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 13px; }

/* ---- Responsive ---------------------------------------------------------- */
@media (max-width: 860px) {
  .grid-3, .pricing, .stats { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2,1fr); }
  /* Collapse the header into a burger-toggled dropdown */
  .nav-burger { display: flex; }
  .nav-menu {
    display: none; position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--border);
    padding: 6px 0 12px; box-shadow: 0 10px 28px rgba(15,23,42,.10);
  }
  .nav-menu.open { display: flex; }
  .nav-links { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-links a { padding: 12px 22px; font-size: 15px; }
  .nav-cta { flex-direction: column; align-items: stretch; gap: 8px; padding: 10px 18px 0; }
  .nav-cta .btn { width: 100%; }
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
}

/* ---- Light scrape friction (cosmetic only, see SECURITY notes) ---------- */
.no-select { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }

/* =============================================================================
   Search-first homepage
   ========================================================================== */
.search-hero {
  position: relative; padding: 80px 0 64px;
  /* Transparent so the fixed background globe shows behind the hero. */
  background: radial-gradient(900px 480px at 50% -8%, rgba(79,70,229,.10), transparent 60%);
}
.cov-link-row { text-align: center; margin-top: 38px; }
.search-hero::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(15,23,42,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15,23,42,.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(680px 360px at 50% 0%, #000, transparent 78%);
  pointer-events: none;
}
.search-hero-inner { position: relative; text-align: center; max-width: 820px; margin: 0 auto; }
.search-hero h1 { font-size: clamp(32px, 5vw, 54px); }
.search-hero h1 .grad { background: linear-gradient(120deg, var(--indigo-600), var(--indigo-400)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.search-hero .lede { font-size: clamp(15px, 2vw, 19px); color: var(--text-muted); max-width: 600px; margin: 16px auto 28px; }

/* Animatable angle for the rotating search-box border. */
@property --ofi-bdr { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
.bigsearch { max-width: 680px; margin: 0 auto; }

/* Search box with animated minimalist gradient border */
.bigsearch-box {
  position: relative; display: flex; align-items: center; gap: 10px;
  background: #fff; border-radius: 999px;
  padding: 9px 9px 9px 20px; box-shadow: var(--shadow-md);
  transition: box-shadow .2s;
}
.bigsearch-box::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 2px;
  /* Rotating conic gradient → a bright band of colour travels around the border. */
  background: conic-gradient(from var(--ofi-bdr),
    #4f46e5 0deg, #6366f1 170deg, #a5b4fc 280deg, #e0e7ff 320deg, #a5b4fc 350deg, #4f46e5 360deg);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  animation: ofi-bdr-spin 4.5s linear infinite; pointer-events: none;
}
@keyframes ofi-bdr-spin { to { --ofi-bdr: 360deg; } }
@media (prefers-reduced-motion: reduce) { .bigsearch-box::before { animation: none; } }
.bigsearch-box:focus-within { box-shadow: var(--shadow-glow); }
.bigsearch-ico { color: var(--slate-400); flex-shrink: 0; }
.bigsearch input {
  flex: 1; border: none; outline: none; font: 400 17px var(--font-sans);
  background: transparent; color: var(--ink); min-width: 0;
}
.bigsearch-hint { font-size: 13px; color: var(--slate-400); margin: 18px 0 0; }

/* Single action below the box (Google-style) */
.bigsearch-actions { display: flex; justify-content: center; margin-top: 22px; }
.bigsearch-submit { border-radius: var(--r-lg); padding: 14px 28px; }

/* Country dropdown pill (AI-Mode-style) */
.market-dd { position: relative; flex-shrink: 0; }
.market-toggle {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  font: 600 14px var(--font-sans); color: var(--indigo);
  background: var(--indigo-soft); border: 1px solid var(--indigo-border);
  padding: 9px 14px; border-radius: 999px; white-space: nowrap;
  transition: background .15s, border-color .15s;
}
.market-toggle:hover { background: #e7eaff; }
.market-toggle.error { background: #FEF2F2; border-color: var(--danger); color: var(--danger); }
.market-toggle.shake, .searchbar-chips.shake { animation: ofi-shake .5s; }
@keyframes ofi-shake { 10%,90%{transform:translateX(-1px)} 20%,80%{transform:translateX(2px)} 30%,50%,70%{transform:translateX(-4px)} 40%,60%{transform:translateX(4px)} }
.market-toggle .caret { transition: transform .2s; opacity: .7; }
.market-toggle[aria-expanded="true"] .caret { transform: rotate(180deg); }
.market-menu {
  position: absolute; top: calc(100% + 10px); right: 0; z-index: 30;
  width: 270px; max-height: 320px; overflow-y: auto;
  background: #fff; border: 1px solid var(--border); border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg); padding: 8px;
}
.market-menu[hidden] { display: none; }
.market-menu-head { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); padding: 8px 10px 10px; }
.market-menu-list { display: grid; gap: 2px; }
.market-opt { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: var(--r-sm); cursor: pointer; font-size: 14.5px; color: var(--slate-700); }
.market-opt:hover { background: var(--slate-50); }
.market-opt input { position: absolute; opacity: 0; pointer-events: none; }
.market-opt .flag { font-size: 18px; }
.market-opt .nm { flex: 1; }
.market-opt .tick { color: var(--indigo); opacity: 0; flex-shrink: 0; }
.market-opt input:checked ~ .tick { opacity: 1; }
.market-opt input:checked ~ .nm { font-weight: 600; color: var(--ink); }

/* Compact chips still used on the results page */
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 13px; font-weight: 500; padding: 7px 13px; border-radius: 999px;
  border: 1px solid var(--border); background: #fff; color: var(--slate-700);
  transition: all .12s;
}
.chip:hover span { border-color: var(--indigo-border); }
.chip input:checked + span { background: var(--indigo-soft); border-color: var(--indigo); color: var(--indigo); font-weight: 600; }
.chip-sm span { font-size: 12px; padding: 5px 10px; }
.chip-static { font-size: 13px; font-weight: 500; padding: 7px 13px; border-radius: 999px; border: 1px solid var(--border); background: #fff; color: var(--slate-700); }

/* Insights strip */
.insights { display: grid; grid-template-columns: repeat(4,1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; margin-top: 52px; }
.insight { background: #fff; padding: 24px 18px; text-align: center; }
.insight-num { font-family: var(--font-display); font-size: 28px; font-weight: 600; color: var(--ink); }
.insight-lbl { font-size: 12.5px; color: var(--text-muted); margin-top: 4px; }

/* Coverage mini-graphic */
.cov-graphic { max-width: 720px; margin: 36px auto 0; background: #fff; border: 1px solid var(--border); border-radius: var(--r-lg); padding: 24px 26px; box-shadow: var(--shadow-sm); }
.cov-graphic-head { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); margin-bottom: 16px; }
.cov-row { display: grid; grid-template-columns: 160px 1fr 64px; align-items: center; gap: 12px; margin-bottom: 10px; font-size: 14px; }
.cov-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cov-bar { height: 8px; background: var(--slate-100); border-radius: 999px; overflow: hidden; }
.cov-fill { display: block; height: 100%; background: linear-gradient(90deg, var(--indigo-600), var(--indigo-400)); }
.cov-val { text-align: right; font-size: 13px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.cov-more { display: inline-block; margin-top: 10px; font-size: 14px; font-weight: 600; color: var(--indigo); }

/* =============================================================================
   Search results page
   ========================================================================== */
.results-wrap { padding: 28px 0 80px; min-height: 70vh; }
.searchbar { margin-bottom: 22px; }
.searchbar-box { display: flex; align-items: center; gap: 8px; background: #fff; border: 1.5px solid var(--border); border-radius: var(--r-md); padding: 6px 6px 6px 14px; max-width: 640px; }
.searchbar-box:focus-within { border-color: var(--indigo-600); box-shadow: 0 0 0 4px var(--ring); }
.searchbar-box svg { color: var(--slate-400); }
.searchbar-box input { flex: 1; border: none; outline: none; font: 400 15px var(--font-sans); background: transparent; }
.searchbar-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.results-head { margin: 18px 0 16px; }
.results-head h1 { font-size: 24px; margin: 0 0 4px; }

.results-panel { position: relative; }
.results-tbl { width: 100%; }
/* Long values (revealed addresses, long names) wrap inside their cell instead of
   forcing the table, and the page, wider. Headers must NOT break per-character
   (that turned "MARKET" into a vertical M/A/R/K/E/T stack). */
.results-tbl td { overflow-wrap: anywhere; }
.results-tbl th { white-space: nowrap; }
.results-tbl td:first-child, .results-tbl th:first-child { white-space: normal; }
.results-tbl .cell-co { font-weight: 600; color: var(--ink); }
.results-tbl .full-detail { font-size: 13px; }
.tier-badge { font-size: 12.5px; white-space: nowrap; }
/* Desktop keeps a horizontal-scroll fallback if the table ever overflows; on
   phones the table becomes stacked cards (see the mobile layer below), so no
   min-width is forced there. */
.tbl-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
@media (max-width: 760px) {
  .tbl-scroll .results-tbl { min-width: 0; }
}

/* Locked skeleton rows */
.locked-row td { filter: blur(4px); opacity: .55; }
.sk { display: inline-block; height: 11px; border-radius: 4px; background: linear-gradient(90deg, var(--slate-100), var(--slate-200), var(--slate-100)); background-size: 200% 100%; animation: sk 1.4s ease-in-out infinite; }
@keyframes sk { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* Blur-gate overlay */
.lock-overlay { position: absolute; left: 0; right: 0; bottom: 0; height: 320px; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 28px;
  background: linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.82) 42%, #fff 88%); }
.lock-card { text-align: center; max-width: 460px; padding: 28px 32px; background: #fff; border: 1px solid var(--border); border-radius: var(--r-xl); box-shadow: var(--shadow-lg); }
.lock-ico { font-size: 30px; margin-bottom: 8px; }
.lock-card h3 { font-size: 20px; margin: 0 0 8px; }
.lock-card p { margin: 0 0 18px; font-size: 14.5px; }
.lock-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* Export bar */
.export-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 22px; margin-top: 22px; flex-wrap: wrap; }
.quota-upsell { display: flex; align-items: center; gap: 12px; }

/* Copy-protection toast */
.copy-toast { position: fixed; left: 50%; bottom: 32px; transform: translate(-50%, 20px); z-index: 100;
  background: var(--ink); color: #fff; font-size: 14px; font-weight: 500; padding: 13px 20px; border-radius: var(--r-md);
  box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; max-width: 90vw; }
.copy-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Prose (about / legal / blog) */
.prose { font-size: 16px; color: var(--slate-700); line-height: 1.75; }
.prose h3 { font-size: 19px; color: var(--ink); margin: 28px 0 8px; }
.prose p { margin: 0 0 16px; }
.blog-list { display: grid; gap: 8px; }
.blog-item { padding: 22px 0; border-bottom: 1px solid var(--border); }
.blog-item h3 { font-size: 20px; margin: 8px 0 6px; }
.blog-item p { margin: 0; }

@media (max-width: 860px) {
  .insights { grid-template-columns: repeat(2,1fr); }
  .cov-row { grid-template-columns: 110px 1fr 56px; }
  .lock-overlay { height: 280px; }
}
/* Keep the search box proportional & usable on phones */
.market-menu { width: min(270px, calc(100vw - 32px)); }
@media (max-width: 560px) {
  .bigsearch-box { padding: 7px 8px 7px 14px; gap: 6px; }
  .bigsearch input { font-size: 15px; }
  .bigsearch-ico { width: 18px; height: 18px; }
  .market-toggle { padding: 8px 10px; font-size: 13px; gap: 5px; }
  /* Show the selected market so users know what to change (truncated to fit). */
  .market-toggle #marketLabel { display: inline-block; max-width: 92px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
  .bigsearch-submit { width: 100%; }
  .bigsearch-actions { padding: 0 6px; }
  .hero .lede, .search-hero .lede { font-size: 15px; }
}

/* =============================================================================
   Animated global coverage network (home)
   ========================================================================== */
.globe-wrap { max-width: 880px; margin: 44px auto 0; text-align: center; }
.globe-head { margin-bottom: 6px; }
.globe-head .eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--indigo); }
.globe-head h3 { font-size: clamp(18px, 2.4vw, 24px); margin: 8px 0 0; }
.globe-canvas { width: 100%; height: 380px; display: block; }
@media (max-width: 860px) { .globe-canvas { height: 280px; } }

/* =============================================================================
   Search filter bar
   ========================================================================== */
.filter-bar {
  display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap;
  margin-top: 14px; padding: 14px 16px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md);
}
.filter-group { display: flex; flex-direction: column; gap: 5px; }
.filter-lbl { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); }
.filter-sel {
  padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--r-sm);
  font: 500 14px var(--font-sans); background: #fff; color: var(--ink); cursor: pointer; min-width: 150px;
}
.filter-sel:focus { outline: none; border-color: var(--indigo-600); box-shadow: 0 0 0 3px var(--ring); }
.filter-check { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--slate-700); cursor: pointer; padding-bottom: 8px; }
.filter-check input { width: 16px; height: 16px; accent-color: var(--indigo-600); }
.btn-sm { padding: 9px 14px; font-size: 13px; }
.filter-apply { margin-left: auto; }
@media (max-width: 640px) { .filter-apply { margin-left: 0; width: 100%; } .filter-sel { min-width: 0; flex: 1; } }

/* =============================================================================
   Search loading overlay
   ========================================================================== */
.search-loader {
  position: fixed; inset: 0; z-index: 200; display: none;
  align-items: center; justify-content: center;
  background: rgba(11,18,32,.55); backdrop-filter: blur(8px) saturate(140%);
}
.search-loader.show { display: flex; animation: fadeIn .2s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.loader-card {
  background: #fff; border-radius: var(--r-xl); padding: 40px 48px; text-align: center;
  box-shadow: var(--shadow-lg); max-width: 380px; width: 90%;
}
.loader-radar { position: relative; width: 120px; height: 120px; margin: 0 auto 24px; }
.loader-radar .ring {
  position: absolute; inset: 0; margin: auto; border-radius: 50%;
  border: 2px solid var(--indigo); opacity: 0; animation: radar 2.1s ease-out infinite;
}
.loader-radar .ring:nth-child(2) { animation-delay: .7s; }
.loader-radar .ring:nth-child(3) { animation-delay: 1.4s; }
@keyframes radar { 0% { transform: scale(.25); opacity: .8; } 100% { transform: scale(1); opacity: 0; } }
.loader-core {
  position: absolute; inset: 0; margin: auto; width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center; font-size: 24px; color: #fff;
  background: linear-gradient(180deg, var(--indigo-600), var(--indigo));
  box-shadow: 0 8px 24px -6px var(--ring); animation: corepulse 1.4s ease-in-out infinite;
}
@keyframes corepulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.12); } }
.loader-title { font-size: 17px; font-weight: 700; color: var(--ink); min-height: 24px; transition: opacity .2s; }
.loader-sub { font-size: 13.5px; color: var(--text-muted); margin-top: 6px; }
.loader-bar { height: 5px; border-radius: 999px; background: var(--slate-100); overflow: hidden; margin-top: 22px; }
.loader-bar span { display: block; height: 100%; width: 40%; border-radius: 999px;
  background: linear-gradient(90deg, var(--indigo-600), var(--indigo-400));
  animation: indeterminate 1.3s ease-in-out infinite; }
@keyframes indeterminate { 0% { transform: translateX(-100%); } 100% { transform: translateX(320%); } }

/* =============================================================================
   Coverage page (overhaul)
   ========================================================================== */
.cov-hero { position: relative; padding: 72px 0 56px; text-align: center;
  background: radial-gradient(800px 420px at 50% -10%, rgba(79,70,229,.10), transparent 62%), linear-gradient(180deg,#fff,var(--slate-50)); border-bottom: 1px solid var(--border); }
.cov-hero h1 { font-size: clamp(30px,4.4vw,46px); margin: 18px 0 0; }
.cov-hero h1 .grad { background: linear-gradient(120deg,var(--indigo-600),var(--indigo-400)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cov-hero .lede { max-width: 640px; margin: 16px auto 0; color: var(--text-muted); font-size: 17px; }

.cov-bigstats { display: grid; grid-template-columns: repeat(5,1fr); gap: 16px; margin: 40px auto 0; max-width: 920px; }
.cov-bigstat { background: #fff; border: 1px solid var(--border); border-radius: var(--r-lg); padding: 20px 14px; box-shadow: var(--shadow-sm); }
.cov-bigstat .n { font-family: var(--font-display); font-size: 26px; font-weight: 600; color: var(--ink); }
.cov-bigstat .l { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

.tier-dist { max-width: 760px; margin: 40px auto 0; background: #fff; border: 1px solid var(--border); border-radius: var(--r-lg); padding: 22px 24px; box-shadow: var(--shadow-sm); text-align: left; }
.tier-dist-head { display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; color: var(--slate-700); margin-bottom: 12px; }
.tier-track { display: flex; height: 16px; border-radius: 999px; overflow: hidden; background: var(--slate-100); }
.tier-track-sm { height: 10px; margin: 6px 0 12px; }
.seg { display: block; height: 100%; }
.seg-listed { background: #4338CA; } .seg-est { background: #6366f1; } .seg-act { background: #a5b4fc; } .seg-inact { background: #e2e8f0; }
.tier-legend { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 14px; font-size: 13px; color: var(--slate-700); }
.tier-legend i, .cov-card-tiers i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: middle; }
.dot-listed { background: #4338CA; } .dot-est { background: #6366f1; } .dot-act { background: #a5b4fc; } .dot-inact { background: #cbd5e1; }

.cov-cards { display: grid; grid-template-columns: repeat(2,1fr); gap: 20px; }
.cov-card { background: #fff; border: 1px solid var(--border); border-radius: var(--r-lg); padding: 22px 24px; transition: box-shadow .2s, border-color .2s; }
.cov-card:hover { box-shadow: var(--shadow-md); border-color: var(--indigo-border); }
.cov-card-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.cov-card-title { font-size: 17px; font-weight: 700; }
.cov-card-title .flag { font-size: 20px; margin-right: 4px; }
.cov-card-total { font-family: var(--font-display); font-size: 22px; font-weight: 600; color: var(--indigo); }
.cov-card-tiers { display: flex; flex-wrap: wrap; gap: 12px 18px; font-size: 12.5px; color: var(--slate-700); }
.cov-card-scope { font-size: 12.5px; color: var(--text-muted); margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--slate-100); line-height: 1.5; }

.cov-planned { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; }
.planned-chip { display: flex; gap: 12px; align-items: center; background: #fff; border: 1px solid var(--border); border-radius: var(--r-md); padding: 14px 16px; }
.planned-chip .flag { font-size: 24px; }
.planned-chip strong { display: block; font-size: 14.5px; }
.planned-chip .muted { font-size: 12px; }
.cov-method { margin-top: 64px; padding-top: 48px; border-top: 1px solid var(--border); }

@media (max-width: 860px) {
  .cov-bigstats { grid-template-columns: repeat(2,1fr); }
  .cov-cards { grid-template-columns: 1fr; }
  .cov-planned { grid-template-columns: 1fr; }
}

/* =============================================================================
   Admin console
   ========================================================================== */
.admin-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 22px; flex-wrap: wrap; }
.admin-head .page-title { margin: 0; }
.admin-actions { display: flex; gap: 10px; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px,1fr)); gap: 14px; margin-bottom: 22px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 18px 18px 12px; position: relative; overflow: hidden; }
.kpi .k { font-size: 12px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.kpi .v { font-size: 26px; font-weight: 700; letter-spacing: -.02em; margin-top: 6px; line-height: 1.1; }
.kpi .d { font-size: 12.5px; font-weight: 600; margin-top: 4px; }
.kpi .d.up { color: var(--ok); } .kpi .d.down { color: var(--danger); } .kpi .d.muted { color: var(--text-muted); font-weight: 500; }
.kpi .spark { display: block; width: 100%; height: 30px; margin-top: 8px; }

.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; }
@media (max-width: 1100px) { .row-2 { grid-template-columns: 1fr; } }

.chart-bars { display: block; width: 100%; height: 160px; }

/* Admin action button grid on user detail */
.user-actions { padding: 18px; display: flex; flex-wrap: wrap; gap: 10px; }
.user-actions form { margin: 0; }

/* Pagination */
.pager { display: flex; gap: 6px; justify-content: center; margin: 22px 0 0; flex-wrap: wrap; }
.pager a { padding: 7px 13px; border: 1px solid var(--border); border-radius: var(--r-sm); font-size: 13px; font-weight: 500; color: var(--slate-700); background: #fff; }
.pager a:hover { border-color: var(--indigo-border); }
.pager a.active { background: var(--indigo); color: #fff; border-color: var(--indigo); }

/* 1EOR Global banner (about page) */
.oneeor-banner { display: flex; align-items: center; gap: 16px; background: var(--indigo-soft); border: 1px solid var(--indigo-border); border-radius: var(--r-lg); padding: 18px 20px; margin-bottom: 28px; }
.oneeor-badge { flex-shrink: 0; font-family: var(--font-display); font-weight: 600; font-size: 18px; letter-spacing: .02em; color: #fff; background: linear-gradient(180deg,var(--indigo-600),var(--indigo)); padding: 12px 14px; border-radius: var(--r-md); }
.oneeor-banner strong { font-size: 15.5px; color: var(--ink); }

/* --- Search masking + per-row reveal + top-up modal (Plan B) --------------- */
.masked { color: var(--slate-500, #64748b); letter-spacing: .5px; font-variant-ligatures: none; }
.row-locked .cell-co .masked { font-weight: 600; }
.co-free { font-weight: 600; color: var(--ink); }
.row-locked .cell-co .co-free { font-weight: 700; }
.btn-xs { padding: 4px 10px; font-size: 12px; line-height: 1.4; border-radius: 8px; }
.reveal-one { white-space: nowrap; }

.modal-backdrop { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(15,23,42,.55); backdrop-filter: blur(2px); }
.modal-backdrop[hidden] { display: none; }
.modal-card { position: relative; width: 100%; max-width: 460px; background: #fff; border-radius: var(--r-lg, 16px); padding: 28px 26px 22px; box-shadow: 0 24px 60px rgba(15,23,42,.28); }
.modal-card h3 { margin: 0 0 8px; font-size: 20px; }
.modal-x { position: absolute; top: 12px; right: 14px; border: 0; background: none; font-size: 26px; line-height: 1; color: var(--slate-400, #94a3b8); cursor: pointer; }
.modal-x:hover { color: var(--ink, #0f172a); }
.buy-packs { display: flex; flex-direction: column; gap: 10px; margin: 16px 0 6px; }
.buy-pack { display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid var(--line, #e2e8f0); border-radius: var(--r-md, 12px); padding: 12px 14px; margin: 0; }
.buy-pack.is-best { border-color: var(--indigo, #4f46e5); box-shadow: 0 0 0 1px var(--indigo, #4f46e5) inset; }
.buy-pack-info { display: flex; flex-direction: column; }
.buy-pack-info strong { font-size: 15px; }
.buy-pack-info .muted { font-size: 12.5px; }
.modal-foot { font-size: 12.5px; margin: 14px 0 0; }

/* Search results detail drawer (slide-over). Sits above the buy modal (1000);
   the drawer is closed before the buy modal is shown, so they never overlap. */
.cell-open { white-space: nowrap; text-align: right; }
.drawer-backdrop { position: fixed; inset: 0; z-index: 1100; display: flex; justify-content: flex-end; background: rgba(15,23,42,.5); backdrop-filter: blur(2px); }
.drawer-backdrop[hidden] { display: none; }
.drawer { width: min(480px, 100%); height: 100%; background: #fff; box-shadow: -16px 0 48px rgba(15,23,42,.22); overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 22px 24px calc(24px + env(safe-area-inset-bottom)); transform: translateX(100%); animation: drawerIn .22s ease forwards; }
@keyframes drawerIn { to { transform: translateX(0); } }
.drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.drawer-title { font-size: 20px; line-height: 1.25; margin: 0; word-break: break-word; }
.drawer-x { border: 0; background: none; font-size: 28px; line-height: 1; color: var(--slate-400, #94a3b8); cursor: pointer; padding: 0 4px; }
.drawer-x:hover { color: var(--ink, #0f172a); }
.drawer-sub { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted, #64748b); margin: 18px 0 8px; }
.drawer-actions { display: flex; flex-direction: column; gap: 10px; margin: 14px 0 4px; }
.drawer-actions .btn { width: 100%; }
.drawer-foot { margin: 16px 0 0; font-size: 14px; }
.drawer-skel { display: flex; flex-direction: column; gap: 12px; padding: 10px 0; }
.drawer-skel .sk { height: 16px; border-radius: 6px; width: 100%; }
@media (max-width: 760px) {
  .drawer-backdrop { justify-content: stretch; }
  .drawer { width: 100%; height: auto; max-height: 92vh; margin-top: auto; border-radius: 18px 18px 0 0; transform: translateY(100%); animation: drawerUp .24s ease forwards; }
  @keyframes drawerUp { to { transform: translateY(0); } }
  .results-tbl td.cell-open { display: block; margin-top: 12px; border-top: none; padding: 0; text-align: left; }
  .results-tbl td.cell-open .btn { width: 100%; }
}

/* --- Composable filter panel (Plan B) ------------------------------------- */
.filter-dim { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.filter-dim-lbl { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--slate-500, #64748b); margin-right: 4px; }
.chip-global span { font-weight: 600; }
.chip-global input:checked + span { color: var(--indigo, #4f46e5); }
.role-pills { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.pill-radio { position: relative; cursor: pointer; }
.pill-radio input { position: absolute; opacity: 0; pointer-events: none; }
.pill-radio span { display: inline-block; padding: 5px 12px; border: 1px solid var(--line, #e2e8f0); border-radius: 999px; font-size: 13px; line-height: 1.3; background: #fff; transition: all .12s; }
.pill-radio input:checked + span { background: var(--indigo, #4f46e5); border-color: var(--indigo, #4f46e5); color: #fff; }
.pill-radio:hover span { border-color: var(--indigo, #4f46e5); }

/* --- Home search: mode + global toggle ------------------------------------ */
.bigsearch-modes { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; margin: 12px 0 4px; }
.bs-mode-lbl { font-size: 13px; color: var(--slate-500, #64748b); margin-right: 2px; }

/* Inline radio "pills" for the Search-in mode (home hero + search filter bar) */
.mode-radios { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mode-radio { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border: 1px solid var(--line, #e2e8f0); border-radius: 999px; background: #fff; cursor: pointer; font-size: 13.5px; line-height: 1; color: var(--text-muted, #64748b); transition: background .15s, border-color .15s, color .15s; user-select: none; white-space: nowrap; }
.mode-radio input { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
.mode-radio:hover { border-color: var(--indigo-600, #4f46e5); color: var(--ink, #0f172a); }
.mode-radio:has(input:checked) { background: var(--indigo-600, #4f46e5); border-color: var(--indigo-600, #4f46e5); color: #fff; font-weight: 600; }
/* keyboard focus ring */
.mode-radio:focus-within { outline: none; box-shadow: 0 0 0 3px var(--ring, rgba(79,70,229,.25)); }

/* --- Home: authority source strip ---------------------------------------- */
.src-band { padding: 26px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: #fff; }
.src-band-lbl { text-align: center; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); margin: 0 0 16px; }
.src-chips { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.src-chip { display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface, #f8fafc); font-size: 13px; color: var(--slate-700, #334155); white-space: nowrap; }
.src-chip .flag { font-size: 15px; }
.src-chip-more { text-decoration: none; color: var(--indigo-600, #4f46e5); font-weight: 600; border-color: var(--indigo-border, #c7d2fe); background: #fff; }
.src-chip-more:hover { background: var(--indigo-soft, #eef2ff); }

/* --- Home: "what you can do" use-case cards ------------------------------- */
.uc-card { display: flex; flex-direction: column; padding: 22px; border: 1px solid var(--border); border-radius: var(--r-lg, 14px); background: #fff; text-decoration: none; color: inherit; transition: transform .15s, box-shadow .15s, border-color .15s; }
.uc-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--indigo-border, #c7d2fe); }
.uc-card h3 { font-size: 17px; margin: 0 0 8px; color: var(--ink); }
.uc-card p { font-size: 14px; margin: 0 0 14px; line-height: 1.55; }
.uc-go { margin-top: auto; font-size: 13.5px; font-weight: 600; color: var(--indigo-600, #4f46e5); }

/* --- Home: market highlight cards ---------------------------------------- */
.mkt-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.mkt-card { display: block; padding: 16px 16px 14px; border: 1px solid var(--border); border-radius: var(--r-lg, 14px); background: #fff; text-decoration: none; color: inherit; transition: transform .15s, box-shadow .15s, border-color .15s; }
.mkt-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--indigo-border, #c7d2fe); }
.mkt-card-top { display: flex; align-items: center; gap: 8px; }
.mkt-flag { font-size: 19px; }
.mkt-name { font-size: 14px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mkt-total { font-family: var(--font-display); font-size: 23px; font-weight: 700; color: var(--ink); margin-top: 8px; letter-spacing: -.02em; }
.mkt-sub { font-size: 12px; color: var(--text-muted); }
@media (max-width: 900px) { .mkt-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .mkt-grid { grid-template-columns: 1fr 1fr; } .src-chip { font-size: 12px; padding: 6px 10px; } }

/* --- Search pagination + signed-in-free credits wall ---------------------- */
.pager { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 14px 0 2px; }
.pager-info { font-size: 13px; min-width: 150px; text-align: center; }
.credits-wall { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-left: 3px solid var(--indigo, #4f46e5); background: var(--indigo-soft, #eef2ff); margin-top: 14px; padding: 18px 20px; }
/* --- Company typeahead suggestions ---------------------------------------- */
.suggest-box { position: relative; }
.suggest-list { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 50; background: #fff; border: 1px solid var(--line, #e2e8f0); border-radius: 12px; box-shadow: 0 16px 40px rgba(15,23,42,.16); overflow: hidden; }
.suggest-list[hidden] { display: none; }
.suggest-item { display: flex; align-items: center; gap: 8px; padding: 10px 14px; cursor: pointer; font-size: 14px; }
.suggest-item:hover, .suggest-item.active { background: var(--indigo-soft, #eef2ff); }
.suggest-item .sg-flag { flex-shrink: 0; }
.suggest-item .sg-pct { margin-left: auto; font-size: 12px; color: var(--slate-500, #64748b); }
.suggest-head { padding: 8px 14px; font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: var(--slate-500, #64748b); border-bottom: 1px solid var(--line, #eef); }

/* --- Button loading spinner + global market option ------------------------ */
.btn-spin { display: inline-block; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; vertical-align: -2px; animation: btnspin .6s linear infinite; }
@keyframes btnspin { to { transform: rotate(360deg); } }
.btn.is-loading { opacity: .85; cursor: progress; }
.market-opt-global { border-bottom: 1px solid var(--line, #e2e8f0); margin-bottom: 4px; padding-bottom: 8px; font-weight: 600; }

/* =============================================================================
   MOBILE OPTIMISATION LAYER — iOS-app feel (2026-06-05)
   ========================================================================== */
@media (max-width: 760px) {
  html { -webkit-text-size-adjust: 100%; }
  body { overflow-x: hidden; }
  * { -webkit-tap-highlight-color: rgba(79,70,229,.15); }
  .btn { min-height: 44px; }
  .btn-sm { min-height: 40px; } .btn-xs { min-height: 36px; }

  /* ---- Re-search bar + filters on the results page ---- */
  .searchbar-chips { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
  .searchbar-chips .chip { flex: 0 0 auto; }
  .filter-bar { flex-direction: column; align-items: stretch; gap: 10px; }
  .filter-bar .filter-group { width: 100%; }
  .filter-bar select, .filter-sel { width: 100%; }

  /* ---- Results: table → stacked cards (no horizontal scroll) ---- */
  .results-layout { display: flex; flex-direction: column; gap: 14px; }
  .results-main { order: 1; min-width: 0; }
  .facets { order: 2; position: static; display: grid; grid-template-columns: 1fr; gap: 12px; }
  .facet-cta { display: block; }
  .facet-row { padding: 11px 8px; font-size: 14px; }
  .facet-row span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .facet-n { flex-shrink: 0; }

  .results-panel { padding: 0; border: none; background: transparent; box-shadow: none; }
  .tbl-scroll { overflow: visible; }
  .results-tbl { min-width: 0; width: 100%; }
  .results-tbl thead { display: none; }
  .results-tbl, .results-tbl tbody { display: block; }
  .results-tbl tr.result-row, .results-tbl tr.blur-row {
    display: block; position: relative; background: var(--surface);
    border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; margin: 0 0 12px;
  }
  .results-tbl td { display: block; border: none; padding: 0; white-space: normal; overflow-wrap: anywhere; }
  .results-tbl td.cell-co { font-size: 16px; font-weight: 700; line-height: 1.3; padding-right: 34px; margin-bottom: 8px; }
  .results-tbl td.cell-co a, .results-tbl td.cell-co .masked { font-size: 16px; }
  .results-tbl td[data-label] { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; font-size: 14px; border-top: 1px solid var(--slate-50); }
  .results-tbl td[data-label]::before { content: attr(data-label); color: var(--text-muted); font-weight: 600; flex: 0 0 auto; }
  .results-tbl td.cell-detail { display: block; margin-top: 12px; border-top: none; padding: 0; }
  .results-tbl td.cell-detail::before { content: none; }
  .results-tbl td.cell-detail .btn { width: 100%; }
  .results-tbl td.cell-detail .full-detail { font-size: 13.5px; color: var(--slate-700); }
  .results-tbl td.cell-check { position: absolute; top: 13px; right: 14px; padding: 0; }
  .results-tbl td.cell-check .reveal-cb { width: 22px; height: 22px; }
  .results-tbl td.cell-check .saved-tick { font-size: 18px; }
  .results-tbl tr.blur-row td { padding: 5px 0; }
  .results-tbl tr.blur-row td::before { content: none; }

  /* ---- Reveal / export / wall bars: stack, full-width ---- */
  .reveal-bar, .export-bar, .credits-wall { flex-direction: column; align-items: stretch; gap: 12px; }
  .reveal-bar { position: sticky; bottom: 0; z-index: 20; }
  .reveal-bar .btn, .credits-wall .btn { width: 100%; }
  .export-actions { display: grid; grid-template-columns: 1fr; gap: 8px; }
  .export-actions .btn { width: 100%; }

  /* ---- Secondary tables (payment history, market table, admin) scroll ---- */
  .panel .tbl:not(.results-tbl) { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; white-space: nowrap; }
}

/* ---- Portal / admin shell → iOS-style bottom tab bar ---- */
@media (max-width: 860px) {
  .shell { display: block; min-height: 100vh; }
  .main { padding: 18px 16px calc(80px + env(safe-area-inset-bottom)); }
  .sidebar {
    position: fixed; left: 0; right: 0; bottom: 0; top: auto; height: auto; z-index: 60;
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); display: block;
    background: var(--ink); border-top: 1px solid rgba(255,255,255,.08);
    box-shadow: 0 -6px 20px rgba(15,23,42,.18);
  }
  .sidebar .brand, .sidebar .nav-section, .sidebar .nav-spacer { display: none; }
  .sidebar nav { display: flex; flex-direction: row; gap: 2px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .sidebar nav a {
    flex: 1 0 auto; flex-direction: column; gap: 3px; min-width: 62px;
    padding: 7px 6px; border-radius: 12px; text-align: center; color: #94a3b8;
  }
  .sidebar nav a .nav-ic { font-size: 18px; line-height: 1; }
  .sidebar nav a .nav-lb { font-size: 10px; font-weight: 600; white-space: nowrap; }
  .sidebar nav a.active { background: var(--indigo); color: #fff; }

  /* ---- Buy credits / portal cards ---- */
  .main .admin-head { flex-direction: column; align-items: stretch; gap: 14px; }
  .admin-head .metric, .main .metric { width: 100%; min-width: 0; }
  .pack-grid { grid-template-columns: 1fr; gap: 14px; }
  .pack-card { padding: 22px 20px; }
  .pack-card .amount { font-size: 34px; }
}

/* ---- Cookie notice (essential-only, informational) ----------------------- */
.cookie-notice {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 80;
  max-width: 640px; margin: 0 auto; display: flex; align-items: center; gap: 14px;
  justify-content: space-between; background: var(--ink); color: #e2e8f0;
  padding: 12px 16px; border-radius: 14px; box-shadow: var(--shadow-md); font-size: 13.5px;
}
.cookie-notice a { color: #c7d2fe; font-weight: 600; }
.cookie-notice .btn { flex-shrink: 0; }
/* display:flex above out-specifies the [hidden] attribute, so re-hide explicitly
   — otherwise "Got it" (which sets hidden) can never dismiss the banner. */
.cookie-notice[hidden] { display: none; }
@media (max-width: 560px) {
  .cookie-notice { flex-direction: column; align-items: stretch; text-align: center; bottom: 12px; }
  .cookie-notice .btn { width: 100%; }
}

/* Header: keep the burger menu until there's room for the full nav (~1024px),
   so the brand + links + CTAs never collide/wrap on tablets & small laptops. */
@media (max-width: 1024px) {
  .nav-burger { display: flex; }
  .nav-menu {
    display: none; position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--border);
    padding: 6px 0 12px; box-shadow: 0 10px 28px rgba(15,23,42,.10);
  }
  .nav-menu.open { display: flex; }
  .nav-links { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-links a { padding: 12px 22px; font-size: 15px; }
  .nav-cta { flex-direction: column; align-items: stretch; gap: 8px; padding: 10px 18px 0; }
  .nav-cta .btn { width: 100%; }
}
