/* Appscope v2 — shared styles. Tokens first; every page uses these. */

:root {
  --bg: #ffffff;
  --surface: #f7f7f7;
  --surface-2: #f0f0f0;
  --text: #111111;
  --muted: #6b6b6b;          /* 5.33:1 on #fff — passes WCAG AA */
  --faint: #9a9a9a;          /* decorative only, never body text */
  --border: #ececec;
  --accent: #2f81f7;         /* fills, icons, large text (3.75:1 on #fff) */
  --accent-text: #1f6feb;    /* small blue text on light bg (4.63:1) */
  --accent-soft: #e8f1fe;
  --green: #1a7f37;
  --red: #cf222e;
  --yellow-bg: #fff8c5;
  --yellow-text: #7d4e00;
  --btn: #111111;
  --btn-text: #ffffff;
  --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 2px 8px rgba(0, 0, 0, .04);
  --tint: 11%;               /* how much sponsor color goes into its tile */
  --tile-muted: #4f4f4f;     /* tagline on tinted tiles, AA on every tint */

  --font: "Geist Mono", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --font-logo: "Sora", system-ui, sans-serif;
  --radius: 12px;
  --rail: 230px;
  --center: 930px;
  --gap: 24px;
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #0d0d0d;
  --surface: #171717;
  --surface-2: #1f1f1f;
  --text: #ededed;
  --muted: #9a9a9a;          /* 6.91:1 on #0d0d0d */
  --faint: #6b6b6b;
  --border: #262626;
  --accent: #2f81f7;         /* 5.19:1 on #0d0d0d */
  --accent-text: #4c94f8;
  --accent-soft: #0f2340;
  --green: #3fb950;
  --red: #f85149;
  --yellow-bg: #3a2f0b;
  --yellow-text: #e3b341;
  --btn: #ededed;
  --btn-text: #0d0d0d;
  --shadow: none;
  --tint: 16%;
  --tile-muted: #b4b4b4;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 14px/1.5 var(--font);
  font-feature-settings: "tnum" 1, "zero" 0;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent-text); }
button { font: inherit; color: inherit; }
img { display: block; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.muted { color: var(--muted); }
.up { color: var(--green); }
.down { color: var(--red); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* ---------- Page shell: rail | center | rail ---------- */
.shell {
  display: grid;
  grid-template-columns: var(--rail) minmax(0, var(--center)) var(--rail);
  gap: var(--gap);
  justify-content: center;
  padding: 0 16px;
  column-gap: 20px;
}
.center { min-width: 0; padding-bottom: 48px; }

.rail {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  max-height: 940px;
  display: grid;
  grid-template-rows: repeat(5, 1fr);
  padding: 20px 0;
}
.slot { display: flex; padding: 6px 0; }

.sponsor {
  --c: var(--accent);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; text-align: center; width: 100%; padding: 16px 14px; border-radius: var(--radius);
  background: color-mix(in srgb, var(--c) var(--tint), var(--bg));
  border: 1px solid color-mix(in srgb, var(--c) calc(var(--tint) + 8%), var(--bg));
  transition: transform .15s ease, box-shadow .15s ease;
}
.rail .sponsor { height: 100%; }
.sponsor:hover { color: inherit; transform: translateY(-1px); box-shadow: var(--shadow); }
.sponsor.featured { border-color: color-mix(in srgb, var(--c) 45%, var(--bg)); box-shadow: var(--shadow); }
.sponsor-icon {
  width: 24px; height: 24px; border-radius: 6px; display: grid; place-items: center;
  background: var(--c); color: #fff; font-size: 13px; line-height: 1; flex: none;
}
.sponsor-name { font-weight: 600; font-size: 13px; }
.sponsor-tag {
  font-size: 12px; line-height: 1.45; color: var(--tile-muted);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.sponsor.placeholder { background: transparent; border: 1px dashed var(--border); }
.sponsor.placeholder .sponsor-icon { background: var(--surface-2); color: var(--muted); }
.sponsor.placeholder .sponsor-tag { color: var(--muted); }

/* Phone sponsor strips: pinned top and bottom, slow auto-scroll */
.strip { display: none; }
@media (max-width: 767px) {
  .strip {
    display: block; position: sticky; z-index: 20; overflow: hidden; background: var(--bg);
    padding: 8px 0;
  }
  .strip-top { top: env(safe-area-inset-top, 0px); border-bottom: 1px solid var(--border); }
  .strip-bottom {
    position: fixed; left: 0; right: 0; bottom: 0; border-top: 1px solid var(--border);
    padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
  }
  body { padding-bottom: calc(62px + env(safe-area-inset-bottom, 0px)); }
  .strip-track { display: flex; gap: 8px; width: max-content; padding-left: 8px; animation: strip 38s linear infinite; }
  .strip-bottom .strip-track { animation-duration: 44s; animation-direction: reverse; }
  .strip:hover .strip-track, .strip:active .strip-track { animation-play-state: paused; }
  .chip {
    --c: var(--accent);
    display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px 0 8px; border-radius: 10px;
    background: color-mix(in srgb, var(--c) var(--tint), var(--bg));
    border: 1px solid color-mix(in srgb, var(--c) calc(var(--tint) + 8%), var(--bg));
    font-weight: 600; font-size: 13px; white-space: nowrap;
  }
  .chip:hover { color: inherit; }
  .chip .sponsor-icon { width: 22px; height: 22px; font-size: 12px; }
  .chip.placeholder { background: transparent; border-style: dashed; border-color: var(--border); color: var(--muted); }
}
@keyframes strip { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .strip { overflow-x: auto; scrollbar-width: none; }
  .strip-track { animation: none !important; }
}

.inline-sponsors { display: none; }

@media (max-width: 1279px) {
  .shell { grid-template-columns: minmax(0, var(--center)); padding: 0 20px; }
  .rail { display: none; }
  .inline-sponsors { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 28px 0 0; }
  .inline-sponsors .sponsor { padding: 14px; }
}
@media (max-width: 767px) {
  .shell { padding: 0 16px; }
  .inline-sponsors { display: none; }
}

/* ---------- Logo ---------- */
.logo { display: inline-flex; align-items: center; gap: 8px; }
.logo svg { width: 22px; height: 22px; flex: none; }
.wordmark { font: 800 19px/1 var(--font-logo); letter-spacing: -.02em; }
.wordmark .a { color: var(--accent); }
.wordmark .s { color: var(--text); }
.logo-row { display: flex; justify-content: center; padding-top: 44px; }

/* ---------- Hero ---------- */
.hero { text-align: center; padding: 26px 0 8px; }
.hero h1 {
  font: 700 52px/1.1 var(--font);
  letter-spacing: -.045em;
  margin: 0 auto;
  white-space: nowrap;
}
.hero .sub {
  max-width: 720px; margin: 18px auto 0; color: var(--muted); font-size: 15px; line-height: 1.6;
}
.hero .sub a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--faint); }
.search-row { display: flex; gap: 10px; justify-content: center; margin: 32px auto 0; max-width: 620px; }
.search {
  flex: 1; display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 14px;
  background: var(--surface); border-radius: 10px;
}
.search svg { width: 16px; height: 16px; color: var(--muted); flex: none; }
.search input {
  border: 0; outline: 0; background: transparent; font: inherit; color: var(--text); width: 100%; min-width: 0;
}
.search input::placeholder { color: var(--muted); }
.search:focus-within { box-shadow: 0 0 0 2px var(--accent); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 44px; padding: 0 18px;
  border-radius: 10px; border: 0; background: var(--btn); color: var(--btn-text); font-weight: 600; cursor: pointer; white-space: nowrap;
}
.btn:hover { color: var(--btn-text); opacity: .88; }
.btn-blue { background: var(--accent); color: #fff; }
.btn-blue:hover { color: #fff; }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { color: var(--text); background: var(--surface); }
.subnav { display: flex; justify-content: center; gap: 10px; margin-top: 18px; font-size: 13px; color: var(--muted); }
.subnav a:hover { color: var(--text); }
.subnav .dot { color: var(--faint); }

/* ---------- Scanner hero ---------- */
.center { position: relative; }
.scan-bg {
  position: absolute; inset: 0 0 auto 0; height: 560px; pointer-events: none; z-index: -1;
  background-image: radial-gradient(color-mix(in srgb, var(--accent) 22%, transparent) 1px, transparent 1.2px);
  background-size: 18px 18px;
  -webkit-mask-image: radial-gradient(ellipse 60% 70% at 50% 35%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 60% 70% at 50% 35%, #000 30%, transparent 75%);
}
.hero h1 .hl { background: linear-gradient(transparent 62%, color-mix(in srgb, var(--accent) 22%, transparent) 62%); }
.bignum { margin-top: 22px; display: flex; justify-content: center; align-items: baseline; gap: 12px; }
.bignum b { font-size: 34px; letter-spacing: -.03em; font-weight: 700; }
.bignum span { color: var(--muted); font-size: 13px; }
.hero .search-row { max-width: 640px; }
.search.big { height: 52px; font-size: 15px; box-shadow: inset 0 0 0 1px var(--border); }
.search.big:focus-within { box-shadow: 0 0 0 2px var(--accent); }
.hero .search-row .btn { height: 52px; padding: 0 22px; }

.steps { list-style: none; margin: 30px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.steps li { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 12px; background: var(--surface); }
.steps .n {
  flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: #fff; font-size: 12px; font-weight: 700;
}
.steps b { font-size: 13px; }
.steps p { margin: 3px 0 0; font-size: 12px; line-height: 1.5; color: var(--muted); }

.ticker { margin-top: 26px; border-block: 1px solid var(--border); overflow: hidden; padding: 10px 0; font-size: 13px; }
.ticker-track { display: flex; gap: 32px; width: max-content; animation: strip 60s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
a.ticker-item:hover { color: var(--accent-text); }
.ticker-item { display: inline-flex; gap: 8px; white-space: nowrap; }
.ticker-item b { font-weight: 600; }
/* The ticker keeps moving even with reduced motion, just slower; hover pauses it. */
@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation-duration: 140s; }
}

/* ---------- Section header ---------- */
.section { margin-top: 52px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.section-head h2 { margin: 0; font-size: 14px; font-weight: 600; }
.section-head a { font-size: 13px; color: var(--muted); }
.section-head a:hover { color: var(--text); }

/* ---------- App cards ---------- */
.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.card {
  position: relative; display: block; padding: 16px; border-radius: var(--radius); background: var(--surface);
}
.card:hover { color: inherit; background: var(--surface-2); }
.card-link { display: block; }
.card-link::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.card-link:hover { color: inherit; }
.card-spark { margin-top: 12px; }
.spark { display: block; overflow: visible; }
.build {
  position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: center;
  margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border);
  font-size: 12px; font-weight: 600; color: var(--accent-text);
}
.src {
  position: relative; z-index: 1; display: inline-block; font-size: 10px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--yellow-text); background: var(--yellow-bg); padding: 2px 6px; border-radius: 5px; white-space: nowrap;
}
.src.verified { color: var(--accent-text); background: var(--accent-soft); }
.card-src { margin-top: 14px; }
.pending { font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
.c-rev[title] { cursor: help; }
.row-src { margin-top: 4px; }
.build:hover { color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; }
.card-top { display: flex; align-items: center; gap: 10px; min-width: 0; }
.card-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-cat { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .tag { position: absolute; top: 0; right: 0; border-radius: 0 var(--radius) 0 8px; }
.metrics { display: flex; justify-content: space-between; gap: 8px; margin-top: 16px; }
.metric-label { white-space: nowrap; font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.metric-value { font-weight: 600; margin-top: 2px; white-space: nowrap; }

/* ---------- Tags ---------- */
.tag {
  display: inline-block; font-size: 10px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 6px; line-height: 1.3; white-space: nowrap;
}
.tag-verified { background: var(--accent-soft); color: var(--accent-text); }
.tag-est { background: var(--surface-2); color: var(--muted); }
.card .tag-est { background: var(--border); }
.tag-yellow { background: var(--yellow-bg); color: var(--yellow-text); }

/* ---------- App icon + avatar ---------- */
.app-icon {
  flex: none; width: 36px; height: 36px; border-radius: 22%; display: grid; place-items: center;
  color: #fff; font: 700 15px/1 var(--font-logo); overflow: hidden;
}
.app-icon img { width: 100%; height: 100%; object-fit: cover; }
.app-icon.round { border-radius: 50%; }
.avatar {
  flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  font-size: 11px; font-weight: 600; background: var(--surface-2); color: var(--muted);
}

/* ---------- Leaderboard ---------- */
.board { border: 1px solid var(--border); border-radius: 16px; padding: 20px 0 8px; background: var(--bg); }
.board-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 20px 16px; gap: 12px; }
.board-head h2 { margin: 0; font-size: 16px; font-weight: 700; }
.tabs { display: inline-flex; background: var(--surface); border-radius: 9px; padding: 3px; }
.tabs button {
  border: 0; background: transparent; padding: 6px 14px; border-radius: 7px; cursor: pointer; font-size: 13px; color: var(--muted);
}
.tabs button[aria-selected="true"] { background: var(--bg); color: var(--text); box-shadow: var(--shadow); font-weight: 600; }
[data-theme="dark"] .tabs button[aria-selected="true"] { background: var(--surface-2); }

table.lb { width: 100%; border-collapse: collapse; table-layout: fixed; }
.lb th {
  text-align: left; font-size: 12px; font-weight: 500; color: var(--muted); padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}
.lb td { padding: 0 12px; height: 72px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.lb tr:last-child td { border-bottom: 0; }
.lb tbody tr { cursor: pointer; }
.lb tbody tr:hover td { background: var(--surface); }
.lb .c-rank { width: 56px; padding-left: 20px; color: var(--muted); }
.lb .c-dev { width: 210px; }
.lb .c-rev { width: 170px; text-align: right; }
.lb .c-mom { width: 170px; text-align: right; padding-right: 20px; }
.trend { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.lb th.c-rev, .lb th.c-mom { text-align: right; }
.app-cell { display: flex; align-items: center; gap: 12px; min-width: 0; }
.app-cell .t { min-width: 0; }
.app-cell .n { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-cell .d { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dev-cell { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 13px; }
.dev-cell span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rev { font-weight: 600; }
.tier { font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-top: 2px; }
.tier.v { color: var(--accent-text); }
.medal { width: 22px; height: 26px; display: block; }
.mobile-meta { display: none; }
.board-foot { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 16px 20px 12px; }
.footnote { font-size: 12px; color: var(--muted); text-align: center; }
.empty { padding: 32px 20px; text-align: center; color: var(--muted); }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border); margin-top: 64px; padding: 40px 0 32px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 24px; }
.footer h3 { font-size: 12px; font-weight: 600; margin: 0 0 12px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 13px; color: var(--muted); }
.footer ul a:hover { color: var(--text); }
.footer .blurb { font-size: 13px; color: var(--muted); margin: 12px 0 16px; max-width: 260px; }
.theme-toggle {
  display: inline-flex; border: 1px solid var(--border); border-radius: 9px; padding: 3px; gap: 2px;
}
.theme-toggle button {
  border: 0; background: transparent; padding: 5px 10px; border-radius: 6px; cursor: pointer; font-size: 12px; color: var(--muted);
}
.theme-toggle button[aria-pressed="true"] { background: var(--surface-2); color: var(--text); }
.copyright { margin-top: 32px; font-size: 12px; color: var(--muted); }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero h1 { font-size: 44px; white-space: normal; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lb .c-dev { display: none; }
}
@media (max-width: 767px) {
  .logo-row { padding-top: 28px; }
  .hero { padding-top: 28px; }
  .hero h1 { font-size: 34px; letter-spacing: -.04em; }
  .hero .sub { font-size: 13px; }
  .search-row { flex-direction: column; }
  .search-row .btn { width: 100%; }
  .bignum { flex-direction: column; align-items: center; gap: 2px; }
  .bignum b { font-size: 26px; }
  .steps { grid-template-columns: 1fr; gap: 8px; }
  .steps li { padding: 12px 14px; }
  .section { margin-top: 40px; }
  .cards {
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 10px;
    margin: 0 -16px; padding: 0 16px 4px; scrollbar-width: none;
  }
  .cards::-webkit-scrollbar { display: none; }
  .card { flex: 0 0 68%; scroll-snap-align: start; }
  .board { border-radius: 14px; margin: 0 -4px; }
  .board-head { grid-template-columns: 1fr; justify-items: center; padding: 0 14px 14px; }
  .lb .c-rank { width: 40px; padding-left: 14px; padding-right: 4px; }
  .lb .c-rev { width: 118px; padding-right: 14px; }
  .lb .c-mom { display: none; }
  .lb td { height: 68px; padding-left: 8px; padding-right: 8px; }
  .lb td.c-rank { padding-left: 14px; }
  .lb td.c-rev { padding-right: 14px; }
  .app-cell { gap: 10px; }
  .app-cell .app-icon { width: 34px; height: 34px; }
  .mobile-meta { display: inline; font-size: 11px; margin-left: 6px; }
  .lb .c-rev { width: 132px; }
  .lb th.c-rev { white-space: nowrap; font-size: 11px; }
  .rev { font-size: 13px; }
  .c-rev .tier { display: inline; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
}
[data-theme="dark"] .sponsor-icon, [data-theme="dark"] .app-icon { box-shadow: 0 0 0 1px var(--border); }

/* ---------- App page ---------- */
.small { font-size: 12px; }
.app-logo { padding-top: 28px; }
.app-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 24px; font-size: 13px; }
.crumb { color: var(--muted); }
.plan-toggle { display: inline-flex; align-items: center; gap: 2px; border: 1px solid var(--border); border-radius: 9px; padding: 3px; }
.plan-toggle span { font-size: 11px; color: var(--muted); padding: 0 8px 0 6px; }
.plan-toggle button { border: 0; background: transparent; padding: 5px 10px; border-radius: 6px; cursor: pointer; font-size: 12px; color: var(--muted); }
.plan-toggle button[aria-pressed="true"] { background: var(--surface-2); color: var(--text); font-weight: 600; }

.app-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 20px; align-items: center; margin-top: 24px; }
.app-head .app-icon { width: 88px; height: 88px; box-shadow: 0 0 0 1px var(--border); }
.app-title h1 { margin: 0; font-size: 32px; line-height: 1.1; letter-spacing: -.035em; }
.app-dev { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.app-pitch { margin: 8px 0 0; font-size: 14px; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 24px; }
.stat { background: var(--surface); border-radius: var(--radius); padding: 14px 16px; min-width: 0; }
.stat-v { margin-top: 6px; font-size: 22px; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-v b { font-weight: 700; }
.stat-s { margin-top: 4px; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-s .pending { margin-top: 0; }

.hook {
  margin-top: 24px; padding: 18px 20px; border-radius: var(--radius);
  background: var(--accent-soft); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px;
}
.hook p { margin: 0; font-size: 15px; }
.hook ul { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 0; padding: 0; font-size: 13px; color: var(--muted); }
.hook ul b { color: var(--accent-text); font-size: 15px; }

.ov-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 28px; }
.ov-text h3 { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
.ov-text h3:not(:first-child) { margin-top: 22px; }
.ov-text p { margin: 0; line-height: 1.6; }
.how { margin: 0; padding-left: 20px; display: grid; gap: 4px; }
.iap { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.iap span { font-size: 12px; background: var(--surface); border-radius: 7px; padding: 4px 8px; color: var(--muted); }
.iap b { color: var(--text); font-weight: 600; }
.facts { display: grid; grid-template-columns: repeat(4, auto); justify-content: start; gap: 4px 28px; margin: 22px 0 0; }
.facts dt { font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 2px 0 0; font-weight: 600; font-size: 13px; }
.shots { display: grid; grid-template-columns: repeat(2, 140px); gap: 10px; }
.shots img { width: 140px; height: auto; aspect-ratio: 392 / 696; border-radius: 14px; background: var(--surface); box-shadow: 0 0 0 1px var(--border); object-fit: cover; }

.dist { display: grid; gap: 6px; max-width: 520px; }
.dist-row { display: grid; grid-template-columns: 36px 1fr 52px; align-items: center; gap: 10px; font-size: 12px; }
.dist-row .num { text-align: right; color: var(--muted); }
.bar { display: block; height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 4px; background: var(--accent); }
.footnote.left { text-align: left; margin: 14px 0 0; }

/* Pro section: real structure, blurred for free users */
.tag-pro { background: var(--btn); color: var(--btn-text); margin-left: 6px; vertical-align: 2px; }
.pro { position: relative; }
.pro-body { transition: filter .2s ease; }
.pro.locked .pro-body {
  filter: blur(7px); user-select: none; pointer-events: none; max-height: 1100px; overflow: hidden;
  -webkit-mask-image: linear-gradient(#000 60%, transparent); mask-image: linear-gradient(#000 60%, transparent);
}
.unlock { display: none; }
.pro.locked .unlock, .unlock.static {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px;
  position: absolute; z-index: 2; left: 50%; top: 96px; transform: translateX(-50%);
  width: min(440px, calc(100% - 24px)); padding: 28px 24px; border-radius: 16px;
  background: var(--bg); border: 1px solid var(--border); box-shadow: 0 8px 32px rgba(0, 0, 0, .12);
}
.unlock.static { position: static; transform: none; margin: 0 auto; box-shadow: none; }
.unlock h3 { margin: 0; font-size: 18px; letter-spacing: -.02em; }
.unlock ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; text-align: left; font-size: 13px; }
.unlock li { padding-left: 22px; position: relative; }
.unlock li::before { content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 700; }
.unlock .btn { width: 100%; }
.unlock p { margin: 0; font-size: 13px; }
.lock { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); }
.lock svg { width: 16px; height: 16px; }

.pro-h { font-size: 16px; margin: 28px 0 14px; letter-spacing: -.01em; }
.pro-h:first-child { margin-top: 0; }
.pro-h .muted { font-size: 12px; font-weight: 400; margin-left: 8px; }
.hate, .fixes { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.hate li, .fixes li, .wants li, .loves li { background: var(--surface); border-radius: var(--radius); padding: 16px; }
.hate-top, .fix-top, .want-top { display: flex; align-items: baseline; gap: 10px; }
.hate-top b, .fix-top b, .want-top b { flex: 1; min-width: 0; }
.rank { flex: none; width: 22px; height: 22px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--bg); font-size: 11px; font-weight: 700; color: var(--muted); }
.hate .pct { font-size: 22px; font-weight: 700; letter-spacing: -.02em; color: var(--red); }
.hate .sev-2 .pct, .hate .sev-1 .pct { color: var(--text); }
.hate .bar { margin: 10px 0 6px; background: var(--bg); }
.hate .bar i { background: var(--red); }
.hate .sev-2 .bar i, .hate .sev-1 .bar i { background: var(--faint); }
.quotes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.quote { margin: 0; background: var(--bg); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; justify-content: space-between; gap: 8px; }
.quote blockquote { margin: 0; font-size: 13px; line-height: 1.55; }
.quote figcaption { display: flex; justify-content: space-between; gap: 8px; font-size: 11px; color: var(--muted); }
.stars { letter-spacing: 1px; color: var(--border); }
.stars b { color: #e3a008; font-weight: 400; }
.wants, .loves { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.wants .quote, .loves .quote { margin-top: 10px; }
.loves .pct { font-weight: 700; }
.fix-tag { margin: 6px 0 0 32px; font-size: 11px; color: var(--muted); }
.fixes p { margin: 10px 0 0 32px; line-height: 1.6; }
.prompt { margin: 12px 0 0 32px; background: var(--bg); border-radius: 10px; border: 1px solid var(--border); overflow: hidden; }
.prompt-head { display: flex; justify-content: space-between; align-items: center; padding: 6px 8px 6px 12px; border-bottom: 1px solid var(--border); font-size: 11px; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }
.copy { border: 0; background: var(--btn); color: var(--btn-text); font-size: 12px; font-weight: 600; padding: 5px 12px; border-radius: 6px; cursor: pointer; text-transform: none; letter-spacing: 0; }
.prompt pre { margin: 0; padding: 12px; font: 12px/1.6 var(--font); white-space: pre-wrap; word-break: break-word; }
.not-found { text-align: center; padding: 80px 0; }

@media (max-width: 960px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ov-grid { grid-template-columns: 1fr; }
  .shots { grid-template-columns: repeat(4, 140px); overflow-x: auto; scrollbar-width: none; }
}
@media (max-width: 767px) {
  .app-top { margin-top: 18px; }
  .plan-toggle span { display: none; }
  .app-head { grid-template-columns: auto minmax(0, 1fr); gap: 14px; }
  .app-head .app-icon { width: 64px; height: 64px; }
  .app-title h1 { font-size: 24px; }
  .app-store { grid-column: 1 / -1; width: 100%; }
  .stats { gap: 8px; }
  .stat { padding: 12px; }
  .stat-v { font-size: 18px; }
  .hook { padding: 16px; }
  .hook p { font-size: 14px; }
  .facts { grid-template-columns: repeat(2, auto); }
  .shots { margin: 0 -16px; padding: 0 16px; grid-template-columns: repeat(4, 128px); }
  .shots img { width: 128px; }
  .quotes, .wants, .loves { grid-template-columns: 1fr; }
  .fix-tag, .fixes p, .prompt { margin-left: 0; }
  .pro.locked .unlock { top: 64px; padding: 22px 18px; }
}
@media (max-width: 767px) {
  .section-head { flex-wrap: wrap; gap: 4px 12px; }
}
.linkish { border: 0; background: none; padding: 0; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-size: inherit; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--surface-2); border-top-color: var(--accent); animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } }

/* ---------- Search results (any App Store app) ---------- */
.hero { position: relative; }
.search-results {
  position: absolute; z-index: 30; left: 50%; transform: translateX(-50%); width: min(640px, 100%); margin-top: 8px;
  background: var(--bg); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 12px 40px rgba(0, 0, 0, .14);
  text-align: left; overflow: hidden; max-height: 460px; overflow-y: auto;
}
.sr-row { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.sr-row:last-child { border-bottom: 0; }
.sr-row:hover, .sr-row:focus-visible { background: var(--surface); color: inherit; }
.sr-row img, .sr-row .app-icon { width: 36px; height: 36px; border-radius: 22%; }
.sr-t { display: flex; flex-direction: column; min-width: 0; }
.sr-t b, .sr-t span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sr-rev { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.sr-rev .pending { margin-top: 0; }
.sr-msg { padding: 14px; font-size: 13px; }
.about { font-size: 13px; color: var(--muted); }
@media (max-width: 767px) {
  .sr-row { grid-template-columns: 32px minmax(0, 1fr) auto; gap: 10px; padding: 10px 12px; }
  .sr-row img { width: 32px; height: 32px; }
}

/* ---------- Pricing ---------- */
.shell-narrow { grid-template-columns: minmax(0, var(--center)); }
.pricing-hero { text-align: center; padding: 26px 0 0; }
.pricing-hero h1 { font: 700 44px/1.1 var(--font); letter-spacing: -.045em; margin: 0; }
.pricing-hero .sub { max-width: 620px; margin: 16px auto 0; color: var(--muted); font-size: 15px; line-height: 1.6; }

.plans { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr) minmax(0, 1fr); gap: 18px; margin-top: 64px; align-items: stretch; }
.plan {
  --ink: var(--text); --sub: var(--muted); --line: var(--border); --chip: var(--surface);
  position: relative; display: flex; flex-direction: column; gap: 18px; padding: 28px 26px 30px; border-radius: 22px;
  background: var(--bg); color: var(--ink); border: 1px solid var(--border);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 10px 30px rgba(0, 0, 0, .06);
}
.plan-head { display: flex; align-items: center; gap: 12px; }
.plan-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--chip); color: var(--accent); flex: none; }
.plan-icon svg { width: 20px; height: 20px; }
.plan h2 { margin: 0; font-size: 17px; letter-spacing: -.01em; }
.plan-tag { margin: 2px 0 0; font-size: 12px; color: var(--sub); }
.plan-price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.plan-price b { font-size: 48px; line-height: 1; letter-spacing: -.05em; font-weight: 700; }
.plan-price .per { font-size: 14px; color: var(--sub); }
.plan-price s { font-size: 20px; color: var(--sub); text-decoration-thickness: 2px; text-decoration-color: #e5534b; }
.plan-save { align-self: flex-start; font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 999px; background: #dafbe1; color: #116329; min-height: 26px; }
.plan-save.ghost { background: none; padding: 0; }
.plan-cta {
  display: flex; align-items: center; justify-content: center; gap: 8px; height: 50px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--chip); color: var(--ink); font: 600 14px var(--font); cursor: pointer; transition: transform .15s ease, box-shadow .15s ease;
}
.plan-cta:hover { color: var(--ink); transform: translateY(-1px); }
.plan-list { list-style: none; margin: 0; padding: 18px 0 0; border-top: 1px dashed var(--line); display: grid; gap: 12px; font-size: 13px; }
.plan-list li { position: relative; padding-left: 28px; line-height: 1.45; }
.plan-list li::before {
  content: ""; position: absolute; left: 0; top: 0; width: 18px; height: 18px; border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 14%, transparent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4 8.5 2.5 2.5L12 5.5' fill='none' stroke='%232f81f7' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat;
}

/* The highlighted plan: dark card, glow, bigger. */
.plan.best {
  --ink: #fff; --sub: #a8b3c4; --line: rgba(255, 255, 255, .14); --chip: rgba(255, 255, 255, .08);
  padding: 40px 30px 38px; margin: -20px 0; /* taller than its neighbours */
  background: radial-gradient(120% 70% at 50% 0%, #1d3b70 0%, #0d1220 55%, #0a0d16 100%);
  border: 1px solid #2f81f7;
  box-shadow: 0 0 0 4px color-mix(in srgb, #2f81f7 18%, transparent), 0 24px 60px rgba(47, 129, 247, .35);
}
.plan.best .plan-icon { background: linear-gradient(135deg, #2f81f7, #8957e5); color: #fff; }
.plan.best .plan-price b { font-size: 46px; }
.plan.best .plan-price { flex-wrap: wrap; white-space: nowrap; row-gap: 4px; }
.plan.best .plan-price s { flex-basis: 100%; } /* crossed-out price on its own line above */
.plan.best .plan-save { background: rgba(63, 185, 80, .18); color: #56d364; }
.plan.best .plan-cta { height: 54px; border: 0; color: #fff; background: linear-gradient(135deg, #2f81f7, #6e57f5); box-shadow: 0 8px 24px rgba(47, 129, 247, .45); }
.plan.best .plan-cta:hover { color: #fff; box-shadow: 0 10px 30px rgba(47, 129, 247, .6); }
.plan.best .plan-list li::before {
  background: #2f81f7 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4 8.5 2.5 2.5L12 5.5' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.plan-badge {
  position: absolute; top: -15px; left: 50%; transform: translateX(-50%); white-space: nowrap;
  background: linear-gradient(135deg, #f5b73b, #f08c2e); color: #2b1600; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  padding: 7px 16px; border-radius: 999px; box-shadow: 0 6px 18px rgba(240, 140, 46, .45);
}
.plan-monthly .plan-icon { color: #8957e5; }
[data-theme="dark"] .plan:not(.best) { box-shadow: none; background: var(--surface); }
[data-theme="dark"] .plan-save { background: rgba(63, 185, 80, .18); color: #56d364; }

.plans-note { text-align: center; margin-top: 18px; }
.plans-trust { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 22px; margin-top: 28px; font-size: 12px; color: var(--muted); }
.plans-trust span::before { content: "✓ "; color: var(--green); font-weight: 700; }
.faq details { border-bottom: 1px solid var(--border); padding: 14px 0; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 14px; }
.faq details p { margin: 10px 0 0; color: var(--muted); font-size: 13px; line-height: 1.6; max-width: 720px; }
@media (max-width: 960px) {
  .plans { grid-template-columns: 1fr; max-width: 440px; margin-left: auto; margin-right: auto; gap: 26px; }
  .plan.best { order: -1; margin: 0; } /* phones: the highlighted plan comes first */
  .plan-save.ghost { display: none; }
}
@media (max-width: 767px) {
  .pricing-hero h1 { font-size: 30px; }
  .pricing-hero .sub { font-size: 13px; }
  .plans { margin-top: 40px; }
  .plan-price b { font-size: 42px; }
  .plan.best .plan-price b { font-size: 48px; }
}

/* ---------- Inner pages: nav, hero, categories ---------- */
.subnav a[aria-current="page"] { color: var(--text); font-weight: 600; }
.page-hero { text-align: center; padding: 30px 0 4px; }
.page-hero h1 { font: 700 40px/1.12 var(--font); letter-spacing: -.045em; margin: 0; }
.page-hero .sub { max-width: 640px; margin: 14px auto 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.page-hero.left { text-align: left; padding-top: 14px; }
.page-hero.left .sub { margin-left: 0; }
.center > [data-category] > .crumb, .center .crumb.top { display: inline-block; margin-top: 28px; font-size: 13px; }
.cat-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cat-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.cat-chips a { font-size: 12px; padding: 6px 12px; border-radius: 999px; background: var(--surface); color: var(--muted); white-space: nowrap; }
.cat-chips a span { color: var(--faint); margin-left: 4px; }
.cat-chips a:hover { color: var(--text); }
.cat-chips a[aria-current="page"] { background: var(--btn); color: var(--btn-text); }
.cat-chips a[aria-current="page"] span { color: inherit; opacity: .6; }
.cat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 32px; }
.cat-card { display: flex; flex-direction: column; gap: 14px; padding: 18px; border-radius: var(--radius); background: var(--surface); transition: background .15s ease, transform .15s ease; }
.cat-card:hover { color: inherit; background: var(--surface-2); transform: translateY(-1px); }
.cat-card-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.cat-card h2 { margin: 0; font-size: 15px; }
.cat-icons { display: flex; }
.cat-icons .app-icon { box-shadow: 0 0 0 2px var(--surface); }
.cat-icons .app-icon + .app-icon { margin-left: -8px; }
.cat-lead b { color: var(--text); }
@media (max-width: 960px) { .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 767px) {
  .page-hero h1 { font-size: 28px; }
  .page-hero .sub { font-size: 13px; }
  .cat-grid { grid-template-columns: 1fr; }
  .cat-stats { grid-template-columns: 1fr 1fr; }
  .cat-stats .stat:last-child { grid-column: 1 / -1; }
  .cat-chips { flex-wrap: nowrap; overflow-x: auto; margin: 18px -16px 0; padding: 0 16px 4px; scrollbar-width: none; }
}

/* ---------- Advertise ---------- */
.ad-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 32px; }
.ad-stats .stat-v .muted { font-size: 13px; }
.ad-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 24px; align-items: start; }
.ad-form { display: grid; gap: 14px; padding: 20px; border-radius: 16px; background: var(--surface); }
.ad-form label { display: grid; gap: 6px; font-size: 12px; font-weight: 600; }
.ad-form input:not([type="radio"]) {
  width: 100%; min-width: 0; height: 42px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font: 400 14px var(--font);
}
.ad-form input:focus { outline: 2px solid var(--accent); outline-offset: 0; }
.ad-row { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 14px; align-items: start; }
.ad-icon-field input { text-align: center; }
.ad-form fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.ad-form legend { font-size: 12px; font-weight: 600; margin-bottom: 6px; padding: 0; }
.swatches { display: flex; gap: 7px; flex-wrap: wrap; padding-top: 6px; }
.swatch { width: 28px; height: 28px; border-radius: 50%; background: var(--c); cursor: pointer; position: relative; }
.swatch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.swatch:has(input:checked) { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--c); }
.swatch:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 4px; }
.ad-form .btn { width: 100%; height: 48px; }
.ad-form p { margin: -4px 0 0; }
.ad-preview { display: grid; gap: 14px; }
.mini { display: grid; grid-template-columns: 180px 1fr; gap: 14px; padding: 14px; border-radius: 16px; border: 1px solid var(--border); background: var(--bg); }
.mini-rail { display: grid; gap: 8px; }
.mini-rail .slot { padding: 0; }
.mini-rail .sponsor { padding: 10px 8px; gap: 4px; cursor: default; }
.mini-rail .sponsor-tag { font-size: 10px; }
.mini-rail .sponsor-name { font-size: 12px; }
.mini-rail .slot:not(.mine) { opacity: .45; }
.mini-rail .mine .sponsor { box-shadow: 0 0 0 2px var(--c), 0 8px 20px color-mix(in srgb, var(--c) 30%, transparent); }
.mini-page { display: grid; gap: 8px; align-content: start; padding-top: 6px; }
.mini-line { height: 10px; border-radius: 5px; background: var(--surface-2); }
.mini-line.w60 { width: 60%; } .mini-line.w40 { width: 40%; }
.mini-board { display: grid; gap: 6px; margin-top: 8px; padding: 10px; border: 1px solid var(--border); border-radius: 10px; }
.mini-board i { display: block; height: 18px; border-radius: 6px; background: var(--surface); }
.ad-phone { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; border: 1px dashed var(--border); }
.ad-phone .chip {
  --c: var(--accent); display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px 0 8px; border-radius: 10px;
  background: color-mix(in srgb, var(--c) var(--tint), var(--bg)); border: 1px solid color-mix(in srgb, var(--c) calc(var(--tint) + 8%), var(--bg));
  font-weight: 600; font-size: 13px; white-space: nowrap;
}
.ad-phone .chip .sponsor-icon { width: 22px; height: 22px; font-size: 12px; }
.ad-where { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.ad-where > div { padding: 16px; border-radius: var(--radius); background: var(--surface); }
.ad-where p { margin: 6px 0 0; font-size: 13px; line-height: 1.5; }
@media (max-width: 860px) {
  .ad-grid { grid-template-columns: 1fr; }
  .ad-where { grid-template-columns: 1fr; }
}
@media (max-width: 767px) {
  .ad-stats { grid-template-columns: 1fr 1fr; }
  .ad-stats .stat:last-child { grid-column: 1 / -1; }
  .mini { grid-template-columns: 140px 1fr; }
}

/* ---------- Long-form pages (methodology, legal) ---------- */
.doc { max-width: 720px; margin: 0 auto; padding-top: 12px; font-size: 14px; line-height: 1.7; }
.doc-head { text-align: center; padding: 22px 0 8px; }
.doc-head h1 { font: 700 38px/1.15 var(--font); letter-spacing: -.045em; margin: 0; }
.doc-head .sub { color: var(--muted); margin: 12px 0 0; font-size: 14px; }
.doc h2 { font-size: 18px; letter-spacing: -.02em; margin: 40px 0 12px; scroll-margin-top: 20px; }
.doc p { margin: 10px 0; }
.doc ul, .doc ol { padding-left: 20px; }
.doc li { margin: 6px 0; }
.doc a:not(.btn) { color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; }
.doc-toc { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.doc-toc a { font-size: 12px; padding: 6px 12px; border-radius: 999px; background: var(--surface); color: var(--muted) !important; text-decoration: none !important; }
.doc-toc a:hover { color: var(--text) !important; }
.doc-cards, .doc-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.doc-cards > div, .doc-stats > div { padding: 14px 16px; border-radius: var(--radius); background: var(--surface); }
.doc-cards p { margin: 8px 0 0; font-size: 12px; line-height: 1.55; color: var(--muted); }
.doc-cards .src { position: static; }
.doc-stats b { display: block; font-size: 30px; letter-spacing: -.04em; color: var(--accent-text); }
.doc-stats span { font-size: 12px; color: var(--muted); line-height: 1.5; display: block; margin-top: 4px; }
.doc-steps { counter-reset: step; list-style: none; padding: 0 !important; display: grid; gap: 10px; }
.doc-steps li { counter-increment: step; position: relative; padding: 12px 14px 12px 50px; border-radius: var(--radius); background: var(--surface); margin: 0; }
.doc-steps li::before {
  content: counter(step); position: absolute; left: 14px; top: 12px; width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center; background: var(--accent); color: #fff; font-size: 12px; font-weight: 700;
}
.not-found-page { padding: 70px 0 30px; }
.big404 { font: 700 96px/1 var(--font); letter-spacing: -.06em; margin: 0 0 10px; color: var(--accent); }
.not-found-page .btn { margin: 4px; }
@media (max-width: 767px) {
  .doc-head h1 { font-size: 28px; }
  .doc-cards, .doc-stats { grid-template-columns: 1fr; }
}
.ad-stats .stat-s, .cat-stats .stat-s { white-space: normal; }

/* Leaderboard switcher: AI apps / All apps / categories */
.board-switch { display: flex; gap: 8px; padding: 0 20px 14px; overflow-x: auto; scrollbar-width: none; }
.board-switch::-webkit-scrollbar { display: none; }
.board-switch button {
  flex: none; border: 0; cursor: pointer; font: 500 12px var(--font); padding: 7px 12px; border-radius: 999px;
  background: var(--surface); color: var(--muted); white-space: nowrap;
}
.board-switch button span { color: var(--faint); margin-left: 3px; }
.board-switch button:hover { color: var(--text); }
.board-switch button[aria-pressed="true"] { background: var(--btn); color: var(--btn-text); }
.board-switch button[aria-pressed="true"] span { color: inherit; opacity: .6; }
.logo-row + .subnav { margin-top: 12px; }
@media (max-width: 767px) {
  .board-switch { padding: 0 14px 12px; }
  .logo-row + .subnav { flex-wrap: wrap; gap: 6px 10px; font-size: 12px; }
}
.unlock-error { margin: 0; font-size: 13px; color: var(--red); }
.sr-top {
  display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 16px;
  background: color-mix(in srgb, var(--accent) 6%, var(--bg)); border-bottom: 1px solid var(--border);
}
.sr-top:hover, .sr-top:focus-visible { color: inherit; background: color-mix(in srgb, var(--accent) 11%, var(--bg)); }
.sr-top img, .sr-top .app-icon { width: 64px; height: 64px; border-radius: 22%; box-shadow: 0 0 0 1px var(--border); }
.sr-top-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sr-top-t b { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sr-top-t span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sr-kicker { font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-text); }
.sr-top-r { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.sr-top .sr-rev b { font-size: 18px; }
.sr-go { font-size: 12px; font-weight: 600; color: var(--accent-text); white-space: nowrap; }
.sr-sub { padding: 10px 14px 4px; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
@media (max-width: 767px) {
  .sr-top { grid-template-columns: 52px minmax(0, 1fr); gap: 12px; }
  .sr-top img, .sr-top .app-icon { width: 52px; height: 52px; }
  .sr-top-r { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; }
}
.plan-billed { margin-top: -12px; font-size: 12px; color: var(--sub); }

/* Recommended tech stack */
.stack { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.stack-item { padding: 14px 16px; border-radius: var(--radius); background: var(--surface); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.stack-layer { font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-text); font-weight: 700; }
.stack-item b { font-size: 14px; }
.stack-item p { margin: 2px 0 0; font-size: 12px; line-height: 1.5; color: var(--muted); }
.few { margin: 0 0 10px; padding: 12px 14px; border-radius: var(--radius); background: var(--surface); font-size: 13px; }
/* Recently scanned */
.scanned { display: flex; align-items: center; gap: 6px; margin-top: 12px; font-size: 11px; color: var(--muted); }
.dot-live { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 22%, transparent); flex: none; }
@media (max-width: 960px) { .stack { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 767px) { .stack { grid-template-columns: 1fr; } }

/* ---------- Accounts ---------- */
.nav-account { font-weight: 600; color: var(--accent-text) !important; }
.auth-wrap { display: flex; justify-content: center; padding: 40px 0 10px; }
.auth-card { width: min(420px, 100%); padding: 30px 28px; border-radius: 20px; background: var(--bg); border: 1px solid var(--border); box-shadow: 0 10px 30px rgba(0, 0, 0, .06); }
.auth-card h1 { font-size: 22px; letter-spacing: -.03em; margin: 14px 0 6px; }
.auth-sub { margin: 0 0 18px; font-size: 13px; line-height: 1.55; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--surface); border-radius: 10px; padding: 3px; }
.auth-tabs button { border: 0; background: transparent; padding: 8px; border-radius: 8px; cursor: pointer; font: 500 13px var(--font); color: var(--muted); }
.auth-tabs button[aria-selected="true"] { background: var(--bg); color: var(--text); font-weight: 600; box-shadow: var(--shadow); }
.auth-form { display: grid; gap: 14px; }
.auth-form label { display: grid; gap: 6px; font-size: 12px; font-weight: 600; }
.auth-form input[type="email"], .auth-form input[type="password"] {
  height: 46px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font: 400 14px var(--font); width: 100%;
}
.auth-form input:focus { outline: 2px solid var(--accent); outline-offset: 0; }
.auth-check { display: flex !important; grid-template-columns: none; align-items: center; gap: 8px; font-weight: 400 !important; color: var(--muted); }
.auth-form .btn { height: 48px; width: 100%; }
.auth-form .btn[disabled] { opacity: .6; cursor: wait; }
.auth-msg { margin: 0; font-size: 13px; line-height: 1.5; }
.auth-msg.err { color: var(--red); }
.auth-msg.ok { color: var(--green); }
.auth-link { margin-top: 14px; font-size: 12px; }
.auth-legal { margin: 16px 0 0; }
.auth-legal a { text-decoration: underline; }
[data-theme="dark"] .auth-card { background: var(--surface); }

/* ---------- Owner stats ---------- */
.admin { padding-top: 6px; }
.admin-tiles { margin-top: 24px; }
.admin-charts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 24px; }
.chart-card { padding: 16px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--bg); }
.chart-card h2 { margin: 0; font-size: 14px; }
.chart-card .muted.small { margin: 2px 0 10px; }
.bars { width: 100%; height: auto; display: block; overflow: visible; }
.bars path { fill: var(--accent); }
.bars .bar:hover path { fill: var(--accent-text); }
.bars .axis { stroke: var(--border); stroke-width: 1; }
.bars text { font: 10px var(--font); fill: var(--muted); }
.bars text.v { fill: var(--text); font-weight: 600; }
.table-view { margin-top: 8px; font-size: 12px; }
.table-view summary { cursor: pointer; color: var(--muted); }
.table-view table { border-collapse: collapse; margin-top: 6px; }
.table-view td, .table-view th { padding: 3px 12px 3px 0; text-align: left; }
.admin-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.admin-lists { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 40px; }
.admin-lists h2 { font-size: 14px; margin: 0 0 10px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.admin-table td { padding: 7px 8px 7px 0; border-bottom: 1px solid var(--border); overflow-wrap: anywhere; }
.admin-table a { color: var(--accent-text); }
@media (max-width: 860px) { .admin-charts, .admin-lists { grid-template-columns: 1fr; } }
.admin-tiles .stat-s { white-space: normal; }

/* Account page */
.auth-card.account { width: min(520px, 100%); }
.acct-plan { margin: 14px 0 0; line-height: 1.6; }
.acct-h { font-size: 15px; margin: 22px 0 8px; }
.acct-scans { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.acct-scans a { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; color: inherit; text-decoration: none; }
.acct-scans a:hover { background: var(--surface); }
.acct-scans a > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.acct-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 24px; }
.btn-link { background: none; border: 0; padding: 0; font: inherit; font-size: 13px; cursor: pointer; text-decoration: underline; color: var(--muted); }
.btn-link.danger { color: var(--red); }
.btn-link:disabled { opacity: .5; cursor: default; }

/* Account tabs */
.acct-tabs { grid-template-columns: repeat(3, 1fr); margin: 18px 0 20px; }
.acct-panel { display: grid; gap: 14px; }
.acct-panel[hidden] { display: none; }
.plan-now { border: 1px solid var(--border); border-radius: 14px; padding: 16px 18px; background: var(--surface); }
.plan-now p { margin: 6px 0 0; line-height: 1.55; }
.plan-now-name { font-size: 28px; font-weight: 700; letter-spacing: -.02em; margin-top: 2px; }
.plan-now.is-pro { border-color: var(--accent); }
.btn-big { display: flex; justify-content: center; width: 100%; padding: 15px 18px; font-size: 16px; font-weight: 700; border-radius: 12px; box-sizing: border-box; }
.t-center { text-align: center; }
.acct-panel > p { margin: 0; }
.acct-perks { margin: 0; }
.acct-row { display: flex; flex-direction: column; gap: 2px; }
label.acct-row { flex-direction: row; }
.acct-pw { gap: 10px; }
.danger-zone { border: 1px solid color-mix(in srgb, var(--red) 35%, transparent); border-radius: 12px; padding: 14px 16px; display: grid; gap: 6px; }
.danger-zone p { margin: 0; }
.danger-zone .btn-link { justify-self: start; }

/* Check your email */
.check-email { text-align: center; display: grid; gap: 14px; justify-items: center; }
.check-email h1, .check-email p { margin: 0; }
.check-email p { line-height: 1.6; }
.check-icon { width: 76px; height: 76px; border-radius: 22px; display: grid; place-items: center; color: var(--accent); background: var(--accent-soft); }
.check-steps { text-align: left; margin: 0; padding-left: 20px; line-height: 1.7; justify-self: stretch; }
.acct-perks li { text-align: left; }
.auth-card.account .auth-check { margin: 0; }
.acct-panel .acct-actions { margin-top: 0; }

/* Collapsible prompt under each fix */
details.prompt > summary { list-style: none; cursor: pointer; padding: 10px 12px; font-size: 13px; font-weight: 600; color: var(--accent-text); display: flex; align-items: center; gap: 8px; }
details.prompt > summary::-webkit-details-marker { display: none; }
details.prompt > summary::before { content: "▸"; display: inline-block; transition: transform .15s ease; }
details.prompt[open] > summary::before { transform: rotate(90deg); }
details.prompt[open] > summary { border-bottom: 1px solid var(--border); }
details.prompt:not([open]) .prompt-head { display: none; }
