@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;700;800&display=swap');

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

/* ============================================================= tokens ==== */
:root {
  /* canvas */
  --bg:       #fbf3e6;   /* warm cream */
  --surface:  #ffffff;
  --surface2: #fff7ea;
  --border:   #1b1830;   /* ink — used as the chunky outline everywhere */
  --ink:      #1b1830;
  --text:     #1b1830;
  --muted:    #726d84;

  /* brand + playful accents */
  --accent:   #6c4bff;   /* electric violet (brand) */
  --accent2:  #00c2a8;   /* teal (brand) */
  --coral:    #ff5470;
  --amber:    #ffb020;
  --sky:      #2fb8ff;
  --lime:     #b6f36a;
  --pink:     #ff7ad9;
  --danger:   #ff3d6e;

  --radius:   16px;
  --shadow:   4px 4px 0 var(--ink);
  --shadow-lg: 7px 7px 0 var(--ink);

  --dot-color: rgba(27,24,48,.12);
  --wash-opacity: 1;
  --rating-bg: #fff4d6;
  --msg-error-bg: #ffe3ea;
  --msg-success-bg: #d6fff4;
  --msg-success-text: #067a68;
  --header-bg: rgba(251,243,230,.82);
  /* Deliberately NOT redefined in the dark blocks below — the accent colors
     (amber/lime/sky/pink) these pair with don't change between themes, so
     text/pill-background sitting on them must stay this fixed dark shade
     too. Using var(--ink) here (which does flip for theme contrast
     elsewhere) was the root cause of several dark-mode-unreadable elements
     — see the components using this token below. */
  --ink-fixed: #1b1830;
}

/* Dark theme: same token names, so every existing rule built on var(--x)
   re-colors automatically — no per-component dark overrides needed except
   for the handful of places below that use a literal color instead of a
   token. Respects the OS preference by default; an explicit user toggle
   (see the theme-toggle script in inc.php) stamps data-theme to override it. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:       #14121f;
    --surface:  #1e1b2e;
    --surface2: #241f38;
    --border:   #e8e4f5;
    --ink:      #e8e4f5;
    --text:     #f0eef7;
    --muted:    #a39cc4;
    --dot-color: rgba(232,228,245,.08);
    --wash-opacity: .6;
    --rating-bg: #40350f;
    --msg-error-bg: #3a1b28;
    --msg-success-bg: #0f3830;
    --msg-success-text: #4de6c4;
    --header-bg: rgba(20,18,31,.82);
  }
}
:root[data-theme="dark"] {
  --bg:       #14121f;
  --surface:  #1e1b2e;
  --surface2: #241f38;
  --border:   #e8e4f5;
  --ink:      #e8e4f5;
  --text:     #f0eef7;
  --muted:    #a39cc4;
  --dot-color: rgba(232,228,245,.08);
  --wash-opacity: .6;
  --rating-bg: #40350f;
  --msg-error-bg: #3a1b28;
  --msg-success-bg: #0f3830;
  --msg-success-text: #4de6c4;
  --header-bg: rgba(20,18,31,.82);
}

html, body { height: 100%; }

body {
  color: var(--text);
  font-family: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 15.5px;
  line-height: 1.55;
  background-color: var(--bg);
  /* soft colour washes + a faint dot grid so the page never feels flat.
     The dot color is a low-opacity fixed value, not currentColor — at full
     ink opacity the dots read as lines cutting through body text wherever
     a paragraph sits directly on this background (e.g. guide articles). */
  background-image:
    radial-gradient(120% 90% at 8% -5%, rgba(108,75,255,calc(.16 * var(--wash-opacity))), transparent 55%),
    radial-gradient(120% 90% at 100% 0%, rgba(0,194,168,calc(.16 * var(--wash-opacity))), transparent 50%),
    radial-gradient(120% 120% at 50% 120%, rgba(255,84,112,calc(.12 * var(--wash-opacity))), transparent 55%),
    radial-gradient(var(--dot-color) .8px, transparent .8px);
  background-size: auto, auto, auto, 22px 22px;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
/* keep the dot texture very light */
body { background-blend-mode: normal; }
body::before { content: none; }

a { color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 2px; }

.hidden { display: none !important; }
.muted  { color: var(--muted); }

/* ============================================================= buttons === */
button, .btn {
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  border: 2.5px solid var(--ink);
  border-radius: 12px;
  transition: transform .12s ease, box-shadow .12s ease, background .15s;
  display: inline-block;
  text-decoration: none;
  color: var(--ink);
  background: var(--surface);
  box-shadow: var(--shadow);
}
button:hover, .btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--ink);
}
button:active, .btn:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--ink);
}
button:disabled { opacity: .5; cursor: default; transform: none; box-shadow: var(--shadow); }

.btn-primary { background: var(--accent); color: #fff; padding: 11px 22px; }
.btn-ghost   { background: var(--surface); color: var(--ink); padding: 11px 22px; }

/* ============================================================= inputs ==== */
input, textarea, select {
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 2.5px solid var(--ink);
  border-radius: 12px;
  padding: 11px 13px;
  outline: none;
  width: 100%;
  transition: box-shadow .12s ease, transform .12s ease;
  box-shadow: 3px 3px 0 rgba(27,24,48,.18);
}
input:focus, textarea:focus, select:focus {
  box-shadow: 4px 4px 0 var(--accent);
}
select { -webkit-appearance: none; appearance: none; background-image:
  linear-gradient(45deg, transparent 50%, var(--ink) 50%),
  linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 12px) 50%;
  background-size: 6px 6px, 6px 6px; background-repeat: no-repeat; padding-right: 34px;
}
label {
  display: block; font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: var(--muted); margin: 18px 0 7px;
}
label:first-child { margin-top: 0; }

/* Honeypot */
/* display:none matters: browser autofill and password managers happily fill an
   off-screen field, which flagged real submissions as bots. They skip display:none. */
.hp-field { display: none; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 22px; }

/* ============================================================= header ==== */
header.site {
  position: sticky; top: 0; z-index: 20;
  background: var(--header-bg);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 2.5px solid var(--ink);
  padding: 14px 0;
}
header.site .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
header.site .logo {
  font-weight: 800; font-size: 19px; color: var(--ink); text-decoration: none;
  letter-spacing: -.02em; display: inline-flex; align-items: center; gap: 2px;
}
header.site .logo span {
  color: #fff; background: var(--accent); padding: 1px 8px; border-radius: 8px;
  border: 2px solid var(--ink); box-shadow: 2px 2px 0 var(--ink); margin-left: 4px;
  transform: rotate(-2deg); display: inline-block;
}
header.site nav a {
  color: var(--ink); text-decoration: none; margin-left: 8px; font-size: 14px; font-weight: 700;
  padding: 7px 14px; border-radius: 999px; border: 2px solid transparent; transition: all .12s;
}
header.site nav a:hover { border-color: var(--ink); background: var(--amber); color: var(--ink-fixed); box-shadow: 2px 2px 0 var(--ink); }
#theme-toggle {
  background: none; color: var(--ink); text-decoration: none; margin-left: 8px; font-size: 15px;
  padding: 6px 10px; border-radius: 999px; border: 2px solid transparent; cursor: pointer; transition: all .12s; line-height: 1;
}
#theme-toggle:hover { border-color: var(--ink); background: var(--surface2); box-shadow: 2px 2px 0 var(--ink); }

/* ============================================================== hero ===== */
.hero { padding: 60px 0 30px; text-align: center; position: relative; }
.hero .eyebrow {
  display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .1em; color: var(--ink-fixed);
  background: var(--lime); border: 2.5px solid var(--ink); border-radius: 999px;
  padding: 6px 16px; box-shadow: 3px 3px 0 var(--ink); margin-bottom: 24px;
  transform: rotate(-1.5deg);
}
.hero h1 {
  font-size: clamp(38px, 7vw, 68px); line-height: 1.02; letter-spacing: -.035em;
  font-weight: 800; margin-bottom: 18px;
}
.hero h1 .hl {
  background: linear-gradient(105deg, var(--coral), var(--amber) 45%, var(--accent2) 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero h1 .mark {
  background: var(--amber); color: var(--ink-fixed); padding: 0 .12em; border-radius: 8px;
  box-shadow: 3px 3px 0 var(--ink); box-decoration-break: clone; -webkit-box-decoration-break: clone;
  display: inline-block; transform: rotate(-1deg);
}
.hero p { color: var(--muted); max-width: 540px; margin: 0 auto; font-size: 17px; font-weight: 500; }

/* floating decorative stickers */
.hero::before, .hero::after {
  content: ""; position: absolute; width: 74px; height: 74px; border: 2.5px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink); z-index: -1; pointer-events: none;
}
.hero::before {
  left: 4%; top: 40px; background: var(--sky); border-radius: 50%;
  animation: bob 5s ease-in-out infinite;
}
.hero::after {
  right: 5%; top: 90px; background: var(--pink); border-radius: 16px; transform: rotate(12deg);
  animation: bob 6s ease-in-out infinite reverse;
}
@keyframes bob { 0%,100% { translate: 0 0; } 50% { translate: 0 -16px; } }
@media (max-width: 820px) { .hero::before, .hero::after { display: none; } }
@media (prefers-reduced-motion: reduce) { .hero::before, .hero::after { animation: none; } }

/* ============================================================= toolbar === */
.toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin: 30px 0 6px; }
.toolbar select { width: auto; min-width: 160px; }
.search-wrap { position: relative; flex: 1; min-width: 220px; }
.search-wrap input[type=search] { width: 100%; }
.search-suggest {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 20;
  background: var(--surface); border: 2.5px solid var(--ink); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); overflow: hidden;
}
.search-suggest.hidden { display: none; }
.search-suggest a { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; text-decoration: none; color: var(--text); font-size: 14px; }
.search-suggest a:hover, .search-suggest a.active { background: var(--surface2); }
.search-suggest .cat { color: var(--muted); font-size: 12px; }

.chips { display: flex; gap: 9px; flex-wrap: wrap; margin: 20px 0 28px; }
.chip {
  background: var(--surface); border: 2.5px solid var(--ink); color: var(--ink);
  padding: 7px 15px; border-radius: 999px; font-size: 13.5px; font-weight: 700; cursor: pointer;
  transition: transform .1s, box-shadow .1s, background .12s; box-shadow: 2px 2px 0 var(--ink);
}
.chip:hover { transform: translate(-1px,-1px); box-shadow: 3px 3px 0 var(--ink); }
.chip.active { background: var(--accent); color: #fff; }
/* rotate a splash of colour through the non-active chips — these background
   colors don't change between themes, so their text must stay a fixed dark
   shade too. Leaving it on var(--ink) (as before) meant dark mode flipped
   the text to near-white, making it nearly invisible against these same
   bright pastels — a real contrast bug, not just a missed dark-mode pass. */
.chip:nth-child(6n+2):not(.active) { background: var(--amber); color: var(--ink-fixed); }
.chip:nth-child(6n+3):not(.active) { background: var(--sky); color: var(--ink-fixed); }
.chip:nth-child(6n+4):not(.active) { background: var(--lime); color: var(--ink-fixed); }
.chip:nth-child(6n+5):not(.active) { background: var(--pink); color: var(--ink-fixed); }
.chip:nth-child(6n+0):not(.active) { background: var(--accent2); color:#fff; }

/* =============================================================== grid ==== */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(285px, 1fr));
  gap: 20px;
  margin-bottom: 48px;
}

.card {
  background: var(--surface); border: 2.5px solid var(--ink); border-radius: var(--radius);
  padding: 20px; display: flex; flex-direction: column; gap: 10px; text-decoration: none;
  color: var(--text); position: relative; box-shadow: var(--shadow);
  transition: transform .13s ease, box-shadow .13s ease;
  overflow: hidden;
}
/* a colourful cap along the top that cycles per card */
.card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 8px; background: var(--accent);
}
.card:nth-child(6n+1)::before { background: var(--coral); }
.card:nth-child(6n+2)::before { background: var(--amber); }
.card:nth-child(6n+3)::before { background: var(--sky); }
.card:nth-child(6n+4)::before { background: var(--accent2); }
.card:nth-child(6n+5)::before { background: var(--pink); }
.card:nth-child(6n+0)::before { background: var(--accent); }
.card:hover { transform: translate(-3px, -3px); box-shadow: var(--shadow-lg); opacity: 1; }
.card .row { display: flex; align-items: center; gap: 12px; margin-top: 4px; }
.card img.favicon {
  width: 40px; height: 40px; border-radius: 10px; background: var(--surface2);
  border: 2px solid var(--ink); padding: 4px; object-fit: contain;
}
.card h3 { font-size: 17px; font-weight: 800; letter-spacing: -.01em; }
.card .tagline { color: var(--muted); font-size: 14px; flex: 1; font-weight: 500; }
.card .meta { display: flex; justify-content: space-between; align-items: center; font-size: 13px; margin-top: 4px; }
.badge {
  background: var(--surface2); border: 2px solid var(--ink); border-radius: 999px;
  padding: 2px 11px; font-weight: 700; font-size: 12px; color: var(--ink);
}
.card .meta span:last-child { font-weight: 800; color: var(--coral); }

.empty {
  text-align: center; color: var(--muted); padding: 64px 20px; font-weight: 600;
  grid-column: 1 / -1;
}

.load-more-wrap {
  display: flex; justify-content: center; margin: -20px 0 48px;
}
.load-more-wrap[hidden] { display: none; }

/* ===================================================== tools of the day === */
.tod { margin: 4px 0 30px; }
.tod-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.tod-head h2 { font-size: 21px; font-weight: 800; letter-spacing: -.01em; }
.tod-nav { display: flex; gap: 8px; }
.tod-btn {
  width: 38px; height: 38px; padding: 0; border-radius: 999px; font-size: 20px; line-height: 1;
  background: var(--surface); color: var(--ink); border: 2.5px solid var(--ink);
  box-shadow: 2px 2px 0 var(--ink); cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.tod-btn:hover { background: var(--accent); color: #fff; }
.tod-btn:active { transform: translate(2px, 2px); box-shadow: none; }
.tod-track {
  display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory;
  scroll-behavior: smooth; padding: 4px 2px 10px; scrollbar-width: none;
}
.tod-track::-webkit-scrollbar { display: none; }
.tod-card {
  flex: 0 0 300px; scroll-snap-align: start; display: flex; gap: 12px; align-items: flex-start;
  background: var(--surface); border: 2.5px solid var(--ink); border-radius: var(--radius);
  padding: 16px; text-decoration: none; color: var(--text); box-shadow: var(--shadow);
  transition: transform .13s ease, box-shadow .13s ease;
}
.tod-card:hover { transform: translate(-3px, -3px); box-shadow: var(--shadow-lg); }
.tod-card img.favicon {
  width: 40px; height: 40px; border-radius: 10px; background: var(--surface2);
  border: 2px solid var(--ink); padding: 4px; object-fit: contain; flex: none;
}
.tod-body { min-width: 0; }
.tod-body h3 { font-size: 16px; font-weight: 800; letter-spacing: -.01em; }
.tod-body p {
  color: var(--muted); font-size: 13px; font-weight: 500; margin: 4px 0 8px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
@media (max-width: 640px) { .tod-card { flex-basis: 82%; } }

/* ============================================================== detail === */
/* padding-block only — the shared .wrap keeps its 22px horizontal padding */
.detail { padding-top: 40px; padding-bottom: 40px; }
.detail .row { display: flex; align-items: center; gap: 16px; margin-bottom: 10px; }
.detail img.favicon {
  width: 60px; height: 60px; border-radius: 14px; background: var(--surface);
  border: 2.5px solid var(--ink); box-shadow: var(--shadow); padding: 8px; object-fit: contain;
}
.detail h1 { font-size: clamp(26px, 4vw, 34px); font-weight: 800; letter-spacing: -.02em; margin-bottom: 6px; }
.detail .tagline { color: var(--muted); margin-bottom: 20px; font-size: 18px; font-weight: 500; }
.detail .desc {
  white-space: pre-wrap; line-height: 1.75; margin: 22px 0; font-size: 16px;
  background: var(--surface); border: 2.5px solid var(--ink); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 22px;
}
.detail .actions { display: flex; gap: 12px; align-items: center; margin: 22px 0; flex-wrap: wrap; }
.tags { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0; }
.tag {
  background: var(--lime); border: 2px solid var(--ink); border-radius: 999px;
  padding: 3px 12px; font-size: 12.5px; font-weight: 700; color: var(--ink-fixed);
  text-decoration: none; display: inline-block; transition: background .12s;
}
a.tag:hover { background: var(--amber); }

/* =================================================== richer listing data == */
.info-strip {
  display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0;
}
.info-bit {
  background: var(--surface2); border: 2px solid var(--ink); border-radius: 10px;
  padding: 6px 12px; font-size: 13px; display: flex; align-items: center; gap: 6px;
}
.info-bit .k { color: var(--muted); font-weight: 700; text-transform: uppercase; font-size: 10.5px; letter-spacing: .04em; }
.info-bit .v { font-weight: 700; }

.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 20px 0; }
.gallery img {
  width: 100%; height: auto; display: block; border-radius: var(--radius);
  border: 2.5px solid var(--ink); box-shadow: var(--shadow); background: var(--surface2);
}

.feature-list { list-style: none; display: flex; flex-direction: column; gap: 8px; margin: 12px 0 20px; }
.feature-list li {
  position: relative; padding-left: 26px; font-size: 15px; line-height: 1.5;
}
.feature-list li::before {
  content: "✓"; position: absolute; left: 0; top: 0; color: #fff; font-weight: 800; font-size: 12px;
  background: var(--accent2); width: 18px; height: 18px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; border: 2px solid var(--ink);
}

.pros-cons { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 12px 0 20px; }
@media (max-width: 640px) { .pros-cons { grid-template-columns: 1fr; } }
.pc {
  border: 2.5px solid var(--ink); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow);
}
.pc.pros { background: color-mix(in srgb, var(--accent2) 10%, var(--surface)); }
.pc.cons { background: color-mix(in srgb, var(--coral) 10%, var(--surface)); }
.pc h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 10px; }
.pc.pros h3 { color: var(--accent2); } .pc.cons h3 { color: var(--coral); }
.pc ul { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.pc li { font-size: 14px; padding-left: 18px; position: relative; }
.pc.pros li::before { content: "+"; position: absolute; left: 0; color: var(--accent2); font-weight: 800; }
.pc.cons li::before { content: "–"; position: absolute; left: 0; color: var(--coral); font-weight: 800; }

.maker-card {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 14px;
  background: var(--surface2); border: 2.5px solid var(--ink); border-radius: 999px;
  padding: 10px 18px; margin: 20px 0; width: fit-content;
}
.maker-card .k { color: var(--muted); font-weight: 600; }
.maker-card a { font-weight: 700; }

/* ============================================================== forms ==== */
form.card-form {
  background: var(--surface); border: 2.5px solid var(--ink); border-radius: 22px;
  padding: 32px; max-width: 660px; margin: 28px auto; box-shadow: var(--shadow-lg);
}
.field-error { color: var(--danger); font-size: 13px; font-weight: 600; margin-top: 6px; }

.more-details { margin: 18px 0 0; border: 2px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.more-details summary {
  cursor: pointer; list-style: none; padding: 12px 16px; font-size: 13.5px; font-weight: 700;
  color: var(--muted); background: var(--surface2);
}
.more-details summary::-webkit-details-marker { display: none; }
.more-details[open] summary { color: var(--text); }
.more-details-body { padding: 4px 16px 16px; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px 12px; margin-top: 6px; }
.badge-embed { padding: 14px 16px 18px; }
.badge-embed label { display: block; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin: 14px 0 6px; }
.badge-preview { display: flex; gap: 12px; flex-wrap: wrap; padding: 14px; background: var(--surface2); border-radius: var(--radius); }
.copy-row { display: flex; gap: 8px; }
.copy-row input { flex: 1; font-family: monospace; font-size: 12.5px; background: var(--surface2); }
.copy-row .btn { flex-shrink: 0; padding: 8px 16px; }

.newsletter-box {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  background: var(--surface); border: 2.5px solid var(--ink); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px 22px; margin: 24px 0;
}
.nl-form { display: flex; gap: 8px; }
.nl-form input { min-width: 220px; }
.nl-msg { width: 100%; margin: 10px 0 0; font-size: 13.5px; color: var(--muted); }
.nl-msg:empty { display: none; }

.rating-badge { background: var(--rating-bg); }
.reviews-section #review-form { margin: 16px 0; max-width: 100%; }
.review-list { display: flex; flex-direction: column; gap: 14px; margin-top: 18px; }
.review-card {
  background: var(--surface); border: 2.5px solid var(--ink); border-radius: var(--radius);
  padding: 16px 20px; box-shadow: var(--shadow);
}
.review-card h4 { margin: 6px 0 4px; }
.review-card p { margin: 6px 0; font-size: 14.5px; line-height: 1.5; }
.review-stars { color: #f5a524; font-size: 15px; letter-spacing: 1px; }
.review-meta { display: flex; align-items: center; gap: 12px; margin-top: 10px; font-size: 13px; flex-wrap: wrap; }
.review-meta a { font-weight: 700; }
.review-vote-btn {
  background: none; border: 1.5px solid var(--border); border-radius: 999px; padding: 4px 12px;
  font-size: 12.5px; cursor: pointer; color: var(--muted); font-weight: 600;
}
.review-vote-btn:hover { border-color: var(--ink); color: var(--text); }
.review-vote-btn:disabled { opacity: .6; cursor: default; }

/* ============================================================ reports ==== */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.stat-card {
  background: var(--surface); border: 2.5px solid var(--ink); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px 18px;
}
.stat-card .lbl { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.stat-card .num { font-size: 28px; font-weight: 800; margin-top: 4px; }
.stat-card .sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }

.rank { display: flex; flex-direction: column; gap: 10px; }
.rank .r { display: grid; grid-template-columns: 140px 1fr 44px; align-items: center; gap: 10px; font-size: 14px; }
.rank .r span:first-child { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank .track { height: 12px; background: var(--surface2); border: 1.5px solid var(--border); border-radius: 999px; overflow: hidden; }
.rank .fill { height: 100%; background: var(--accent); border-radius: 999px 0 0 999px; }
.rank .n { text-align: right; font-weight: 700; color: var(--muted); font-size: 13px; }

.spark-row { display: flex; align-items: flex-end; gap: 6px; height: 110px; padding: 10px; background: var(--surface); border: 2.5px solid var(--ink); border-radius: var(--radius); box-shadow: var(--shadow); overflow-x: auto; }
.spark-row .col { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 26px; flex: 1; }
.spark-row .col b { display: block; width: 100%; background: var(--accent2); border-radius: 3px 3px 0 0; }
.spark-row .col span { font-size: 10.5px; color: var(--muted); }

.cmp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 10px; }
.cmp-col {
  background: var(--surface); border: 2.5px solid var(--ink); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 20px 22px;
}
.cmp-col .btn { width: 100%; justify-content: center; margin: 12px 0 16px; }
.cmp-table { width: 100%; border-collapse: collapse; margin-bottom: 14px; }
.cmp-table th, .cmp-table td { text-align: left; padding: 7px 0; font-size: 13.5px; border-bottom: 1px solid var(--border); }
.cmp-table th { color: var(--muted); font-weight: 600; width: 40%; }
@media (max-width: 720px) { .cmp-grid { grid-template-columns: 1fr; } }

.ad-slot { display: flex; justify-content: center; align-items: center; min-height: 250px; width: 300px; max-width: 100%; margin: 32px auto; }

.follow-list { display: flex; flex-direction: column; gap: 8px; }
.follow-row {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 2px solid var(--border); border-radius: var(--radius);
  padding: 10px 14px;
}
.follow-row a { font-weight: 700; flex: 1; }
.follow-row .btn { padding: 6px 14px; font-size: 13px; }
.check { display: flex !important; align-items: center; gap: 6px; font-size: 13.5px; color: var(--text) !important; text-transform: none !important; letter-spacing: normal !important; margin: 0 !important; }
.check input { width: auto; }
.form-msg { margin: 18px 0; padding: 13px 16px; border-radius: 12px; font-size: 14px; font-weight: 600; border: 2.5px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); }
.form-msg.error { background: var(--msg-error-bg); color: var(--danger); }
.form-msg.success { background: var(--msg-success-bg); color: var(--msg-success-text); }

/* ============================================================= thanks ==== */
.thanks { text-align: center; padding: 80px 0; }
.thanks h1 { font-size: clamp(28px,5vw,44px); font-weight: 800; letter-spacing: -.02em; margin-bottom: 12px; }
.thanks .edit-link {
  background: var(--surface); border: 2.5px solid var(--ink); border-radius: 12px;
  box-shadow: var(--shadow); padding: 14px 18px; word-break: break-all; margin: 24px auto;
  max-width: 500px; font-size: 13.5px; font-weight: 600;
}

/* ============================================================= footer ==== */
footer.site {
  border-top: 2.5px solid var(--ink); padding: 26px 0; text-align: center;
  color: var(--muted); font-size: 13px; margin-top: 48px; font-weight: 600;
}

/* =============================================================== admin === */
.admin-panel { max-width: 760px; margin: 56px auto; }
.queue-item {
  background: var(--surface); border: 2.5px solid var(--ink); border-radius: var(--radius);
  padding: 18px; margin-bottom: 14px; box-shadow: var(--shadow);
}
.queue-item .actions { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.score {
  font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 999px;
  border: 2px solid var(--ink); background: var(--surface2); color: var(--ink);
}
.score.high { background: var(--coral); color: #fff; }
/* Review-worker verdict badges (queue.php) — reuses .badge's pill shape. */
.queue-item .badge { margin-left: 4px; cursor: help; }
.queue-item .badge-ok { background: var(--mint, #2ecc71); color: #fff; border-color: var(--ink); }
.queue-item .badge-bad { background: var(--coral); color: #fff; border-color: var(--ink); }

/* ===================================================== SEO content ======= */
.crumbs { font-size: 13px; font-weight: 600; margin-bottom: 18px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.crumbs a { color: var(--accent); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.crumbs span[aria-current] { color: var(--muted); }

a.badge { text-decoration: none; }
a.badge:hover { background: var(--amber); color: var(--ink-fixed); }

.rank-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: #fff;
  font-size: 12px; font-weight: 800; flex-shrink: 0;
}

.prose { margin: 8px 0 12px; }
.prose h2, .faq h2 {
  font-size: clamp(22px, 3.5vw, 28px); font-weight: 800; letter-spacing: -.02em;
  margin: 36px 0 14px; display: inline-block; color: var(--ink-fixed);
  background: var(--lime); border: 2.5px solid var(--ink); border-radius: 10px;
  padding: 2px 12px; box-shadow: 3px 3px 0 var(--ink); transform: rotate(-1deg);
}
.prose p { font-size: 16.5px; max-width: 720px; margin-bottom: 8px; }

.steps { max-width: 720px; margin: 6px 0 8px; padding-left: 0; list-style: none; counter-reset: step; }
.steps li {
  position: relative; background: var(--surface); border: 2.5px solid var(--ink); border-radius: 14px;
  padding: 14px 18px 14px 58px; margin-bottom: 12px; box-shadow: var(--shadow); font-size: 16px; counter-increment: step;
}
.steps li::before {
  content: counter(step); position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: #fff;
  border: 2.5px solid var(--ink); display: grid; place-items: center; font-weight: 800; font-size: 15px;
}

.cat-cloud { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0 8px; }
.cat-cloud a {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink);
  background: var(--surface); border: 2.5px solid var(--ink); border-radius: 999px;
  padding: 7px 14px; font-weight: 700; font-size: 14px; box-shadow: 2px 2px 0 var(--ink);
  transition: transform .1s, box-shadow .1s;
}
.cat-cloud a:hover { transform: translate(-1px,-1px); box-shadow: 4px 4px 0 var(--ink); background: var(--amber); color: var(--ink-fixed); }
.cat-cloud a span { background: var(--ink-fixed); color: #fff; border-radius: 999px; padding: 0 8px; font-size: 12px; }

/* ============================================================= collections == */
.coll-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; margin: 20px 0 40px; }
.coll-card {
  background: var(--surface); border: 2.5px solid var(--ink); border-radius: var(--radius);
  padding: 20px; text-decoration: none; color: var(--text); box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 8px; transition: transform .13s, box-shadow .13s;
}
.coll-card:hover { transform: translate(-3px,-3px); box-shadow: var(--shadow-lg); opacity: 1; }
.coll-card h3 { font-size: 18px; font-weight: 800; letter-spacing: -.01em; }
.coll-card p { color: var(--muted); font-size: 14px; flex: 1; }
.coll-count { font-weight: 700; font-size: 13px; color: var(--accent); }

.coll-list { list-style: none; display: flex; flex-direction: column; gap: 14px; margin: 24px 0 32px; padding: 0; }
.coll-item { display: flex; align-items: flex-start; gap: 14px; }
.coll-rank {
  flex: 0 0 auto; width: 34px; height: 34px; display: flex; align-items: center; justify-content: center;
  background: var(--amber); color: var(--ink-fixed); border: 2.5px solid var(--ink); border-radius: 50%; font-weight: 800; font-size: 15px;
  box-shadow: 2px 2px 0 var(--ink); margin-top: 4px;
}
.coll-item-body {
  flex: 1; text-decoration: none; color: var(--text); background: var(--surface);
  border: 2.5px solid var(--ink); border-radius: var(--radius); padding: 14px 18px; box-shadow: var(--shadow);
  transition: transform .12s, box-shadow .12s;
}
.coll-item-body:hover { transform: translate(-2px,-2px); box-shadow: var(--shadow-lg); }
.coll-item-body .row { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.coll-item-body h3 { font-size: 16px; font-weight: 800; }
.coll-blurb { color: var(--muted); font-size: 14px; line-height: 1.5; margin: 0; }

/* ==================================================================== guides == */
.guide-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; margin: 20px 0 40px; }
.guide-card {
  background: var(--surface); border: 2.5px solid var(--ink); border-radius: var(--radius);
  padding: 20px; text-decoration: none; color: var(--text); box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 8px; transition: transform .13s, box-shadow .13s;
}
.guide-card:hover { transform: translate(-3px,-3px); box-shadow: var(--shadow-lg); opacity: 1; }
.guide-card h3 { font-size: 17px; font-weight: 800; letter-spacing: -.01em; }
.guide-card p { color: var(--muted); font-size: 14px; flex: 1; }

.guide-article { max-width: 760px; margin: 8px 0 20px; }
.guide-article h1 { font-size: clamp(26px, 4vw, 36px); font-weight: 800; letter-spacing: -.02em; margin-bottom: 8px; }
.guide-body {
  font-size: 16.5px; line-height: 1.75;
  background: var(--surface); border: 2.5px solid var(--ink); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 26px 30px;
}
.guide-body h2 { font-size: 24px; font-weight: 800; margin: 32px 0 12px; letter-spacing: -.01em; }
.guide-body h3 { font-size: 19px; font-weight: 800; margin: 24px 0 10px; }
.guide-body p { margin: 0 0 16px; }
.guide-body ul, .guide-body ol { margin: 0 0 16px; padding-left: 24px; }
.guide-body li { margin-bottom: 8px; }
.guide-body strong { font-weight: 800; }
.guide-body a { text-decoration-thickness: 2px; }
.guide-body blockquote {
  border-left: 4px solid var(--accent); padding: 4px 0 4px 18px; margin: 0 0 16px; color: var(--muted); font-style: italic;
}
.guide-body code { background: var(--surface2); border: 1.5px solid var(--border); border-radius: 5px; padding: 1px 6px; font-size: .9em; }

/* =============================================================== leaderboard == */
.lb-tabs { display: flex; gap: 10px; margin: 20px 0 24px; flex-wrap: wrap; }
.lb-tab {
  background: var(--surface); border: 2.5px solid var(--ink); color: var(--ink); text-decoration: none;
  padding: 8px 18px; border-radius: 999px; font-weight: 700; font-size: 14px; box-shadow: 2px 2px 0 var(--ink);
  transition: transform .1s, box-shadow .1s;
}
.lb-tab:hover { transform: translate(-1px,-1px); box-shadow: 3px 3px 0 var(--ink); }
.lb-tab.active { background: var(--accent); color: #fff; }

.lb-list { list-style: none; display: flex; flex-direction: column; gap: 12px; margin: 0 0 32px; padding: 0; }
.lb-item { display: flex; align-items: center; gap: 14px; }
.lb-rank {
  flex: 0 0 auto; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
  background: var(--surface2); border: 2.5px solid var(--ink); border-radius: 50%; font-weight: 800; font-size: 15px;
  box-shadow: 2px 2px 0 var(--ink);
}
.lb-top1 .lb-rank { background: #ffd23d; font-size: 20px; }
.lb-top2 .lb-rank { background: #d8d8e2; font-size: 20px; }
.lb-top3 .lb-rank { background: #e0ac69; font-size: 20px; }
.lb-item-body {
  flex: 1; display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text);
  background: var(--surface); border: 2.5px solid var(--ink); border-radius: var(--radius);
  padding: 12px 18px; box-shadow: var(--shadow); transition: transform .12s, box-shadow .12s; min-width: 0;
}
.lb-item-body:hover { transform: translate(-2px,-2px); box-shadow: var(--shadow-lg); }
.lb-top1 .lb-item-body { border-width: 3px; box-shadow: 4px 4px 0 var(--ink); }
.lb-item-text { flex: 1; min-width: 0; }
.lb-item-text h3 { font-size: 15.5px; font-weight: 800; }
.lb-item-text .tagline { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-votes { flex: 0 0 auto; font-weight: 800; color: var(--coral); font-size: 15px; }

/* Compact "recently launched" row on the homepage */
.launch-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin: 18px 0 36px; }
.launch-card {
  background: var(--surface); border: 2.5px solid var(--ink); border-radius: 14px; padding: 14px;
  text-decoration: none; color: var(--text); box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 6px;
  transition: transform .12s, box-shadow .12s;
}
.launch-card:hover { transform: translate(-2px,-2px); box-shadow: var(--shadow-lg); opacity: 1; }
.launch-card .row { display: flex; align-items: center; gap: 8px; }
.launch-card h3 { font-size: 14.5px; font-weight: 800; }
.launch-card .tagline { font-size: 12.5px; color: var(--muted); }
.launch-new-badge {
  font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-fixed);
  background: var(--lime); border: 2px solid var(--ink); border-radius: 999px; padding: 1px 8px; width: fit-content;
}

.faq { margin: 8px 0 20px; }
.faq details {
  background: var(--surface); border: 2.5px solid var(--ink); border-radius: 14px;
  box-shadow: var(--shadow); margin-bottom: 12px; overflow: hidden;
}
.faq summary {
  cursor: pointer; font-weight: 700; font-size: 16.5px; padding: 16px 20px; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-size: 24px; font-weight: 800; color: var(--accent); }
.faq details[open] summary::after { content: '–'; }
.faq details p { padding: 0 20px 18px; color: var(--muted); font-size: 15.5px; line-height: 1.6; max-width: 760px; }

.detail h2 {
  font-size: clamp(20px, 3vw, 25px); font-weight: 800; letter-spacing: -.01em; margin: 26px 0 12px;
}
