/* SolveForge — shared styles */
:root {
  --bg: #070a14;
  --bg-2: #0d1120;
  --card: rgba(24,30,52,.72);
  --card-solid: #161c31;
  --card-2: rgba(38,46,78,.55);
  --border: rgba(120,140,200,.16);
  --border-strong: rgba(120,140,200,.30);
  --ink: #eef2ff;
  --muted: #9aa6c8;
  --brand: #22d3ee;
  --brand-2: #6366f1;
  --brand-3: #a855f7;
  --accent: #a78bfa;
  --good: #34d399;
  --warn: #fbbf24;
  --bad: #fb7185;
  --gold: #fbbf24;
  --shadow: 0 18px 50px rgba(3,6,20,.55);
  --radius: 18px;
  --grad: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 55%, var(--brand-3) 100%);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background:
    radial-gradient(900px 500px at 12% -8%, rgba(99,102,241,.20) 0%, transparent 55%),
    radial-gradient(1000px 560px at 88% -6%, rgba(34,211,238,.16) 0%, transparent 55%),
    radial-gradient(900px 700px at 50% 110%, rgba(168,85,247,.12) 0%, transparent 55%),
    var(--bg);
  background-attachment: fixed;
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
a { color: var(--brand-2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); letter-spacing: -.01em; }
p { color: var(--muted); }
.container { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 820px; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(7,10,20,.72);
  backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--border);
}
.nav-group { display: flex; gap: 15px; align-items: center; padding-right: 15px; border-right: 1px solid var(--border); flex: none; }
.nav .container { max-width: 1320px; }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 20px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--ink); font-size: 1.15rem; white-space: nowrap; flex: none; }
.logo:hover { text-decoration: none; }
.logo-mark {
  width: 32px; height: 32px; border-radius: 9px;
  background: var(--grad);
  display: grid; place-items: center; color: #fff; font-weight: 900;
  box-shadow: 0 4px 14px rgba(99,102,241,.5);
}
.nav-links { display: flex; align-items: center; gap: 16px; flex-wrap: nowrap; }
.nav-links a { color: var(--muted); font-weight: 600; font-size: .95rem; white-space: nowrap; }
.nav-links a:hover { color: var(--ink); text-decoration: none; }
.nav-toggle { display: none; background: none; border: 0; color: var(--ink); font-size: 1.6rem; cursor: pointer; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--grad); background-size: 160% 160%;
  color: #fff; font-weight: 700; border: 0; cursor: pointer;
  padding: 12px 22px; border-radius: 12px; font-size: .98rem;
  box-shadow: 0 6px 18px rgba(99,102,241,.35);
  transition: transform .15s ease, box-shadow .15s ease, background-position .4s ease;
}
.btn:hover { transform: translateY(-2px); text-decoration: none; background-position: 100% 50%; box-shadow: 0 12px 28px rgba(99,102,241,.5); }
.btn.ghost { background: rgba(255,255,255,.03); color: var(--ink); border: 1px solid var(--border-strong); box-shadow: none; }
.btn.ghost:hover { border-color: var(--brand); background: rgba(34,211,238,.08); box-shadow: 0 6px 18px rgba(34,211,238,.15); }
.btn.sm { padding: 8px 14px; font-size: .88rem; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }

/* Hero */
.hero { padding: 80px 0 60px; position: relative; }
.eyebrow {
  display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--brand);
  background: rgba(45,212,191,.1); border: 1px solid rgba(45,212,191,.25);
  padding: 5px 12px; border-radius: 999px; margin-bottom: 20px;
}
.hero p.lead { font-size: 1.2rem; max-width: 640px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 34px; color: var(--muted); font-size: .9rem; }
.hero-badges span { display: flex; align-items: center; gap: 7px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }

/* Cards / grid */
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.card {
  background: var(--card);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow);
  position: relative;
}
.card::before { content:''; position:absolute; inset:0; border-radius:var(--radius); padding:1px;
  background: linear-gradient(180deg, rgba(255,255,255,.10), transparent 40%); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events:none; }
.game-card { display: flex; flex-direction: column; height: 100%; transition: border-color .2s, transform .2s; }
.game-card:hover { border-color: var(--brand); transform: translateY(-3px); text-decoration: none; }
.game-card .icon { font-size: 2rem; margin-bottom: 12px; }
.game-card h3 { color: var(--ink); }
.game-card p { flex: 1; font-size: .95rem; }
.game-card .meta { display: flex; gap: 12px; margin-top: 14px; font-size: .8rem; color: var(--brand); font-weight: 600; }
.tag { font-size: .7rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: 3px 9px; border-radius: 6px; }
.tag.new { background: rgba(167,139,250,.18); color: var(--accent); }
.tag.core { background: rgba(56,189,248,.15); color: var(--brand-2); }
.tag.free { background: rgba(52,211,153,.16); color: var(--good); }
.tag.pro { background: linear-gradient(135deg, rgba(251,191,36,.22), rgba(245,158,11,.22)); color: var(--gold); }
.tag.legacy { background: rgba(159,176,208,.16); color: var(--muted); }

/* ===== LinkedIn links ===== */
.li-link { display: inline-flex; align-items: center; gap: 6px; color: #0a66c2; line-height: 0; vertical-align: middle; }
.li-link:hover { color: #0a66c2; opacity: .82; text-decoration: none; }
.li-link span { font-size: .9rem; font-weight: 700; line-height: 1; }
.li-btn { background: rgba(10,102,194,.14); border: 1px solid rgba(10,102,194,.38); border-radius: 12px; padding: 10px 16px; }
.li-btn:hover { background: rgba(10,102,194,.22); opacity: 1; }
html[data-theme="light"] .li-link { color: #0a66c2; }

.section { padding: 64px 0; }
.section-head { text-align: center; max-width: 620px; margin: 0 auto 44px; }
.section-head p { font-size: 1.05rem; }

/* Steps */
.steps { counter-reset: step; }
.step { display: flex; gap: 18px; margin-bottom: 22px; align-items: flex-start; }
.step .num {
  flex: none; width: 38px; height: 38px; border-radius: 10px;
  background: var(--card-2); border: 1px solid var(--border);
  display: grid; place-items: center; font-weight: 800; color: var(--brand);
}
.step h4 { margin: 4px 0 4px; color: var(--ink); }
.step p { margin: 0; font-size: .95rem; }

/* Footer */
.footer { border-top: 1px solid var(--border); padding: 44px 0 30px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 30px; }
.footer h5 { color: var(--ink); font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 14px; }
.footer a { color: var(--muted); display: block; margin-bottom: 8px; font-size: .92rem; }
.footer a:hover { color: var(--ink); }
.footer .disclaimer { color: #6b7ba0; font-size: .82rem; margin-top: 30px; border-top: 1px solid var(--border); padding-top: 20px; }
.footer-legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin-top: 16px; color: var(--muted); font-size: .82rem; }
.footer-legal a { color: var(--muted); }
.footer-legal a:hover { color: var(--ink); }

/* Simulator shell */
.sim-wrap { padding: 34px 0 80px; min-height: 70vh; }
.sim-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.sim-title { display: flex; align-items: center; gap: 12px; }
.sim-title h1 { font-size: 1.6rem; margin: 0; }
.hud { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.timer {
  font-variant-numeric: tabular-nums; font-weight: 800; font-size: 1.2rem;
  background: var(--card); border: 1px solid var(--border); border-radius: 10px;
  padding: 8px 16px; min-width: 96px; text-align: center;
}
.timer.warn { color: var(--warn); border-color: var(--warn); }
.timer.danger { color: var(--bad); border-color: var(--bad); animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .55; } }
.pill { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 8px 14px; font-weight: 700; font-size: .9rem; }

.panel { background: var(--card); backdrop-filter: blur(14px); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin-bottom: 20px; }
.panel h3 { color: var(--ink); font-size: 1.1rem; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }
.hidden { display: none !important; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.spread { justify-content: space-between; }

table.data { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.data th, table.data td { border: 1px solid var(--border); padding: 8px 10px; text-align: center; }
table.data th { background: var(--card-2); color: var(--ink); font-weight: 700; }
table.data td { color: var(--muted); }
table.data tr:hover td { background: rgba(56,189,248,.05); }

.tile {
  background: var(--card-2); border: 1px solid var(--border); border-radius: 12px;
  padding: 14px; cursor: pointer; transition: all .15s; user-select: none;
}
.tile:hover { border-color: var(--brand-2); }
.tile.selected { border-color: var(--brand); background: rgba(45,212,191,.12); box-shadow: 0 0 0 1px var(--brand) inset; }
.tile.disabled { opacity: .45; cursor: not-allowed; }
.tile h4 { margin: 0 0 8px; color: var(--ink); display: flex; justify-content: space-between; align-items: center; }
.attr { display: flex; justify-content: space-between; font-size: .82rem; color: var(--muted); margin: 2px 0; }
.attr b { color: var(--ink); }
.trait-tag { font-size: .72rem; padding: 2px 8px; border-radius: 6px; font-weight: 700; }
.trait-good { background: rgba(52,211,153,.18); color: var(--good); }
.trait-bad { background: rgba(248,113,113,.18); color: var(--bad); }
.trait-neutral { background: rgba(159,176,208,.15); color: var(--muted); }

.range-ok { color: var(--good); font-weight: 700; }
.range-bad { color: var(--bad); font-weight: 700; }

.result-banner { border-radius: 12px; padding: 20px; margin: 18px 0; border: 1px solid var(--border); }
.result-banner.pass { background: rgba(52,211,153,.1); border-color: var(--good); }
.result-banner.fail { background: rgba(248,113,113,.1); border-color: var(--bad); }
.big-score { font-size: 2.6rem; font-weight: 900; letter-spacing: -.02em; }

.progress-track { height: 8px; background: var(--card-2); border-radius: 999px; overflow: hidden; margin: 8px 0 4px; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--brand), var(--brand-2)); width: 0; transition: width .3s; }

.choice {
  display: block; width: 100%; text-align: left; background: var(--card-2);
  border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px;
  margin-bottom: 10px; cursor: pointer; color: var(--ink); font-size: .96rem; transition: all .15s;
}
.choice:hover { border-color: var(--brand-2); }
.choice.picked { border-color: var(--brand); background: rgba(45,212,191,.1); }
input.calc {
  background: var(--card-2); border: 1px solid var(--border); color: var(--ink);
  border-radius: 8px; padding: 9px 12px; font-size: 1rem; width: 130px;
  font-variant-numeric: tabular-nums;
}
input.calc:focus { outline: none; border-color: var(--brand); }
input.blank { width: 90px; display: inline-block; }

.notice {
  background: rgba(56,189,248,.08); border: 1px solid rgba(56,189,248,.3);
  border-radius: 10px; padding: 12px 16px; font-size: .88rem; color: var(--muted); margin: 16px 0;
}

@media (max-width: 1040px) {
  .nav-links { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; align-items: flex-start; background: var(--bg-2); padding: 16px 20px; border-bottom: 1px solid var(--border); gap: 14px; }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
  .nav-group { flex-direction: column; align-items: flex-start; border-right: 0; padding-right: 0; gap: 12px; }
}
@media (max-width: 860px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* ===== profile chip ===== */
.sf-chip .chip-link { display: inline-flex; align-items: center; gap: 8px; background: var(--card-2); border: 1px solid var(--border-strong); border-radius: 999px; padding: 4px 12px 4px 4px; }
.sf-chip .chip-link:hover { text-decoration: none; border-color: var(--brand); }
.sf-chip .chip-av { display: inline-flex; line-height: 0; }
.sf-chip .chip-name { color: var(--ink); font-weight: 700; font-size: .9rem; }
.sf-chip { display: inline-flex; align-items: center; }
.chip-logout { background: var(--card-2); border: 1px solid var(--border-strong); color: var(--muted); width: 30px; height: 30px; border-radius: 8px; cursor: pointer; font-size: 1rem; line-height: 1; margin-left: 6px; display: inline-grid; place-items: center; }
.chip-logout:hover { border-color: var(--bad); color: var(--bad); }
.sf-modal-x { position: absolute; top: 12px; right: 14px; background: transparent; border: 0; color: var(--muted); font-size: 1.05rem; cursor: pointer; line-height: 1; }
.sf-modal-x:hover { color: var(--ink); }
.login-list { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.login-item { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: var(--card-2); border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px; cursor: pointer; color: var(--ink); transition: border-color .15s, transform .12s; }
.login-item:hover { border-color: var(--brand); transform: translateX(2px); }
.login-item .li-name { font-weight: 700; flex: 1; }
.auth-or { display: flex; align-items: center; gap: 10px; margin: 14px 0; color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; }
.auth-or::before, .auth-or::after { content: ''; flex: 1; height: 1px; background: var(--border); }
#googleBtn svg { display: inline-block; }

/* ===== onboarding modal ===== */
.sf-modal-overlay { position: fixed; inset: 0; z-index: 200; background: rgba(4,7,16,.72); backdrop-filter: blur(8px); display: grid; place-items: center; padding: 20px; animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; } }
.sf-modal { width: 100%; max-width: 420px; background: var(--card-solid); border: 1px solid var(--border-strong); border-radius: 22px; padding: 30px; box-shadow: var(--shadow); text-align: left; position: relative; }
.sf-modal h2 { margin: 8px 0 6px; }
.sf-modal-badge { width: 54px; height: 54px; border-radius: 15px; background: var(--grad); display: grid; place-items: center; font-size: 1.7rem; box-shadow: 0 8px 22px rgba(99,102,241,.5); }
.avatar-pick { display: flex; align-items: center; gap: 16px; margin: 18px 0; }
.avatar-pick #avPreview { line-height: 0; border-radius: 16px; overflow: hidden; box-shadow: 0 6px 18px rgba(0,0,0,.4); }
.fld-label { display: block; font-size: .78rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin-bottom: 6px; font-weight: 700; }

/* ===== toasts ===== */
#sf-toasts { position: fixed; right: 18px; bottom: 18px; z-index: 300; display: flex; flex-direction: column; gap: 10px; }
.sf-toast { background: var(--card-solid); border: 1px solid var(--border-strong); border-radius: 14px; padding: 12px 16px; box-shadow: var(--shadow); transform: translateX(120%); opacity: 0; transition: all .3s cubic-bezier(.2,.8,.2,1); max-width: 330px; }
.sf-toast.show { transform: translateX(0); opacity: 1; }
.toast-trophy { display: flex; gap: 12px; align-items: center; }
.toast-trophy .tt-title { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--gold); font-weight: 800; }
.toast-trophy .tt-name { font-weight: 800; color: var(--ink); }
.toast-trophy .tt-desc { font-size: .82rem; color: var(--muted); }

/* ===== trophy badge ===== */
.trophy-badge { display: inline-grid; place-items: center; border-radius: 14px; font-size: 1.3rem; box-shadow: 0 6px 16px rgba(0,0,0,.35); }

/* ===== avatar helpers ===== */
.av { line-height: 0; display: inline-flex; border-radius: 12px; overflow: hidden; flex: none; }
.microbe-thumb { line-height: 0; display: inline-flex; }

/* ===== segmented control / tabs ===== */
.seg { display: inline-flex; background: var(--card-2); border: 1px solid var(--border); border-radius: 999px; padding: 4px; gap: 4px; flex-wrap: wrap; }
.seg button { background: transparent; border: 0; color: var(--muted); font-weight: 700; font-size: .88rem; padding: 7px 16px; border-radius: 999px; cursor: pointer; transition: all .15s; }
.seg button.active { background: var(--grad); color: #fff; box-shadow: 0 4px 12px rgba(99,102,241,.35); }
.seg button:hover:not(.active) { color: var(--ink); }

/* ===== leaderboard ===== */
.lb-row { display: grid; grid-template-columns: 48px 1fr auto; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 14px; border: 1px solid var(--border); background: var(--card-2); margin-bottom: 8px; transition: transform .12s, border-color .12s; }
.lb-row:hover { transform: translateX(2px); border-color: var(--border-strong); }
.lb-row.me { border-color: var(--brand); background: rgba(34,211,238,.10); box-shadow: 0 0 0 1px var(--brand) inset; }
.lb-rank { font-weight: 900; font-size: 1.15rem; text-align: center; color: var(--muted); font-variant-numeric: tabular-nums; }
.lb-rank.r1 { color: var(--gold); } .lb-rank.r2 { color: #cbd5e1; } .lb-rank.r3 { color: #d9a066; }
.lb-user { display: flex; align-items: center; gap: 12px; min-width: 0; }
.lb-name { font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-sub { font-size: .78rem; color: var(--muted); }
.lb-score { font-weight: 900; font-size: 1.25rem; color: var(--ink); font-variant-numeric: tabular-nums; }
.lb-score small { font-size: .7rem; color: var(--muted); font-weight: 600; }
.bot-tag { font-size: .62rem; padding: 1px 6px; border-radius: 5px; background: rgba(154,166,200,.16); color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }

/* podium */
.podium { display: grid; grid-template-columns: 1fr 1.2fr 1fr; gap: 12px; align-items: end; margin-bottom: 24px; }
.podium .pod { background: var(--card-2); border: 1px solid var(--border); border-radius: 16px; padding: 16px 12px; text-align: center; }
.podium .pod.p1 { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold) inset, 0 10px 30px rgba(251,191,36,.15); }
.podium .pod .medal { font-size: 1.6rem; }
.podium .pod .pname { font-weight: 800; color: var(--ink); margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.podium .pod .psc { font-weight: 900; font-size: 1.4rem; }
.podium .pod .bar { height: 8px; border-radius: 999px; background: var(--grad); margin-top: 10px; }

/* ===== stat cards ===== */
.stat-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; }
@media (max-width:860px){ .stat-grid{ grid-template-columns: repeat(2,1fr);} .podium{ grid-template-columns:1fr;} .stat-grid{ } }
.stat { background: var(--card-2); border: 1px solid var(--border); border-radius: 14px; padding: 16px; }
.stat .k { font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.stat .v { font-size: 1.7rem; font-weight: 900; color: var(--ink); margin-top: 4px; font-variant-numeric: tabular-nums; }
.stat .v.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat .sub { font-size: .8rem; color: var(--muted); }

/* histogram */
.histo { display: flex; align-items: flex-end; gap: 6px; height: 140px; padding-top: 10px; }
.histo .b { flex: 1; background: var(--grad); border-radius: 6px 6px 0 0; min-height: 3px; position: relative; opacity: .85; }
.histo .b:hover { opacity: 1; }
.histo-x { display: flex; gap: 6px; margin-top: 6px; }
.histo-x span { flex: 1; text-align: center; font-size: .66rem; color: var(--muted); }

/* trophy grid */
.troph-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }
@media (max-width:640px){ .troph-grid{ grid-template-columns:1fr; } }
.troph { display: flex; gap: 12px; align-items: center; background: var(--card-2); border: 1px solid var(--border); border-radius: 14px; padding: 14px; }
.troph.locked { opacity: .55; }
.troph .tn { font-weight: 800; color: var(--ink); font-size: .95rem; }
.troph .td { font-size: .8rem; color: var(--muted); }
.tier-dot { font-size: .62rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; padding: 1px 7px; border-radius: 5px; }
.tier-bronze { background: rgba(217,160,102,.16); color: #d9a066; }
.tier-silver { background: rgba(203,213,225,.16); color: #cbd5e1; }
.tier-gold { background: rgba(251,191,36,.16); color: var(--gold); }
.tier-platinum { background: rgba(103,232,249,.16); color: #67e8f9; }

/* microbe tile picture */
.tile .mpic { display: flex; justify-content: center; margin: 2px 0 8px; }

/* rank banner on results */
.rank-flash { display:flex; gap:14px; align-items:center; background: var(--card-2); border:1px solid var(--border-strong); border-radius:14px; padding:14px 18px; margin:14px 0; }
.rank-flash .rk { font-size:1.8rem; font-weight:900; }

/* page hero for sub-pages */
.page-head { padding: 30px 0 10px; }
.page-head h1 { margin-bottom: 6px; }

/* ===== access / freemium ===== */
#sf-plan { display:inline-flex; align-items:center; }
.upgrade-btn { background: linear-gradient(135deg, var(--gold), #f59e0b); color:#1a1206; box-shadow:0 4px 14px rgba(251,191,36,.35); }
.upgrade-btn:hover { box-shadow:0 8px 20px rgba(251,191,36,.5); }
.pro-badge { font-weight:900; font-size:.78rem; letter-spacing:.06em; color:#1a1206; background:linear-gradient(135deg,var(--gold),#f59e0b); padding:5px 11px; border-radius:999px; box-shadow:0 4px 12px rgba(251,191,36,.35); }
.plan-features { margin:16px 0; display:flex; flex-direction:column; gap:10px; }
.plan-features .pf { display:flex; align-items:center; gap:10px; color:var(--ink); font-size:.92rem; }
.plan-features .pf span { font-size:1.1rem; }
.price-row { display:flex; align-items:baseline; gap:10px; margin:6px 0 14px; }
.price-row .price { font-size:2rem; font-weight:900; background:var(--grad); -webkit-background-clip:text; background-clip:text; color:transparent; }
.plan-options { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin:18px 0 4px; }
.plan-opt { position:relative; background:var(--card-2); border:1px solid var(--border-strong); border-radius:14px; padding:20px 14px; cursor:pointer; text-align:center; color:var(--ink); transition:transform .15s, border-color .15s, box-shadow .15s; }
.plan-opt:hover { border-color:var(--brand); transform:translateY(-2px); box-shadow:0 8px 20px rgba(34,211,238,.18); }
.plan-opt.featured { border-color:var(--gold); box-shadow:0 0 0 1px var(--gold) inset; }
.plan-opt.featured:hover { box-shadow:0 0 0 1px var(--gold) inset, 0 8px 20px rgba(251,191,36,.25); }
.plan-opt .po-price { font-size:1.9rem; font-weight:900; }
.plan-opt .po-per { color:var(--muted); font-size:.85rem; margin-top:2px; }
.plan-opt .po-tag { position:absolute; top:-10px; left:50%; transform:translateX(-50%); background:linear-gradient(135deg, var(--gold), #f59e0b); color:#1a1206; font-size:.62rem; font-weight:800; text-transform:uppercase; letter-spacing:.05em; padding:2px 9px; border-radius:999px; white-space:nowrap; }
.lock-panel { text-align:center; padding:40px 26px; }
.lock-badge { font-size:2.4rem; margin-bottom:8px; }
.lock-panel h2 { margin:6px 0; }
.lock-panel p { max-width:520px; margin:0 auto; }
.free-banner { display:flex; align-items:center; justify-content:space-between; gap:14px; flex-wrap:wrap;
  background:linear-gradient(135deg, rgba(251,191,36,.12), rgba(99,102,241,.10));
  border:1px solid rgba(251,191,36,.3); border-radius:12px; padding:12px 16px; margin-bottom:18px; font-size:.9rem; color:var(--muted); }
.free-banner b { color:var(--ink); }

/* ===== light theme ===== */
html[data-theme="light"] {
  --bg: #f4f6fb;
  --bg-2: #eaeef7;
  --card: rgba(255,255,255,.78);
  --card-solid: #ffffff;
  --card-2: #eef2f9;
  --border: rgba(15,23,42,.12);
  --border-strong: rgba(15,23,42,.22);
  --ink: #101728;
  --muted: #55617c;
  --brand: #0891b2;
  --brand-2: #4f46e5;
  --brand-3: #9333ea;
  --good: #059669;
  --warn: #d97706;
  --bad: #e11d48;
  --gold: #d97706;
  --shadow: 0 16px 40px rgba(30,41,90,.14);
  --grad: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 55%, var(--brand-3) 100%);
}
html[data-theme="light"] body {
  background:
    radial-gradient(900px 500px at 12% -8%, rgba(79,70,229,.10) 0%, transparent 55%),
    radial-gradient(1000px 560px at 88% -6%, rgba(8,145,178,.10) 0%, transparent 55%),
    radial-gradient(900px 700px at 50% 110%, rgba(147,51,234,.07) 0%, transparent 55%),
    var(--bg);
}
html[data-theme="light"] .nav { background: rgba(244,246,251,.8); }
html[data-theme="light"] .btn.ghost { background: rgba(15,23,42,.03); }
html[data-theme="light"] .btn.ghost:hover { background: rgba(8,145,178,.08); }
html[data-theme="light"] .card::before { background: linear-gradient(180deg, rgba(255,255,255,.6), transparent 40%); }
html[data-theme="light"] .tile.selected { background: rgba(8,145,178,.12); }
html[data-theme="light"] .lb-row.me { background: rgba(8,145,178,.10); }
html[data-theme="light"] .trait-neutral { background: rgba(15,23,42,.06); color: var(--muted); }
html[data-theme="light"] .pro-badge, html[data-theme="light"] .upgrade-btn { color:#3a2708; }

/* ===== theme toggle button ===== */
.theme-toggle {
  background: var(--card-2); border: 1px solid var(--border-strong); color: var(--ink);
  width: 34px; height: 34px; border-radius: 9px; cursor: pointer; font-size: 1rem;
  display: inline-grid; place-items: center; transition: border-color .15s, transform .15s;
}
.theme-toggle:hover { border-color: var(--brand); transform: translateY(-1px); }
