/* Comet — son's surface ONLY. Dark gaming-dashboard skin (Roblox/FIFA-menu register).
   Self-contained: son pages load this INSTEAD of kid.css. The daughter and admin
   surfaces are untouched (they keep kid.css / admin.css).

   Semantic colour is preserved, now tuned for dark:
     green = earned/correct/done · amber = fading/at-risk/overdue · blue = info
     purple = quests/themes · RED = tier-drop warning ONLY (nowhere else).
   No decorative colour: the hero/rating card and XP bar use neutral + earned-green only.
   Sharp geometry (small radii), heavy condensed numerals, no mascots, no emoji. */
:root {
  --bg:    #0f172a;   /* slate-900 — page */
  --bg2:   #1e293b;   /* slate-800 — cards / panels */
  --bg3:   #334155;   /* slate-600 — raised (inputs, chips, tracks) */
  --line:  #334155;   /* slate-600 — borders */
  --text:  #e2e8f0;   /* slate-200 */
  --muted: #94a3b8;   /* slate-400 */
  --green: #3fb950;   /* earned / correct / done */
  --amber: #e3a008;   /* fading / at-risk / overdue */
  --blue:  #4493f8;   /* informational */
  --purple:#a371f7;   /* quests / themes */
  --red:   #f85149;   /* tier-drop warning ONLY */
}
* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0; background: var(--bg); color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px; line-height: 1.5; -webkit-text-size-adjust: 100%;
}
.wrap { max-width: 760px; margin: 0 auto; padding: 14px; }
a { color: var(--blue); text-decoration: none; }

/* condensed, heavy headings + numerals */
h1, h2, .num, .label {
  font-family: "SF Pro Display", system-ui, "Segoe UI", Roboto, sans-serif;
  font-stretch: condensed;
}
h1 { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.01em; margin: 0.2em 0; }
h2 { font-size: 1.0rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
     color: var(--muted); margin: 0 0 10px; }
.label { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
         color: var(--muted); }
.muted { color: var(--muted); }
.big { font-size: 1.9rem; font-weight: 800; }

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; background: #0f172a; border-bottom: 1px solid var(--line);
}
.topbar .name { font-weight: 700; letter-spacing: 0.01em; }

.card {
  background: var(--bg2); border: 1px solid var(--line); border-radius: 8px;
  padding: 14px 16px; margin: 10px 0;
}
.row { display: flex; align-items: center; gap: 12px; }
.spread { justify-content: space-between; }

/* buttons — sharp, >= 44px */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; min-width: 48px; padding: 0 20px; border-radius: 6px;
  font-size: 1rem; font-weight: 700; letter-spacing: 0.02em; border: 1px solid transparent;
  cursor: pointer; background: var(--blue); color: #04101f; width: 100%;
}
.btn.green  { background: var(--green); color: #04130a; }
.btn.purple { background: var(--purple); color: #120524; }
.btn.ghost  { background: var(--bg3); color: var(--text); border-color: var(--line); }
.btn:active { transform: translateY(1px); }

/* ---- HERO: tier as a player-rating card (neutral, no decorative colour) ---- */
.rating {
  display: flex; align-items: stretch; gap: 18px;
  background: linear-gradient(160deg, #1e293b 0%, #0f172a 100%);
  border: 1px solid var(--line); border-radius: 10px; padding: 18px 18px;
}
.rating .tier-num {
  font-family: "SF Pro Display", system-ui, sans-serif; font-stretch: condensed;
  font-size: 5.2rem; font-weight: 900; line-height: 0.9; letter-spacing: -0.04em; color: #fff;
}
.rating .tier-num .x { font-size: 2.6rem; color: var(--muted); vertical-align: super; }
.rating .rate { font-size: 1.15rem; font-weight: 800; color: var(--text); margin-top: 4px; }
.rating .rate .per { color: var(--muted); font-weight: 600; font-size: 0.85rem; }
.rating .side { margin-left: auto; text-align: right; display: flex; flex-direction: column; gap: 8px; }
.rating .pb { font-weight: 800; letter-spacing: 0.08em; color: var(--text); }
.rating .next { font-size: 0.85rem; max-width: 220px; }

/* ---- XP-style streak bar ---- */
.xp-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.xp-top .days { font-weight: 800; font-size: 1.1rem; }
.xp { height: 12px; background: #0f172a; border: 1px solid var(--line); border-radius: 3px; overflow: hidden; }
.xp > span { display: block; height: 100%; background: var(--green); }
.xp-sub { font-size: 0.78rem; margin-top: 8px; }

/* progress bar (daily completion) */
.bar { height: 10px; background: #0f172a; border: 1px solid var(--line); border-radius: 3px; overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--green); }

/* badges / pills */
.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px;
  border-radius: 4px; font-weight: 700; font-size: 0.85rem; letter-spacing: 0.04em;
  text-transform: uppercase; border: 1px solid transparent;
}
/* chips sit on a slate surface; the semantic colour is the text + border accent,
   never a pastel fill (blue in particular is an accent here, not a surface) */
.badge.tier  { background: var(--bg3); color: var(--purple); border-color: var(--purple); }
.badge.green { background: var(--bg3); color: var(--green); border-color: var(--green); }
.badge.blue  { background: var(--bg3); color: var(--blue); border-color: var(--blue); }
.badge.amber { background: var(--bg3); color: var(--amber); border-color: var(--amber); }

/* tier-drop warning — the ONLY red in the son UI */
.warning-red {
  border: 1px solid var(--red); background: rgba(248,81,73,.10); color: var(--red);
  border-radius: 6px; padding: 12px 14px; margin: 10px 0; font-weight: 600;
}

/* review queue */
.review-item { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); }
.review-item:last-child { border-bottom: 0; }
.review-item.overdue .tag { color: var(--amber); font-weight: 700; }

/* quests / theme picker (purple) */
.themes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.theme {
  min-height: 84px; border-radius: 6px; border: 1px solid var(--line); background: var(--bg3);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; cursor: pointer; font-weight: 700; color: var(--text); padding: 6px; text-align: center;
}
.theme .ico { font-size: 1.6rem; }
.theme.chosen { border-color: var(--purple); background: rgba(163,113,247,.12); color: var(--purple); }

/* challenge / writing / summit */
.qtext { font-size: 1.3rem; font-weight: 600; margin: 12px 0; color: var(--text); }
.passage { max-height: 40vh; overflow-y: auto; background: #0f172a; border: 1px solid var(--line);
  border-radius: 6px; padding: 12px; color: var(--text); }
.answer-input { width: 100%; min-height: 54px; font-size: 1.2rem; padding: 0 14px; border-radius: 6px;
  border: 1px solid var(--line); background: var(--bg3); color: var(--text); }
.answer-input::placeholder { color: var(--muted); }
.feedback.correct { color: var(--green); font-weight: 800; }
.feedback.wrong   { color: var(--blue);  font-weight: 800; }   /* not red — red is tier-drop only */
.levelup-tag { background: rgba(163,113,247,.14); color: var(--purple); padding: 3px 10px;
  border-radius: 4px; font-size: .8rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.payout { text-align: center; }
.payout .amt { font-size: 2.4rem; font-weight: 900; color: var(--green); }

.unit { font-size: 0.9rem; color: var(--muted); font-weight: 600; }

/* ---- login: profile picker + PIN pad (shared entry, dark slate) ---- */
.profiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.profile {
  min-height: 116px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg2);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  cursor: pointer; font-weight: 800; color: var(--text);
}
.profile.sel { border-color: var(--blue); background: var(--bg3); }   /* blue = selection accent only */
.profile .ava { font-size: 2.2rem; }
.pinpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; max-width: 320px; margin: 16px auto; }
.pinpad .btn { font-size: 1.4rem; }
.pindots { text-align: center; font-size: 2rem; letter-spacing: 10px; min-height: 40px; color: var(--text); }
.err { color: var(--amber); text-align: center; font-weight: 700; }
