:root {
  --bg: #0b0d14; --bg2: #11141e; --panel: #161a26; --panel2: #1c2130; --line: #262c3d;
  --text: #e8eaf2; --muted: #8b93a7; --accent: #8b5cf6; --accent2: #22d3ee;
  --up: #34d399; --down: #f87171; --warn: #fbbf24; --gold: #facc15;
  --grad: linear-gradient(135deg, #8b5cf6 0%, #6366f1 45%, #22d3ee 100%);
  --radius: 16px; --shadow: 0 10px 30px rgba(0,0,0,.35);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font: 15px/1.55 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
  color: var(--text); background: var(--bg);
  background-image: radial-gradient(1200px 600px at 80% -10%, rgba(139,92,246,.18), transparent 60%),
                    radial-gradient(900px 500px at -10% 110%, rgba(34,211,238,.10), transparent 60%);
  background-attachment: fixed; min-height: 100vh;
}
a { color: #a5b4fc; text-decoration: none; }
a:hover { color: #c7d2fe; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .4em; letter-spacing: -.01em; }
h1 { font-size: 28px; } h2 { font-size: 19px; margin-top: 1.4em; }
.muted { color: var(--muted); } .small { font-size: 13px; } .center { text-align: center; } .pad { padding: 0 12px; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px;
  padding: 12px 22px; background: rgba(11,13,20,.75); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.logo { font-weight: 800; font-size: 21px; color: var(--text); letter-spacing: -.02em; }
.logo span { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tagline { color: var(--muted); font-size: 13px; padding-left: 12px; border-left: 1px solid var(--line); }
.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.nav a { color: var(--muted); padding: 7px 12px; border-radius: 10px; font-weight: 500; }
.nav a:hover { color: var(--text); background: var(--panel); }
.nav a.active { color: var(--text); background: var(--panel2); }
.nav a.me { color: #c4b5fd; }
.icon-btn { background: none; border: 0; color: var(--text); font-size: 20px; cursor: pointer; }
.only-mobile { display: none; }

/* ---------- buttons ---------- */
button { font: inherit; }
.primary, .ghost, .btnlike { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border-radius: 12px; padding: 11px 20px; font-weight: 600; cursor: pointer; border: 1px solid transparent; transition: transform .12s, box-shadow .2s, background .2s; }
.primary { background: var(--grad); color: #fff !important; box-shadow: 0 6px 20px rgba(99,102,241,.35); }
.primary:hover { transform: translateY(-1px); box-shadow: 0 10px 28px rgba(99,102,241,.45); }
.ghost { background: transparent; color: var(--text) !important; border-color: var(--line); }
.ghost:hover { background: var(--panel); }
.small.primary, .small.ghost, .nav .btnlike { padding: 7px 14px; font-size: 14px; }
.nav .primary { color: #fff; }
.wide { width: 100%; }
button:disabled { opacity: .5; cursor: not-allowed; transform: none !important; }
.linkbtn { background: none; border: 0; color: #a5b4fc; cursor: pointer; padding: 0; }

/* ---------- banner ad slot ---------- */
.adslot { --ad-h: 56px; height: var(--ad-h); overflow: hidden; border-bottom: 1px solid var(--line); background: rgba(17,20,30,.7); }
.adslot[hidden] { display: none; }
.ad-inner { height: 100%; max-width: 980px; margin: 0 auto; padding: 6px 16px; display: flex; align-items: center; gap: 12px; }
.ad-inner iframe { flex: 1; height: 100%; border: 0; border-radius: 8px; }
.ad-placeholder { flex: 1; height: 100%; display: flex; align-items: center; justify-content: center; gap: 10px; border: 1px dashed var(--line); border-radius: 10px; color: var(--muted); font-size: 13px; overflow: hidden; white-space: nowrap; }
.ad-label { font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 1px 6px; border-radius: 4px; border: 1px solid var(--line); }
.ad-free-link { font-size: 12px; white-space: nowrap; color: var(--muted); }
.ad-free-link:hover { color: var(--text); }
.layout { min-height: calc(100vh - 60px); }

/* ---------- layout ---------- */
.layout { display: grid; grid-template-columns: 1fr; min-height: calc(100vh - 60px); }
.layout.with-sidebar { grid-template-columns: 280px 1fr; }
.sidebar { border-right: 1px solid var(--line); background: rgba(17,20,30,.6); padding: 16px 10px; overflow-y: auto; max-height: calc(100vh - 60px); position: sticky; top: 60px; }
.layout:not(.with-sidebar) .sidebar { display: none; }
.main { padding: 32px 24px 80px; width: 100%; max-width: 900px; margin: 0 auto; }
.new-q { display: block; text-align: center; padding: 10px; border: 1px dashed var(--line); border-radius: 12px; color: var(--text); margin: 0 4px 16px; }
.new-q:hover { border-color: var(--accent); background: var(--panel); }
.side-title { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 0 12px 8px; }
.history { list-style: none; margin: 0; padding: 0; }
.history a { display: flex; gap: 8px; align-items: center; justify-content: space-between; padding: 9px 12px; border-radius: 10px; color: var(--text); }
.history a:hover { background: var(--panel); }
.history a.active { background: var(--panel2); box-shadow: inset 3px 0 0 var(--accent); }
.h-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; }

/* ---------- pills & tiers ---------- */
.pill { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; white-space: nowrap; background: var(--panel2); color: var(--muted); border: 1px solid var(--line); }
.pill.waiting { color: var(--warn); border-color: rgba(251,191,36,.35); background: rgba(251,191,36,.08); }
.pill.answered { color: var(--accent2); border-color: rgba(34,211,238,.35); background: rgba(34,211,238,.08); }
.pill.complete { color: var(--up); border-color: rgba(52,211,153,.35); background: rgba(52,211,153,.08); }
.pill.demo { margin-left: 10px; vertical-align: middle; }
.userwrap { display: inline-flex; align-items: center; gap: 6px; }
.user { font-weight: 600; color: #c4b5fd; }
.tier { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; white-space: nowrap; border: 1px solid var(--line); color: var(--muted); }
.tier.trusted { color: var(--gold); border-color: rgba(250,204,21,.4); background: rgba(250,204,21,.08); }
.tier.low { color: var(--down); border-color: rgba(248,113,113,.4); background: rgba(248,113,113,.08); }
.tier-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.tier-card.trusted { border-color: rgba(250,204,21,.35); }
.tier-card.low { border-color: rgba(248,113,113,.35); }
.tier-card p { margin: .3em 0 0; }
.tier-big { font-weight: 700; font-size: 16px; display: flex; justify-content: space-between; gap: 10px; }
.tier-card.trusted .tier-big { color: var(--gold); } .tier-card.low .tier-big { color: var(--down); }
.tier-count { font-size: 12px; color: var(--muted); font-weight: 500; }
.tiers-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }

/* ---------- landing ---------- */
.landing { max-width: 860px; margin: 0 auto; }
.hero { text-align: center; padding: 40px 0 30px; position: relative; }
.hero-mark { width: 84px; height: 84px; margin: 0 auto 18px; border-radius: 24px; display: grid; place-items: center; font-size: 52px; font-weight: 800; color: #fff; background: var(--grad); box-shadow: 0 20px 60px rgba(139,92,246,.45); animation: float 5s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-8px) rotate(-4deg); } }
.hero h1 { font-size: 56px; font-weight: 800; letter-spacing: -.03em; margin: 0; }
.hero h1 .q, .ask-hero h1 span { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.headline { font-size: 30px; font-weight: 700; margin: 10px 0 4px; background: linear-gradient(90deg, #fff, #c4b5fd); -webkit-background-clip: text; background-clip: text; color: transparent; }
.subline { font-size: 17px; color: #c7cbe0; margin: 0 0 14px; }
.pitch { color: var(--muted); margin: 0 0 26px; }
.cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.steps { list-style: none; padding: 0; margin: 26px 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.steps li { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; position: relative; }
.steps h3 { margin: 10px 0 6px; font-size: 17px; }
.steps p { margin: 0; color: var(--muted); font-size: 14px; }
.num { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; background: var(--grad); color: #fff; font-weight: 800; }
.anon { background: linear-gradient(135deg, rgba(139,92,246,.12), rgba(34,211,238,.08)); border: 1px solid rgba(139,92,246,.3); padding: 16px 18px; border-radius: var(--radius); margin-bottom: 18px; }

/* ---------- choice ---------- */
.choice { text-align: center; padding-top: 30px; }
.choice h1 { font-size: 32px; }
.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 30px auto 24px; max-width: 680px; }
.choice-card { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 36px 20px; border-radius: 22px; background: var(--panel); border: 1px solid var(--line); color: var(--text); transition: transform .15s, border-color .2s, box-shadow .2s; }
.choice-card:hover { transform: translateY(-3px); color: var(--text); box-shadow: var(--shadow); }
.choice-card.c-ask:hover { border-color: var(--accent); } .choice-card.c-answer:hover { border-color: var(--accent2); }
.choice-icon { width: 70px; height: 70px; border-radius: 20px; display: grid; place-items: center; font-size: 36px; font-weight: 800; color: #fff; background: var(--grad); }
.choice-card.c-answer .choice-icon { background: linear-gradient(135deg, #22d3ee, #10b981); }
.choice-title { font-size: 26px; font-weight: 800; }
.choice-sub { color: var(--muted); font-size: 14px; }

/* ---------- ask & composer ---------- */
.ask { max-width: 720px; margin: 8vh auto 0; }
.ask-hero { text-align: center; margin-bottom: 22px; }
.ask-hero h1 { font-size: 34px; }
.composer-box { background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 12px 12px 8px 16px; transition: border-color .2s, box-shadow .2s; }
.composer-box:focus-within { border-color: rgba(139,92,246,.6); box-shadow: 0 0 0 4px rgba(139,92,246,.15); }
.composer textarea { width: 100%; resize: none; background: transparent; border: 0; outline: 0; color: var(--text); font: inherit; font-size: 16px; min-height: 48px; }
.composer.big textarea { font-size: 18px; min-height: 76px; }
.composer-bar { display: flex; align-items: center; gap: 10px; }
.composer-bar .hint { color: var(--muted); font-size: 12px; margin-right: auto; }
.count { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.send { width: 38px; height: 38px; border-radius: 12px; border: 0; background: var(--grad); color: #fff; font-size: 18px; font-weight: 800; cursor: pointer; }
.suggestions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 16px; }
.chip { background: var(--panel); border: 1px solid var(--line); color: var(--muted); border-radius: 999px; padding: 7px 14px; cursor: pointer; font-size: 13px; }
.chip:hover { color: var(--text); border-color: var(--accent); }
.form-error { display: none; margin-top: 10px; padding: 10px 14px; border-radius: 12px; background: rgba(248,113,113,.1); border: 1px solid rgba(248,113,113,.35); color: #fecaca; font-size: 14px; }
.form-error.show { display: block; }

/* ---------- thread ---------- */
.thread-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; padding: 14px 18px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); margin-bottom: 18px; position: sticky; top: 72px; z-index: 5; backdrop-filter: blur(10px); }
.thread-head .pill { margin-left: auto; }
.conversation { display: flex; flex-direction: column; gap: 12px; }
.bubble { border-radius: 18px; padding: 14px 18px; border: 1px solid var(--line); background: var(--panel); max-width: 92%; }
.bubble.question { background: linear-gradient(135deg, rgba(139,92,246,.20), rgba(99,102,241,.12)); border-color: rgba(139,92,246,.35); align-self: flex-end; }
.bubble.question.followup { background: linear-gradient(135deg, rgba(34,211,238,.14), rgba(99,102,241,.12)); border-color: rgba(34,211,238,.35); }
.bubble.answer { align-self: flex-start; }
.bubble.lowrep { opacity: .65; border-style: dashed; }
.bubble.collapsed { padding: 10px 16px; border-style: dashed; opacity: .8; }
.bubble-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 14px; }
.tag { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #c4b5fd; }
.tag.ans { color: var(--accent2); }
.body { margin: 8px 0 10px; white-space: pre-wrap; word-wrap: break-word; font-size: 16px; }
.post-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.votes { display: flex; gap: 6px; }
.vote { background: rgba(255,255,255,.04); border: 1px solid var(--line); color: var(--muted); border-radius: 10px; padding: 4px 10px; cursor: pointer; font-size: 13px; font-variant-numeric: tabular-nums; }
.vote.up:hover:not(:disabled), .vote.up.on { color: var(--up); border-color: rgba(52,211,153,.5); background: rgba(52,211,153,.1); }
.vote.down:hover:not(:disabled), .vote.down.on { color: var(--down); border-color: rgba(248,113,113,.5); background: rgba(248,113,113,.1); }
.reactions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.rchip { display: inline-flex; gap: 5px; align-items: center; background: rgba(255,255,255,.04); border: 1px solid var(--line); border-radius: 999px; padding: 2px 9px; color: var(--muted); cursor: pointer; font-size: 13px; }
.rchip .em { font-size: 15px; }
.rchip.mine { border-color: rgba(139,92,246,.6); background: rgba(139,92,246,.18); color: var(--text); }
.rchip:hover { border-color: var(--accent); }
.picker { position: relative; }
.react-add { background: transparent; border: 1px dashed var(--line); border-radius: 999px; color: var(--muted); padding: 2px 9px; cursor: pointer; font-size: 13px; }
.react-add:hover:not(:disabled) { color: var(--text); border-color: var(--accent); }
.picker-pop { display: none; position: absolute; bottom: calc(100% + 6px); left: 0; z-index: 30; background: var(--panel2); border: 1px solid var(--line); border-radius: 14px; padding: 6px; box-shadow: var(--shadow); grid-template-columns: repeat(8, 34px); gap: 2px; }
.picker.open .picker-pop { display: grid; }
.emo { background: none; border: 0; font-size: 20px; width: 34px; height: 34px; border-radius: 8px; cursor: pointer; }
.emo:hover { background: rgba(255,255,255,.08); transform: scale(1.15); }
.followup-box, .answer-box { margin-top: 22px; }
.followup-box p, .answer-box p { margin: 0 0 8px; }
.notice { margin-top: 20px; padding: 12px 16px; border-radius: 12px; background: rgba(52,211,153,.08); border: 1px solid rgba(52,211,153,.3); color: #a7f3d0; font-size: 14px; }

/* ---------- presence + popup ---------- */
.userbtn { background: none; border: 0; padding: 0; font: inherit; font-weight: 600; color: #c4b5fd; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.userbtn:hover { color: #ddd6fe; text-decoration: underline; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: #475066; display: inline-block; flex: none; }
.thread-head .userwrap .dot { display: none; }
.thread-head .userwrap.online .dot, .dot.on { display: inline-block; background: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,.2); animation: ping 1.8s ease-out infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(34,197,94,.6); } 100% { box-shadow: 0 0 0 9px rgba(34,197,94,0); } }
.live { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: #86efac; padding: 2px 10px; border-radius: 999px; border: 1px solid rgba(34,197,94,.4); background: rgba(34,197,94,.08); }
.live[hidden] { display: none; }
.popcard { position: absolute; z-index: 60; width: 260px; background: var(--panel2); border: 1px solid var(--line); border-radius: 16px; padding: 14px; box-shadow: var(--shadow); animation: pop .15s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
.pop-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.pop-head .dot:not(.on) { display: none; }
.pop-votes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.pv { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; display: flex; flex-direction: column; }
.pv b { font-size: 22px; font-variant-numeric: tabular-nums; } .pv span { font-size: 12px; color: var(--muted); }
.pv.up b { color: var(--up); } .pv.down b { color: var(--down); }
.pop-label { margin-bottom: 6px; }
.pop-reacts { display: flex; flex-wrap: wrap; gap: 6px; }
.rchip.static { cursor: default; }

/* ---------- swirl loader ---------- */
.waiting-loader { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 48px 12px 30px; min-height: 300px; }
.swirl { position: relative; width: 128px; height: 128px; filter: drop-shadow(0 0 22px rgba(139,92,246,.45)); }
.swirl .ring { position: absolute; inset: 0; border-radius: 50%;
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 7px), #000 calc(100% - 6px));
          mask: radial-gradient(farthest-side, transparent calc(100% - 7px), #000 calc(100% - 6px)); }
.swirl .r1 { background: conic-gradient(from 0deg, transparent 0 10%, #8b5cf6 55%, #22d3ee 90%, transparent 100%); animation: spin 1.6s cubic-bezier(.6,.15,.4,.85) infinite; }
.swirl .r2 { inset: 16px; background: conic-gradient(from 120deg, transparent 0 20%, #22d3ee 60%, #a78bfa 95%, transparent 100%); animation: spin 2.2s cubic-bezier(.5,.1,.5,.9) infinite reverse; }
.swirl .r3 { inset: 32px; background: conic-gradient(from 240deg, transparent 0 25%, #f0abfc 70%, #8b5cf6 98%, transparent 100%); animation: spin 1.1s linear infinite; }
.swirl .core { position: absolute; inset: 50px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff, #c4b5fd 35%, #6366f1 75%); animation: pulse 1.8s ease-in-out infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { transform: scale(.75); opacity: .75; } 50% { transform: scale(1.05); opacity: 1; } }
.waiting-text { font-size: 18px; font-weight: 600; margin: 26px 0 4px; background: linear-gradient(90deg, #e9d5ff, #a5f3fc, #e9d5ff); background-size: 200% auto; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 3s linear infinite; }
.waiting-sub { color: var(--muted); font-size: 13px; margin: 0; }
@keyframes shimmer { to { background-position: 200% center; } }
@media (prefers-reduced-motion: reduce) { .swirl *, .hero-mark, .waiting-text { animation-duration: 6s !important; } }

/* ---------- feed / cards ---------- */
.tabs { display: flex; gap: 6px; margin: 16px 0; flex-wrap: wrap; align-items: center; }
.tabs a { padding: 7px 14px; border-radius: 999px; color: var(--muted); border: 1px solid var(--line); font-size: 14px; }
.tabs a.active { background: var(--panel2); color: var(--text); border-color: var(--accent); }
.toggle { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; cursor: pointer; user-select: none; }
.toggle input { display: none; }
.switch { width: 34px; height: 20px; border-radius: 999px; background: var(--line); position: relative; transition: background .2s; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform .2s; }
.toggle input:checked + .switch { background: var(--accent); }
.toggle input:checked + .switch::after { transform: translateX(14px); }
.cards { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.qcard { display: block; padding: 16px 18px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); color: var(--text); transition: border-color .2s, transform .12s; }
.qcard:hover { border-color: rgba(139,92,246,.6); color: var(--text); transform: translateY(-1px); }
.qcard.lowrep { opacity: .6; border-style: dashed; }
.qcard-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.qcard-top .pill { margin-left: auto; }
.qcard-title { font-size: 17px; font-weight: 600; margin: 8px 0 4px; }
.qcard-fu { margin: 0 0 4px; color: #a5f3fc; font-size: 14px; }
.qcard-foot { margin-top: 6px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.loading { color: var(--muted); padding: 20px; }

/* ---------- auth ---------- */
.auth-wrap { max-width: 420px; margin: 6vh auto; }
.auth label { display: block; margin: 14px 0; }
.lbl { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.lbl em { font-style: normal; opacity: .8; margin-left: 4px; margin-right: auto; }
.auth input { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg2); color: var(--text); font: inherit; outline: 0; }
.auth input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(139,92,246,.2); }
.auth .primary { margin-top: 10px; }
.avail.ok { color: var(--up); } .avail.bad { color: var(--down); }

/* ---------- profile & scoreboard ---------- */
.profile-head { display: flex; align-items: center; gap: 18px; margin-bottom: 16px; }
.profile-head h1 { margin: 0; }
.avatar { width: 68px; height: 68px; border-radius: 20px; background: var(--grad); display: grid; place-items: center; font-size: 30px; font-weight: 800; color: #fff; flex: none; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 16px 0; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.stat-n { font-size: 28px; font-weight: 800; font-variant-numeric: tabular-nums; }
.stat.big .stat-n { font-size: 36px; }
.stat-l { color: var(--muted); font-size: 13px; }
.stat.up .stat-n, td.up { color: var(--up); } .stat.down .stat-n, td.down { color: var(--down); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.mini { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.mini li { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; font-size: 14px; }
.mini a { color: var(--text); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.leaders { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.leaders th, .leaders td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.leaders th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; background: var(--bg2); }
.leaders tr:last-child td { border-bottom: 0; }
.leaders tr.top1 { background: rgba(250,204,21,.06); }
.leaders tr.lowrep { opacity: .6; }
td.score { font-weight: 800; }

/* ---------- settings ---------- */
.settings { max-width: 640px; margin: 0 auto; display: grid; gap: 16px; }
.toggle.big { margin: 0; font-size: 15px; color: var(--text); align-items: flex-start; gap: 14px; }
.toggle.big .switch { margin-top: 3px; flex: none; }
.facts { margin: 16px 0 0; padding-left: 18px; color: var(--muted); font-size: 14px; display: grid; gap: 6px; }
.mt0 { margin-top: 0; }

/* ---------- toast ---------- */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 30px); opacity: 0; pointer-events: none; background: var(--panel2); border: 1px solid var(--line); padding: 12px 18px; border-radius: 14px; box-shadow: var(--shadow); transition: all .25s; z-index: 50; max-width: 90vw; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { border-color: rgba(248,113,113,.6); color: #fecaca; }
.toast.ok { border-color: rgba(52,211,153,.5); }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .tagline { display: none; }
  .layout.with-sidebar { grid-template-columns: 1fr; }
  .has-sidebar .only-mobile { display: inline-block; }
  .sidebar { position: fixed; top: 58px; left: 0; bottom: 0; width: 280px; transform: translateX(-100%); transition: transform .25s; z-index: 15; max-height: none; background: var(--bg2); }
  .layout.sidebar-open .sidebar { transform: none; box-shadow: var(--shadow); }
  .steps, .tiers-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .two-col { grid-template-columns: 1fr; }
  .hero h1 { font-size: 44px; } .headline { font-size: 24px; }
}
@media (max-width: 560px) {
  .topbar { padding: 10px 12px; gap: 8px; flex-wrap: wrap; }
  .nav { width: 100%; margin-left: 0; gap: 2px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a, .nav button { padding: 6px 9px; font-size: 14px; white-space: nowrap; flex: none; }
  .ad-placeholder .ad-text { overflow: hidden; text-overflow: ellipsis; }
  .main { padding: 20px 14px 70px; }
  .choice-grid { grid-template-columns: 1fr; }
  .bubble { max-width: 100%; }
  .thread-head { top: 100px; }
  .toggle { margin-left: 0; }
}

/* ---------- forms shared by settings, modals and admin ---------- */
.settings form.card label, .modal label { display: block; margin: 12px 0; }
.settings form.card input, .modal input:not([type=checkbox]):not([type=radio]), .modal textarea, .modal select,
.admin input[type=search], .admin select, .case-actions input, .case-actions select {
  width: 100%; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg2); color: var(--text); font: inherit; outline: 0;
}
.modal textarea { resize: vertical; }
.settings form.card input:focus, .modal input:focus, .modal textarea:focus, .admin input:focus, .admin select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(139,92,246,.2); }
.danger, .warnbtn { display: inline-flex; align-items: center; gap: 6px; border-radius: 12px; padding: 9px 16px; font-weight: 600; cursor: pointer; border: 1px solid; }
.danger { background: rgba(248,113,113,.12); color: #fecaca; border-color: rgba(248,113,113,.45); }
.danger:hover { background: rgba(248,113,113,.22); }
.warnbtn { background: rgba(251,191,36,.1); color: #fde68a; border-color: rgba(251,191,36,.4); }
.warnbtn:hover { background: rgba(251,191,36,.2); }
.linkbtn.danger { border: 0; background: none; padding: 0; color: #fca5a5; }
.row { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.row.wrap { flex-wrap: wrap; }
.row-end { display: flex; justify-content: flex-end; gap: 10px; margin-top: 14px; }
.block { display: block; }
.nowrap { white-space: nowrap; }

/* ---------- report / moderation in threads ---------- */
.mod-tools { margin-left: auto; display: flex; gap: 14px; align-items: center; font-size: 13px; }
.report-btn { color: var(--muted); font-size: 13px; }
.report-btn:hover { color: #fca5a5; }
.thread-head .report-btn { margin-left: auto; }
.removed-body .body.removed { color: var(--muted); font-style: italic; }
.removed-body .original { border-left: 3px solid rgba(248,113,113,.5); padding-left: 10px; opacity: .85; }
.profile-head .report-user { margin-left: auto; align-self: flex-start; }
.mod-banner { background: rgba(251,191,36,.12); border-bottom: 1px solid rgba(251,191,36,.4); color: #fde68a; }
.mod-banner[hidden] { display: none; }
.mod-banner-inner { max-width: 980px; margin: 0 auto; padding: 10px 16px; display: flex; gap: 14px; align-items: center; justify-content: space-between; font-size: 14px; }

/* ---------- one answerer per question ---------- */
.claim-box { margin-top: 22px; padding: 16px; border-radius: var(--radius); border: 1px dashed var(--line); background: var(--panel); display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.claim-box p { margin: 0; flex: 1; min-width: 200px; }
.claim-timer { font-variant-numeric: tabular-nums; color: var(--warn); font-weight: 700; }
.notice.taken { background: rgba(139,92,246,.08); border-color: rgba(139,92,246,.35); color: #ddd6fe; }
.pill.taken { color: #c4b5fd; border-color: rgba(139,92,246,.4); background: rgba(139,92,246,.1); }
.pill.yours { color: var(--warn); border-color: rgba(251,191,36,.35); background: rgba(251,191,36,.08); }

/* ---------- modal ---------- */
.modal-open { overflow: hidden; }
.overlay { position: fixed; inset: 0; z-index: 70; background: rgba(5,6,10,.7); backdrop-filter: blur(4px); display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px; overflow-y: auto; }
.modal { width: 100%; max-width: 620px; background: var(--panel); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); animation: pop .15s ease-out; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; }
.modal-head .close { color: var(--muted); font-size: 18px; }
.modal-body { padding: 16px 20px 20px; }
.reasons { border: 0; padding: 0; margin: 12px 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.reasons legend { margin-bottom: 6px; }
.modal .radio { display: flex; align-items: center; gap: 8px; margin: 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-size: 14px; }
.modal .radio:has(input:checked) { border-color: var(--accent); background: rgba(139,92,246,.1); }

/* ---------- admin ---------- */
.admin { max-width: 1180px; margin: 0 auto; }
.admin-stats { grid-template-columns: repeat(5, 1fr); }
.stat.link { color: var(--text); } .stat.link:hover { border-color: var(--accent); }
.admin-controls { display: flex; gap: 12px; align-items: center; margin: 8px 0 10px; }
.admin-controls .admin-search { flex: 1; }
.admin-controls .sort { display: flex; gap: 8px; align-items: center; }
.admin-controls select { width: auto; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0 14px; }
.chip.on { color: var(--text); border-color: var(--accent); background: var(--panel2); }
.chip.static { cursor: default; font-size: 12px; padding: 4px 10px; }
.admin-users, .audit { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: 14px; }
.admin-users th, .admin-users td, .audit th, .audit td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.admin-users th, .audit th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; background: var(--bg2); white-space: nowrap; }
.admin-users tr:last-child td, .audit tr:last-child td { border-bottom: 0; }
.admin-users tr.clickable { cursor: pointer; }
.admin-users tr.clickable:hover, .admin-users tr.clickable:focus { background: rgba(139,92,246,.07); outline: 0; }
.admin-users tr.is-banned td { opacity: .75; }
.admin-users .uname { white-space: nowrap; }
.admin-users .uname .pill { margin-left: 6px; }
.admin-users td.email { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.presence { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; white-space: nowrap; }
.presence.on { color: #86efac; font-weight: 600; }
.presence .block { flex-basis: 100%; }
.pill.admin { color: #c4b5fd; border-color: rgba(139,92,246,.4); }
.pill.banned { color: #fecaca; border-color: rgba(248,113,113,.45); background: rgba(248,113,113,.1); }
.pill.suspended { color: #fde68a; border-color: rgba(251,191,36,.4); background: rgba(251,191,36,.08); }
.pill.open { color: #fde68a; } .pill.actioned { color: #fecaca; } .pill.dismissed { color: var(--muted); }
.flag { margin-left: 8px; font-size: 12px; font-weight: 700; color: #fca5a5; background: rgba(248,113,113,.12); border: 1px solid rgba(248,113,113,.4); padding: 1px 7px; border-radius: 999px; }
.flag.old { color: var(--muted); background: none; border-color: var(--line); }
.detail-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 18px; margin-bottom: 12px; }
.detail-grid .email { word-break: break-all; }
.actions { display: grid; gap: 12px; margin-top: 12px; }
.act { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; background: var(--bg2); }
.act h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 8px; }
.act input.num { width: 80px; }
.act .row input:not(.num) { flex: 1; }
.act .row select { width: auto; }
.temp-pw { margin-top: 10px; padding: 10px 12px; border-radius: 12px; border: 1px solid rgba(52,211,153,.4); background: rgba(52,211,153,.08); }
.temp-pw p { margin: 0 0 6px; }
.temp-pw code { font-size: 18px; letter-spacing: .05em; margin-right: 10px; user-select: all; }
.cases { display: grid; gap: 16px; }
.case { padding: 16px 18px; }
.case.open { border-color: rgba(251,191,36,.35); }
.case-head { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.case-title { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.count-badge { font-weight: 800; color: #fca5a5; background: rgba(248,113,113,.12); border: 1px solid rgba(248,113,113,.4); padding: 2px 10px; border-radius: 999px; white-space: nowrap; }
.reason-chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0; }
.reporters { margin: 0 0 10px; padding-left: 18px; display: grid; gap: 4px; }
.evidence { border: 1px solid var(--line); border-radius: 14px; background: var(--bg2); padding: 10px 12px; display: grid; gap: 8px; max-height: 360px; overflow-y: auto; }
.ev-msg { border-left: 3px solid var(--line); padding: 4px 10px; }
.ev-msg.hl-user { border-left-color: rgba(251,191,36,.6); }
.ev-msg.hl-post { border-left-color: #f87171; background: rgba(248,113,113,.07); border-radius: 0 8px 8px 0; }
.ev-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ev-body { margin: 4px 0 0; white-space: pre-wrap; word-break: break-word; }
.case-actions { margin-top: 12px; display: grid; gap: 8px; }
.case-actions select { width: auto; }
@media (max-width: 860px) {
  .admin-stats { grid-template-columns: repeat(2, 1fr); }
  .admin-controls { flex-direction: column; align-items: stretch; }
}
@media (max-width: 560px) {
  .detail-grid, .reasons { grid-template-columns: 1fr; }
  .mod-banner-inner { flex-direction: column; align-items: flex-start; }
  .modal-body { padding: 14px; }
  .overlay { padding: 12px 8px; }
}
.switch { flex: none; }
.modal .act input.num { width: 80px; flex: none; }
.act .toggle { margin-left: 0; }
.nowrap { white-space: nowrap; }
.modal label.toggle { display: inline-flex; margin: 0; }

/* ---------- kudos: streaks, thanks, badges, nudge ---------- */
.mini-badges { display: inline-flex; gap: 1px; margin-left: 4px; vertical-align: middle; }
.mini-badge { font-size: 12px; line-height: 1; cursor: help; filter: saturate(.9); }
.badges-cell .mini-badge { font-size: 14px; margin-right: 2px; }
.choice-streak { display: inline-block; margin-top: 10px; font-size: 13px; font-weight: 600; color: #fdba74; background: rgba(251,146,60,.1); border: 1px solid rgba(251,146,60,.3); padding: 3px 10px; border-radius: 999px; }
.thanks-box { margin-top: 20px; padding: 14px 16px; border-radius: 12px; background: rgba(250,204,21,.06); border: 1px solid rgba(250,204,21,.3); display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.thanks-box p { margin: 0; }
.thanks-btn { font: inherit; font-weight: 700; cursor: pointer; padding: 10px 20px; border-radius: 999px; border: 1px solid rgba(250,204,21,.5); background: rgba(250,204,21,.14); color: #fde68a; transition: transform .12s, background .2s; min-height: 44px; }
.thanks-btn:hover:not(:disabled) { background: rgba(250,204,21,.24); transform: translateY(-1px); }
.thanks-btn:disabled { opacity: .6; cursor: default; }
.notice.thanked { background: rgba(250,204,21,.06); border-color: rgba(250,204,21,.3); color: #fde68a; }
.mod-banner.kind { background: rgba(250,204,21,.08); border-bottom-color: rgba(250,204,21,.3); color: #fef3c7; }
.mod-banner .row { margin-top: 0; }
.pill.priority { color: var(--gold); border-color: rgba(250,204,21,.4); background: rgba(250,204,21,.08); }
.stat.thanks .stat-n, td.thanks { color: #fde68a; }
.stat.streak .stat-n { color: #fdba74; }
.kudos { margin: 4px 0 8px; }
.kudos-stats { margin-bottom: 6px; }
.badge-list { list-style: none; padding: 0; margin: 8px 0; display: flex; flex-wrap: wrap; gap: 8px; }
.badge-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); font-size: 13px; font-weight: 600; }
.badge-chip.trusted { color: var(--gold); border-color: rgba(250,204,21,.4); }
.badge-chip.thoughtful { color: #fde68a; } .badge-chip.fast { color: #a5f3fc; } .badge-chip.streaker { color: #fdba74; }
.badge-icon { font-size: 16px; line-height: 1; }
.badge-icon.dim { opacity: .55; filter: grayscale(.5); }
.next-badges { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; margin-top: 10px; }
.next-badges h3 { font-size: 14px; margin: 0 0 6px; color: var(--muted); font-weight: 600; }
.next-badges ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.next-badges li { display: flex; gap: 10px; align-items: flex-start; }
.most-thanked { padding-left: 22px; } .most-thanked li { margin: 4px 0; }
.modal.nudge { max-width: 440px; }
.nudge-lead { font-size: 16px; font-weight: 600; margin-top: 0; }
.nudge-actions { justify-content: flex-end; margin-top: 14px; flex-wrap: wrap; }
@media (max-width: 560px) {
  .thanks-box { flex-direction: column; align-items: stretch; text-align: center; }
  .nudge-actions button { flex: 1; }
  .kudos-stats { grid-template-columns: repeat(2, 1fr); }
}
.scoreboard > .stats { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 860px) { .scoreboard > .stats { grid-template-columns: repeat(2, 1fr); } }
/* ---------- footer / support line ---------- */
.site-footer { text-align: center; padding: 14px 16px calc(18px + env(safe-area-inset-bottom)); font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); }
.support-line { overflow-wrap: anywhere; }
.support-link { color: var(--muted); text-decoration: underline; text-decoration-color: var(--line); }
.support-link:hover { color: var(--text); }
.profile-support { margin-top: 28px; }
/* ---------- answer queue, browse, private threads ---------- */
.tiny { font-size: 12px; }
.queue .waiting-loader { min-height: 55vh; }
.queue-actions { display: flex; gap: 12px; align-items: center; justify-content: center; flex-wrap: wrap; margin-top: 18px; }
.queue-assigned .queue-actions { justify-content: flex-start; }
.privacy-row { margin-top: 12px; display: flex; gap: 6px 16px; align-items: center; flex-wrap: wrap; }
.privacy-row p { flex-basis: 100%; margin: 0; }
.privacy-row input[type=checkbox] { vertical-align: middle; accent-color: #8b5cf6; }
.privacy-box { margin-top: 18px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.privacy-box p { flex-basis: 100%; margin: 4px 0 0; }
.delete-after, .browse-search { background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; font: inherit; }
.browse-form { margin: 8px 0 4px; }
.browse-search { width: 100%; padding: 10px 14px; }
.warnbtn.small { padding: 6px 12px; font-size: 13px; }
.notice.private-note { background: rgba(139,92,246,.08); border-color: rgba(139,92,246,.35); color: #ddd6fe; }
.delete-note { margin-top: 10px; }
