/* Lagos Rent Sharp — styles. Tokens first; dark mode follows the site's choice (data-theme)
   or the device when the visitor picked "auto". */
:root {
  --bg: #f6f7f4; --surface: #ffffff; --surface-2: #eef3ee; --ink: #0f172a; --muted: #475569;
  --line: #d9e1da; --brand: #047857; --brand-ink: #ffffff; --gold: #facc15; --gold-ink: #0b1020;
  --scam: #dc2626; --legit: #15803d; --on-legit: #ffffff; --focus: #b45309; --shadow: 0 10px 30px rgba(15, 23, 42, .08);
  --radius: 16px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1020; --surface: #111a2c; --surface-2: #17233a; --ink: #e8edf5; --muted: #a8b4c7;
    --line: #2a3850; --brand: #34d399; --brand-ink: #052e16; --gold: #facc15; --gold-ink: #0b1020;
    --scam: #f87171; --legit: #4ade80; --on-legit: #052e16; --focus: #facc15; --shadow: 0 10px 30px rgba(0, 0, 0, .35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b1020; --surface: #111a2c; --surface-2: #17233a; --ink: #e8edf5; --muted: #a8b4c7;
  --line: #2a3850; --brand: #34d399; --brand-ink: #052e16; --gold: #facc15; --gold-ink: #0b1020;
  --scam: #f87171; --legit: #4ade80; --on-legit: #052e16; --focus: #facc15; --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 'Ubuntu', system-ui, sans-serif; -webkit-tap-highlight-color: transparent; }
a { color: var(--brand); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
/* headings get focus from the script (so screen readers land there); no ring for that */
[tabindex="-1"]:focus { outline: none; }
[hidden] { display: none !important; }

.wrap { max-width: 720px; margin: 0 auto; padding: 0 16px 48px; }
.topbar { max-width: 720px; margin: 0 auto; padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.back { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-weight: 700; color: var(--ink); text-decoration: none; }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.hud { font-size: .9rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.hud strong { color: var(--ink); }
.pill { min-width: 44px; min-height: 40px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; }

.comic { font-family: 'Bangers', Impact, system-ui, sans-serif; letter-spacing: .03em; font-weight: 400; margin: 8px 0; }
h1.comic { font-size: clamp(2.6rem, 9vw, 3.6rem); line-height: 1; color: var(--brand); }
h2.comic { font-size: clamp(1.7rem, 6vw, 2.2rem); line-height: 1.05; }
.lead { font-size: 1.1rem; margin: 6px 0 14px; }
.hint, .fineprint { color: var(--muted); font-size: .9rem; }

.screen { animation: enter .35s ease both; }
@keyframes enter { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.rounds { margin: 0 0 14px; padding-left: 1.3rem; }
.rounds li { margin: 6px 0; }
.rounds strong { display: block; }
.lifeline-legend { display: grid; gap: 6px; padding: 12px 14px; border-radius: var(--radius); background: var(--surface-2); margin-bottom: 14px; font-size: .95rem; }
.switch-row { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); margin-bottom: 16px; cursor: pointer; }
.switch-row input { width: 22px; height: 22px; margin-top: 2px; accent-color: var(--brand); flex: 0 0 auto; }
.switch-row strong { display: block; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 10px 18px; border-radius: 14px;
  border: 2px solid var(--line); background: var(--surface); color: var(--ink); font: 700 1rem/1.2 'Ubuntu', system-ui, sans-serif; text-decoration: none; cursor: pointer; }
.btn:disabled { opacity: .6; cursor: default; }
.btn-primary { width: 100%; background: var(--brand); border-color: var(--brand); color: var(--brand-ink); margin-top: 12px; }
.btn-scam { background: var(--scam); border-color: var(--scam); color: #fff; }
.btn-legit { background: var(--legit); border-color: var(--legit); color: #fff; }
:root[data-theme="dark"] .btn-scam, :root[data-theme="dark"] .btn-legit { color: #0b1020; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn-scam, :root:not([data-theme="light"]) .btn-legit { color: #0b1020; } }

/* Round 1 */
.round-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.counter { font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.speedbar, .timebar { height: 6px; border-radius: 6px; background: var(--surface-2); overflow: hidden; margin: 6px 0 12px; }
.speedbar span, .timebar span { display: block; height: 100%; width: 100%; background: var(--gold); transform-origin: left center; }
.scenario { font-size: 1.15rem; font-weight: 700; margin: 0 0 14px; }
.options { display: grid; gap: 10px; }
.option { display: flex; gap: 12px; align-items: center; width: 100%; min-height: 56px; padding: 10px 14px; text-align: left; border-radius: 14px;
  border: 2px solid var(--line); background: var(--surface); color: var(--ink); font: 600 1rem/1.35 'Ubuntu', system-ui, sans-serif; cursor: pointer; box-shadow: var(--shadow); }
.option .key { display: inline-grid; place-items: center; width: 28px; height: 28px; flex: 0 0 auto; border-radius: 8px; background: var(--gold); color: var(--gold-ink); font-weight: 700; }
.option:hover:not(:disabled) { border-color: var(--brand); }
.option.is-correct { border-color: var(--legit); background: color-mix(in srgb, var(--legit) 14%, var(--surface)); }
.option.is-wrong { border-color: var(--scam); background: color-mix(in srgb, var(--scam) 12%, var(--surface)); }
.option.is-removed { opacity: .35; text-decoration: line-through; }
.lifelines { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.lifeline { min-height: 48px; padding: 6px 8px; border-radius: 12px; border: 1px dashed var(--brand); background: transparent; color: var(--ink); font: 700 .85rem/1.2 'Ubuntu', system-ui, sans-serif; cursor: pointer; }
.lifeline:disabled { opacity: .45; text-decoration: line-through; cursor: default; }
.panel { margin-top: 14px; padding: 14px 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.panel h3 { margin: 0 0 6px; font-size: 1rem; }
.panel p { margin: 6px 0; }
.panel blockquote { margin: 8px 0; padding: 8px 12px; border-left: 4px solid var(--brand); background: var(--surface-2); border-radius: 8px; font-size: .95rem; }
.feedback.good { border-color: var(--legit); }
.feedback.bad { border-color: var(--scam); }
.points { font-weight: 700; font-variant-numeric: tabular-nums; }
.tag { display: inline-block; padding: 1px 7px; border-radius: 6px; font-size: .72rem; font-weight: 700; letter-spacing: .05em; vertical-align: 1px; }
.tag-law { background: var(--legit); color: var(--on-legit); }
.tag-bill { background: var(--gold); color: var(--gold-ink); }

/* Round 2: swipe deck */
.streak { font-weight: 700; color: var(--brand); }
.deck { position: relative; margin: 8px 0 12px; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.card { position: relative; min-height: 290px; padding: 18px; border-radius: 22px; background: var(--surface); border: 2px solid var(--line); box-shadow: var(--shadow);
  will-change: transform; cursor: grab; display: flex; flex-direction: column; gap: 8px; }
.card:active { cursor: grabbing; }
.card .photo { display: grid; place-items: center; height: 120px; border-radius: 14px; font-size: 64px; background: linear-gradient(135deg, #a7f3d0, #fde68a); }
.card h3 { margin: 4px 0 0; font-size: 1.15rem; }
.card .price { font-weight: 700; font-size: 1.2rem; color: var(--brand); }
.card .msg { margin: 0; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); font-size: .98rem; }
.card .msg::before { content: "💬 "; }
.stamp { position: absolute; top: 34px; left: 50%; transform: translateX(-50%) rotate(-10deg); padding: 4px 14px; border: 4px solid currentColor; border-radius: 10px;
  font: 400 2rem/1 'Bangers', Impact, sans-serif; letter-spacing: .05em; opacity: 0; pointer-events: none; background: color-mix(in srgb, var(--surface) 80%, transparent); }
.stamp.left { color: var(--scam); opacity: 1; }
.stamp.right { color: var(--legit); opacity: 1; }
.swipe-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mult { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--gold); color: var(--gold-ink); font-weight: 700; }

/* Round 3: calculator */
.calc fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; margin: 0 0 12px; background: var(--surface); }
.calc legend { font-weight: 700; padding: 0 6px; }
.calc label { display: grid; gap: 4px; margin: 8px 0; font-size: .95rem; }
.calc label.wide { margin: 0 0 12px; }
.calc input { min-height: 48px; padding: 8px 12px; border-radius: 12px; border: 2px solid var(--line); background: var(--bg); color: var(--ink); font: 600 1rem 'Ubuntu', system-ui, sans-serif; }
.calc input:focus { border-color: var(--brand); outline: none; }
.calc-q { margin: 6px 0 8px; }
.guess { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.error { color: var(--scam); font-weight: 700; }
.result .verdict { font-size: 1.2rem; font-weight: 700; }
.bars { display: grid; gap: 8px; margin: 10px 0; }
.bar { display: grid; grid-template-columns: 7.5rem 1fr; gap: 8px; align-items: center; font-size: .9rem; }
.bar i { display: block; height: 14px; border-radius: 7px; background: var(--brand); min-width: 2px; }
.bar i.cost { background: var(--scam); }
.result dl { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; margin: 8px 0; }
.result dt { color: var(--muted); }
.result dd { margin: 0; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }

/* Results */
.rank-hero { text-align: center; padding: 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.rank-hero .emoji { font-size: 56px; line-height: 1; }
.rank-hero .title { font: 400 2.4rem/1 'Bangers', Impact, sans-serif; color: var(--brand); margin: 6px 0; }
#share-card { display: block; width: min(100%, 420px); height: auto; margin: 14px auto; border-radius: 16px; box-shadow: var(--shadow); }
.share-row { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-top: 10px; }

/* The facts */
.facts { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); }
.facts h2 { font-size: 1.25rem; }
.facts li { margin: 8px 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
