/* firfun — graphite & chrome theme */
:root {
  --bg: #0d0d10;
  --bg-2: #111115;
  --red: #ff2d3d;
  --red-glow: linear-gradient(180deg, #ff6470 0%, #ff2d3d 45%, #c4111f 100%);
  --surface: #141418;
  --surface-2: #1b1b20;
  --surface-3: #24242a;
  --line: #2a2a31;
  --line-2: #3a3a42;
  --text: #f2f2f4;
  --text-2: #b4b5bc;
  --muted: #7d7e87;
  --strong: #ffffff;
  --chrome: linear-gradient(180deg, #ffffff 0%, #d7d9de 36%, #7a7d86 52%, #e8e9ec 70%, #9c9fa7 100%);
  --chrome-soft: linear-gradient(180deg, #f4f5f7 0%, #c4c6cc 48%, #9a9ca4 52%, #dfe0e4 100%);
  --bezel: linear-gradient(135deg, #f2f3f5 0%, #5d6068 45%, #c9cbd0 60%, #3a3c42 100%);
  --glass: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,0) 55%);
  --ok: #8fd6a8;
  --err: #ff8f80;
  --warn: #ffd27a;
  --radius: 14px;
  --shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 20px 40px -20px rgba(0,0,0,.8);
  --f-display: "Geist", "Inter", system-ui, -apple-system, Segoe UI, sans-serif;
  --f-body: "Geist", "Inter", system-ui, -apple-system, Segoe UI, sans-serif;
  --f-mono: "Geist Mono", "JetBrains Mono", ui-monospace, Menlo, monospace;
  --head-bg: rgba(13,13,16,.72);
  --foot-bg: #060607;
  --input-bg: #0d0d10;
  --pre-bg: #050506;
  --glow: rgba(255,255,255,.07);
  --glow-2: rgba(160,170,190,.05);
  --tile-glow: rgba(255,255,255,.09);
  --ring: rgba(255,255,255,.07);
  --hover-ink: #2e2e35;
  --focus: #9a9ca4;
  --placeholder: #5f6068;
  color-scheme: dark;
}

/* light theme */
[data-theme="light"] {
  --bg: #f3f3f5;
  --bg-2: #ececf0;
  --surface: #ffffff;
  --surface-2: #f1f1f4;
  --surface-3: #e6e6eb;
  --line: #e2e2e8;
  --line-2: #cfcfd7;
  --text: #1b1b20;
  --text-2: #4a4b53;
  --muted: #7a7b84;
  --strong: #0b0b0d;
  --ok: #1d8048;
  --err: #c0321f;
  --warn: #8a5d00;
  --glass: linear-gradient(180deg, rgba(255,255,255,.9), rgba(255,255,255,0) 55%);
  --shadow: 0 1px 0 rgba(255,255,255,.8) inset, 0 20px 40px -24px rgba(20,20,35,.35);
  --head-bg: rgba(243,243,245,.8);
  --foot-bg: #e9e9ee;
  --input-bg: #ffffff;
  --pre-bg: #f6f6f8;
  --glow: rgba(0,0,0,.035);
  --glow-2: rgba(80,90,120,.04);
  --tile-glow: rgba(0,0,0,.05);
  --ring: rgba(0,0,0,.08);
  --hover-ink: #dcdce2;
  --focus: #6a6c74;
  --placeholder: #9a9ba3;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.55 var(--f-body);
  background-image:
    radial-gradient(1200px 600px at 75% -10%, var(--glow), transparent 60%),
    radial-gradient(800px 500px at -10% 10%, var(--glow-2), transparent 60%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}
::selection { background: #e8e9ec; color: #0a0a0c; }
a { color: var(--text); text-decoration-color: var(--line-2); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--strong); text-decoration-color: var(--text-2); }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--f-display); line-height: 1.05; letter-spacing: -.035em; margin: 0 0 .4em; color: var(--strong); }
h1 { font-size: clamp(2.4rem, 5.4vw, 4.2rem); font-weight: 800; }
h2, .h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); font-weight: 700; }
h3 { font-size: 1.1rem; font-weight: 700; letter-spacing: -.02em; }
code { font-family: var(--f-mono); font-size: .86em; background: var(--surface-2); border: 1px solid var(--line); padding: .1em .4em; border-radius: 6px; color: var(--text); }
pre { background: var(--pre-bg); border: 1px solid var(--line); color: var(--text); padding: 1rem 1.2rem; border-radius: 10px; overflow: auto; }
.mono { font-family: var(--f-mono); font-size: .8rem; letter-spacing: 0; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.wrap { width: min(1200px, 100% - 2.5rem); margin-inline: auto; }
.narrow { width: min(760px, 100% - 2.5rem); margin: 3rem auto; }
.narrow-sm { width: min(420px, 100% - 2.5rem); margin: 5rem auto; }
.inline { display: inline; }
.ic { flex: none; vertical-align: -0.2em; }

/* header */
.site-head { position: sticky; top: 0; z-index: 20; background: var(--head-bg); backdrop-filter: blur(14px) saturate(140%); border-bottom: 1px solid var(--line); }
.head-row { display: flex; align-items: center; gap: 1.5rem; height: 68px; }
.logo { display: inline-flex; align-items: center; gap: .38rem; text-decoration: none; color: var(--strong); font-family: var(--f-display); font-weight: 500; font-size: 39px; letter-spacing: -.045em; line-height: 1; }
.wordmark { display: inline-block; transform: translateY(-.04em); }
.logo:hover { color: var(--strong); }
.logo .mark { flex: none; filter: drop-shadow(0 4px 10px rgba(0,0,0,.6)); transition: transform .3s; }
.logo:hover .mark { transform: rotate(-6deg) scale(1.04); }
.wordmark { color: var(--strong); }
.main-nav { display: flex; gap: .1rem; flex: 1; }
.main-nav a { white-space: nowrap; }
.main-nav a, .head-actions > a:not(.btn) { color: var(--text-2); text-decoration: none; padding: .42rem .7rem; border-radius: 99px; font-weight: 500; font-size: .93rem; transition: color .15s, background .15s; }
.main-nav a:hover, .main-nav a.on, .head-actions > a:not(.btn):hover { background: var(--surface-2); color: var(--strong); }
.main-nav a.on { box-shadow: inset 0 0 0 1px var(--line-2); }
.head-actions { display: flex; align-items: center; gap: .35rem; }
.pill-link { border: 1px solid var(--line-2); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; font: 600 .94rem/1 var(--f-body); padding: .74rem 1.15rem; border-radius: 99px; border: 1px solid transparent; cursor: pointer; text-decoration: none; transition: transform .12s, background .15s, box-shadow .2s, filter .15s; letter-spacing: -.01em; }
.btn:active { transform: translateY(1px); }
/* primary = polished chrome */
.btn-chrome {
  background: var(--chrome-soft); color: #0b0b0d; border-color: rgba(255,255,255,.6);
  box-shadow: 0 1px 0 rgba(255,255,255,.9) inset, 0 -1px 0 rgba(0,0,0,.25) inset, 0 6px 18px -6px rgba(255,255,255,.25);
}
.btn-chrome:hover { color: #000; filter: brightness(1.08); box-shadow: 0 1px 0 #fff inset, 0 8px 26px -6px rgba(255,255,255,.4); }
.btn-ink { background: var(--surface-3); color: var(--strong); border-color: var(--line-2); box-shadow: 0 1px 0 rgba(255,255,255,.08) inset; }
.btn-ink:hover { background: var(--hover-ink); color: var(--strong); }
.btn-outline { background: transparent; border-color: var(--line-2); color: var(--text); }
.btn-outline:hover { background: var(--surface-2); border-color: var(--text-2); color: var(--strong); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-2); color: var(--strong); }
.btn-sm { padding: .46rem .78rem; font-size: .82rem; }
.btn-lg { padding: .98rem 1.55rem; font-size: 1.04rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: default; }
.is-voted { background: var(--chrome-soft); color: #0b0b0d; border-color: transparent; opacity: 1 !important; }
.danger { color: var(--err); }
.linkish { background: none; border: 0; padding: 0; color: var(--text); text-decoration: underline; text-decoration-color: var(--line-2); cursor: pointer; font: inherit; }

/* hero */
.hero { padding: 5rem 0 2.5rem; }
.hero-grid { display: grid; grid-template-columns: 1.3fr .95fr; gap: 3rem; align-items: center; }
.hero h1 em { font-style: normal; }
.eyebrow { text-transform: uppercase; letter-spacing: .16em; font-size: .7rem; color: var(--muted); margin: 0 0 1rem; font-weight: 500; display: inline-flex; align-items: center; gap: .55rem; }
.eyebrow::before { content: ""; width: 18px; height: 1px; background: var(--chrome); }
.lede { font-size: 1.14rem; color: var(--text-2); max-width: 58ch; }
.hero-art svg { width: 100%; height: auto; overflow: visible; }
.hero-art .spin { transform-origin: 262px 104px; animation: spin 14s linear infinite; }
.hero-art .eq rect { transform-box: fill-box; transform-origin: bottom; animation: eq 1.6s ease-in-out infinite; }
.hero-art .eq rect:nth-child(2) { animation-delay: -.4s; } .hero-art .eq rect:nth-child(3) { animation-delay: -.9s; }
.hero-art .eq rect:nth-child(4) { animation-delay: -1.2s; } .hero-art .eq rect:nth-child(5) { animation-delay: -.2s; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes eq { 0%, 100% { transform: scaleY(.45); } 50% { transform: scaleY(1); } }
@media (prefers-reduced-motion: reduce) { .hero-art .spin, .hero-art .eq rect { animation: none; } }
.search { display: flex; align-items: center; gap: .6rem; background: var(--surface); border: 1px solid var(--line-2); border-radius: 99px; padding: .35rem .35rem .35rem 1.1rem; margin: 1.8rem 0 1.2rem; max-width: 620px; color: var(--muted); box-shadow: 0 1px 0 rgba(255,255,255,.05) inset, 0 20px 50px -20px rgba(0,0,0,.9); transition: border-color .15s, box-shadow .15s; }
.search:focus-within { border-color: var(--focus); box-shadow: 0 0 0 4px var(--ring), 0 20px 50px -20px rgba(0,0,0,.9); }
.search input { flex: 1; border: 0; background: transparent; font: inherit; font-size: 1.02rem; outline: none; min-width: 0; padding: .55rem 0; color: var(--text); }
.search input::placeholder { color: var(--muted); }
.search-sm { margin: 0 0 1.4rem; box-shadow: none; padding: .2rem .9rem; }
.hero-stats { display: flex; gap: 1.6rem; color: var(--muted); flex-wrap: wrap; }
.hero-stats b { color: var(--strong); font-size: 1rem; }

/* category tiles */
.cats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-top: 1rem; }
.cat-tile { display: grid; align-content: start; gap: .3rem; padding: 1.3rem; border-radius: var(--radius); text-decoration: none; color: var(--text); background: var(--glass), var(--surface); border: 1px solid var(--line); transition: transform .2s, box-shadow .2s, border-color .2s; position: relative; overflow: hidden; }
.cat-tile::after { content: ""; position: absolute; right: -60px; bottom: -60px; width: 160px; height: 160px; border-radius: 50%; background: radial-gradient(circle, var(--tile-glow), transparent 65%); transition: transform .4s; }
.cat-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-2); color: var(--text); }
.cat-tile:hover::after { transform: scale(1.4); }
.cat-ic { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 12px; color: #121216; margin-bottom: .55rem; background: var(--chrome-soft); box-shadow: 0 1px 0 #fff inset, 0 -1px 0 rgba(0,0,0,.3) inset, 0 8px 18px -8px rgba(0,0,0,.9); }
.cat-cta { background: linear-gradient(160deg, #2a2b31, #121215); border-color: var(--line-2); }
.cat-cta .cat-ic { background: #0b0b0d; color: #ffffff; box-shadow: inset 0 0 0 1px var(--line-2); }
.cat-cta .cat-name { color: #ffffff; }
.cat-cta .cat-blurb { color: #b4b5bc; } .cat-cta .cat-count { color: #8a8b93; } .cat-cta:hover .cat-count { color: #ffffff; }
.cat-name { font-family: var(--f-display); font-weight: 700; font-size: 1.2rem; letter-spacing: -.03em; color: var(--strong); }
.cat-blurb { color: var(--text-2); font-size: .9rem; }
.cat-count { color: var(--muted); margin-top: .4rem; }
.cat-tile:hover .cat-count { color: var(--text); }

/* sections & grid */
.section { margin-top: 4rem; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 1.1rem; border-bottom: 1px solid var(--line); padding-bottom: .7rem; }
.section-head h2 { margin: 0; }
.section-head a { color: var(--muted); text-decoration: none; }
.section-head a:hover { color: var(--strong); }
.grid { display: grid; gap: 1.1rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.split { display: grid; grid-template-columns: 1fr 340px; gap: 2rem; align-items: start; }
.side { display: grid; gap: 1rem; position: sticky; top: 88px; }

/* card */
.card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s, border-color .2s; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-2); }
.card-cover { text-decoration: none; position: relative; aspect-ratio: 16/9; display: grid; place-items: center; overflow: hidden; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.card-cover::before, .listing-cover::before, .q-thumb::before { content: ""; position: absolute; inset: 0; background: linear-gradient(160deg, rgba(255,255,255,.14) 0%, rgba(255,255,255,0) 38%), radial-gradient(120% 80% at 50% 120%, rgba(0,0,0,.55), transparent 60%); pointer-events: none; }
.card-cover img, .listing-cover img { width: 100%; height: 100%; object-fit: cover; }
.card:hover .card-cover img { transform: scale(1.03); }
.card-cover img { transition: transform .4s; }
.cover-initials { position: relative; font-family: var(--f-display); font-weight: 700; font-size: 2.8rem; letter-spacing: -.05em; color: rgba(255,255,255,.92); text-shadow: 0 4px 18px rgba(0,0,0,.55); }
.cover-initials.big { font-size: 5.5rem; }
.chip { display: inline-flex; align-items: center; gap: .3rem; font: 500 .7rem/1 var(--f-mono); padding: .38rem .58rem; border-radius: 99px; }
.chip-cat { position: absolute; left: .6rem; top: .6rem; background: rgba(10,10,12,.62); backdrop-filter: blur(8px); color: #f2f2f4; border: 1px solid rgba(255,255,255,.12); z-index: 1; }
.card-body { padding: .95rem 1rem .4rem; flex: 1; }
.card-body h3 { margin: 0 0 .3rem; font-size: 1.08rem; }
.card-body h3 a { color: var(--strong); text-decoration: none; }
.card-body h3 a::after { content: ""; position: absolute; inset: 0; }
.card-body p { margin: 0; color: var(--text-2); font-size: .9rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-foot { display: flex; justify-content: space-between; align-items: center; padding: .6rem 1rem .85rem; gap: .5rem; }
.maker { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.badges { display: flex; align-items: center; gap: .35rem; flex: none; }
.badge { font: 500 .66rem/1 var(--f-mono); padding: .32rem .48rem; border-radius: 6px; text-transform: lowercase; border: 1px solid; }
.badge-indie { background: rgba(255,255,255,.92); border-color: #fff; color: #0b0b0d; }
.badge-found { background: transparent; border-color: var(--line-2); border-style: dashed; color: var(--text-2); }
.badge-card { background: var(--chrome-soft); border-color: transparent; color: #0b0b0d; }
.badge-feat { background: #0b0b0d; border-color: #0b0b0d; color: #ffffff; }
.votes { display: inline-flex; align-items: center; gap: .2rem; color: var(--text); font-weight: 500; }

/* panels */
.panel { background: var(--glass), var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem; }
.panel h3 { margin-top: 0; }
.panel-title { display: flex; align-items: center; gap: .45rem; }
.panel-ink { background: radial-gradient(140% 120% at 100% 0%, rgba(255,255,255,.14), transparent 50%), linear-gradient(160deg, #26272c, #0f0f12); border-color: var(--line-2); }
.panel-ink h3 { color: #ffffff; font-size: 1.35rem; }
.panel-ink p { color: #b4b5bc; }
.toplist { list-style: none; padding: 0; margin: 0; }
.toplist li { display: grid; grid-template-columns: 2rem 1fr auto; align-items: center; gap: .4rem; padding: .6rem 0; border-top: 1px solid var(--line); }
.toplist li:first-child { border-top: 0; }
.toplist a { text-decoration: none; color: var(--strong); display: grid; line-height: 1.25; }
.toplist small { color: var(--muted); font-size: .78rem; }
.steps { margin: 0; padding-left: 1.2rem; display: grid; gap: .55rem; color: var(--text-2); font-size: .92rem; }
.steps b { color: var(--strong); }
.ticks { padding-left: 1.1rem; color: var(--text-2); font-size: .92rem; display: grid; gap: .35rem; }

/* page head */
.page-head { padding: 3.4rem 0 1.6rem; border-bottom: 1px solid var(--line); margin-bottom: 2rem; }
.page-head h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); }
.page-head-inline { margin-bottom: 1.5rem; }

/* browse */
.browse { display: grid; grid-template-columns: 240px 1fr; gap: 2rem; align-items: start; }
.filters { position: sticky; top: 88px; }
.filters h4 { font: 500 .7rem var(--f-mono); text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin: 1.4rem 0 .5rem; }
.filter-link { display: flex; align-items: center; gap: .5rem; padding: .45rem .6rem; border-radius: 9px; text-decoration: none; color: var(--text-2); font-size: .93rem; }
.filter-link span { margin-left: auto; color: var(--muted); }
.filter-link:hover { background: var(--surface-2); color: var(--strong); }
.filter-link.on { background: var(--chrome-soft); color: #0b0b0d; }
.filter-link.on span { color: #3a3b41; }
.toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; gap: 1rem; flex-wrap: wrap; }
.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 99px; padding: 3px; }
.seg a { padding: .4rem .85rem; border-radius: 99px; text-decoration: none; color: var(--text-2); font-size: .86rem; font-weight: 500; }
.seg a:hover { color: var(--strong); }
.seg a.on { background: var(--surface-3); color: var(--strong); box-shadow: 0 1px 0 rgba(255,255,255,.08) inset; }
.pager { display: flex; gap: .3rem; margin-top: 2rem; }
.pager a { padding: .4rem .7rem; border-radius: 8px; text-decoration: none; border: 1px solid var(--line); color: var(--text); }
.pager a.on { background: var(--chrome-soft); color: #0b0b0d; border-color: transparent; }
.empty { text-align: center; padding: 4rem 1rem; background: var(--surface); border: 1px dashed var(--line-2); border-radius: var(--radius); }
.empty-page { margin: 4rem auto; max-width: 640px; }

/* listing */
.listing { padding-top: 2rem; }
.crumbs { color: var(--muted); margin-bottom: 1.2rem; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--strong); }
.listing-grid { display: grid; grid-template-columns: 1fr 330px; gap: 2.5rem; align-items: start; }
.listing-cover { position: relative; aspect-ratio: 16/8; border-radius: var(--radius); overflow: hidden; display: grid; place-items: center; margin-bottom: 1.6rem; border: 1px solid var(--line); }
.listing-title { font-size: clamp(2.1rem, 4.2vw, 3.2rem); }
.prose { max-width: 68ch; color: var(--text-2); font-size: 1.03rem; }
.prose h2 { margin-top: 2.2rem; }
.prose b, .prose strong { color: var(--strong); }
.tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 1.5rem; }
.tag { background: var(--surface); border: 1px solid var(--line); padding: .36rem .62rem; border-radius: 99px; text-decoration: none; color: var(--text-2); }
.tag:hover { border-color: var(--text-2); color: var(--strong); }
.sticky { position: sticky; top: 88px; display: grid; gap: .7rem; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: .55rem 1rem; margin: .8rem 0 0; font-size: .92rem; }
.facts dt { color: var(--muted); font: 500 .72rem/1.9 var(--f-mono); text-transform: uppercase; letter-spacing: .08em; }
.facts dd { margin: 0; color: var(--text); }

/* forms */
.form { display: grid; gap: 1.1rem; }
.field { display: grid; gap: .38rem; }
.field > span { font-weight: 600; font-size: .88rem; color: var(--text); }
.field b { color: var(--strong); }
input:not([type=checkbox]):not([type=radio]), select, textarea {
  font: inherit; width: 100%; padding: .72rem .88rem; border-radius: 10px; border: 1px solid var(--line-2); background: var(--input-bg); color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
input::placeholder, textarea::placeholder { color: var(--placeholder); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 4px var(--ring); }
.search input[type=search], .search input[type=search]:focus { border: 0; box-shadow: none; padding: .55rem 0; background: transparent; border-radius: 0; }
select option { background: var(--surface); }
textarea { resize: vertical; }
.field-row { display: flex; gap: .5rem; }
.field-row input { flex: 1; }
.hint { color: var(--muted); font-size: .82rem; }
.hint.is-ok { color: var(--ok); } .hint.is-err { color: var(--err); }
.field-err { color: var(--err); font-size: .85rem; font-weight: 500; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.four { display: grid; grid-template-columns: 1fr 1.6fr .9fr .9fr; gap: .8rem; }
.check { display: flex; gap: .65rem; align-items: flex-start; font-size: .93rem; color: var(--text-2); cursor: pointer; }
.check b { color: var(--strong); }
.check input { margin-top: .3rem; accent-color: #d7d9de; width: 1.05rem; height: 1.05rem; }
.maker-box { border: 1px dashed var(--line-2); border-radius: 12px; padding: 1rem 1.1rem 1.1rem; display: grid; gap: 1rem; margin: 0; }
.maker-box legend { font: 500 .7rem var(--f-mono); text-transform: uppercase; letter-spacing: .12em; color: var(--muted); padding: 0 .4rem; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.submit-grid { display: grid; grid-template-columns: 1fr 360px; gap: 2rem; align-items: start; padding-bottom: 2rem; }
.preview-panel .card:hover { transform: none; }
.is-loading { opacity: .6; pointer-events: none; }

/* flash */
.flash { margin: 1rem 0; padding: .85rem 1.1rem; border-radius: 10px; font-weight: 500; border: 1px solid; background: var(--surface); }
.flash-ok { border-color: rgba(143,214,168,.35); color: var(--ok); }
.flash-err { border-color: rgba(255,143,128,.4); color: var(--err); }
.flash-warn { border-color: rgba(255,210,122,.4); color: var(--warn); }

/* admin */
.admin { padding: 2.2rem 0 3rem; }
.admin-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 1.4rem; }
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: .8rem; margin-bottom: 1.4rem; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 1rem 1.1rem; text-decoration: none; color: var(--text); display: grid; }
.stat b { font: 800 2rem/1 var(--f-display); letter-spacing: -.04em; color: var(--strong); }
.stat span { color: var(--muted); font-size: .86rem; }
.stat.on { border-color: #8a8c94; box-shadow: 0 0 0 1px #8a8c94, 0 14px 30px -18px rgba(255,255,255,.25); }
.stat-demo { border-style: dashed; border-color: rgba(255,210,122,.4); }
.queue { display: grid; gap: .7rem; }
.q-row { display: grid; grid-template-columns: 96px 1fr auto; gap: 1rem; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: .8rem; }
.q-thumb { position: relative; width: 96px; aspect-ratio: 16/10; border-radius: 8px; overflow: hidden; display: grid; place-items: center; color: #fff; font: 800 1.3rem var(--f-display); }
.q-thumb img { width: 100%; height: 100%; object-fit: cover; }
.q-title { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.q-title a { color: var(--strong); text-decoration: none; }
.q-main p { margin: .2rem 0; color: var(--text-2); }
.q-actions { display: flex; gap: .35rem; align-items: center; flex-wrap: wrap; justify-content: flex-end; max-width: 380px; }
.q-actions select { width: auto; padding: .4rem .6rem; font-size: .85rem; }
.table { width: 100%; border-collapse: collapse; margin: 1.4rem 0; background: var(--surface); border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.table th { text-align: left; font: 500 .7rem var(--f-mono); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); background: var(--surface-2); }
.table th, .table td { padding: .8rem 1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr.is-off td { opacity: .5; }
.row-actions { display: flex; gap: .3rem; justify-content: flex-end; }
.add-source h3 { margin: 0; }

/* footer */
.site-foot { margin-top: 6rem; background: var(--foot-bg); border-top: 1px solid var(--line); color: var(--text-2); padding: 3.2rem 0 1.4rem; position: relative; }
.site-foot::before { content: ""; position: absolute; top: -1px; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--line-2), transparent); }
.foot-grid { display: grid; grid-template-columns: 1.7fr repeat(4, 1fr); gap: 2rem; }
.site-foot h4 { color: var(--strong); font: 500 .7rem var(--f-mono); text-transform: uppercase; letter-spacing: .14em; margin: 0 0 .8rem; }
.site-foot a, .site-foot .linkish { display: block; color: var(--text-2); text-decoration: none; margin-bottom: .4rem; font-size: .92rem; }
.site-foot a:hover { color: var(--strong); }
.site-foot .logo { display: inline-flex; font-size: 32px; margin-bottom: .6rem; }
.site-foot .muted { max-width: 34ch; }
.foot-base { margin-top: 2.5rem; padding-top: 1.2rem; border-top: 1px solid var(--line); color: var(--muted); }

/* agents */
.h3 { font-size: 1.2rem; display: flex; align-items: center; gap: .45rem; }
.caps { margin-top: 1.8rem; background: var(--glass), var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem 1.4rem; max-width: 68ch; }
.caps ul { margin: .3rem 0 .6rem; padding-left: 1.2rem; display: grid; gap: .3rem; color: var(--text-2); }
.detected { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: -.4rem; }
.detected .det { display: inline-flex; align-items: center; gap: .35rem; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 99px; padding: .35rem .7rem; font: 500 .76rem var(--f-mono); color: var(--text); }
.detected .det b { color: var(--strong); }

/* responsive */
@media (max-width: 1240px) {
  .main-nav a { padding: .4rem .5rem; font-size: .88rem; }
  .head-actions .hide-sm { display: none; }
}
@media (max-width: 1100px) {
  .main-nav { display: none; }
  .head-row { justify-content: space-between; }
  .head-actions .hide-sm { display: inline; }
}
@media (max-width: 1040px) {
  .foot-grid { grid-template-columns: 1fr 1fr 1fr; }
  .foot-grid > div:first-child { grid-column: 1 / -1; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .cats { grid-template-columns: repeat(2, 1fr); }
  .split, .listing-grid, .submit-grid { grid-template-columns: 1fr; }
  .side, .sticky { position: static; }
}
@media (max-width: 720px) {
  .hero { padding-top: 3rem; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { display: none; }
  .browse { grid-template-columns: 1fr; }
  .filters { position: static; }
  .grid-2, .grid-3, .grid-4, .two, .four, .stat-row { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .hide-sm, .head-actions .hide-sm { display: none; }
  .head-row { height: 60px; }
  .q-row { grid-template-columns: 64px 1fr; }
  .q-thumb { width: 64px; }
  .q-actions { grid-column: 1 / -1; justify-content: flex-start; max-width: none; }
  .admin-head { flex-direction: column; align-items: flex-start; gap: 1rem; }
}

/* red accents (sparingly, like a play button) */
.dot-live { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--red); box-shadow: 0 0 10px var(--red); }
.eyebrow::before { background: var(--red); height: 2px; width: 16px; border-radius: 2px; }
.rank { color: var(--red); font-weight: 600; }
@media (max-width: 520px) {
  .cats { grid-template-columns: 1fr; }
  .hero-stats { gap: .4rem 1.2rem; }
}

/* html sitemap */
.sitemap { columns: 3 280px; column-gap: 2.5rem; }
.sitemap-col { break-inside: avoid; margin-bottom: 2rem; }
.sitemap-col h2 a { color: var(--strong); text-decoration: none; }
.sitemap-col ul { list-style: none; padding: 0; margin: .5rem 0 0; display: grid; gap: .35rem; }
.sitemap-col li a { color: var(--text-2); text-decoration: none; }
.sitemap-col li a:hover { color: var(--strong); }

/* category icons: a different chrome per category */
.cat-ic { --hi: #ffffff; --base: #d7d9de; --dark: #7a7d86; --lite: #e8e9ec; --mid: #9c9fa7; --ink: #121216;
  background: linear-gradient(180deg, var(--hi) 0%, var(--base) 36%, var(--dark) 52%, var(--lite) 70%, var(--mid) 100%);
  color: var(--ink); }
.cat-games .cat-ic          { --hi: #ffe1e3; --base: #ff5c69; --dark: #8d0d18; --lite: #ff9ea6; --mid: #cc1f2e; --ink: #2b0306; }
.cat-apps .cat-ic           { --hi: #e2eeff; --base: #5b9bff; --dark: #10327a; --lite: #a3c6ff; --mid: #2a63cf; --ink: #04122e; }
.cat-ai-agents .cat-ic      { --hi: #f0e6ff; --base: #a77bff; --dark: #3a157f; --lite: #d2b8ff; --mid: #6c39d4; --ink: #160533; }
.cat-websites .cat-ic       { --hi: #dcfdf9; --base: #3fd4c4; --dark: #0a5751; --lite: #98ede4; --mid: #179b90; --ink: #02211f; }
.cat-film-video .cat-ic     { --hi: #fff6d1; --base: #f0be47; --dark: #7a4d03; --lite: #ffe18f; --mid: #bf891b; --ink: #2a1a00; }
.cat-music .cat-ic          { --hi: #ffe2f3; --base: #ff62b9; --dark: #7d0c4c; --lite: #ffa8d8; --mid: #c92884; --ink: #2d0219; }
.cat-digital-assets .cat-ic { --hi: #dfffeb; --base: #3fcf7c; --dark: #0a5a2b; --lite: #95e9b8; --mid: #1d9a54; --ink: #022111; }

/* light-mode touch-ups */
[data-theme="light"] .badge-indie { background: #111114; border-color: #111114; color: #ffffff; }
[data-theme="light"] ::selection { background: #111114; color: #ffffff; }
[data-theme="light"] .btn-chrome { border-color: #c4c6cc; }
[data-theme="light"] .logo .mark { filter: drop-shadow(0 3px 8px rgba(0,0,0,.18)); }

/* theme switch */
.theme-switch { background: none; border: 0; padding: 4px; cursor: pointer; border-radius: 99px; }
.theme-switch:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.ts-track { position: relative; display: flex; align-items: center; justify-content: space-between; width: 58px; height: 30px; padding: 0 8px; border-radius: 99px;
  background: #1b1b20; border: 1px solid #3a3a42; box-shadow: inset 0 2px 6px rgba(0,0,0,.55); transition: background .25s, border-color .25s; }
.ts-ic { position: relative; z-index: 0; color: #7d7e87; transition: color .25s; }
.ts-knob { position: absolute; top: 2px; left: 2px; width: 24px; height: 24px; border-radius: 50%; z-index: 1;
  background: linear-gradient(180deg, #ffffff 0%, #d7d9de 40%, #9c9fa7 55%, #e8e9ec 75%, #c4c6cc 100%);
  box-shadow: 0 1px 0 #fff inset, 0 2px 6px rgba(0,0,0,.5); transition: transform .28s cubic-bezier(.4,1.4,.6,1); }
.theme-switch:hover .ts-track { border-color: #5a5b63; }
/* the visible icon shows the current mode: dark = moon lit (knob right), light = sun lit (knob left) */
[data-theme="dark"] .ts-knob { transform: translateX(28px); }
[data-theme="dark"] .ts-moon { color: #e8e9ec; }
[data-theme="light"] .ts-track { background: #e4e4ea; border-color: #cfcfd7; box-shadow: inset 0 2px 5px rgba(0,0,0,.12); }
[data-theme="light"] .ts-knob { box-shadow: 0 1px 0 #fff inset, 0 2px 6px rgba(0,0,0,.22); }
[data-theme="light"] .ts-sun { color: #b07a00; }
[data-theme="light"] .theme-switch:hover .ts-track { border-color: #a9abb3; }
@media (prefers-reduced-motion: reduce) { .ts-knob { transition: none; } }

/* ---------- utilities ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.center { text-align: center; }
.stack { display: grid; gap: 1rem; align-content: start; }

/* ---------- avatars & member links ---------- */
.avatar { display: inline-grid; place-items: center; flex: none; border-radius: 50%; color: #fff; font-weight: 700; font-family: var(--f-display); line-height: 1; box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 2px 6px rgba(0,0,0,.25); }
.user-link { display: inline-flex; align-items: center; gap: .45rem; text-decoration: none; color: var(--strong); font-weight: 600; font-size: .92rem; }
.user-link:hover span { text-decoration: underline; text-decoration-color: var(--line-2); }
.me-link { display: inline-grid; border-radius: 50%; text-decoration: none; padding: 0 !important; }
.me-link:hover .avatar { box-shadow: 0 0 0 2px var(--focus); }
.login-link { white-space: nowrap; }
.head-actions .on { background: var(--surface-2); color: var(--strong); }

/* ---------- spotlight ---------- */
.spot-star { color: #f0be47; text-shadow: 0 0 14px rgba(240,190,71,.45); }
.badge-spot { background: linear-gradient(180deg, #fff6d1, #f0be47 45%, #7a4d03 55%, #ffe18f 80%, #bf891b); border-color: transparent; color: #2a1a00; }
.spotlight-corner .section-head h2 { display: flex; align-items: center; gap: .5rem; }
.spot-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 1.1rem; }
.spot-hero { display: grid; grid-template-columns: 1.1fr 1fr; background: var(--glass), var(--surface); border: 1px solid var(--line); border-radius: calc(var(--radius) + 4px); overflow: hidden; box-shadow: var(--shadow); position: relative; }
.spot-hero::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; box-shadow: inset 0 0 0 1px rgba(240,190,71,.28); }
.spot-cover { position: relative; display: grid; place-items: center; min-height: 260px; overflow: hidden; text-decoration: none; }
.spot-cover::before { content: ""; position: absolute; inset: 0; background: linear-gradient(160deg, rgba(255,255,255,.14), transparent 40%), radial-gradient(120% 80% at 50% 120%, rgba(0,0,0,.5), transparent 60%); }
.spot-cover img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.spot-ribbon { position: absolute; left: .8rem; top: .8rem; padding: .35rem .6rem; border-radius: 99px; background: rgba(10,10,12,.7); color: #f0be47; border: 1px solid rgba(240,190,71,.4); backdrop-filter: blur(8px); font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; }
.spot-body { padding: 1.5rem 1.6rem; display: grid; align-content: center; gap: .3rem; }
.spot-body h3 { font-size: 1.7rem; margin: 0; }
.spot-body h3 a, .spot-body h2 a { color: var(--strong); text-decoration: none; }
.spot-body .eyebrow { margin-bottom: .3rem; }
.spot-note { margin: .6rem 0 .4rem; padding: .9rem 1rem; border-left: 2px solid #f0be47; background: var(--surface-2); border-radius: 0 10px 10px 0; color: var(--text); font-size: .98rem; line-height: 1.5; }
.spot-note span { display: block; color: #c99a2e; font-size: .68rem; text-transform: uppercase; letter-spacing: .12em; margin-bottom: .3rem; }
.spot-actions { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: .6rem; }
.spot-more { display: grid; gap: .7rem; align-content: start; }
.spot-mini { display: grid; grid-template-columns: 84px 1fr; gap: .9rem; align-items: center; padding: .7rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--text); transition: transform .2s, border-color .2s; }
.spot-mini:hover { transform: translateX(3px); border-color: var(--line-2); color: var(--text); }
.spot-thumb { position: relative; width: 84px; aspect-ratio: 16/11; border-radius: 9px; overflow: hidden; display: grid; place-items: center; color: rgba(255,255,255,.9); font: 700 1.2rem var(--f-display); }
.spot-thumb img { width: 100%; height: 100%; object-fit: cover; }
.spot-mini-text { display: grid; gap: .15rem; }
.spot-mini-text b { color: var(--strong); }
.spot-mini-text small { color: var(--muted); font-size: .82rem; line-height: 1.35; }
.spot-banner { display: flex; align-items: flex-start; gap: .9rem; padding: 1rem 1.2rem; margin-bottom: 1.4rem; border-radius: var(--radius); background: var(--surface); border: 1px solid rgba(240,190,71,.35); }
.spot-banner .spot-star { font-size: 1.4rem; line-height: 1; }
.spot-banner div { flex: 1; }
.spot-banner b { color: var(--strong); }
.spot-banner p { margin: .25rem 0 0; color: var(--text-2); }
.spot-list { display: grid; gap: 1.2rem; }
.spot-row { display: grid; grid-template-columns: 320px 1fr; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.spot-row .spot-cover { min-height: 200px; }

/* ---------- listing actions ---------- */
.act-row { display: grid; grid-template-columns: 1fr auto; gap: .5rem; }
.save-btn { padding-inline: .9rem; }
.is-saved { color: #f0be47; border-color: rgba(240,190,71,.6); }

/* ---------- recommendations ---------- */
.recs { margin-top: 3.5rem; }
.recs-grid { display: grid; grid-template-columns: 1fr 360px; gap: 2rem; align-items: start; }
.rec-list { display: grid; gap: .8rem; }
.rec { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.15rem; }
.rec header { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-bottom: .45rem; }
.rec p { margin: 0; color: var(--text); line-height: 1.55; }
.rec.is-mine { border-color: var(--focus); }
.rec-form-wrap { position: sticky; top: 88px; display: grid; gap: .6rem; }
.rec-form textarea { min-height: 120px; }
.hint .is-ok, .hint.is-ok { color: var(--ok); }
.rec-cta p { margin: .3rem 0 .9rem; }
.small-empty { padding: 1.6rem 1rem; }
.mini-recs { display: grid; gap: .3rem; margin-bottom: .6rem; }
.mini-rec { display: grid; grid-template-columns: auto 1fr; gap: .6rem; align-items: start; padding: .55rem 0; border-top: 1px solid var(--line); text-decoration: none; color: var(--text-2); font-size: .88rem; line-height: 1.35; }
.mini-rec:first-child { border-top: 0; }
.mini-rec b { color: var(--strong); font-weight: 600; }
.mini-rec small { display: block; color: var(--muted); margin-top: .15rem; }
.mini-rec:hover b { text-decoration: underline; text-decoration-color: var(--line-2); }

/* ---------- auth, account, profile ---------- */
.auth { display: grid; grid-template-columns: 1fr 440px; gap: 3rem; align-items: center; padding: 3.5rem 0; }
.auth-intro h1 { font-size: clamp(2rem, 4vw, 3rem); }
.account-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; align-items: start; }
.danger-zone { border-color: rgba(255,143,128,.3); }
.profile-head { display: flex; gap: 1.3rem; align-items: center; }
.profile-head h1 { margin-bottom: .2rem; }
.profile-head .lede { margin: .2rem 0 .5rem; }
.profile-recs { display: grid; grid-template-columns: repeat(2, 1fr); gap: .9rem; }
.rec-wide { display: grid; gap: .7rem; }
.rec-listing { display: grid; grid-template-columns: 84px 1fr; gap: .8rem; align-items: center; text-decoration: none; color: var(--text); }
.rec-listing b { display: block; color: var(--strong); }
.rec-listing small { display: block; }

/* ---------- admin ---------- */
.admin-nav { flex-wrap: wrap; }
.spot-edit { grid-column: 1 / -1; margin-top: .2rem; padding-top: .6rem; border-top: 1px dashed var(--line); display: grid; gap: .5rem; }
.spot-edit summary { cursor: pointer; color: var(--text-2); width: max-content; }
.spot-edit summary:hover { color: var(--strong); }
.spot-edit[open] { gap: .7rem; }
.q-rec { grid-template-columns: 40px 1fr auto; align-items: start; }

@media (max-width: 1040px) {
  .spot-grid, .recs-grid, .auth, .account-grid { grid-template-columns: 1fr; }
  .rec-form-wrap { position: static; }
}
@media (max-width: 720px) {
  .spot-hero, .spot-row { grid-template-columns: 1fr; }
  .spot-cover { min-height: 200px; }
  .profile-recs { grid-template-columns: 1fr; }
  .profile-head { flex-direction: column; align-items: flex-start; }
  .login-link { display: none; }
}
