:root {
  --bg: #f4f6fb;
  --card-bg: #ffffff;
  --ink: #1a2233;
  --ink-soft: #4a5568;
  --ink-faint: #707b8c;
  --brand: #2f5fe0;
  --brand-dark: #2347b0;
  --warning-bg: #fff6e6;
  --warning-border: #f0c36d;
  --warning-ink: #8a5a00;
  --success-bg: #e8f7ee;
  --success-border: #7cc99a;
  --success-ink: #1c7a45;
  --danger-bg: #fdecec;
  --danger-border: #e3a3a3;
  --danger-ink: #a32020;
  --line: #e2e7f0;
  --radius: 14px;
  --shadow: 0 8px 30px rgba(26, 34, 51, 0.08);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ---------- Header & nav ---------- */
.site-header {
  background: var(--card-bg);
  border-bottom: 1px solid var(--line);
  padding: 0.85rem 1.25rem;
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-inner {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--ink);
}

.brand-mark { font-size: 1.4rem; }
.brand-tld { color: var(--brand); }

/* Hamburger button (top-right) */
.nav-toggle {
  appearance: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nav-toggle:hover { border-color: var(--brand); }

.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  display: block;
  width: 20px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  position: relative;
}

.nav-toggle-bars::before { position: absolute; top: -6px; }
.nav-toggle-bars::after { position: absolute; top: 6px; }

/* Dropdown nav menu */
.site-nav {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 0.4rem;
  display: flex;
  flex-direction: column;
  min-width: 200px;
  z-index: 20;
}

.site-nav[hidden] { display: none; }

.site-nav a {
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
}

.site-nav a:hover { background: #f0f4ff; color: var(--brand); }
.site-nav a.is-current { color: var(--brand); background: #f0f4ff; }

/* ---------- Layout ---------- */
main {
  flex: 1;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 2rem 1.25rem;
}

.panel { display: none; }
.panel.is-active { display: block; animation: fade 0.25s ease; }

@keyframes fade {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem;
}

h1 {
  font-size: 1.6rem;
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
}

.lede {
  color: var(--ink-soft);
  margin: 0 0 1.5rem;
}

/* ---------- Notices ---------- */
.notice {
  border-radius: 10px;
  padding: 0.9rem 1.1rem;
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.notice-warning {
  background: var(--warning-bg);
  border: 1px solid var(--warning-border);
  color: var(--warning-ink);
}

/* ---------- Form / dropzone ---------- */
.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  text-align: center;
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  padding: 2.25rem 1.5rem;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  position: relative;
}

.dropzone:hover,
.dropzone.is-drag {
  border-color: var(--brand);
  background: #f6f9ff;
}

.dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.dropzone-icon { font-size: 2rem; color: var(--brand); }
.dropzone-text { font-weight: 600; }
.dropzone-hint { font-size: 0.85rem; color: var(--ink-faint); }

.preview {
  max-width: 100%;
  max-height: 320px;
  border-radius: 8px;
  margin-top: 0.5rem;
  border: 1px solid var(--line);
}

.file-name {
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin-top: 0.25rem;
  word-break: break-all;
}

/* ---------- Select / labels ---------- */
.field-label {
  display: block;
  margin-top: 1.25rem;
  margin-bottom: 0.4rem;
  font-weight: 600;
  font-size: 0.95rem;
}

.field-label .optional {
  font-weight: 400;
  color: var(--ink-faint);
}

.select {
  width: 100%;
  font: inherit;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}

.select:focus {
  outline: none;
  border-color: var(--brand);
}

.textarea {
  width: 100%;
  font: inherit;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  resize: vertical;
}

.textarea:focus {
  outline: none;
  border-color: var(--brand);
}

/* Honeypot: kept off-screen (not display:none) so bots still fill it, while
   staying out of the tab order and away from screen readers. */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.turnstile:not(:empty) {
  margin-top: 1.25rem;
}

.form-error {
  margin: 0.9rem 0 0;
  padding: 0.7rem 0.9rem;
  border-radius: 8px;
  background: #fdecec;
  border: 1px solid #f0b4b4;
  color: #a32020;
  font-size: 0.9rem;
}

/* ---------- Buttons ---------- */
.btn {
  appearance: none;
  font: inherit;
  font-weight: 600;
  border-radius: 10px;
  padding: 0.75rem 1.25rem;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  text-align: center;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.btn-primary {
  display: block;
  width: 100%;
  margin-top: 1.25rem;
  background: var(--brand);
  color: #fff;
  font-size: 1.05rem;
}

.btn-primary:hover { background: var(--brand-dark); }
.btn-primary:disabled { opacity: 0.55; cursor: not-allowed; }
/* Keep anchor-buttons legible: the UA a:link / a:visited rules out-specify the
   .btn-primary/.btn-secondary class, so set both states explicitly. */
.btn-primary:link, .btn-primary:visited { color: #fff; }

.btn-secondary {
  background: #fff;
  border-color: var(--brand);
  color: var(--brand);
}

.btn-secondary:hover { background: #f0f4ff; }
.btn-secondary:link, .btn-secondary:visited { color: var(--brand); }

/* Hero action row (Submit a scam / Learn more) above the gallery */
.hero-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.hero-btn {
  display: inline-block;
  width: auto;
  margin-top: 0;
  font-size: 1rem;
}

@media (max-width: 520px) {
  .hero-actions { flex-direction: column; }
  .hero-btn { width: 100%; }
}

/* ---------- Fine print ---------- */
.fine-print {
  font-size: 0.8rem;
  color: var(--ink-faint);
  margin: 1rem 0 0;
  line-height: 1.5;
}

/* ---------- Success ---------- */
.success {
  text-align: center;
  background: var(--success-bg);
  border: 1px solid var(--success-border);
  color: var(--success-ink);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
}

.success-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--success-border);
  color: #fff;
  font-size: 1.6rem;
  margin-bottom: 0.5rem;
}

.success h2 { margin: 0.25rem 0 0.5rem; font-size: 1.25rem; }
.success p { margin: 0.25rem 0; color: var(--success-ink); }

.link-strong, .link-strong:visited {
  color: var(--brand-dark);
  font-weight: 700;
}

/* ---------- Below-CTA row ---------- */
.below-cta {
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  text-align: center;
  color: var(--ink-soft);
}

.below-cta .btn { margin-top: 0.6rem; }

/* ---------- Carousel ---------- */
.carousel {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.carousel-viewport {
  flex: 1;
  overflow: hidden;
  border-radius: var(--radius);
}

.carousel-track {
  display: flex;
  transition: transform 0.35s ease;
}

.slide {
  min-width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0.5rem;
}

.slide-image-link {
  display: inline-block;
  cursor: zoom-in;
  border-radius: 10px;
  line-height: 0;
  transition: transform 0.15s, box-shadow 0.15s;
}

.slide-image-link:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

/* Cap both dimensions so tall/large screenshots can't stretch the page; aspect
   ratio is preserved (no cropping). Full size is one click away. */
.slide img {
  max-width: min(380px, 100%);
  max-height: 420px;
  width: auto;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #eef1f7;
  object-fit: contain;
}

.slide-zoom-hint {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.78rem;
  color: var(--ink-faint);
}

.slide-caption {
  margin-top: 0.9rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
  max-width: 560px;
}

.slide-text { display: block; margin: 0.5rem 0; }

/* Assessment block — mirrors the admin score field. */
.slide-assessment {
  display: flex;
  align-items: stretch;
  gap: 0.85rem;
  text-align: left;
  max-width: 440px;
  margin: 0.4rem auto 0;
  border: 1px solid var(--line);
  border-left-width: 6px;
  border-radius: 10px;
  padding: 0.8rem 0.95rem;
  background: #fff;
}

.slide-score-num {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  align-self: center;
  min-width: 2.4ch;
  text-align: center;
}

.slide-score-body {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  flex: 1;
  min-width: 0;
}

.slide-score-label { font-weight: 700; font-size: 1rem; }

.slide-score-scale {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
}

.slide-score-context {
  margin-top: 0.4rem;
  background: #f7f9fc;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.55rem 0.7rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
  white-space: pre-wrap;
}

.slide-score-body .slide-tag {
  align-self: flex-start;
  margin: 0.55rem 0 0;
}

.slide-model {
  margin-top: 0.5rem;
  font-size: 0.78rem;
  color: var(--ink-faint);
  font-style: italic;
}

.slide-assessment.s-low { background: var(--success-bg); border-left-color: var(--success-ink); }
.slide-assessment.s-low .slide-score-num, .slide-assessment.s-low .slide-score-label { color: var(--success-ink); }
.slide-assessment.s-moderate { background: var(--warning-bg); border-left-color: var(--warning-ink); }
.slide-assessment.s-moderate .slide-score-num, .slide-assessment.s-moderate .slide-score-label { color: var(--warning-ink); }
.slide-assessment.s-high { background: #fff1e8; border-left-color: #c2480f; }
.slide-assessment.s-high .slide-score-num, .slide-assessment.s-high .slide-score-label { color: #c2480f; }
.slide-assessment.s-severe { background: var(--danger-bg); border-left-color: var(--danger-ink); }
.slide-assessment.s-severe .slide-score-num, .slide-assessment.s-severe .slide-score-label { color: var(--danger-ink); }

.slide-caption .slide-number {
  display: block;
  font-size: 0.8rem;
  color: var(--ink-faint);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.slide-caption .slide-tag {
  display: inline-block;
  background: #eaf0ff;
  color: var(--brand-dark);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  margin-bottom: 0.5rem;
}

.carousel-arrow {
  appearance: none;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s, border-color 0.15s;
}

.carousel-arrow:hover { background: #f0f4ff; border-color: var(--brand); color: var(--brand); }

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 1.1rem;
  flex-wrap: wrap;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: var(--line);
  cursor: pointer;
  padding: 0;
  transition: background 0.15s, transform 0.15s;
}

.dot.is-active { background: var(--brand); transform: scale(1.2); }

.carousel-controls {
  display: flex;
  justify-content: center;
  margin-top: 0.75rem;
}

.carousel-toggle {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-soft);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.carousel-toggle:hover { border-color: var(--brand); color: var(--brand); background: #f0f4ff; }
.carousel-toggle-icon { font-size: 0.7rem; line-height: 1; }

/* ---------- Article (Learn more) ---------- */
.article h2 {
  font-size: 1.3rem;
  margin: 1.75rem 0 0.6rem;
  letter-spacing: -0.01em;
}

.article h3 {
  font-size: 1.08rem;
  margin: 1.4rem 0 0.4rem;
  color: var(--ink);
}

.article p { margin: 0 0 0.9rem; color: var(--ink-soft); }
.article .lede { color: var(--ink-soft); }

.article ul {
  margin: 0 0 1rem;
  padding-left: 1.2rem;
  color: var(--ink-soft);
}

.article li { margin-bottom: 0.6rem; }
.article li strong { color: var(--ink); }

.article hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: 2rem 0;
}

.article a {
  color: var(--brand-dark);
  font-weight: 600;
  word-break: break-word;
}

.article .below-cta { text-align: left; }
.article .below-cta .hero-btn { display: inline-block; }

/* ---------- Footer ---------- */
.site-footer {
  text-align: center;
  padding: 1.5rem 1.25rem 2rem;
  color: var(--ink-faint);
  font-size: 0.9rem;
}

.footer-nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.4rem 1.25rem;
  margin-bottom: 0.9rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--line);
}

.footer-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 600;
}

.footer-nav a:hover { color: var(--brand); }

.site-footer strong { color: var(--ink-soft); }

.disclaimer {
  max-width: 640px;
  margin: 0.75rem auto 0;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--ink-faint);
}

.disclaimer a { color: var(--brand-dark); }

.adbutter-note {
  background: #eaf0ff;
  border: 1px solid #c9daf8;
  border-radius: 10px;
  padding: 0.75rem 1rem;
  margin: 0 0 1.25rem;
  font-weight: 600;
  color: var(--ink-soft);
}
.adbutter-note a { color: var(--brand-dark); }

/* ---------- Responsive ---------- */
@media (max-width: 520px) {
  .card { padding: 1.4rem; }
  h1 { font-size: 1.35rem; }
  .carousel-arrow { width: 36px; height: 36px; font-size: 1.25rem; }
}

/* ---------- Server-rendered pages (/all + category pages) ---------- */
.server-page main { max-width: 1000px; }

/* Static header nav (server pages have no JS dropdown) */
.server-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.1rem;
  align-items: center;
}
.server-nav a {
  text-decoration: none;
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 0.95rem;
}
.server-nav a:hover { color: var(--brand); }

@media (max-width: 560px) {
  .server-nav { font-size: 0.88rem; gap: 0.3rem 0.8rem; }
}

/* /all — category index */
.category-index {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.6rem;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.category-index li {
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}
.category-index a {
  color: var(--brand-dark);
  font-weight: 700;
  text-decoration: none;
}
.category-index a:hover { text-decoration: underline; }
.category-count { color: var(--ink-faint); font-size: 0.9rem; }

/* Category page — grid of screenshot cards */
.back-link { margin: 0 0 0.5rem; }
.back-link a { color: var(--brand-dark); font-weight: 600; text-decoration: none; }
.back-link a:hover { text-decoration: underline; }

.screenshot-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  margin-top: 1.5rem;
}
.screenshot-card {
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.screenshot-card img {
  max-width: min(320px, 100%);
  max-height: 380px;
  width: auto;
  height: auto;
  display: block;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #eef1f7;
}
.screenshot-card .slide-assessment { max-width: 100%; }

.empty-category {
  color: var(--ink-faint);
  text-align: center;
  padding: 2.5rem 1rem;
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-top: 1.5rem;
}

/* ---------- Sharing ---------- */
.share-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-top: 1rem;
}
.share-btn {
  appearance: none;
  font: inherit;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--brand);
  background: #fff;
  color: var(--brand);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.share-btn:hover { background: #f0f4ff; }
.share-btn.primary { background: var(--brand); color: #fff; }
.share-btn.primary:hover { background: var(--brand-dark); }
.share-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--brand-dark);
  text-decoration: none;
  padding: 0.4rem 0.6rem;
  border-radius: 8px;
}
.share-link:hover { background: #f0f4ff; }

/* per-card share row (category grid) */
.card-share {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  justify-content: center;
  margin-top: 0.75rem;
}

/* carousel slide share button */
.slide-share { margin-top: 0.75rem; }

/* scam detail page card */
.scam-detail {
  max-width: 520px;
  margin: 0 auto;
}
.scam-detail .share-row { justify-content: center; }
