/* Retail Therapy — theme tokens. LOCKED PALETTE: black and electric blue.
   ALL colors live here, in :root. To reskin the whole site, change only
   these variables. This theme uses black and electric blue only. */

:root {
  /* Core palette (locked) */
  --bg: #050505;
  --bg-panel: #101014;
  --bg-panel-2: #17171C;
  --bg-input: #101014;
  --border: #23232A;

  /* Brand accents (locked) */
  --blue: #0090FF;
  --bright: #33B5FF;
  --deep: #0A2540;

  /* Text (locked) */
  --text: #B8B8C0;
  --heading: #FFFFFF;
  --muted: #71717A;

  /* Signal colors (candles / errors only — not theme accents) */
  --green: #2fbf71;
  --red: #e5484d;

  /* Shape / type */
  --radius: 14px;
  --radius-sm: 8px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
}
h1, h2, h3, h4 { color: var(--heading); }
a { color: var(--blue); }
a:hover { color: var(--bright); }

.wrap { max-width: 960px; margin: 0 auto; padding: 0 20px 64px; }

/* ---------- Header / nav ---------- */
.site-header {
  border-bottom: 1px solid var(--border);
  background: #000;
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-header .inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.brand {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  color: var(--heading);
  text-decoration: none;
  letter-spacing: 0.2px;
}
.brand small {
  display: block;
  font-family: var(--font);
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}
.main-nav { display: flex; gap: 16px; flex-wrap: wrap; margin-left: auto; }
.main-nav a {
  color: var(--text);
  text-decoration: none;
  font-size: 15px;
}
.main-nav a:hover, .main-nav a.active { color: var(--blue); }
.auth-box { display: flex; gap: 10px; align-items: center; font-size: 14px; }
.auth-box .who { color: var(--muted); max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Hero / cards / buttons ---------- */
.hero { padding: 44px 0 8px; }
.hero h1 {
  font-family: var(--font-display);
  font-size: 46px;
  line-height: 1.05;
  margin: 0 0 8px;
  color: var(--heading);
}
.hero p.tagline { font-size: 19px; color: var(--muted); margin: 0 0 20px; }
.card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  margin: 18px 0;
}
.card h2, .card h3 { margin-top: 0; color: var(--heading); }
.card h2 { font-size: 24px; }
.card h3 { font-size: 19px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.btn {
  display: inline-block;
  background: var(--blue);
  color: #000;
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px 18px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
}
.btn:hover { background: var(--bright); color: #000; }
.btn.secondary { background: transparent; color: var(--bright); border: 1px solid var(--blue); }
.btn.secondary:hover { background: var(--bg-panel-2); color: var(--bright); }
.btn:disabled { opacity: 0.5; cursor: default; }
input[type="email"], input[type="password"], input[type="text"], select {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 10px 12px;
  font-size: 15px;
  margin: 6px 0 12px;
}
label { font-size: 14px; color: var(--muted); }
.check-row { display: flex; gap: 10px; align-items: flex-start; margin: 10px 0; font-size: 14px; }
.check-row input { margin-top: 4px; }
.notice {
  border: 1px solid var(--blue);
  background: var(--deep);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin: 14px 0;
  font-size: 14px;
  color: var(--heading);
}
.notice.error { border-color: var(--red); background: #2a0f10; }
.notice.success { border-color: var(--blue); background: var(--deep); }
.hidden { display: none !important; }

/* ---------- Lessons ---------- */
.lesson-list { list-style: none; padding: 0; margin: 0; }
.lesson-list li {
  display: flex;
  gap: 12px;
  align-items: center;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin: 8px 0;
}
.lesson-list li.done { border-color: var(--blue); }
.lesson-list .mark {
  width: 26px; height: 26px; border-radius: 50%;
  border: 2px solid var(--blue);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px; flex: 0 0 auto; color: var(--blue);
  background: transparent;
}
.lesson-list li.done .mark { background: var(--deep); border-color: var(--blue); color: var(--bright); }
.lesson-list a { color: var(--heading); text-decoration: none; font-weight: 600; }
.lesson-list a:hover { color: var(--bright); }
.lesson-list .meta { margin-left: auto; color: var(--muted); font-size: 13px; white-space: nowrap; }
.progress-bar { height: 12px; background: var(--border); border-radius: 99px; overflow: hidden; }
.progress-bar > div { height: 100%; background: var(--blue); width: 0%; transition: width 0.3s; }
.progress-ring { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.progress-ring .ring-text { font-size: 15px; }
.progress-ring .ring-pct { font-size: 32px; font-weight: 800; color: var(--heading); }
.video { position: relative; width: 100%; aspect-ratio: 16 / 9; margin: 16px 0; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: var(--radius-sm); }
.figure { margin: 18px 0; }
.figure img { width: 100%; height: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); background: #fff; }
.figure figcaption { font-size: 13px; color: var(--muted); margin-top: 6px; }
.diagram { background: #0b0b0e; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px; margin: 18px 0; overflow-x: auto; }
.diagram svg { display: block; margin: 0 auto; max-width: 100%; height: auto; }
.drill, .quiz, .homework { border: 1px dashed var(--blue); border-radius: var(--radius); padding: 18px; margin: 20px 0; }
.drill h3, .quiz h3, .homework h3 { color: var(--heading); margin-top: 0; }
.opt-btn {
  display: block; width: 100%; text-align: left;
  background: var(--bg-panel-2); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 10px 12px; margin: 8px 0; cursor: pointer; font-size: 15px;
}
.opt-btn:hover { border-color: var(--blue); }
.opt-btn.correct { border-color: var(--blue); background: var(--deep); color: var(--heading); }
.opt-btn.wrong { border-color: var(--red); background: #2a0f10; }
.opt-btn:disabled { opacity: 0.75; cursor: default; }
.glossary-term { border-bottom: 1px solid var(--border); padding: 10px 0; }
.glossary-term b { color: var(--bright); }
.pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
footer.site-footer { border-top: 1px solid var(--border); color: var(--muted); font-size: 13px; text-align: center; padding: 24px 12px 40px; }
.kbd { font-family: ui-monospace, monospace; background: var(--bg-panel-2); border: 1px solid var(--border); border-radius: 4px; padding: 1px 6px; font-size: 13px; }

/* ---------- Badges ---------- */
.badge-shelf { display: flex; gap: 10px; flex-wrap: wrap; margin: 12px 0; }
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--deep);
  border: 1px solid var(--blue);
  border-radius: 99px;
  padding: 6px 12px;
  font-size: 13px; font-weight: 600; color: var(--heading);
}
.badge .badge-icon { color: var(--bright); font-size: 15px; }
.badge.locked { background: transparent; border-color: var(--border); color: var(--muted); }
.badge.locked .badge-icon { color: var(--muted); }
.badge.course-badge { font-size: 15px; padding: 9px 16px; border-width: 2px; }
.quiz-score-row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 15px; }
.quiz-score-row:last-child { border-bottom: none; }
/* ---------- Flash Cards ---------- */
.fc-tabs { display: flex; gap: 10px; flex-wrap: wrap; margin: 12px 0; }
.fc-tab.active, .fc-view-btn.active { background: var(--blue); color: #000; border-color: var(--blue); }
.fc-card { perspective: 1200px; max-width: 640px; margin: 8px auto 0; }
.fc-card-inner { position: relative; min-height: 300px; transform-style: preserve-3d; transition: transform .55s ease; cursor: pointer; }
.fc-card-inner.flipped { transform: rotateY(180deg); }
.fc-face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; background: var(--bg-panel-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; justify-content: center; transition: visibility 0s .28s; overflow: hidden; }
.fc-face.fc-back { transform: rotateY(180deg); background: var(--deep); visibility: hidden; }
.fc-card-inner.flipped .fc-front, .fc-mini-inner.flipped .fc-front { visibility: hidden; }
.fc-card-inner.flipped .fc-back, .fc-mini-inner.flipped .fc-back { visibility: visible; }
.fc-deck-tag { font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--bright); font-weight: 700; margin-bottom: 10px; }
.fc-text { font-family: var(--font-display); font-size: 26px; line-height: 1.35; color: var(--heading); }
.fc-back .fc-text { font-family: var(--font); font-size: 18px; line-height: 1.6; color: var(--text); }
.fc-hint { margin-top: 14px; font-size: 13px; color: var(--muted); }
.fc-wm { position: absolute; right: 14px; bottom: 14px; width: 60px; height: auto; opacity: .16; pointer-events: none; border-radius: 8px; }
.fc-known { position: absolute; left: 14px; top: 14px; font-size: 12px; font-weight: 700; color: var(--bright); background: var(--deep); border: 1px solid var(--blue); border-radius: 99px; padding: 3px 10px; }
.fc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.fc-mini { perspective: 900px; cursor: pointer; }
.fc-mini-inner { position: relative; min-height: 180px; transform-style: preserve-3d; transition: transform .55s ease; }
.fc-mini-inner.flipped { transform: rotateY(180deg); }
.fc-mini .fc-face { padding: 18px; }
.fc-mini .fc-text { font-size: 16px; }
.fc-mini .fc-back .fc-text { font-size: 14px; }
.fc-mini .fc-wm { width: 40px; right: 10px; bottom: 10px; }
.fc-mini { position: relative; }
.fc-mine { position: absolute; right: 14px; top: 14px; font-size: 12px; font-weight: 700; color: var(--bright); background: var(--deep); border: 1px solid var(--blue); border-radius: 99px; padding: 3px 10px; }
.fc-del { position: absolute; left: 10px; bottom: 10px; z-index: 3; background: var(--bg-panel); color: var(--muted); border: 1px solid var(--border); border-radius: 99px; width: 28px; height: 28px; font-size: 15px; line-height: 1; cursor: pointer; padding: 0; }
.fc-del:hover { color: var(--heading); border-color: var(--blue); }
.fc-form label { display: block; margin-top: 10px; }
.fc-form textarea { width: 100%; background: var(--bg-input); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); padding: 10px 12px; font-size: 15px; font-family: var(--font); margin: 6px 0 12px; min-height: 84px; resize: vertical; }
.fc-form .fc-error { color: var(--red); font-size: 14px; margin: 0 0 10px; }
@media (prefers-reduced-motion: reduce) {
  .fc-card-inner, .fc-mini-inner { transition: none; }
  .fc-face { transition: none; }
}
@media (max-width: 640px) {
  .hero h1 { font-size: 34px; }
  .main-nav { margin-left: 0; }
  .lesson-list .meta { display: none; }
  .fc-text { font-size: 22px; }
}
