/* ExploitMatch design system.
   Built on ThreatCluster tokens, disciplined per Vercel/Linear principles:
   systematic spacing, restraint, real iconography, one accent, generous whitespace. */

:root {
  /* surfaces — TC palette, slightly tuned for depth layering */
  --bg:        #0a0b0a;
  --surface:   #131413;
  --surface-2: #1a1b1a;
  --border:    #232423;
  --border-2:  #2e2f2e;
  --hairline:  rgba(255,255,255,0.06);

  /* text */
  --text:      #f2f2f2;
  --text-2:    #9a9b9a;   /* secondary */
  --text-3:    #6b6c6b;   /* muted */

  /* single accent — used sparingly */
  --red:       #d10a30;
  --red-hover: #e62a4a;

  /* severity (data only, never decoration) */
  --critical:  #f04359;
  --high:      #ff7847;
  --medium:    #f0a93e;
  --low:       #3fb978;
  --info:      #4a9fe0;

  /* systematic spacing (4px base) */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px;
  --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px;

  --radius:   8px;
  --radius-sm:6px;
  --maxw:     1080px;
}

* { box-sizing: border-box; }
html { font-size: 16px; color-scheme: dark; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
  font-size: 16px;            /* 16px minimum body text */
  line-height: 1.6;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  letter-spacing: -0.02em;
  margin: 0;
  font-weight: 600;
  line-height: 1.2;
}
h1 { font-size: clamp(2rem, 4vw, 3.25rem); font-weight: 600; }
h2 { font-size: 1.375rem; }
h3 { font-size: 1rem; }

p { margin: 0; }
a { color: inherit; text-decoration: none; }

.mono, .num { font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, monospace; font-variant-numeric: tabular-nums; }
.tnum { font-variant-numeric: tabular-nums; }

/* ---------- layout ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--s5); width: 100%; }
@media (max-width: 640px) { .wrap { padding-inline: var(--s4); } }

/* hero collapses to a single column on narrow screens */
@media (max-width: 820px) {
  .hero-row { grid-template-columns: 1fr !important; gap: var(--s5) !important; }
}
/* CVE gauge + metrics stack on narrow screens */
@media (max-width: 640px) {
  .cve-top { grid-template-columns: 1fr !important; justify-items: center; }
}
/* CVE description + affected stack on narrow screens */
@media (max-width: 700px) {
  .cve-info { grid-template-columns: 1fr !important; }
}
/* stack page: CVEs | context collapses to one column */
@media (max-width: 820px) {
  .stack-cols { grid-template-columns: 1fr !important; }
}
/* entity page: main | related-sidebar collapses (sidebar drops below) */
@media (max-width: 820px) {
  .entity-cols { grid-template-columns: 1fr !important; }
  .entity-cols aside .card { position: static !important; }
}

/* ============================================================
   Mobile responsiveness — consolidated. Mobile-first intent:
   below these widths, every multi-column layout collapses to a
   single column and dense controls reflow/shrink to fit a phone.
   ============================================================ */

/* home: Trending | CVEs two-col collapses (Trending list drops below CVEs).
   Grid items need min-width:0 or their nowrap content (the .rank rows) forces the
   track wider than the viewport — the cause of the home-page horizontal overflow. */
.trending-cols > div { min-width: 0; }
@media (max-width: 860px) {
  .trending-cols { grid-template-columns: 1fr !important; }
}

/* home "Most active vulnerabilities": tabs + arrows wrap below the heading */
@media (max-width: 700px) {
  .mav-head { flex-wrap: wrap; }
  .mav-controls { margin-top: 0 !important; flex-wrap: wrap; }
}

/* navbar: drop the inline search on small screens (home keeps its hero search;
   other pages keep the nav links) and tighten spacing. */
@media (max-width: 760px) {
  header .wrap { gap: var(--s3) !important; height: 64px !important; }
  header img[alt="ExploitMatch"] { height: 44px !important; }
  .nav-search { display: none !important; }
}
/* tightest: hide the secondary nav links, keep only the primary CTA */
@media (max-width: 460px) {
  .nav-links .btn-ghost { display: none; }
  .nav-links .btn-primary { padding: 8px 12px; white-space: nowrap; }
}
/* very narrow phones: shrink logo + CTA so the header row never overflows */
@media (max-width: 380px) {
  header img[alt="ExploitMatch"] { height: 38px !important; }
  .nav-links .btn-primary { padding: 7px 10px; font-size: 0.9rem; gap: 4px; }
  .nav-links .btn-primary svg { display: none; }   /* drop the external-link glyph */
}

/* 4-up summary strips (stack risk rollup, category stats) -> 2x2, no left rules */
@media (max-width: 640px) {
  #stackSummary, #catSummary { grid-template-columns: 1fr 1fr !important; }
  #stackSummary.divide-x > * + *, #catSummary.divide-x > * + * { border-left: 0; }
  #stackSummary.divide-x > *:nth-child(odd) + *,
  #catSummary.divide-x > *:nth-child(odd) + * { border-left: 1px solid var(--border); }
}
@media (max-width: 380px) {
  #stackSummary, #catSummary { grid-template-columns: 1fr !important; }
  #stackSummary.divide-x > * + *, #catSummary.divide-x > * + * { border-left: 0 !important; }
}

/* activity rows: keep hero image proportional, allow body to breathe on phones */
@media (max-width: 460px) {
  .act-img, .act-fade { width: 96px !important; }
  .act-body { padding-left: 76px !important; }
  .act-go { padding: 0 8px; }
}

/* CVE detail: header (title + CTA) stacks; full-width CTA tap target */
@media (max-width: 560px) {
  .cve-top { gap: var(--s4) !important; }
}

/* prevent horizontal scroll from any stray wide child.
   overflow-x:clip (not hidden) does NOT create a scroll container, so it can't
   break the sticky header. */
html, body { max-width: 100%; overflow-x: clip; }
img, svg { max-width: 100%; }

.eyebrow {
  font-size: 1rem; font-weight: 500; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--text-3);
}

/* ---------- icons ---------- */
.ico { display: inline-flex; vertical-align: -0.15em; flex-shrink: 0; }
.ico-2 { color: var(--text-2); }
.ico-3 { color: var(--text-3); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: var(--s2);
  padding: 8px 14px; font-size: 1rem; font-weight: 500;
  border-radius: var(--radius-sm); border: 1px solid var(--border-2);
  color: var(--text-2); background: transparent; cursor: pointer;
  transition: color .15s ease, border-color .15s ease, background-color .15s ease;
}
.btn:hover { color: var(--text); border-color: var(--text-3); }
.btn:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

.btn-primary {
  display: inline-flex; align-items: center; gap: var(--s2);
  padding: 8px 14px; font-size: 1rem; font-weight: 600;
  border-radius: var(--radius-sm); border: 1px solid transparent;
  color: #fff; background: var(--red); cursor: pointer;
  transition: background-color .15s ease;
}
.btn-primary:hover { background: var(--red-hover); }
.btn-primary:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

.btn-ghost {
  display: inline-flex; align-items: center; gap: var(--s2);
  padding: 8px 12px; font-size: 1rem; font-weight: 500;
  border-radius: var(--radius-sm); border: 1px solid transparent;
  color: var(--text-2); background: transparent; cursor: pointer;
  transition: color .15s ease, background-color .15s ease;
}
.btn-ghost:hover { color: var(--text); background: var(--hairline); }
.btn-ghost:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

.link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 1rem; font-weight: 500; color: var(--text-2);
  transition: color .15s ease;
}
.link:hover { color: var(--text); }
.link-accent { color: var(--red); }
.link-accent:hover { color: var(--red-hover); }

/* ---------- cards ---------- */
.card {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
a.card, button.card { display: block; text-align: left; width: 100%; cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease; }
a.card:hover, button.card:hover { border-color: var(--text-3); background: var(--hairline); }
a.card:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

/* ---------- chips / tags ---------- */
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; font-size: 1rem; font-weight: 500; line-height: 1.4;
  border-radius: var(--radius-sm); border: 1px solid var(--border-2);
  color: var(--text-2); background: var(--bg);
  transition: color .15s ease, border-color .15s ease, background-color .15s ease;
}
button.tag, a.tag { cursor: pointer; }
button.tag:hover, a.tag:hover { color: var(--text); border-color: var(--text-3); }
.tag.removable { padding-right: 9px; }
.tag .tag-x { color: var(--text-3); display: inline-flex; }
.tag.removable:hover .tag-x { color: var(--text); }

/* severity / status accents on tags (data semantics, text always present) */
.tag-kev    { color: #ff97a6; border-color: rgba(240,67,89,0.4);  background: rgba(240,67,89,0.08); }
.tag-exploit{ color: var(--text); border-color: var(--border-2); }
.tag-new    { color: var(--low); border-color: rgba(63,185,120,0.35); background: rgba(63,185,120,0.08);
              font-size: 1rem; font-weight: 600; letter-spacing: 0.03em; padding: 4px 9px; }

/* severity pill (CVSS) */
.sev { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: var(--radius-sm);
       font-size: 1rem; font-weight: 600; letter-spacing: 0.02em; text-transform: uppercase; }

/* ---------- tabs (segmented) ---------- */
.seg { display: inline-flex; gap: 2px; padding: 3px; background: transparent;
       border: 1px solid var(--border); border-radius: var(--radius); }
.seg button {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 11px; font-size: 1rem; font-weight: 500;
  color: var(--text-2); background: transparent; border: 0; border-radius: var(--radius-sm);
  cursor: pointer; transition: color .15s ease, background-color .15s ease; white-space: nowrap;
}
.seg button:hover { color: var(--text); }
.seg button[aria-selected="true"] { color: var(--text); background: var(--surface-2); }
.seg button:focus-visible { outline: 2px solid var(--red); outline-offset: -1px; }

/* ---------- rank list ---------- */
.rank { display: flex; align-items: center; gap: var(--s3); padding: 10px 12px; min-width: 0;
        border-radius: var(--radius-sm); transition: background-color .15s ease; }
.rank:hover { background: var(--surface-2); }
.rank:focus-visible { outline: 2px solid var(--red); outline-offset: -2px; }
.rank-n { font-size: 1rem; color: var(--text-3); width: 16px; text-align: right; font-variant-numeric: tabular-nums; }
.bar { height: 2px; background: var(--border-2); border-radius: 999px; overflow: hidden; margin-top: 6px; }
.bar > i { display: block; height: 100%; background: var(--text-3); border-radius: 999px; }

/* score bar */
.score { display: inline-flex; align-items: center; gap: var(--s2); }
.score-track { width: 56px; height: 4px; background: var(--border-2); border-radius: 999px; overflow: hidden; }
.score-track > i { display: block; height: 100%; border-radius: 999px; }

/* ---------- search / dropdown ---------- */
.field {
  display: flex; align-items: center; gap: var(--s3);
  padding: 0 var(--s4); background: transparent;
  border: 1px solid var(--border-2); border-radius: var(--radius);
  transition: border-color .15s ease;
}
.field:focus-within { border-color: var(--text-3); }
.field input { flex: 1; background: transparent; border: 0; outline: 0; color: var(--text);
  font-size: 1rem; padding: 13px 0; font-family: inherit; }
.field input::placeholder { color: var(--text-3); }

.popover {
  position: absolute; left: 0; right: 0; margin-top: 6px; z-index: 50;
  background: var(--surface); border: 1px solid var(--border-2); border-radius: var(--radius);
  box-shadow: 0 1px 2px rgba(0,0,0,.4), 0 12px 32px rgba(0,0,0,.45);
  overflow: hidden; padding: 4px;
}
.opt { display: flex; align-items: center; justify-content: space-between; gap: var(--s3);
  padding: 9px 11px; border-radius: var(--radius-sm); cursor: pointer;
  transition: background-color .12s ease; }
.opt:hover, .opt[aria-selected="true"] { background: var(--surface-2); }

/* ---------- misc ---------- */
.grid { display: grid; gap: var(--s3); }
.divide-x > * + * { border-left: 1px solid var(--border); }
.hairline { border-top: 1px solid var(--border); }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.fade { animation: fade .2s ease both; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- stack filter bar ---------- */
.filterbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: var(--s5); }
.filterbar .fb-group { display: inline-flex; align-items: center; gap: 7px; }
.filterbar .fb-label { font-size: 0.9rem; color: var(--text-3); white-space: nowrap; }
.filterbar select {
  font-family: inherit; font-size: 0.9rem; color: var(--text); cursor: pointer;
  padding: 7px 28px 7px 11px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-2); background: transparent;
  -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239a9b9a' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 9px center;
}
.filterbar select:hover { border-color: var(--text-3); }
.filterbar select:focus-visible { outline: 2px solid var(--red); outline-offset: 1px; }
.fb-divider { width: 1px; align-self: stretch; min-height: 22px; background: var(--border-2); }
.fb-chip {
  font-family: inherit; font-size: 0.9rem; font-weight: 500; line-height: 1;
  padding: 7px 12px; border-radius: var(--radius-sm); cursor: pointer; white-space: nowrap;
  border: 1px solid var(--border-2); background: transparent; color: var(--text-2);
  transition: color .15s ease, border-color .15s ease, background-color .15s ease;
}
.fb-chip:hover { color: var(--text); border-color: var(--text-3); }
/* pressed state must beat :hover so a selected chip never goes white-on-tint */
.fb-chip[aria-pressed="true"],
.fb-chip[aria-pressed="true"]:hover { color: #ff97a6; border-color: var(--red); background: rgba(240,67,89,0.12); }
.fb-chip:focus-visible { outline: 2px solid var(--red); outline-offset: 1px; }

/* ---------- pagination: nav (arrows+counter, in heading) + dots (below) ---------- */
.pg-nav { display: flex; align-items: center; gap: 10px; }
.pg-nav:empty { display: none; }
.em-dots { display: flex; align-items: center; gap: 7px; margin-top: var(--s4); }
.em-dots:empty { display: none; }
.pg-arrow {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; padding: 0; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--border-2); background: transparent; color: var(--text-2);
  transition: color .15s ease, border-color .15s ease;
}
.pg-arrow:hover { color: var(--text); border-color: var(--text-3); }
.pg-arrow:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.pg-count { font-size: 0.95rem; color: var(--text-3); min-width: 38px; text-align: center; }
.pg-count b { color: var(--text); font-weight: 600; }
.pg-dots { display: flex; gap: 7px; margin-left: 4px; }
.pg-dot {
  width: 8px; height: 8px; padding: 0; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--border-2); transition: background-color .15s ease, width .15s ease;
}
.pg-dot:hover { background: var(--text-3); }
.pg-dot[aria-current="true"] { background: var(--red); width: 20px; }
.pg-dot:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

/* ---------- CVE exploit rows ---------- */
a.cve-exploit {
  display: flex; align-items: flex-start; gap: var(--s3); padding: 14px 16px;
}
.cve-exploit-icon {
  flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: var(--radius-sm);
  background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border);
}
.cve-exploit-icon img { display: block; }

/* ---------- entity hero ---------- */
/* pull up behind the sticky 76px navbar so the colour shows through its translucent blur */
.entity-hero { position: relative; width: 100%; overflow: hidden; margin-top: -76px; }
.entity-hero-bg {
  position: absolute; inset: 0; z-index: 0;
  /* --hero-c set from the favicon colour at runtime; default to brand red tint */
  background:
    radial-gradient(120% 160% at 18% -20%, color-mix(in srgb, var(--hero-c, var(--red)) 60%, transparent) 0%, transparent 60%),
    linear-gradient(180deg, color-mix(in srgb, var(--hero-c, var(--red)) 28%, var(--bg)) 0%, var(--bg) 100%);
  filter: blur(46px); transform: scale(1.25); opacity: 0.9;
}
/* soft fade to page bg at the bottom (instead of a hard border line) */
.entity-hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 90px; z-index: 1;
  background: linear-gradient(180deg, transparent 0%, var(--bg) 100%); pointer-events: none;
}
/* clear the navbar: 76px nav + breathing room */
.entity-hero-inner { position: relative; z-index: 2; padding-top: calc(76px + var(--s5)); padding-bottom: var(--s7); }
.entity-hero-back { margin-bottom: var(--s5); }
.entity-hero-id { display: flex; align-items: flex-end; gap: var(--s4); }
.entity-hero-avatar {
  width: 72px; height: 72px; flex: 0 0 72px; border-radius: 16px; overflow: hidden;
  background: var(--surface); border: 2px solid var(--bg);
  box-shadow: 0 6px 24px rgba(0,0,0,.5); display: inline-flex;
}
/* scale the logo box (emLogo renders at the px we pass, but ensure it fills the avatar) */
.entity-hero-avatar .em-logo-wrap, .entity-hero-avatar .em-logo, .entity-hero-avatar .em-logo-img,
.entity-hero-avatar .em-mono { width: 72px !important; height: 72px !important; border-radius: 14px; }
.entity-hero-avatar .em-mono { font-size: 30px !important; }

/* ---------- recent-activity rows (entity page) ---------- */
a.act-row {
  position: relative; display: flex; align-items: center; gap: 0; overflow: hidden;
  min-height: 116px; padding: 0; background: #0a0b0a;   /* black so the hero fades into it */
}
/* hero image absolutely fills the LEFT portion of the row; the row is position:relative */
.act-img {
  position: absolute; left: 0; top: 0; bottom: 0; width: 300px;
  background-size: cover; background-position: center; background-repeat: no-repeat;
}
/* fade the image hard to BLACK, starting early so text sits on near-black backing */
.act-fade {
  position: absolute; left: 0; top: 0; bottom: 0; width: 300px;
  background: linear-gradient(90deg,
    rgba(10,11,10,0) 0%, rgba(10,11,10,0.6) 18%, rgba(10,11,10,0.92) 38%, #0a0b0a 55%);
}
.act-media { position: static; }   /* image is absolute; no reserved column needed */
.act-body {
  position: relative; z-index: 1; flex: 1; min-width: 0;
  display: flex; flex-direction: column; justify-content: center; gap: 4px;
  padding: 14px 16px 14px 180px;   /* left padding clears the visible part of the hero */
}
/* no image -> normal left padding */
.act-row:not(:has(.act-img)) .act-body { padding-left: 16px; }
.act-title {
  font-family: 'IBM Plex Sans', sans-serif; font-weight: 600; font-size: 1rem; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}
.act-desc {
  color: var(--text-2); font-size: 0.95rem; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.act-date { color: var(--text-3); font-size: 0.875rem; display: inline-flex; align-items: center; gap: 5px; margin-top: 2px; }
.act-go { position: relative; z-index: 1; display: flex; align-items: center; padding: 0 16px; color: var(--text-3); flex: 0 0 auto; }
.act-row:hover .act-go { color: var(--text); }

/* associated-CVE rows: same shape as activity rows, gauge instead of hero image */
a.cve-row { display: flex; align-items: center; gap: 0; overflow: hidden; min-height: 92px; padding: 0; }
.cverow-gauge {
  flex: 0 0 96px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0; padding: 12px 0; border-right: 1px solid var(--border);
}
.cverow-gauge svg { display: block; }
.cve-body {
  flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 4px;
  padding: 14px 16px;
}
@media (max-width: 560px) {
  .act-img, .act-fade { width: 140px; }
  .act-body { padding-left: 110px; }
}

/* ---------- browse / view-all list ---------- */
.browse-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--s3); }
a.browse-row {
  display: flex; align-items: center; gap: var(--s3); min-width: 0;
  padding: 12px 14px; border-radius: var(--radius);
}
.browse-name { flex: 1; min-width: 0; font-weight: 600; font-size: 1rem; }
.browse-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; flex: 0 0 auto; text-align: right; }
.browse-stat { font-size: 0.85rem; color: var(--text-3); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* export menu (stack page) */
.export-opt {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  width: 100%; padding: 9px 12px; border: 0; border-radius: var(--radius-sm);
  background: transparent; color: var(--text); font: inherit; font-size: 1rem;
  font-weight: 600; text-align: left; cursor: pointer;
}
.export-opt:hover { background: var(--surface-2); }
.export-opt:focus-visible { outline: 2px solid var(--red); outline-offset: -2px; }
.export-hint { font-size: 0.8rem; font-weight: 400; color: var(--text-3); }
#exportBtn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* CVE card footer meta (EPSS + published date) */
.cve-card-meta {
  display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px;
  padding-top: 10px; border-top: 1px solid var(--border);
  font-size: 0.85rem; color: var(--text-3);
}
.cve-meta-item { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cve-meta-item .ico { color: var(--text-3); }
.browse-go { flex: 0 0 auto; color: var(--text-3); display: flex; align-items: center; }
a.browse-row:hover .browse-go { color: var(--text); }
@media (max-width: 480px) {
  .browse-grid { grid-template-columns: 1fr; }
}

/* ---------- suggestions carousel ---------- */
#suggest { -ms-overflow-style: none; min-width: 0; }   /* min-width:0 so the carousel clips instead of widening the page */
#suggest::-webkit-scrollbar { display: none; }    /* hide scrollbar (WebKit) */
#suggest .tag { flex: 0 0 auto; white-space: nowrap; border-color: transparent; background: transparent; }  /* chips: no outline */
#suggest .tag:hover { border-color: transparent; color: var(--text); }
.carousel-arrow {
  flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 999px;
  border: 1px solid var(--border-2); background: transparent; color: var(--text-2);
  cursor: pointer; transition: color .15s ease, border-color .15s ease, opacity .15s ease;
}
.carousel-arrow:hover { color: var(--text); border-color: var(--text-3); }
.carousel-arrow:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.carousel-arrow[disabled] { opacity: 0.3; cursor: default; }

/* ---------- entity logos ---------- */
.em-logo-wrap { position: relative; display: inline-flex; flex-shrink: 0; vertical-align: middle; }
.em-logo, .em-logo-img {
  border-radius: 5px; display: inline-flex; align-items: center; justify-content: center;
}
.em-logo-img {
  position: absolute; inset: 0; object-fit: contain; background: var(--surface-2);
  border: 1px solid var(--border); padding: 2px;
}
.em-mono {
  border: 1px solid; font-family: 'IBM Plex Sans', sans-serif; font-weight: 600;
  letter-spacing: -0.02em; line-height: 1;
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 8px; border: 2px solid var(--bg); }
::-webkit-scrollbar-track { background: transparent; }
