/* ============ Design tokens ============ */
/* Brand gradient sampled directly from the company mark:
   indigo #4A00FF at the top, magenta #F400FF at the base. */
:root {
  --brand-1: #4A00FF;
  --brand-2: #9500FF;
  --brand-3: #E000FF;
  --brand-4: #F400FF;

  --purple-950: #100821;
  --purple-900: #180E30;
  --purple-850: #201640;
  --purple-800: #2E1958;
  --purple-700: #3E1D70;
  --purple-600: #6D2FA8;
  --purple-500: #8C41CC;
  --purple-400: #A968E0;
  --orchid-500: #B463E0;
  --orchid-400: #CB86EA;

  --lilac-050: #FBF8FE;
  --lilac-100: #F2E9FB;

  --ink: #F4EEFC;
  --muted: #BBA6DE;
  --muted-2: #8A76B0;

  --gold: #E8C468;
  --success: #6FDCA8;
  --warn: #E8C468;
  --danger: #E88A8A;

  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-sm: 9px;

  --shadow-card: 0 24px 60px -24px rgba(10, 2, 30, 0.65);
  --shadow-soft: 0 10px 30px -14px rgba(10, 2, 30, 0.5);

  --font-display: 'Space Grotesk', 'Inter', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

/* ============ Reset ============ */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
[hidden] { display: none !important; }
body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--purple-950);
  color: var(--ink);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
button { font-family: inherit; }
ul { list-style: none; margin: 0; padding: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ============ Ambient background ============ */
.bg-glow {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(600px 420px at 18% -8%, rgba(74, 0, 255, 0.32), transparent 60%),
    radial-gradient(560px 480px at 88% 6%, rgba(244, 0, 255, 0.20), transparent 60%),
    radial-gradient(900px 700px at 50% 115%, rgba(149, 0, 255, 0.28), transparent 60%);
  animation: bgGlowDrift 13s ease-in-out infinite;
  transform-origin: 50% 50%;
}
.bg-mark {
  position: fixed;
  top: -6vw;
  right: -9vw;
  width: min(46vw, 560px);
  height: auto;
  z-index: 0;
  pointer-events: none;
  opacity: 0.08;
  filter: saturate(1.1);
  transform: rotate(-4deg);
}
@media (max-width: 720px) {
  .bg-mark { width: 70vw; top: -4vw; right: -18vw; opacity: 0.07; }
}

@keyframes bgGlowDrift {
  0%, 100% { opacity: 0.75; transform: translate3d(0, 0, 0) scale(1); }
  50% { opacity: 1; transform: translate3d(-34px, 26px, 0) scale(1.11); }
}

/* ============ Page shell ============ */
.page {
  position: relative;
  z-index: 1;
  max-width: 880px;
  margin: 0 auto;
  padding: 0 20px 48px;
}

/* ============ Corner icon stack (hamburger + help) ============ */
.corner-icons {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.corner-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.corner-btn:hover { background: var(--purple-850); border-color: var(--purple-700); }
#menuBtn.corner-btn { flex-direction: column; gap: 4px; }
.menu-btn-line {
  width: 15px;
  height: 1.5px;
  border-radius: 2px;
  background: var(--muted);
  transition: background 0.15s ease;
}
.corner-btn:hover .menu-btn-line { background: var(--ink); }
.corner-btn--help {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
  color: var(--muted);
}
.corner-btn--help:hover { color: var(--ink); }

/* ============ Side menu ============ */
.menu-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(8, 3, 18, 0.6);
  backdrop-filter: blur(2px);
  z-index: 40;
  opacity: 0;
  transition: opacity 0.5s ease;
}
.menu-backdrop.is-visible { opacity: 1; }

.side-menu {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(300px, 84vw);
  background: var(--purple-900);
  border-right: 1px solid var(--purple-700);
  z-index: 41;
  transform: translateX(-100%);
  transition: transform 1.1s cubic-bezier(.22,.7,.2,1);
  overflow-y: auto;
  box-shadow: 30px 0 60px -20px rgba(0,0,0,0.5);
}
.side-menu.is-open { transform: translateX(0); }
.side-menu.is-help-open { transition-duration: 1.1s; }

.side-menu-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 16px;
  border-bottom: 1px solid var(--purple-800);
}
.side-menu-logo { height: 22px; width: auto; }
.menu-close-btn {
  margin-left: auto;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 0;
  background: var(--purple-800);
  color: var(--muted);
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.menu-close-btn:hover { background: var(--purple-700); color: var(--ink); }

.side-menu-section {
  padding: 16px;
  border-bottom: 1px solid var(--purple-850);
}
.side-menu-section:last-child { border-bottom: 0; }

.side-menu-empty .side-menu-section {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.36s ease, transform 0.36s ease;
}
.side-menu.content-in .side-menu-empty .side-menu-section { opacity: 1; transform: translateY(0); }
.side-menu-text--muted { font-style: italic; color: var(--muted-2); }

.side-menu-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  border: 0;
  background: transparent;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 0;
  cursor: pointer;
  transition: color 0.15s ease;
}
.side-menu-link:hover { color: #C9A0FF; }
.side-menu-link--danger { color: #E88A8A; }
.side-menu-link--danger:hover { color: #FF9F9F; }
.side-menu-link:hover .side-menu-link-arrow { transform: translateX(3px); }
.side-menu-link-arrow {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  transition: transform 0.15s ease;
}

.side-menu-help .side-menu-section {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.36s ease, transform 0.36s ease;
}
.side-menu.content-in .side-menu-help .side-menu-section { opacity: 1; transform: translateY(0); }
.side-menu-help .side-menu-section:nth-child(1) { transition-delay: 0.04s; }
.side-menu-help .side-menu-section:nth-child(2) { transition-delay: 0.10s; }
.side-menu-help .side-menu-section:nth-child(3) { transition-delay: 0.16s; }
.side-menu-title {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #C9A0FF;
  margin: 0 0 8px;
  font-weight: 600;
}
.side-menu-text {
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted);
  margin: 0;
}
.side-menu-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.side-menu-list li {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted);
}
.side-menu-list .dot-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 3px;
}
.side-menu-list strong { color: var(--ink); font-weight: 600; }
.dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  transform: translateY(-1px);
  display: inline-block;
}
.dot--alta { background: var(--success); }
.dot--media { background: var(--warn); }
.dot--baixa { background: var(--danger); }

/* ============ Topbar ============ */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0 8px;
}
.topbar-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-logo { height: 24px; width: auto; display: block; filter: drop-shadow(0 2px 10px rgba(149, 0, 255, 0.35)); }
.brand-word { display: flex; flex-direction: column; line-height: 1; gap: 3px; }
.brand-name {
  font-family: 'Poppins', var(--font-display);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.brand-grupo {
  font-family: 'Poppins', var(--font-body);
  font-weight: 600;
  font-size: 8px;
  letter-spacing: 0.32em;
  color: var(--muted-2);
  align-self: flex-end;
}
.brand-sub {
  font-size: 12px;
  color: var(--muted-2);
  font-weight: 500;
}
.topbar-count {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted-2);
  letter-spacing: 0.03em;
}

/* ============ Hero ============ */
.hero {
  padding: 40px 0 8px;
  text-align: center;
}
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #C9A0FF;
  margin: 0 0 14px;
}
.hero h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(30px, 6vw, 46px);
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0 0 16px;
  color: var(--ink);
}
.hero h1 .accent {
  background: linear-gradient(90deg, var(--brand-1), var(--brand-4));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lede {
  font-size: 15px;
  line-height: 1.55;
  color: var(--muted);
  max-width: 480px;
  margin: 0 auto 30px;
}

/* ============ Search ============ */
.search-wrap {
  position: relative;
  max-width: 560px;
  margin: 0 auto;
}
.search-row {
  display: flex;
  align-items: stretch;
  gap: 10px;
}
.search-box {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--purple-850);
  border: 1.5px solid var(--purple-700);
  border-radius: var(--radius-md);
  padding: 0 16px;
  height: 56px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.search-box:focus-within {
  border-color: var(--gold);
  background: var(--purple-800);
  box-shadow: 0 0 0 4px rgba(232, 196, 104, 0.14);
}
.search-icon { width: 19px; height: 19px; color: var(--muted-2); flex-shrink: 0; }
.search-box:focus-within .search-icon { color: var(--gold); }
#searchInput {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16.5px;
  font-weight: 500;
  min-width: 0;
}
#searchInput::placeholder { color: var(--muted-2); font-weight: 400; }
.clear-btn {
  border: 0;
  background: var(--purple-700);
  color: var(--muted);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, color 0.15s ease;
}
.clear-btn:hover { background: var(--purple-600); color: var(--ink); }
.clear-btn[hidden] { display: none; }

/* ============ Type filter select ============ */
.type-filter-wrap { flex-shrink: 0; }
.type-filter {
  height: 56px;
  appearance: none;
  -webkit-appearance: none;
  background: var(--purple-850) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23BBA6DE' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 14px center;
  border: 1.5px solid var(--purple-700);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  padding: 0 32px 0 16px;
  border-radius: var(--radius-md);
  cursor: pointer;
  max-width: 168px;
  transition: border-color 0.18s ease, background-color 0.18s ease;
}
.type-filter:hover { border-color: var(--purple-600); }
.type-filter:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }

/* ============ Type browse panel (scrollable model list) ============ */
.type-browse {
  margin-top: 10px;
  background: var(--purple-850);
  border: 1px solid var(--purple-700);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  animation: rise 0.22s ease both;
}
.type-browse-head {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--purple-700);
}
#typeBrowseTitle {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #C9A0FF;
}
.type-browse-list {
  max-height: 320px;
  overflow-y: auto;
}
.type-browse-list .suggestion-item { padding: 10px 16px; }

/* ============ Suggestions dropdown ============ */
.suggestions {
  position: absolute;
  left: 0; right: 0; top: calc(100% + 8px);
  background: var(--purple-850);
  border: 1px solid var(--purple-700);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  max-height: 340px;
  overflow-y: auto;
  z-index: 20;
}
.suggestion-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 16px;
  cursor: pointer;
  text-align: left;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.suggestion-item:last-child { border-bottom: 0; }
.suggestion-item:hover,
.suggestion-item.is-active {
  background: var(--purple-700);
}
.suggestion-main { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.suggestion-model {
  font-weight: 600;
  font-size: 14.5px;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.suggestion-model mark {
  background: transparent;
  color: var(--gold);
  font-weight: 700;
}
.suggestion-brand {
  font-size: 12px;
  color: var(--muted-2);
  margin-top: 1px;
}
.suggestion-tag {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.03em;
  color: var(--muted);
  background: rgba(255,255,255,0.06);
  padding: 3px 8px;
  border-radius: 20px;
  white-space: nowrap;
}

/* ============ Result section ============ */
.result { margin-top: 40px; animation: rise 0.32s ease both; }
#mainView, #treinamentosView { animation: rise 0.32s ease both; }

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.ident {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(120deg, var(--brand-1), var(--brand-3));
  border-radius: var(--radius-md);
  padding: 14px 18px;
  box-shadow: var(--shadow-soft);
  flex-wrap: wrap;
}
.ident-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(111, 220, 168, 0.22);
  flex-shrink: 0;
}
.ident-text { flex: 1; min-width: 0; }
.ident-modelo {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  color: #fff;
  margin-right: 8px;
}
.ident-meta {
  font-size: 13px;
  color: var(--lilac-100);
  opacity: 0.85;
}
.ident-tipo {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(255,255,255,0.14);
  color: #fff;
  padding: 5px 10px;
  border-radius: 20px;
  flex-shrink: 0;
}

/* ============ Year filter ============ */
.year-filter {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
  background: var(--purple-850);
  border: 1px solid var(--purple-700);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-top: 10px;
}
.year-filter-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}
.year-filter-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.year-filter select {
  appearance: none;
  -webkit-appearance: none;
  background: var(--purple-800) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23BBA6DE' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 10px center;
  border: 1px solid var(--purple-600);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 13.5px;
  font-weight: 600;
  padding: 7px 26px 7px 12px;
  border-radius: 9px;
  cursor: pointer;
}
.year-filter select:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
.year-filter-sep { font-size: 12.5px; color: var(--muted-2); }
.year-reset {
  border: 1px solid var(--purple-600);
  background: transparent;
  color: #C9A0FF;
  font-size: 12px;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 9px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.year-reset:hover { background: var(--purple-700); color: var(--ink); }
.year-filter-note {
  width: 100%;
  font-size: 11.5px;
  color: var(--muted-2);
  font-style: italic;
}

/* ============ Login ============ */
.login-card {
  max-width: 360px;
  margin: 8px auto 0;
  background: var(--purple-850);
  border: 1px solid var(--purple-700);
  border-radius: var(--radius-lg);
  padding: 28px 26px 26px;
  box-shadow: var(--shadow-card);
}
.login-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 6px;
}
.login-label:not(:first-child) { margin-top: 16px; }
.login-input {
  width: 100%;
  height: 46px;
  background: var(--purple-900);
  border: 1.5px solid var(--purple-700);
  border-radius: var(--radius-sm);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  padding: 0 14px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.login-input:focus {
  outline: 0;
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(232, 196, 104, 0.14);
}
.login-error {
  margin: 14px 0 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: #FF9F9F;
  background: rgba(232, 138, 138, 0.1);
  border: 1px solid rgba(232, 138, 138, 0.28);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}
.btn-primary {
  width: 100%;
  height: 48px;
  margin-top: 20px;
  border: 0;
  border-radius: var(--radius-md);
  background: linear-gradient(120deg, var(--brand-1), var(--brand-3));
  color: #fff;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: filter 0.15s ease, opacity 0.15s ease;
}
.btn-primary:hover { filter: brightness(1.1); }
.btn-primary:disabled { opacity: 0.6; cursor: default; filter: none; }

/* ============ Cards ============ */
.cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 16px;
}
@media (max-width: 620px) {
  .cards { grid-template-columns: 1fr; }
}

.card {
  position: relative;
  background: var(--lilac-050);
  border-radius: var(--radius-lg);
  padding: 20px 20px 18px;
  box-shadow: var(--shadow-card);
  border-top: 4px solid var(--brand-1);
}
.card-bloqueio { border-top-color: var(--brand-4); background: #FDF3FE; }

.card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.card-icon { font-size: 15px; }
.card-title {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--brand-1);
  font-weight: 600;
}
.card-bloqueio .card-title { color: #C400D6; }


/* ---------- ranked rows (1st / 2nd place) ---------- */
.rank {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.rank-1 { margin-bottom: 14px; }
.rank-2 {
  padding-top: 12px;
  border-top: 1px dashed rgba(107, 47, 168, 0.18);
}
.rank-badge {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  margin-top: 2px;
}
.rank-badge--1 {
  background: var(--brand-1);
  color: #fff;
}
.rank-badge--1.rank-badge--bloqueio { background: var(--brand-4); }
.rank-badge--2 {
  background: rgba(107, 47, 168, 0.12);
  color: var(--purple-700);
}
.rank-body { flex: 1; min-width: 0; }

.rank-value {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
  color: var(--purple-900);
  margin: 0 0 8px;
  line-height: 1.15;
}
.rank-value--2 {
  font-size: 14.5px;
  font-weight: 600;
  color: #6B5C87;
  margin-bottom: 6px;
}

.rank-foot {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.rank-pct {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 15px;
  color: var(--brand-1);
}
.rank-pct--bloqueio { color: #C400D6; }
.rank-pct--2 {
  font-size: 12px;
  font-weight: 600;
  color: #8A7AA8;
}
.rank-sample {
  font-size: 12px;
  color: #7A6A94;
}

.confidence {
  display: inline-block;
  margin-top: 12px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 4px 10px;
  border-radius: 20px;
}
.confidence--alta { background: rgba(111,220,168,0.16); color: #1E8A5E; }
.confidence--media { background: rgba(232,196,104,0.22); color: #8A6A15; }
.confidence--baixa { background: rgba(232,138,138,0.18); color: #B03A3A; }

/* ============ Alternate matches ============ */
.alt-matches {
  margin-top: 16px;
  padding: 14px 18px;
  background: var(--purple-850);
  border: 1px dashed var(--purple-700);
  border-radius: var(--radius-md);
  font-size: 12.5px;
  color: var(--muted);
}
.alt-matches span { display: block; margin-bottom: 8px; }
.alt-matches-list { display: flex; flex-wrap: wrap; gap: 8px; }
.alt-chip {
  border: 1px solid var(--purple-600);
  background: var(--purple-800);
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.alt-chip:hover { background: var(--purple-600); border-color: var(--brand-3); }

/* ============ Empty / idle states ============ */
.empty-state, .idle-state {
  text-align: center;
  margin-top: 44px;
  color: var(--muted);
}
.empty-state p:first-child { font-size: 15px; color: var(--ink); margin-bottom: 6px; }
.empty-hint { font-size: 13px; color: var(--muted-2); }

.idle-state p { font-size: 13px; color: var(--muted-2); margin-bottom: 14px; }
.idle-examples {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  justify-content: center;
}
.chip {
  display: inline-block;
  border: 1px solid var(--purple-700);
  background: var(--purple-850);
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.chip:hover {
  border-color: var(--brand-3);
  color: var(--ink);
  background: var(--purple-700);
}

/* ============ Footer ============ */
.footer {
  margin-top: 56px;
  text-align: center;
  border-top: 1px solid var(--purple-850);
  padding-top: 20px;
}
.footer p {
  font-size: 11.5px;
  color: var(--muted-2);
  max-width: 480px;
  margin: 0 auto;
  line-height: 1.5;
}

/* ============ Focus visibility ============ */
a:focus-visible, button:focus-visible, input:focus-visible, [role="option"]:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* ============ Mobile tweaks ============ */
@media (max-width: 480px) {
  .topbar { padding: 16px 0 4px; }
  .brand-sub { display: none; }
  .hero { padding-top: 26px; }
  .search-row { flex-direction: column; }
  .search-box { height: 52px; flex: none; width: 100%; }
  .type-filter { width: 100%; max-width: none; height: 48px; }
  #searchInput { font-size: 16px; } /* prevents iOS zoom on focus */
  .ident { padding: 12px 14px; }
  .card { padding: 17px 16px 15px; }
}
