/* yr-discovery.css — shared styles for the public discovery surfaces
   (/search, /opportunities). Extracted from search.html; single source of truth. */

/* ── Search / commercial-intelligence feed ─────────────────────────────── */
  .feed-hero { padding: 36px 0 18px; }
  .feed-hero .live {
    display: inline-flex; align-items: center; gap: 7px;
    font-family: 'JetBrains Mono', monospace; font-size: 10.5px; letter-spacing: 0.16em;
    text-transform: uppercase; color: var(--emerald); margin-bottom: 12px;
  }
  .feed-hero .live .dot {
    width: 7px; height: 7px; border-radius: 100px; background: var(--emerald);
    box-shadow: 0 0 0 0 rgba(52,211,153,0.5); animation: feed-pulse 2s infinite;
  }
  @keyframes feed-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(52,211,153,0.45); }
    70%  { box-shadow: 0 0 0 7px rgba(52,211,153,0); }
    100% { box-shadow: 0 0 0 0 rgba(52,211,153,0); }
  }
  .feed-hero h1 { font-size: 30px; margin: 0 0 8px; }
  .feed-hero .count {
    font-family: 'JetBrains Mono', monospace; font-size: 13px; color: var(--text-1);
  }
  .feed-hero .count strong { color: var(--text-0); }

  /* Filter bar — mobile-first stack, row on wider screens */
  .filters {
    display: grid; grid-template-columns: 1fr; gap: 10px;
    padding: 16px; border: 1px solid var(--border-faint); border-radius: 12px;
    background: var(--bg-1); margin: 18px 0 8px;
  }
  .filters input, .filters select {
    width: 100%; background: var(--bg-0); border: 1px solid var(--border-faint);
    color: var(--text-0); padding: 11px 12px; border-radius: 8px;
    font-family: 'Outfit', sans-serif; font-size: 14px; outline: none;
  }
  .filters input:focus, .filters select:focus { border-color: var(--emerald); }
  .filters .row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .filters .actions { display: flex; gap: 10px; }
  .filters button {
    flex: 1; background: var(--emerald); color: var(--bg-0); border: 0;
    padding: 11px 16px; border-radius: 8px; font-family: 'Outfit', sans-serif;
    font-weight: 600; font-size: 14px; cursor: pointer;
  }
  .filters .reset {
    display: inline-flex; align-items: center; padding: 11px 16px;
    border: 1px solid var(--border-faint); border-radius: 8px; color: var(--text-1);
    font-size: 13px;
  }
  .applied {
    display: flex; flex-wrap: wrap; gap: 7px; margin: 12px 0 4px;
    font-family: 'JetBrains Mono', monospace; font-size: 11px;
  }
  .applied .chip {
    padding: 4px 10px; border-radius: 100px; background: var(--bg-2);
    border: 1px solid var(--border-faint); color: var(--text-1);
  }

  /* Results grid */
  .feed { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
          gap: 12px; margin: 18px 0 28px; }
  .card {
    display: block; border: 1px solid var(--border-faint); border-radius: 12px;
    background: var(--bg-1); padding: 16px 17px; color: var(--text-0);
    transition: border-color 0.15s, transform 0.15s;
  }
  .card:hover { border-color: var(--emerald); transform: translateY(-2px); }
  .card .top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
  .tier {
    font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: 0.1em;
    text-transform: uppercase; padding: 4px 9px; border-radius: 100px; white-space: nowrap;
  }
  .tier.t1 { color: var(--emerald); background: rgba(52,211,153,0.08); border: 1px solid rgba(52,211,153,0.25); }
  .tier.t2 { color: var(--gold);    background: rgba(201,168,91,0.08); border: 1px solid rgba(201,168,91,0.25); }
  .tier.t3 { color: var(--amber);   background: rgba(216,156,78,0.08); border: 1px solid rgba(216,156,78,0.25); }
  .tier.t4, .tier.t0 { color: var(--text-2); background: var(--bg-2); border: 1px solid var(--border-faint); }
  .score { font-family: 'JetBrains Mono', monospace; font-size: 22px; color: var(--text-0); line-height: 1; }
  .score .of { font-size: 11px; color: var(--text-2); }
  .score .na { font-size: 12px; color: var(--text-2); }
  .card h3 { font-family: 'JetBrains Mono', monospace; font-size: 15px; font-weight: 500;
             letter-spacing: 0.04em; margin: 2px 0 4px; color: var(--text-0); }
  .card .loc { font-size: 12.5px; color: var(--text-1); margin-bottom: 12px; }
  .card .loc .sep { color: var(--text-3); margin: 0 5px; }

  .gapbar { height: 6px; border-radius: 3px; background: rgba(255,255,255,0.05); overflow: hidden; }
  .gapbar > span { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--amber)); }
  .gaprow { display: flex; justify-content: space-between; font-family: 'JetBrains Mono', monospace;
            font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-2); margin: 9px 0 5px; }

  .badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 11px; }
  .badge { font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: 0.06em;
           text-transform: uppercase; padding: 3px 8px; border-radius: 6px; }
  .badge.warn    { color: var(--amber);   background: rgba(216,156,78,0.08);  border: 1px solid rgba(216,156,78,0.22); }
  .badge.neutral { color: var(--text-1);  background: var(--bg-2);            border: 1px solid var(--border-faint); }
  .badge.gold    { color: var(--gold);    background: rgba(201,168,91,0.08);  border: 1px solid rgba(201,168,91,0.22); }
  .badge.emerald { color: var(--emerald); background: rgba(52,211,153,0.08);  border: 1px solid rgba(52,211,153,0.22); }
  .badge.ok      { color: var(--emerald); background: rgba(52,211,153,0.06);  border: 1px solid rgba(52,211,153,0.18); }
  .badge.id      { color: var(--text-2);  background: transparent;            border: 1px solid var(--border-faint); }

  .card .insight { font-size: 12.5px; line-height: 1.45; color: var(--text-1); margin: 11px 0 0;
                   padding-left: 10px; border-left: 2px solid var(--border-strong); font-style: italic; }

  /* Digital-gap discovery chips */
  .gapchips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 4px 0 18px; }
  .gapchips-label { font-family: 'JetBrains Mono', monospace; font-size: 10.5px; letter-spacing: 0.12em;
                    text-transform: uppercase; color: var(--text-2); margin-right: 2px; }
  .gapchip { font-size: 12.5px; padding: 6px 13px; border-radius: 100px; border: 1px solid var(--border-faint);
             color: var(--text-1); background: var(--bg-1); transition: border-color .15s, color .15s, background .15s; white-space: nowrap; }
  .gapchip:hover { border-color: var(--emerald); color: var(--text-0); }
  .gapchip.on { background: var(--emerald); color: #06140d; border-color: var(--emerald); font-weight: 600; box-shadow: 0 0 18px rgba(52,211,153,0.25); }
  .gapchip.on.warn    { background: var(--amber);  border-color: var(--amber);  box-shadow: 0 0 18px rgba(216,156,78,0.3); }
  .gapchip.on.gold    { background: var(--gold);   border-color: var(--gold);   box-shadow: 0 0 18px rgba(201,168,91,0.3); }
  .gapchip.on.neutral { background: var(--text-1); border-color: var(--text-1); color: #06140d; }
  .gapchip.clear { border-style: dashed; color: var(--text-2); }

  .empty { padding: 40px 20px; text-align: center; border: 1px dashed var(--border-faint);
           border-radius: 12px; color: var(--text-1); }
  .empty a { color: var(--emerald); }

  /* Pagination */
  .pager { display: flex; align-items: center; justify-content: space-between; gap: 12px;
           margin: 8px 0 26px; font-family: 'JetBrains Mono', monospace; font-size: 12.5px; }
  .pager a { padding: 9px 16px; border: 1px solid var(--border-faint); border-radius: 8px; color: var(--text-0); }
  .pager a:hover { border-color: var(--emerald); color: var(--emerald); }
  .pager .where { color: var(--text-2); }
  .pager .spacer { width: 96px; }

  .reveal-note { border: 1px solid var(--border-faint); border-radius: 12px; background: var(--bg-1);
                 padding: 18px 20px; margin: 8px 0 40px; color: var(--text-1); font-size: 13.5px; }
  .reveal-note strong { color: var(--text-0); }
  .reveal-note a { color: var(--emerald); }

  @media (min-width: 720px) {
    .filters { grid-template-columns: 2fr 1fr 1fr auto; align-items: center; }
    .filters .row { display: contents; }
    .filters .actions { display: contents; }
    .filters .reset { white-space: nowrap; }
    .feed-hero h1 { font-size: 36px; }
  }

  /* ── Phase 6 polish: accessibility, reduced-motion, layout stability ── */
  .card { min-height: 150px; }                 /* reserve height → less layout shift as insight text varies */
  .card:focus-visible,
  .gapchip:focus-visible { outline: 2px solid var(--emerald); outline-offset: 2px; }
  @media (prefers-reduced-motion: reduce) {
    .feed-hero .live .dot { animation: none; }
    .card { transition: none; }
  }
  @media (max-width: 560px) {
    .gapchips { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
    .feed-hero h1 { font-size: 26px; }
  }
