/* ==========================================================================
   EDGAR Insights — design system + index page styles
   --------------------------------------------------------------------------
   This file defines the FULL design-token contract (SPEC §12). Other pages
   (admin.css) consume these custom properties and utility classes:

     Tokens:   --bg --bg-elev --surface --text --text-muted --border
               --accent --accent-contrast --success --warning --danger
               --radius --shadow-1 --shadow-2 --font-sans --font-mono
     Classes:  .btn .btn-primary .btn-ghost .card .chip .pill .pill-high
               .pill-med .pill-low .input .table-wrap .skeleton

   Light theme is the default; dark applies via prefers-color-scheme when no
   manual choice exists, or via [data-theme="dark"] on <html> (persisted in
   localStorage("edgar_theme")).
   ========================================================================== */

/* The [hidden] attribute must always win over author display rules,
   or JS show/hide toggling silently breaks. */
[hidden] {
  display: none !important;
}

/* --------------------------------------------------------------------------
   1. Design tokens
   -------------------------------------------------------------------------- */

:root {
  color-scheme: light;

  --bg: #F7F8FA;
  --bg-elev: #FFFFFF;
  --surface: #FFFFFF;
  --text: #0B1220;
  --text-muted: #5B6472;
  --border: #E4E7EC;

  --accent: #3B5BFD;
  --accent-contrast: #FFFFFF;
  --success: #0E7A43;
  --warning: #92610C;
  --danger: #C42B2B;

  --radius: 14px;
  --shadow-1: 0 1px 2px rgba(11, 18, 32, 0.05), 0 1px 1px rgba(11, 18, 32, 0.03);
  --shadow-2: 0 2px 4px rgba(11, 18, 32, 0.05), 0 12px 32px rgba(11, 18, 32, 0.10);

  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI",
               Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas,
               "Liberation Mono", monospace;

  /* Extended (non-contract) tokens used by this page; safe extras for others. */
  --accent-strong: #2E49D6;
  --accent-soft: rgba(59, 91, 253, 0.10);
  --success-soft: rgba(14, 122, 67, 0.10);
  --warning-soft: rgba(146, 97, 12, 0.12);
  --danger-soft: rgba(196, 43, 43, 0.10);
  --muted-soft: rgba(11, 18, 32, 0.055);
  --shimmer: rgba(255, 255, 255, 0.55);
}

[data-theme="dark"] {
  color-scheme: dark;

  --bg: #0B1220;
  --bg-elev: #0F1729;
  --surface: #131D33;
  --text: #E9EDF5;
  --text-muted: #9AA5B8;
  --border: #243149;

  --accent: #7C92FF;
  --accent-contrast: #0B1220;
  --success: #4ECE8D;
  --warning: #E8B45A;
  --danger: #FF8A82;

  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.35), 0 1px 1px rgba(0, 0, 0, 0.25);
  --shadow-2: 0 2px 4px rgba(0, 0, 0, 0.40), 0 14px 36px rgba(0, 0, 0, 0.45);

  --accent-strong: #94A6FF;
  --accent-soft: rgba(124, 146, 255, 0.14);
  --success-soft: rgba(78, 206, 141, 0.12);
  --warning-soft: rgba(232, 180, 90, 0.13);
  --danger-soft: rgba(255, 138, 130, 0.13);
  --muted-soft: rgba(233, 237, 245, 0.06);
  --shimmer: rgba(255, 255, 255, 0.07);
}

/* System preference applies only when the user hasn't chosen manually. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-theme="dark"]) {
    color-scheme: dark;

    --bg: #0B1220;
    --bg-elev: #0F1729;
    --surface: #131D33;
    --text: #E9EDF5;
    --text-muted: #9AA5B8;
    --border: #243149;

    --accent: #7C92FF;
    --accent-contrast: #0B1220;
    --success: #4ECE8D;
    --warning: #E8B45A;
    --danger: #FF8A82;

    --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.35), 0 1px 1px rgba(0, 0, 0, 0.25);
    --shadow-2: 0 2px 4px rgba(0, 0, 0, 0.40), 0 14px 36px rgba(0, 0, 0, 0.45);

    --accent-strong: #94A6FF;
    --accent-soft: rgba(124, 146, 255, 0.14);
    --success-soft: rgba(78, 206, 141, 0.12);
    --warning-soft: rgba(232, 180, 90, 0.13);
    --danger-soft: rgba(255, 138, 130, 0.13);
    --muted-soft: rgba(233, 237, 245, 0.06);
    --shimmer: rgba(255, 255, 255, 0.07);
  }
}

/* --------------------------------------------------------------------------
   2. Base / reset
   -------------------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { margin: 0; line-height: 1.2; letter-spacing: -0.015em; }
p { margin: 0; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-strong); text-decoration: underline; text-underline-offset: 2px; }
ul { margin: 0; padding: 0; list-style: none; }
blockquote { margin: 0; }
button { font: inherit; color: inherit; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

::selection { background: var(--accent-soft); }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 12px; top: -48px; z-index: 100;
  padding: 8px 14px; border-radius: 8px;
  background: var(--accent); color: var(--accent-contrast);
  font-size: 14px; font-weight: 600;
  transition: top 150ms ease;
}
.skip-link:focus-visible { top: 12px; color: var(--accent-contrast); }

.mono { font-family: var(--font-mono); font-size: 0.92em; }
.muted { color: var(--text-muted); }

/* --------------------------------------------------------------------------
   3. Utility classes (contract)
   -------------------------------------------------------------------------- */

.btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: calc(var(--radius) - 4px);
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.005em;
  line-height: 1.2;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  transition: background-color 180ms ease, border-color 180ms ease,
              color 180ms ease, box-shadow 180ms ease, transform 180ms ease,
              opacity 180ms ease;
}
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn:active:not(:disabled) { transform: translateY(1px); }

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-contrast);
  box-shadow: var(--shadow-1);
}
.btn-primary:hover:not(:disabled) {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
  box-shadow: var(--shadow-2);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover:not(:disabled) {
  background: var(--muted-soft);
  border-color: var(--text-muted);
}

.btn-sm { padding: 6px 12px; font-size: 13px; border-radius: 9px; }

.icon-btn { padding: 8px; border-radius: 10px; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
  padding: 20px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-elev);
  color: var(--text);
  font-size: 12.5px;
  font-weight: 550;
  line-height: 1.4;
  white-space: nowrap;
}
.chip-mono { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.04em; }
.chip-accent { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
.chip-btn { cursor: pointer; transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease; }
.chip-btn:hover { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: 0.03em;
  line-height: 1.5;
  white-space: nowrap;
  cursor: default;
}
.pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}
.pill-high { color: var(--success); background: var(--success-soft); border-color: var(--success-soft); }
.pill-med  { color: var(--warning); background: var(--warning-soft); border-color: var(--warning-soft); }
.pill-low  { color: var(--text-muted); background: var(--muted-soft); border-color: var(--muted-soft); }

.input {
  appearance: none;
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) - 4px);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 15px;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}
.input::placeholder { color: var(--text-muted); }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-1);
}

.skeleton {
  position: relative;
  overflow: hidden;
  background: var(--muted-soft);
  border-radius: 7px;
  min-height: 12px;
}
.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, var(--shimmer), transparent);
  animation: shimmer 1.5s ease-in-out infinite;
}

/* --------------------------------------------------------------------------
   4. Top bar
   -------------------------------------------------------------------------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px clamp(16px, 4vw, 32px);
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
@supports ((backdrop-filter: blur(10px)) or (-webkit-backdrop-filter: blur(10px))) {
  .topbar {
    background: color-mix(in srgb, var(--bg) 78%, transparent);
    -webkit-backdrop-filter: blur(10px) saturate(1.4);
    backdrop-filter: blur(10px) saturate(1.4);
  }
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.wordmark:hover { color: var(--text); text-decoration: none; }
.wordmark-logo { width: 24px; height: 24px; border-radius: 6px; flex: none; }

/* Theme toggle: light shows moon ("switch to dark"), dark shows sun. */
.icon { width: 18px; height: 18px; flex: none; display: inline-block; vertical-align: -3px; }
.icon-xs { width: 13px; height: 13px; }
.icon-sun { display: none; }
.icon-moon { display: block; }
[data-theme="dark"] .icon-sun { display: block; }
[data-theme="dark"] .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]):not([data-theme="dark"]) .icon-sun { display: block; }
  html:not([data-theme="light"]):not([data-theme="dark"]) .icon-moon { display: none; }
}

/* --------------------------------------------------------------------------
   5. Page layout, hero
   -------------------------------------------------------------------------- */

.page-main {
  flex: 1;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 32px) 64px;
}

.hero {
  position: relative;
  text-align: center;
  padding: clamp(48px, 9vh, 88px) 8px 36px;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -80px -10% auto;
  height: 360px;
  background: radial-gradient(560px 240px at 50% 10%, var(--accent-soft), transparent 72%);
  pointer-events: none;
  z-index: -1;
}
.hero-title {
  font-size: clamp(30px, 5.2vw, 48px);
  font-weight: 750;
  letter-spacing: -0.028em;
}
.hero-accent { color: var(--accent); }
.hero-sub {
  max-width: 620px;
  margin: 16px auto 0;
  color: var(--text-muted);
  font-size: clamp(15px, 1.7vw, 17px);
}

/* --------------------------------------------------------------------------
   6. Search box + typeahead listbox
   -------------------------------------------------------------------------- */

.search-section { max-width: 720px; margin: 0 auto; }
.search-shell { display: block; }
.search-anchor { position: relative; }

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 8px 8px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow-1);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}
.search-box:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft), var(--shadow-2);
}
.search-icon { width: 20px; height: 20px; color: var(--text-muted); flex: none; }

.search-input {
  flex: 1;
  min-width: 0;
  padding: 11px 0;
  border: none;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 17px;
}
.search-input::placeholder { color: var(--text-muted); }
.search-input:focus { outline: none; }

.generate-btn { padding: 12px 20px; font-size: 15px; border-radius: var(--radius); }

.search-listbox {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 40;
  max-height: 332px;
  overflow-y: auto;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-2);
  animation: pop-in 160ms ease both;
}

.search-option {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 10px 12px;
  border-radius: calc(var(--radius) - 5px);
  cursor: pointer;
}
.search-option[aria-selected="true"] { background: var(--accent-soft); }
.opt-ticker {
  font-family: var(--font-mono);
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--accent);
  min-width: 56px;
  flex: none;
}
.opt-name {
  flex: 1;
  min-width: 0;
  font-size: 14.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.opt-exchange { color: var(--text-muted); font-size: 12.5px; flex: none; }

.ticker-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 30px;
  margin-top: 10px;
  font-size: 14px;
  text-align: center;
}
.ticker-status.is-ok { color: var(--success); font-weight: 550; }
.ticker-status.is-none, .ticker-status.is-err { color: var(--text-muted); }
.ticker-status .status-detail { color: var(--text-muted); font-weight: 400; }

.suggestions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.suggestions-label {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

/* --------------------------------------------------------------------------
   7. Loading state (staged progress + skeleton cards)
   -------------------------------------------------------------------------- */

.results-section { margin-top: 40px; }
.result-view, .loading-state, .error-wrap { scroll-margin-top: 84px; }

.load-card {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}
.load-spinner { width: 26px; height: 26px; flex: none; color: var(--accent); }
.load-spinner svg { width: 100%; height: 100%; animation: spin 0.9s linear infinite; }
.load-status { font-size: 15.5px; font-weight: 650; }
.load-hint { margin-top: 3px; color: var(--text-muted); font-size: 13.5px; }
.load-elapsed { font-family: var(--font-mono); font-size: 12.5px; }

.sk-header { margin-bottom: 16px; }
.sk-row { display: flex; gap: 10px; margin-top: 12px; }
.sk-block { height: 14px; }

/* --------------------------------------------------------------------------
   8. Results — company header
   -------------------------------------------------------------------------- */

.company-card { margin-bottom: 20px; padding: 24px; }
.company-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.company-name { font-size: clamp(22px, 3vw, 28px); font-weight: 720; letter-spacing: -0.02em; }
.company-aside { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.cached-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--warning-soft);
  color: var(--warning);
  font-size: 12px;
  font-weight: 650;
}

.company-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.company-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin-top: 14px;
  color: var(--text-muted);
  font-size: 13.5px;
}
.company-links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 10px; font-size: 13.5px; }

.meta-link { display: inline-flex; align-items: center; gap: 5px; font-weight: 550; }

/* --------------------------------------------------------------------------
   9. Results — answers grid
   -------------------------------------------------------------------------- */

.answers-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 700px)  { .answers-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1060px) { .answers-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.answer-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: card-in 480ms cubic-bezier(0.2, 0.7, 0.3, 1) both;
  animation-delay: calc(var(--i, 0) * 45ms);
  transition: box-shadow 200ms ease, transform 200ms ease, border-color 200ms ease;
}
.answer-card:hover { box-shadow: var(--shadow-2); transform: translateY(-2px); }

.answer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.answer-label {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  line-height: 1.5;
  padding-top: 2px;
}

.answer-body { display: flex; flex-direction: column; gap: 10px; }

.answer-display {
  font-size: 21px;
  font-weight: 680;
  letter-spacing: -0.015em;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.answer-display.is-long { font-size: 16.5px; font-weight: 620; }
.answer-display.is-empty { color: var(--text-muted); font-weight: 500; font-size: 16.5px; }
.answer-flag { display: flex; align-items: center; gap: 9px; font-size: 18px; }

.answer-details { color: var(--text-muted); font-size: 13.5px; overflow-wrap: anywhere; }

.ic-success { color: var(--success); }
.ic-muted { color: var(--text-muted); }
.ic-accent { color: var(--accent); }
.ic-danger { color: var(--danger); }

.chip-row { display: flex; flex-wrap: wrap; gap: 7px; }
.chip-group { display: flex; flex-direction: column; gap: 6px; }
.chip-group-label {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* q7 — region rows */
.region-list { display: flex; flex-direction: column; }
.region-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 14.5px;
}
.region-row:last-child { border-bottom: none; }
.region-name { font-weight: 570; overflow-wrap: anywhere; }
.region-share { color: var(--text-muted); font-family: var(--font-mono); font-size: 13px; flex: none; }

/* q12 — checklist rows */
.check-list { display: flex; flex-direction: column; gap: 2px; }
.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 0;
  font-size: 14px;
}
.check-row .icon { width: 17px; height: 17px; }
.check-row.is-on { font-weight: 600; }
.check-row.is-off { color: var(--text-muted); }

/* Evidence quote */
.evidence {
  position: relative;
  padding: 10px 14px 10px 16px;
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  background: var(--muted-soft);
}
.evidence-text { color: var(--text); font-size: 13.5px; font-style: italic; line-height: 1.55; overflow-wrap: anywhere; }
.evidence-toggle {
  appearance: none;
  margin-top: 6px;
  padding: 0;
  border: none;
  background: none;
  color: var(--accent);
  font-size: 12.5px;
  font-weight: 650;
  cursor: pointer;
}
.evidence-toggle:hover { color: var(--accent-strong); text-decoration: underline; }

/* Per-answer sources */
.answer-sources {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}
.source-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  font-weight: 550;
  color: var(--text-muted);
}
.source-link:hover { color: var(--accent); text-decoration: none; }
.source-link .icon-xs { width: 11px; height: 11px; }

/* --------------------------------------------------------------------------
   10. Results footer + error card
   -------------------------------------------------------------------------- */

.results-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px 24px;
  flex-wrap: wrap;
  margin-top: 20px;
  padding: 16px 24px;
}
.footer-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 18px;
  color: var(--text-muted);
  font-size: 13px;
}
.footer-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.error-card {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
  padding: 32px 28px;
  border-color: var(--danger-soft);
  animation: card-in 420ms cubic-bezier(0.2, 0.7, 0.3, 1) both;
}
.error-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-bottom: 14px;
  border-radius: 50%;
  background: var(--danger-soft);
  color: var(--danger);
}
.error-icon .icon { width: 22px; height: 22px; }
.error-title { font-size: 19px; font-weight: 700; }
.error-msg { margin: 8px auto 18px; max-width: 420px; color: var(--text-muted); font-size: 14.5px; overflow-wrap: anywhere; }

/* --------------------------------------------------------------------------
   11. Page footer
   -------------------------------------------------------------------------- */

.page-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  padding: 26px clamp(16px, 4vw, 32px);
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 13px;
}
.admin-link { color: var(--text-muted); font-size: 12px; }
.admin-link:hover { color: var(--accent); }

/* --------------------------------------------------------------------------
   12. Animations, motion preferences, small screens
   -------------------------------------------------------------------------- */

@keyframes shimmer { 100% { transform: translateX(100%); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes card-in {
  from { opacity: 0; transform: translateY(10px) scale(0.985); }
  to   { opacity: 1; transform: none; }
}
@keyframes pop-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media (max-width: 560px) {
  .search-box { flex-wrap: wrap; padding: 10px 12px; }
  .search-input { flex: 1 1 100%; order: 0; padding: 8px 0; }
  .search-icon { order: -1; }
  .generate-btn { flex: 1 1 100%; order: 1; }
  .company-card { padding: 20px; }
  .results-footer { padding: 16px 20px; }
}
