:root {
  --bg: #0d1522;
  --card: #16202f;
  --card-edge: #24344c;
  --text: #eef2f7;
  --muted: #9db0c5;
  --gold: #e3b341;
  --gold-dim: #8a6d24;
  --ok: #4caf7d;
  --warn: #e08a3c;
  --bad: #e05c5c;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  padding: 16px;
  max-width: 760px;
  margin: 0 auto;
}

a { color: var(--gold); }

.site-header { text-align: center; padding: 18px 0 8px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-icon { width: 42px; height: 42px; }
.brand-name { font-size: 1.9rem; font-weight: 700; letter-spacing: 0.5px; color: var(--gold); }
.tagline { color: var(--text); font-size: 1.02rem; margin-top: 4px; }
.asof { color: var(--muted); font-size: 0.85rem; margin-top: 6px; }

.site-footer { text-align: center; color: var(--muted); font-size: 0.88rem; padding: 26px 0 10px; }

.card {
  background: var(--card);
  border: 1px solid var(--card-edge);
  border-radius: 14px;
  padding: 18px;
  margin-top: 16px;
}
.card h2 {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 1.6px;
  color: var(--muted);
  margin-bottom: 12px;
}
.card h3 { font-size: 1.05rem; margin-bottom: 6px; }

.note { color: var(--muted); font-size: 0.9rem; margin-top: 6px; }
.label { color: var(--muted); font-size: 0.92rem; }
.value { font-weight: 600; }
.row-between { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }

.hero h1 { font-size: 1.55rem; line-height: 1.25; }
.hero p { margin-top: 8px; color: var(--text); }

.btn {
  display: inline-block;
  background: var(--gold);
  color: #14100a;
  font-weight: 700;
  border: none;
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 0.95rem;
  cursor: pointer;
  text-decoration: none;
  margin-top: 10px;
}
.btn.secondary { background: transparent; color: var(--gold); border: 1px solid var(--gold-dim); }
.btn.small { padding: 6px 12px; font-size: 0.85rem; margin-top: 0; }
.btn:disabled { opacity: 0.45; cursor: default; }

input[type="text"] {
  background: #0a101b;
  border: 1px solid var(--card-edge);
  border-radius: 10px;
  color: var(--text);
  padding: 10px 12px;
  font-size: 1rem;
  width: 100%;
  margin-top: 8px;
}

/* catalog */
.course-grid { display: grid; grid-template-columns: 1fr; gap: 14px; margin-top: 16px; }
@media (min-width: 620px) { .course-grid { grid-template-columns: 1fr 1fr; } }
.course-card {
  background: var(--card);
  border: 1px solid var(--card-edge);
  border-radius: 14px;
  padding: 16px;
  text-decoration: none;
  color: var(--text);
  display: block;
}
.course-card:hover { border-color: var(--gold-dim); }
.course-code { color: var(--gold); font-weight: 700; letter-spacing: 1px; font-size: 0.85rem; }
.course-title { font-size: 1.12rem; font-weight: 700; margin-top: 2px; }
.course-sub { color: var(--muted); font-size: 0.88rem; margin-top: 4px; }

.bar { background: #0a101b; border: 1px solid var(--card-edge); border-radius: 999px; height: 10px; margin-top: 10px; overflow: hidden; }
.bar-fill { background: var(--gold); height: 100%; border-radius: 999px; transition: width 0.4s ease; }

.chip {
  display: inline-block; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.6px;
  padding: 2px 8px; border-radius: 999px; background: #0a101b; border: 1px solid var(--card-edge);
  color: var(--muted); text-transform: uppercase; margin-left: 6px; vertical-align: middle;
}
.chip.done { color: #08130d; background: var(--ok); border-color: var(--ok); }
.chip.pass { color: #14100a; background: var(--gold); border-color: var(--gold); }

.crumb { margin-top: 14px; font-size: 0.9rem; }
.crumb a { text-decoration: none; }

/* module rows */
.mod-row {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 12px 0; border-bottom: 1px solid var(--card-edge);
}
.mod-row:last-child { border-bottom: none; }
.mod-row a { text-decoration: none; color: var(--text); font-weight: 600; }
.mod-status { color: var(--muted); font-size: 0.82rem; white-space: nowrap; }

.objectives { margin: 8px 0 0 18px; }
.objectives li { margin-top: 4px; }

.lesson p { margin-top: 10px; }
.lesson p:first-child { margin-top: 0; }
.homework {
  background: #0a101b; border: 1px solid var(--card-edge); border-left: 4px solid var(--gold);
  border-radius: 10px; padding: 12px 14px; margin-top: 14px;
}
.homework h3 { color: var(--gold); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1.2px; }

.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.actions .btn { margin-top: 0; }

/* flashcards */
.flash-wrap { perspective: 1200px; margin-top: 14px; }
.flashcard {
  position: relative; width: 100%; min-height: 220px; cursor: pointer;
  transform-style: preserve-3d; transition: transform 0.45s ease;
}
.flashcard.flipped { transform: rotateY(180deg); }
.flash-face {
  position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  background: var(--card); border: 1px solid var(--gold-dim); border-radius: 14px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 22px; text-align: center;
}
.flash-face .side-label { position: absolute; top: 12px; left: 16px; font-size: 0.72rem; letter-spacing: 1.4px; color: var(--muted); text-transform: uppercase; }
.flash-face .q-text { font-size: 1.25rem; font-weight: 700; }
.flash-face .a-text { font-size: 1.05rem; }
.flash-back { transform: rotateY(180deg); border-color: var(--ok); }
.flash-progress { text-align: center; color: var(--muted); margin-top: 12px; font-size: 0.9rem; }
.flash-actions { display: flex; gap: 10px; justify-content: center; margin-top: 12px; }
.btn.know { background: var(--ok); color: #08130d; }
.btn.learn { background: transparent; color: var(--warn); border: 1px solid var(--warn); }

/* quizzes + exams */
.q-block { padding: 14px 0; border-bottom: 1px solid var(--card-edge); }
.q-block:last-of-type { border-bottom: none; }
.q-text { font-weight: 600; }
.q-opts { margin-top: 8px; }
.q-opts label {
  display: block; padding: 9px 12px; margin-top: 6px; border: 1px solid var(--card-edge);
  border-radius: 10px; cursor: pointer; background: #0a101b;
}
.q-opts label:hover { border-color: var(--gold-dim); }
.q-opts input { margin-right: 8px; }
.q-opts label.correct { border-color: var(--ok); background: rgba(76, 175, 125, 0.12); }
.q-opts label.wrong { border-color: var(--bad); background: rgba(224, 92, 92, 0.10); }
.q-why { color: var(--muted); font-size: 0.9rem; margin-top: 8px; }
.q-why strong { color: var(--ok); }
.score-banner {
  border-radius: 12px; padding: 14px 16px; margin-top: 14px; font-weight: 700; font-size: 1.05rem;
  background: #0a101b; border: 1px solid var(--card-edge);
}
.score-banner.pass { border-color: var(--ok); color: var(--ok); }
.score-banner.fail { border-color: var(--bad); color: var(--bad); }

/* pricing */
.price-row { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; padding: 12px 0; border-bottom: 1px solid var(--card-edge); }
.price-row:first-of-type { padding-top: 2px; }
.price-row:last-of-type { border-bottom: none; }
.price-info { flex: 1 1 300px; }
.price-row .actions { margin-top: 0; }
.price-big { font-size: 1.55rem; font-weight: 700; color: var(--gold); }
.price-was { font-size: 1.02rem; font-weight: 400; color: var(--muted); text-decoration: line-through; margin-left: 8px; }
.price-per { font-size: 0.95rem; font-weight: 600; color: var(--text); }
.guarantee { margin-top: 12px; background: #0a101b; border: 1px solid var(--card-edge); border-left: 4px solid var(--ok); border-radius: 10px; padding: 10px 12px; font-size: 0.93rem; }
.btn.buy.pending { background: transparent; color: var(--muted); border: 1px dashed var(--card-edge); cursor: default; font-weight: 600; }

/* certificate */
.cert {
  background: #f7f2e3; color: #1c2733; border: 6px double #8a6d24; border-radius: 6px;
  padding: 34px 26px; text-align: center; margin-top: 16px;
}
.cert .cert-brand { letter-spacing: 3px; font-size: 0.8rem; text-transform: uppercase; color: #8a6d24; font-weight: 700; }
.cert h2 { font-size: 1.7rem; margin-top: 10px; color: #1c2733; letter-spacing: 0; text-transform: none; }
.cert .cert-name { font-size: 1.5rem; font-weight: 700; margin-top: 14px; border-bottom: 1px solid #c9b96a; display: inline-block; padding: 0 18px 4px; }
.cert .cert-line { margin-top: 10px; font-size: 0.98rem; }
.cert .cert-meta { margin-top: 16px; color: #5a6672; font-size: 0.85rem; }
.cert-list-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--card-edge); }
.cert-list-row:last-child { border-bottom: none; }

@media print {
  body { background: #fff; padding: 0; max-width: none; }
  .no-print, .site-footer, .crumb, .actions, .btn { display: none !important; }
  .card { border: none; background: #fff; padding: 0; margin: 0; }
  .cert { margin: 0; }
}
