/* Search & Prompt Radar - green #22c55e + cyan #00EEFC */
.sr-visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* ── AMBIENT ── */
.sr-ambient {
  position: fixed; inset: 0;
  pointer-events: none; z-index: 0; overflow: hidden;
}
.sr-ambient::before, .sr-ambient::after {
  content: ''; position: absolute; border-radius: 50%;
}
.sr-ambient::before {
  top: -20%; left: -10%; width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(34,197,94,0.07) 0%, transparent 70%);
  animation: srDrift1 20s ease-in-out infinite alternate;
}
.sr-ambient::after {
  bottom: -20%; right: -10%; width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(0,238,252,0.05) 0%, transparent 70%);
  animation: srDrift2 25s ease-in-out infinite alternate;
}
@keyframes srDrift1 { to { transform: translate(60px,80px); } }
@keyframes srDrift2 { to { transform: translate(-80px,-60px); } }

/* ── LAYOUT ── */
.sr-wrap {
  position: relative; z-index: 1;
  max-width: 1100px; margin: 0 auto;
  padding: 120px 1.5rem 5rem;
}

/* ── HERO ── */
.sr-hero { margin-bottom: 2.5rem; text-align: center; }
.sr-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2rem, 6vw, 3.8rem);
  font-weight: 900; text-transform: uppercase;
  letter-spacing: -0.02em; line-height: 1;
  color: var(--on-surface); margin-bottom: 1rem;
}
.sr-gradient {
  background: linear-gradient(90deg, #22c55e, #00EEFC);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 20px rgba(34,197,94,0.35));
}
.sr-desc {
  font-size: 0.92rem; line-height: 1.65;
  color: var(--on-surface-variant);
  max-width: 600px; margin: 0 auto;
}

/* ── CONTROL CARD ── */
.sr-card {
  background: rgba(28,28,35,0.7);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(34,197,94,0.2);
  border-radius: 1.25rem;
  padding: 2rem;
  box-shadow: 0 0 40px rgba(34,197,94,0.06), inset 0 0 30px rgba(0,238,252,0.02);
  margin: 0 auto 1.5rem;
}
.sr-control { max-width: 820px; }
.sr-field-row { display: flex; gap: 1rem; flex-wrap: wrap; }
.sr-field { display: flex; flex-direction: column; gap: 0.4rem; min-width: 0; }
.sr-field-seed { flex: 1 1 320px; }
.sr-field-region { flex: 0 1 190px; }
.sr-label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.68rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: #22c55e;
}
.sr-input {
  width: 100%;
  background: rgba(14,14,19,0.7);
  border: 1px solid rgba(34,197,94,0.3);
  border-radius: 0.625rem;
  padding: 0.75rem 1rem;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.9rem; font-weight: 500;
  color: var(--on-surface);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.sr-input::placeholder { color: rgba(172,170,177,0.55); }
.sr-input:focus, .sr-input:focus-visible {
  border-color: #00EEFC;
  box-shadow: 0 0 0 2px rgba(0,238,252,0.25);
}
.sr-input[aria-invalid="true"] { border-color: #f87171; }
.sr-select { cursor: pointer; }
.sr-select option { background: #19191f; color: var(--on-surface); }
.sr-hint { font-size: 0.72rem; color: var(--on-surface-variant); margin: 0.5rem 0 0; }

.sr-examples { display: flex; flex-wrap: wrap; align-items: center; gap: 0.45rem; margin-top: 1rem; }
.sr-examples-label {
  font-family: 'Space Grotesk', sans-serif; font-size: 0.7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em; color: var(--on-surface-variant);
}
.sr-example {
  font-family: 'Space Grotesk', sans-serif; font-size: 0.75rem; font-weight: 600;
  padding: 0.3rem 0.75rem; border-radius: 999px; cursor: pointer;
  background: rgba(0,238,252,0.07); border: 1px solid rgba(0,238,252,0.25); color: #00EEFC;
  transition: background 0.2s, border-color 0.2s;
}
.sr-example:hover { background: rgba(0,238,252,0.15); border-color: rgba(0,238,252,0.5); }

.sr-scan-btn {
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  width: 100%; margin-top: 1.5rem;
  padding: 0.85rem 1.5rem;
  background: linear-gradient(135deg, #22c55e, #00EEFC);
  color: #0a0a0f;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.82rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.08em;
  border: none; border-radius: 0.625rem;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 0 20px rgba(34,197,94,0.25);
}
.sr-scan-btn:hover:not(:disabled) { opacity: 0.92; transform: translateY(-1px); box-shadow: 0 0 30px rgba(0,238,252,0.35); }
.sr-scan-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.sr-scan-btn .material-symbols-outlined { font-size: 1.05rem; }

.sr-status {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.8rem; font-weight: 600;
  color: var(--on-surface-variant);
  margin: 0.75rem 0 0; min-height: 1.2em; text-align: center;
}
.sr-status.error { color: #fca5a5; }
.sr-status a { color: #00EEFC; }

/* ── PLATFORM STATUS ROW ── */
.sr-platforms {
  list-style: none; margin: 1rem 0 0; padding: 0;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem;
}
.sr-platforms[hidden] { display: none; }
.sr-platform {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-family: 'Space Grotesk', sans-serif; font-size: 0.72rem; font-weight: 600;
  padding: 0.35rem 0.75rem; border-radius: 999px;
  background: rgba(14,14,19,0.6); border: 1px solid rgba(248,245,253,0.1);
  color: var(--on-surface);
}
.sr-platform-state { color: var(--on-surface-variant); font-weight: 500; }
.sr-dot { width: 8px; height: 8px; border-radius: 50%; background: #6b6a72; flex-shrink: 0; }
.sr-platform.is-loading .sr-dot { background: #00EEFC; animation: srPulse 1.1s ease-in-out infinite; }
.sr-platform.is-ok { border-color: rgba(34,197,94,0.35); }
.sr-platform.is-ok .sr-dot { background: #22c55e; }
.sr-platform.is-partial { border-color: rgba(234,179,8,0.4); }
.sr-platform.is-partial .sr-dot { background: #eab308; }
.sr-platform.is-down { border-color: rgba(248,113,113,0.4); }
.sr-platform.is-down .sr-dot { background: #f87171; }
.sr-platform.is-empty { border-color: rgba(172,170,177,0.35); }
.sr-platform.is-empty .sr-dot { background: #acaab1; }
@keyframes srPulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.35; transform: scale(0.7); } }
.sr-platform-notes {
  font-size: 0.74rem; color: #fcd34d; text-align: center; margin: 0.6rem 0 0; line-height: 1.5;
}

/* ── SUMMARY BAR ── */
.sr-results { margin-top: 0.5rem; }
.sr-summary {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 0.9rem 1.25rem;
  background: rgba(28,28,35,0.7);
  border: 1px solid rgba(0,238,252,0.18);
  border-radius: 1rem; padding: 1rem 1.25rem; margin-bottom: 1.25rem;
}
.sr-summary[hidden] { display: none; }
.sr-summary-stats { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; min-width: 0; }
.sr-total {
  font-family: 'Space Grotesk', sans-serif; font-size: 0.9rem; margin: 0;
  color: var(--on-surface-variant); overflow-wrap: anywhere;
}
.sr-total span { font-size: 1.3rem; font-weight: 800; color: #22c55e; margin-right: 0.15rem; }
.sr-total strong { color: var(--on-surface); }
.sr-badges { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.sr-badge {
  font-family: 'Space Grotesk', sans-serif; font-size: 0.64rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  padding: 0.25rem 0.6rem; border-radius: 999px;
  background: rgba(34,197,94,0.12); border: 1px solid rgba(34,197,94,0.35); color: #86efac;
}
.sr-badge.is-rules { background: rgba(234,179,8,0.1); border-color: rgba(234,179,8,0.35); color: #fde68a; }
.sr-badge.is-cached { background: rgba(0,238,252,0.08); border-color: rgba(0,238,252,0.3); color: #67e8f9; }
.sr-summary-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.sr-filters { display: flex; flex-wrap: wrap; gap: 0.4rem; flex-basis: 100%; }

.sr-action-btn, .sr-filter, .sr-card-copy {
  display: inline-flex; align-items: center; gap: 0.35rem;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.68rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.07em;
  padding: 0.45rem 0.9rem;
  background: rgba(34,197,94,0.1);
  border: 1px solid rgba(34,197,94,0.3);
  border-radius: 0.45rem;
  color: #22c55e; cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.sr-action-btn:hover, .sr-card-copy:hover { background: rgba(34,197,94,0.18); border-color: rgba(34,197,94,0.55); }
.sr-action-btn .material-symbols-outlined, .sr-card-copy .material-symbols-outlined { font-size: 0.95rem; }
.sr-filter { border-radius: 999px; background: transparent; border-color: rgba(248,245,253,0.15); color: var(--on-surface-variant); }
.sr-filter:hover { color: #00EEFC; border-color: rgba(0,238,252,0.4); }
.sr-filter[aria-pressed="true"] { background: rgba(0,238,252,0.12); border-color: rgba(0,238,252,0.55); color: #00EEFC; }
.sr-filter-count { opacity: 0.75; font-weight: 600; }

/* ── BENTO GRID ── */
.sr-notice.sr-ambiguity { margin: 0 0 1.25rem; }
.sr-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.sr-bento {
  background: rgba(28,28,35,0.72);
  border: 1px solid rgba(248,245,253,0.08);
  border-radius: 1.1rem; padding: 1.25rem;
  min-width: 0;
  animation: srFadeIn 0.35s ease;
}
.sr-bento-wide { grid-column: 1 / -1; border-color: rgba(0,238,252,0.25); box-shadow: 0 0 40px rgba(0,238,252,0.05); }
@keyframes srFadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.sr-bento-head { display: flex; align-items: flex-start; gap: 0.75rem; margin-bottom: 0.9rem; }
.sr-bento-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.2rem; height: 2.2rem; flex-shrink: 0; border-radius: 0.6rem;
  background: rgba(34,197,94,0.12); color: #22c55e; font-size: 1.2rem;
}
.sr-bento-wide .sr-bento-icon { background: rgba(0,238,252,0.12); color: #00EEFC; }
.sr-bento-titles { flex: 1; min-width: 0; }
.sr-bento-title {
  font-family: 'Space Grotesk', sans-serif; font-size: 0.9rem; font-weight: 800;
  color: var(--on-surface); margin: 0; line-height: 1.3;
}
.sr-bento-sub { font-size: 0.74rem; color: var(--on-surface-variant); margin: 0.2rem 0 0; line-height: 1.45; }
.sr-count {
  font-family: 'Space Grotesk', sans-serif; font-size: 0.66rem; font-weight: 700;
  padding: 0.12rem 0.5rem; border-radius: 999px; margin-left: 0.4rem; vertical-align: middle;
  background: rgba(248,245,253,0.07); color: var(--on-surface-variant);
}
.sr-card-copy { padding: 0.4rem 0.55rem; flex-shrink: 0; }

.sr-group { margin-top: 0.9rem; }
.sr-group:first-of-type { margin-top: 0; }
.sr-group-label {
  font-family: 'Space Grotesk', sans-serif; font-size: 0.66rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em; color: #22c55e;
  margin: 0 0 0.5rem;
}
.sr-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; list-style: none; margin: 0; padding: 0; }
.sr-chip {
  font-family: 'Space Grotesk', sans-serif; font-size: 0.78rem; font-weight: 500;
  text-align: left; line-height: 1.35;
  padding: 0.32rem 0.7rem; border-radius: 0.5rem; cursor: copy;
  background: rgba(14,14,19,0.65); border: 1px solid rgba(248,245,253,0.12);
  color: var(--on-surface); max-width: 100%; overflow-wrap: anywhere;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.sr-chip:hover { border-color: rgba(0,238,252,0.5); color: #00EEFC; background: rgba(0,238,252,0.06); }

.sr-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.45rem; }
.sr-line {
  display: flex; align-items: flex-start; gap: 0.6rem; width: 100%;
  font-family: 'Space Grotesk', sans-serif; font-size: 0.84rem; line-height: 1.5;
  text-align: left; padding: 0.6rem 0.8rem; border-radius: 0.6rem; cursor: copy;
  background: rgba(14,14,19,0.6); border: 1px solid rgba(248,245,253,0.08);
  color: var(--on-surface); overflow-wrap: anywhere;
  transition: border-color 0.15s, background 0.15s;
}
.sr-line:hover { border-color: rgba(0,238,252,0.45); background: rgba(0,238,252,0.05); }
.sr-line-text { flex: 1; min-width: 0; }
.sr-intent {
  flex-shrink: 0; margin-top: 0.12rem;
  font-size: 0.6rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em;
  padding: 0.18rem 0.5rem; border-radius: 999px; white-space: nowrap;
  background: rgba(0,238,252,0.1); border: 1px solid rgba(0,238,252,0.35); color: #67e8f9;
}
.sr-intent-comparison { background: rgba(234,179,8,0.1); border-color: rgba(234,179,8,0.4); color: #fde68a; }
.sr-intent-implementation { background: rgba(34,197,94,0.1); border-color: rgba(34,197,94,0.4); color: #86efac; }

.sr-cluster { margin-top: 0.7rem; }
.sr-cluster-name { font-size: 0.8rem; font-weight: 700; color: var(--on-surface); margin: 0 0 0.4rem; font-family: 'Space Grotesk', sans-serif; }

/* Reddit threads */
.sr-thread {
  padding: 0.6rem 0.8rem; border-radius: 0.6rem;
  background: rgba(14,14,19,0.6); border: 1px solid rgba(248,245,253,0.08);
}
.sr-thread a {
  font-family: 'Space Grotesk', sans-serif; font-size: 0.84rem; font-weight: 600; line-height: 1.45;
  color: var(--on-surface); text-decoration: none; overflow-wrap: anywhere;
}
.sr-thread a:hover, .sr-thread a:focus-visible { color: #00EEFC; text-decoration: underline; }
.sr-thread-meta {
  display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 0.3rem;
  font-size: 0.72rem; color: var(--on-surface-variant);
}
.sr-thread-meta span { display: inline-flex; align-items: center; gap: 0.2rem; }
.sr-thread-meta .material-symbols-outlined { font-size: 0.95rem; }
.sr-notice {
  font-size: 0.78rem; line-height: 1.55; color: #fde68a;
  background: rgba(234,179,8,0.07); border: 1px solid rgba(234,179,8,0.25);
  border-radius: 0.6rem; padding: 0.65rem 0.8rem; margin: 0;
}
.sr-notice a, .sr-fallback a { color: #00EEFC; }
.sr-fallback { font-size: 0.76rem; margin: 0.7rem 0 0; color: var(--on-surface-variant); }
.sr-empty { font-size: 0.8rem; color: var(--on-surface-variant); font-style: italic; margin: 0.4rem 0 0; }

/* hidden by filter */
.sr-grid [data-hide="1"] { display: none !important; }

/* ── SKELETONS ── */
.sr-skel { pointer-events: none; }
.sr-skel-bar {
  height: 0.8rem; border-radius: 0.4rem; margin-bottom: 0.6rem;
  background: linear-gradient(90deg, rgba(248,245,253,0.05) 25%, rgba(0,238,252,0.1) 50%, rgba(248,245,253,0.05) 75%);
  background-size: 200% 100%;
  animation: srShimmer 1.4s ease-in-out infinite;
}
.sr-skel-bar.w30 { width: 30%; height: 1.1rem; margin-bottom: 1rem; }
.sr-skel-bar.w60 { width: 60%; } .sr-skel-bar.w80 { width: 80%; } .sr-skel-bar.w45 { width: 45%; }
@keyframes srShimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ── TOAST ── */
.sr-toast {
  position: fixed; bottom: 2rem; left: 50%;
  transform: translateX(-50%) translateY(1rem);
  max-width: calc(100vw - 2rem);
  background: rgba(14,14,19,0.96);
  border: 1px solid rgba(34,197,94,0.45);
  color: var(--on-surface);
  font-family: 'Space Grotesk', sans-serif; font-size: 0.82rem;
  padding: 0.65rem 1.25rem; border-radius: 0.6rem;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 9999; text-align: center; overflow-wrap: anywhere;
}
.sr-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── FOCUS ── */
.sr-chip:focus-visible, .sr-line:focus-visible, .sr-filter:focus-visible,
.sr-action-btn:focus-visible, .sr-card-copy:focus-visible, .sr-example:focus-visible,
.sr-scan-btn:focus-visible, .sr-thread a:focus-visible {
  outline: 2px solid #00EEFC; outline-offset: 2px;
}

/* ── RESPONSIVE ── */
@media (max-width: 860px) {
  .sr-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .sr-wrap { padding: 100px 1rem 4rem; }
  .sr-card { padding: 1.25rem; }
  .sr-field-region { flex: 1 1 100%; }
  .sr-summary { padding: 0.9rem 1rem; }
  .sr-summary-actions { width: 100%; }
  .sr-summary-actions .sr-action-btn { flex: 1 1 auto; justify-content: center; }
  .sr-bento { padding: 1rem; }
  .sr-line { flex-direction: column; gap: 0.35rem; }
  .sr-toast { bottom: 4.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  .sr-ambient::before, .sr-ambient::after,
  .sr-platform.is-loading .sr-dot, .sr-skel-bar, .sr-bento { animation: none; }
  .sr-scan-btn, .sr-toast { transition: none; }
}
