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

:root {
  --bg:        #080808;
  --bg2:       #111111;
  --bg3:       #181818;
  --border:    #242424;
  --red:       #e03030;
  --red-dim:   #b52525;
  --red-glow:  rgba(224,48,48,0.12);
  --text:      #e2e2e2;
  --text-dim:  #7a7a7a;
  --text-faint:#3a3a3a;
  --mono:      'JetBrains Mono', monospace;
  --sans:      'Manrope', sans-serif;
  --r:         10px;
  --r-sm:      6px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  line-height: 1.5;
}

.noise {
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none; z-index: 0; opacity: 0.35;
}

header {
  padding: 2rem 2.5rem 1.6rem;
  border-bottom: 1px solid var(--border);
  position: relative; z-index: 1;
}

.logo {
  display: flex; align-items: center; gap: 0.55rem;
  font-family: var(--sans);
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.logo-icon { color: var(--red); font-size: 1.2rem; line-height: 1; }
.logo-text em { color: var(--red); font-style: normal; }

.tagline {
  margin-top: 0.35rem;
  font-size: 0.7rem;
  color: var(--text-dim);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-family: var(--mono);
}

main {
  max-width: 860px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
  position: relative; z-index: 1;
}

/* SEARCH */
.search-section { margin-bottom: 2rem; }

.search-box {
  display: flex; align-items: center;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search-box:focus-within {
  border-color: var(--red);
  box-shadow: 0 0 0 3px var(--red-glow);
}

.search-prefix {
  padding: 0 0.2rem 0 1.1rem;
  color: var(--red);
  font-family: var(--mono);
  font-size: 1rem;
  font-weight: 600;
  user-select: none;
}

#usernameInput {
  flex: 1;
  background: transparent;
  border: none; outline: none;
  color: var(--text);
  font-family: var(--mono);
  font-size: 1rem;
  padding: 0.9rem 0.7rem;
  caret-color: var(--red);
}
#usernameInput::placeholder { color: var(--text-faint); }

#searchBtn {
  background: var(--red);
  border: none;
  color: #fff;
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 0 1.4rem;
  height: 100%;
  cursor: pointer;
  display: flex; align-items: center; gap: 0.4rem;
  transition: background 0.15s;
  white-space: nowrap;
  min-height: 50px;
}
#searchBtn:hover { background: var(--red-dim); }
#searchBtn:disabled { background: #2a2a2a; color: var(--text-faint); cursor: not-allowed; }
.btn-icon { font-size: 1rem; }

.search-options {
  display: flex; gap: 1.4rem;
  margin-top: 0.8rem;
  font-size: 0.73rem;
  color: var(--text-dim);
  font-family: var(--mono);
}
.search-options label {
  display: flex; align-items: center; gap: 0.4rem;
  cursor: pointer; user-select: none;
}
.search-options input[type=checkbox] {
  accent-color: var(--red);
  width: 13px; height: 13px;
}

/* STATUS */
.status-section { margin-bottom: 1.5rem; }

.status-bar {
  display: flex; align-items: center; gap: 0.65rem;
  font-size: 0.73rem;
  color: var(--text-dim);
  font-family: var(--mono);
  margin-bottom: 0.5rem;
}

.status-indicator {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--red);
  animation: pulse 1.3s infinite;
  flex-shrink: 0;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.35; transform: scale(0.65); }
}

.progress-wrap {
  height: 2px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  background: var(--red);
  width: 0%;
  transition: width 0.4s ease;
  border-radius: 99px;
}

/* SUMMARY STATS */
.summary-section {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

/* USER BADGE (Reddit) */
.user-section { margin-bottom: 1rem; }
.user-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 0.95rem 1.1rem;
  display: flex;
  gap: 0.85rem;
  align-items: center;
}
.user-avatar-wrap {
  width: 44px; height: 44px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg3);
  flex: 0 0 auto;
}
.user-avatar { width: 100%; height: 100%; object-fit: cover; display: block; }
.user-main { min-width: 0; flex: 1; }
.user-topline {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.user-name {
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.user-name:hover { color: var(--red); }
.user-meta {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--text-dim);
}
.user-badges {
  margin-top: 0.45rem;
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  font-family: var(--mono);
}
.user-chip, a.user-chip {
  font-size: 0.8rem;
  border: 1px solid var(--border);
  background: var(--bg3);
  padding: 4px 12px;
  border-radius: 999px;
  color: #cfcfcf;
  white-space: nowrap;
}
.user-chip strong { color: #fff; font-weight: 800; }
a.user-chip { text-decoration: none; cursor: pointer; transition: opacity 0.15s; }
a.user-chip:hover { opacity: 0.75; }
.user-chip.good { border-color: rgba(76,175,80,0.35); color: #cfe9d1; }
.user-chip.warn { border-color: rgba(224,48,48,0.35); color: #f2c3c3; }

.stat-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 1rem 1rem 0.9rem;
  text-align: center;
  transition: border-color 0.2s, background 0.2s;
}
.stat-card:hover { border-color: #333; background: var(--bg3); }

.stat-num {
  display: block;
  font-family: var(--sans);
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--red);
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.stat-label {
  font-size: 0.62rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 0.25rem;
  display: block;
  font-family: var(--mono);
}

/* SUBREDDIT BREAKDOWN */
.sub-breakdown {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 1.2rem 1.4rem;
  margin-bottom: 1.5rem;
}
.sub-breakdown.is-collapsed { padding-bottom: 1.2rem; }

.section-title {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: #d8d8d8;
  margin-bottom: 1rem;
  text-transform: uppercase;
}

.sub-map-toggle {
  width: 100%;
  background: transparent;
  border: none;
  padding: 0;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  cursor: pointer;
  text-align: left;
}
.sub-map-toggle .section-title { margin-bottom: 0; }
.sub-map-caret {
  color: #d6d6d6;
  font-family: var(--mono);
  font-size: 1.45rem;
  font-weight: 900;
  line-height: 1;
  min-width: 1.8rem;
  text-align: right;
}
.sub-map-toggle:hover .section-title,
.sub-map-toggle:hover .sub-map-caret { color: #fff; }
.sub-breakdown.is-collapsed .sub-map-toggle { margin-bottom: 0; }
.sub-breakdown.is-collapsed .sub-list { display: none; }

.sub-list {
  display: flex; flex-wrap: wrap; gap: 0.45rem;
}

.sub-pill {
  background: #1b1b1b;
  border: 1px solid #303030;
  border-radius: 99px;
  padding: 0.32rem 0.78rem;
  font-size: 0.74rem;
  font-family: var(--mono);
  font-weight: 650;
  cursor: pointer;
  transition: all 0.15s;
  display: flex; align-items: center; gap: 0.45rem;
  white-space: nowrap;
  color: #d6d6d6;
}
.sub-pill:hover { border-color: var(--red); color: #eeeeee; background: #211818; }
.sub-pill .pill-count {
  background: #d83a3a;
  color: #fff;
  font-size: 0.62rem;
  padding: 2px 7px;
  border-radius: 99px;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.4;
}

/* RESULTS */
.results-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.filter-bar {
  display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap;
}

.filter-btn {
  background: var(--bg2);
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 0.7rem;
  padding: 0.3rem 0.8rem;
  cursor: pointer;
  border-radius: 99px;
  transition: all 0.15s;
}
.filter-btn:hover { border-color: #444; color: var(--text); }
.filter-btn.active {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

#subFilter, #sortFilter {
  background: var(--bg2);
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 0.7rem;
  padding: 0.3rem 0.65rem;
  border-radius: var(--r-sm);
  outline: none;
  cursor: pointer;
  transition: border-color 0.15s;
}
#subFilter:focus, #sortFilter:focus { border-color: var(--red); }

/* FEED */
.feed-container { display: flex; flex-direction: column; gap: 0.55rem; }

.feed-item {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-left: 3px solid transparent;
  border-radius: var(--r);
  padding: 0.95rem 1.1rem;
  transition: border-color 0.15s, background 0.15s;
  animation: fadeIn 0.2s ease;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }

.feed-item:hover { background: var(--bg3); }
.feed-item.type-post    { border-left-color: var(--red); }
.feed-item.type-comment { border-left-color: #2c5c2c; }

.item-meta {
  display: flex; align-items: center; gap: 0.55rem;
  font-size: 0.67rem;
  color: var(--text-dim);
  margin-bottom: 0.45rem;
  flex-wrap: wrap;
  font-family: var(--mono);
}

.item-type {
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 99px;
}
.type-post .item-type    { background: rgba(224,48,48,0.12); color: var(--red); }
.type-comment .item-type { background: rgba(76,175,80,0.1);  color: #4caf50; }

.item-source.src-arctic  { border-color: #3a6ea8; color: #5b9bd5; opacity: 0.7; }
.item-source.src-pullpush { border-color: #6a3a8a; color: #a07ac8; opacity: 0.7; }
.item-source.src-reddit  { border-color: #555; opacity: 0.5; }

.item-sub {
  color: var(--red);
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.15s;
}
.item-sub:hover { opacity: 0.7; }

.item-date { color: #888; font-size: 0.72rem; }

.item-source {
  font-size: 0.58rem;
  border: 1px solid var(--text-faint);
  padding: 1px 6px;
  border-radius: 99px;
  opacity: 1;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #eaeaea;
}

.item-source.src-reddit {
  border-color: rgba(255,69,0,0.45);
  background: rgba(255,69,0,0.14);
  color: #ffd6c6;
}
.item-source.src-pullpush {
  border-color: rgba(160,122,200,0.45);
  background: rgba(160,122,200,0.14);
  color: #eddcff;
}
.item-source.src-arctic {
  border-color: rgba(91,155,213,0.45);
  background: rgba(91,155,213,0.14);
  color: #d9eeff;
}

.item-score {
  margin-left: auto;
  display: flex; align-items: center; gap: 0.25rem;
  color: var(--text-dim); font-size: 0.68rem;
}
.score-up { color: var(--red); }

.item-title {
  font-family: var(--sans);
  font-size: 0.92rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  line-height: 1.45;
}
.item-title a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.15s;
}
.item-title a:hover { color: var(--red); }

.item-context {
  font-size: 0.82rem;
  color: #d7d7d7;
  font-family: var(--sans);
  font-weight: 700;
  margin-bottom: 0.35rem;
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
  line-height: 1.45;
}

.item-body {
  font-size: 0.78rem;
  color: #c0c0c0;
  line-height: 1.65;
  overflow: visible;
  position: relative;
  font-family: var(--mono);
  white-space: pre-wrap;
}
.item-body.is-collapsible {
  max-height: var(--collapsed-height, 13.2em);
  overflow: hidden;
}
.item-body.expanded { max-height: none; }
.item-body.is-collapsible::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 16px;
  background: linear-gradient(rgba(17,17,17,0), rgba(17,17,17,0.92));
  pointer-events: none;
}
.item-body.expanded::after { display: none; }

/* Body links */
.item-body a {
  color: var(--red);
  text-decoration: none;
  font-weight: 700;
}
.item-body a:visited { color: #c85b5b; }
.item-body a:hover { color: #ff6a6a; text-decoration: underline; }
.item-body a:active { color: #ff8a8a; }

.item-actions {
  margin-top: 0.5rem;
  display: flex; gap: 0.9rem;
}
.item-action {
  font-size: 0.68rem;
  color: var(--text-dim);
  cursor: pointer;
  background: none; border: none;
  font-family: var(--mono);
  padding: 0;
  transition: color 0.15s;
  text-decoration: none;
}
.item-action:hover { color: var(--red); }

/* IMAGES */
.item-images {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin: 0.6rem 0;
}

.item-img {
  width: 100%;
  height: auto;
  max-height: 560px;
  object-fit: contain;
  border-radius: var(--r-sm);
  cursor: zoom-in;
  border: 1px solid var(--border);
  transition: opacity 0.15s, border-color 0.15s, transform 0.15s;
  background: var(--bg3);
}
.item-img:hover {
  opacity: 0.9;
  border-color: var(--red);
  transform: scale(1.02);
}

@media (max-width: 600px) {
  .item-img { max-height: 420px; }
}

/* LIGHTBOX */
#lightbox {
  display: none;
  position: fixed; inset: 0;
  z-index: 1000;
  align-items: center;
  justify-content: center;
}
#lightbox.open { display: flex; }

.lb-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.92);
  cursor: zoom-out;
}

.lb-img {
  position: relative; z-index: 1;
  max-width: 90vw;
  max-height: 88vh;
  object-fit: contain;
  border-radius: var(--r);
  border: 1px solid var(--border);
  box-shadow: 0 0 60px rgba(0,0,0,0.8);
}

.lb-close {
  position: absolute;
  top: 1.2rem; right: 1.2rem;
  z-index: 2;
  background: var(--bg2);
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 1rem;
  width: 36px; height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.lb-close:hover { border-color: var(--red); color: var(--red); }

/* LOAD MORE */
.load-more { text-align: center; margin-top: 1.5rem; }
.load-more button {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 0.75rem;
  padding: 0.6rem 2rem;
  cursor: pointer;
  border-radius: var(--r);
  transition: all 0.15s;
}
.load-more button:hover { border-color: var(--red); color: var(--red); }

/* ERROR */
.error-box {
  background: var(--bg2);
  border: 1px solid #3a1515;
  border-radius: var(--r);
  padding: 2.5rem 2rem;
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 1rem;
}
.error-icon { font-size: 1.8rem; color: var(--red); }
.error-box p {
  font-size: 0.8rem;
  color: var(--text-dim);
  font-family: var(--mono);
  max-width: 420px;
  line-height: 1.65;
}
.error-box button {
  background: var(--red);
  border: none; color: #fff;
  font-family: var(--mono);
  font-size: 0.73rem;
  padding: 0.55rem 1.5rem;
  cursor: pointer;
  border-radius: var(--r-sm);
  transition: background 0.15s;
}
.error-box button:hover { background: var(--red-dim); }

.sub-pill-nsfw {
  border-color: rgba(224,48,48,0.55);
  color: #dddddd;
}
.sub-pill-nsfw:hover {
  border-color: var(--red);
  color: #eeeeee;
}

.pill-nsfw-badge {
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 2px 6px;
  border-radius: 99px;
  border: 1px solid rgba(224,48,48,0.6);
  background: rgba(224,48,48,0.18);
  color: #f2b0b0;
  line-height: 1.4;
  flex-shrink: 0;
}

/* NSFW */
.item-nsfw-badge {
  font-family: var(--mono);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 1px 7px;
  border-radius: 99px;
  border: 1px solid rgba(224,48,48,0.5);
  background: rgba(224,48,48,0.12);
  color: #f28080;
  white-space: nowrap;
}

.feed-item.is-nsfw {
  border-left: 2px solid rgba(224,48,48,0.4);
}

.filter-divider {
  display: inline-block;
  width: 1px;
  height: 16px;
  background: var(--border);
  margin: 0 0.2rem;
  vertical-align: middle;
  align-self: center;
}

/* API STATUS BANNER */
.api-status-section {
  margin-bottom: 1rem;
}

.api-status-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.api-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  padding: 4px 10px;
  border-radius: 99px;
  border: 1px solid var(--border);
  background: var(--bg2);
  color: var(--text-dim);
  white-space: nowrap;
}

.api-chip-icon {
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1;
}

.api-chip-note {
  color: #c9c9c9;
  font-size: 0.62rem;
  margin-left: 0.1rem;
}

.api-status-note {
  width: 100%;
  margin-top: 0.15rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  line-height: 1.55;
  color: #f1d6d6;
}

.api-status-chip.api-ok {
  border-color: rgba(76,175,80,0.3);
  background: rgba(76,175,80,0.06);
  color: #b2d9b4;
}
.api-status-chip.api-ok .api-chip-icon { color: #4caf50; }
.api-status-chip.api-ok .api-chip-note { color: #6ea870; }

.api-status-chip.api-fail {
  border-color: rgba(224,48,48,0.35);
  background: rgba(224,48,48,0.07);
  color: #f2c3c3;
}
.api-status-chip.api-fail .api-chip-icon { color: var(--red); }
.api-status-chip.api-fail .api-chip-note { color: #f0b0b0; }

/* MOD PANEL */
.mod-section {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--r) var(--r);
  padding: 1rem 1.1rem 1.1rem;
  margin-top: -6px;
  margin-bottom: 1rem;
  animation: slideDown 0.18s ease;
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.mod-header {
  margin-bottom: 0.75rem;
}

.mod-count-badge {
  display: inline-block;
  background: var(--red);
  color: #fff;
  font-size: 0.58rem;
  padding: 1px 7px;
  border-radius: 99px;
  font-weight: 700;
  vertical-align: middle;
  margin-left: 0.4rem;
}

.mod-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.mod-empty {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-dim);
  line-height: 1.65;
}

.mod-sub-pill {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 0.35rem 0.65rem 0.35rem 0.45rem;
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
  max-width: 220px;
}
.mod-sub-pill:hover {
  border-color: var(--red);
  background: #1c1212;
}

.mod-sub-icon {
  width: 22px; height: 22px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border);
}
.mod-sub-icon-placeholder {
  display: flex; align-items: center; justify-content: center;
  background: var(--bg);
  color: var(--text-faint);
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 700;
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.mod-sub-name {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.mod-sub-count {
  font-family: var(--mono);
  font-size: 0.6rem;
  color: var(--text-faint);
  white-space: nowrap;
  margin-left: auto;
  flex-shrink: 0;
}

button.user-chip {
  font-family: var(--mono);
  cursor: pointer;
  background: var(--bg3);
  border: 1px solid rgba(76,175,80,0.35);
  color: #cfe9d1;
  font-size: 0.8rem;
  padding: 4px 12px;
  border-radius: 999px;
  white-space: nowrap;
  transition: opacity 0.15s, background 0.15s;
}
button.user-chip:hover { opacity: 0.8; }
button.mod-toggle-btn.active { background: rgba(76,175,80,0.1); }

/* UTILS */
.hidden { display: none !important; }

/* LOADING OVERLAY */
#loadingOverlay {
  position: fixed; inset: 0;
  background: rgba(8,8,8,0.82);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 500;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.4rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
#loadingOverlay.active {
  opacity: 1;
  pointer-events: all;
}
.overlay-spinner {
  width: 40px; height: 40px;
  border: 2px solid var(--border);
  border-top-color: var(--red);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.overlay-msg {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-dim);
  letter-spacing: 0.08em;
  text-align: center;
  max-width: 280px;
  line-height: 1.6;
}
.overlay-sub {
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--text-faint);
  letter-spacing: 0.06em;
}
.overlay-progress-wrap {
  width: 180px;
  height: 2px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
}
.overlay-progress-bar {
  height: 100%;
  background: var(--red);
  width: 0%;
  transition: width 0.4s ease;
  border-radius: 99px;
}


footer {
  position: relative; z-index: 1;
  text-align: center;
  padding: 1.4rem;
  font-size: 0.82rem;
  color: var(--text-dim);
  border-top: 1px solid var(--border);
  letter-spacing: 0.04em;
  font-family: var(--mono);
}

.footer-credit {
  color: var(--red);
  text-decoration: none;
  display: inline-block;
  animation: dance 1.6s ease-in-out infinite;
  font-weight: 600;
}
.footer-credit:hover {
  animation: danceFast 0.5s ease-in-out infinite;
}

@keyframes dance {
  0%   { transform: translateY(0)    rotate(0deg)   scale(1); }
  20%  { transform: translateY(-4px) rotate(-4deg)  scale(1.08); }
  40%  { transform: translateY(2px)  rotate(3deg)   scale(0.96); }
  60%  { transform: translateY(-3px) rotate(-2deg)  scale(1.05); }
  80%  { transform: translateY(1px)  rotate(2deg)   scale(0.98); }
  100% { transform: translateY(0)    rotate(0deg)   scale(1); }
}

@keyframes danceFast {
  0%   { transform: translateY(0)    rotate(0deg)  scale(1); }
  25%  { transform: translateY(-5px) rotate(-6deg) scale(1.12); }
  75%  { transform: translateY(3px)  rotate(5deg)  scale(0.93); }
  100% { transform: translateY(0)    rotate(0deg)  scale(1); }
}

/* RESPONSIVE */
@media (max-width: 600px) {
  header { padding: 1.5rem 1.25rem 1.2rem; }
  .summary-section { grid-template-columns: repeat(2, 1fr); }
  .results-toolbar { flex-direction: column; align-items: flex-start; }
  .search-options { flex-wrap: wrap; gap: 0.75rem; }
}

/* === TURNSTILE === */
.turnstile-wrap { margin-top: 1.1rem; display: flex; flex-direction: column; gap: 0.45rem; }
.turnstile-note { font-family: var(--mono); font-size: 0.68rem; color: var(--text-dim); letter-spacing: 0.04em; }
.turnstile-warning { font-family: var(--mono); font-size: 0.72rem; color: #f2c3c3; border: 1px solid rgba(224,48,48,0.3); background: rgba(224,48,48,0.07); border-radius: var(--r-sm); padding: 0.5rem 0.85rem; margin-top: 0.5rem; }

/* === LANDING SECTIONS === */
.landing-section { margin-top: 3.5rem; padding-top: 2.5rem; border-top: 1px solid var(--border); }
.landing-title { font-family: var(--sans); font-size: 1.05rem; font-weight: 800; letter-spacing: -0.02em; color: var(--text); text-transform: none; margin-bottom: 1.1rem; }
.landing-eyebrow { font-family: var(--mono); font-size: 0.6rem; font-weight: 600; letter-spacing: 0.16em; color: var(--red); text-transform: uppercase; margin-bottom: 0.4rem; }
.landing-lead { font-size: 0.9rem; color: #c0c0c0; line-height: 1.75; max-width: 640px; margin-bottom: 1.8rem; }
.landing-lead strong { color: var(--text); font-weight: 700; }

/* Feature grid */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; }
@media (max-width: 700px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 440px) { .feature-grid { grid-template-columns: 1fr; } }
.feature-card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--r); padding: 1.15rem 1.1rem 1.1rem; transition: border-color 0.2s, background 0.2s; }
.feature-card:hover { border-color: #2e2e2e; background: var(--bg3); }
.feature-icon { font-size: 1.15rem; color: var(--red); margin-bottom: 0.6rem; line-height: 1; }
.feature-card h3 { font-family: var(--sans); font-size: 0.82rem; font-weight: 700; color: var(--text); margin-bottom: 0.45rem; letter-spacing: -0.01em; }
.feature-card p { font-family: var(--mono); font-size: 0.7rem; color: #c0c0c0; line-height: 1.7; }

/* Use cases */
.use-case-list { display: flex; flex-direction: column; gap: 0.65rem; }
.use-case-item { display: flex; gap: 1rem; align-items: flex-start; background: var(--bg2); border: 1px solid var(--border); border-radius: var(--r); padding: 0.9rem 1.1rem; transition: border-color 0.15s; }
.use-case-item:hover { border-color: #2e2e2e; }
.use-case-tag { font-family: var(--mono); font-size: 0.58rem; font-weight: 700; letter-spacing: 0.12em; color: var(--red); background: rgba(224,48,48,0.1); border: 1px solid rgba(224,48,48,0.25); border-radius: 99px; padding: 3px 10px; white-space: nowrap; flex-shrink: 0; align-self: center; min-width: 100px; text-align: center; }
.use-case-item p { font-family: var(--mono); font-size: 0.72rem; color: #c0c0c0; line-height: 1.7; margin: 0; }

/* Privacy */
.privacy-section { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--r); padding: 1.75rem 1.6rem; margin-top: 3rem; }
.privacy-inner { display: flex; gap: 1.4rem; align-items: flex-start; }
@media (max-width: 500px) { .privacy-inner { flex-direction: column; } }
.privacy-icon-wrap { font-size: 1.6rem; flex-shrink: 0; opacity: 0.8; margin-top: 0.1rem; }
.privacy-content { flex: 1; min-width: 0; }
.privacy-points { display: flex; flex-direction: column; gap: 0.55rem; margin-top: 0.1rem; }
.privacy-point { display: flex; gap: 0.7rem; align-items: flex-start; font-family: var(--mono); font-size: 0.72rem; color: #c0c0c0; line-height: 1.65; }
.privacy-point strong { color: var(--text); font-weight: 700; }
.pp-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; margin-top: 0.42em; }
.pp-dot.ok { background: #4caf50; }
.pp-dot.warn { background: #f0a020; }

/* FAQ */
.faq-list { display: flex; flex-direction: column; gap: 0.5rem; }
.faq-item { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; transition: border-color 0.15s; }
.faq-item[open] { border-color: #2e2e2e; }
.faq-q { font-family: var(--sans); font-size: 0.85rem; font-weight: 600; color: var(--text); padding: 1rem 1.1rem; cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; user-select: none; letter-spacing: -0.01em; }
.faq-q::-webkit-details-marker { display: none; }
.faq-q::after { content: '+'; font-family: var(--mono); font-size: 0.9rem; color: var(--red); flex-shrink: 0; margin-left: 1rem; }
details[open] .faq-q::after { content: '\2212'; }
.faq-a { font-family: var(--mono); font-size: 0.72rem; color: #c0c0c0; line-height: 1.75; padding: 0.85rem 1.1rem 1.1rem; border-top: 1px solid var(--border); }
