:root {
  --cream: #f7f4ec;
  --card: #ffffff;
  --ink: #24211b;
  --ink-soft: #6b6558;
  --border: #e4ddca;
  --blue: #1e4fd8;
  --blue-dark: #163ca6;
  --green: #1e8e5a;
  --green-bg: #e9f7ef;
  --red: #c23b3b;
  --red-bg: #fbeaea;
  --amber: #a9740b;
  --gold: #c99a2e;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--cream); color: var(--ink); min-height: 100vh; }
.hidden { display: none !important; }
a { color: var(--blue); }

/* top nav */
.topbar {
  background: var(--card); border-bottom: 1px solid var(--border);
  padding: 12px 24px; display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 20; flex-wrap: wrap; gap: 10px;
}
.topbar .brand { font-family: Georgia, serif; font-weight: 700; font-size: 15px; }
.topbar nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.topbar nav a {
  text-decoration: none; color: var(--ink-soft); font-size: 14px; font-weight: 600;
  padding: 7px 12px; border-radius: 7px;
}
.topbar nav a:hover { background: var(--cream); color: var(--ink); }
.topbar nav a.active { background: #eaf1fd; color: var(--blue-dark); }
.topbar .user-chip { font-size: 13px; color: var(--ink-soft); }

.container { max-width: 1080px; margin: 0 auto; padding: 32px 22px 70px; }

.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 14px; box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}
.eyebrow { text-transform: uppercase; font-size: 12px; letter-spacing: 0.08em; color: var(--ink-soft); margin: 0 0 6px; font-weight: 600; }
h1 { font-family: Georgia, "Times New Roman", serif; font-size: 28px; margin: 0 0 6px; line-height: 1.25; }
h2 { font-size: 17px; margin: 0 0 14px; }
.subtitle { color: var(--ink-soft); margin: 0 0 24px; font-size: 15px; }

/* buttons */
/* display:inline-block + no underline so an <a class="btn"> sits and reads the
   same as a <button class="btn">, which the nav and card actions rely on. */
.btn { font-family: inherit; font-size: 14px; font-weight: 600; padding: 10px 18px; border-radius: 8px; border: 1px solid transparent; cursor: pointer; transition: background .15s, opacity .15s; text-decoration: none; display: inline-block; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); }
.btn-primary:disabled { opacity: .45; cursor: not-allowed; }
.btn-secondary { background: #fff; color: var(--ink); border-color: var(--border); }
.btn-secondary:hover { background: #f2efe4; }
.btn-danger { background: #fff; color: var(--red); border-color: #ecc8c8; }
.btn-danger:hover { background: var(--red-bg); }
.btn-text { background: none; color: var(--ink-soft); padding: 10px 6px; }
.btn-text:hover { color: var(--ink); }
.btn-large { width: 100%; padding: 14px; font-size: 15px; }
.tab-btn.active { background: #eaf1fd; color: var(--blue-dark); border-color: #b9cef3; }

/* exam chooser */
.choose-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.choose-card { display: flex; flex-direction: column; padding: 26px 24px; text-decoration: none; color: inherit; transition: border-color .15s, box-shadow .15s; }
.choose-card:hover { border-color: var(--blue); box-shadow: 0 2px 10px rgba(30,79,216,.10); }
.choose-code { font-size: 12px; letter-spacing: .1em; font-weight: 700; color: var(--blue-dark); }
.choose-name { font-family: Georgia, serif; font-size: 19px; line-height: 1.3; margin: 6px 0 10px; }
.choose-meta { font-size: 13px; color: var(--ink-soft); }
@media (max-width: 700px) { .choose-grid { grid-template-columns: 1fr; } }

/* login */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 40px 20px; }
.auth-card { max-width: 440px; width: 100%; padding: 38px 40px 40px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.field input { width: 100%; padding: 11px 13px; border: 1px solid var(--border); border-radius: 8px; font-size: 15px; font-family: inherit; background: var(--cream); }
.field input:focus { outline: 2px solid var(--blue); outline-offset: 0; background: #fff; }
.auth-note { font-size: 12px; color: var(--ink-soft); margin-top: 4px; line-height: 1.5; }
.check-row { display: flex; align-items: center; gap: 9px; font-weight: 400; font-size: 14px;
  padding: 11px 13px; border: 1px solid var(--border); border-radius: 8px; background: var(--cream); cursor: pointer; }
.check-row:hover { background: #f2efe4; }
.check-row input { width: auto; accent-color: var(--blue); flex-shrink: 0; }
.form-error { background: var(--red-bg); border: 1px solid #ecc8c8; color: var(--red); font-size: 13px; padding: 10px 12px; border-radius: 8px; margin-bottom: 16px; }

/* meta grid */
.meta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 24px; }
.meta-item { background: var(--cream); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.meta-label { font-size: 12px; color: var(--ink-soft); }
.meta-value { font-size: 16px; font-weight: 600; }

/* dashboard stats */
.stat-row { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 26px; }
.stat { flex: 1; min-width: 150px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 18px; display: flex; flex-direction: column; gap: 4px; align-items: center; }
.stat .num { font-size: 30px; font-weight: 700; font-family: Georgia, serif; }
.stat .num.sec { color: var(--ink-soft); }
.stat .cap { font-size: 12px; color: var(--ink-soft); text-align: center; }

/* tables */
.table { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.table th, .table td { padding: 12px 14px; text-align: left; font-size: 14px; border-bottom: 1px solid var(--border); }
.table th { background: var(--cream); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-soft); }
.table tr:last-child td { border-bottom: none; }
.table .num-cell { text-align: right; font-variant-numeric: tabular-nums; }
.pill { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 20px; }
.pill-pass { background: var(--green-bg); color: var(--green); }
.pill-fail { background: var(--red-bg); color: var(--red); }
.pill-freelancer { background: #f3eefb; color: #6b3fa0; }
.pill-exam { background: #eaf1fd; color: var(--blue-dark); }
.rank-1 { color: var(--gold); font-weight: 800; }
.me-row { background: #eaf1fd; }

.empty { text-align: center; color: var(--ink-soft); padding: 30px; font-size: 14px; }

/* domain bars */
.domain-breakdown { display: flex; flex-direction: column; gap: 12px; }
.domain-bar-row { display: flex; flex-direction: column; gap: 6px; }
.domain-bar-label { display: flex; justify-content: space-between; font-size: 13px; }
.domain-bar-label .dscore { color: var(--ink-soft); font-weight: 600; }
.domain-bar-track { height: 8px; background: var(--border); border-radius: 6px; overflow: hidden; }
.domain-bar-fill { height: 100%; background: var(--blue); border-radius: 6px; }
.domain-bar-fill.weak { background: var(--red); }
.domain-bar-fill.mid { background: var(--amber); }

/* exam */
.exam-header { position: sticky; top: 0; z-index: 10; background: var(--card); border-bottom: 1px solid var(--border); padding: 14px 26px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.exam-header-left { display: flex; flex-direction: column; gap: 2px; }
.exam-title { font-family: Georgia, serif; font-size: 15px; font-weight: 700; }
.progress-label { font-size: 13px; color: var(--ink-soft); }
.exam-header-right { display: flex; align-items: center; gap: 16px; }
.timer { font-family: "Courier New", monospace; font-size: 18px; font-weight: 700; background: var(--cream); border: 1px solid var(--border); border-radius: 8px; padding: 6px 14px; min-width: 84px; text-align: center; }
.timer.warn { color: var(--amber); border-color: #e9c979; }
.timer.danger { color: var(--red); border-color: #ecc8c8; background: var(--red-bg); }
.exam-body { display: flex; gap: 24px; padding: 26px; max-width: 1180px; margin: 0 auto; align-items: flex-start; }
.palette-panel { width: 210px; flex-shrink: 0; position: sticky; top: 90px; }
.palette-title { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); margin: 0 0 10px; font-weight: 600; }
.palette-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin-bottom: 14px; }
.palette-btn { width: 30px; height: 30px; border-radius: 6px; border: 1px solid var(--border); background: #fff; font-size: 12px; font-weight: 600; color: var(--ink-soft); cursor: pointer; }
.palette-btn.answered { background: #eaf1fd; border-color: #b9cef3; color: var(--blue-dark); }
.palette-btn.current { outline: 2px solid var(--blue); outline-offset: 1px; }
.palette-legend { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--ink-soft); }
.dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-right: 6px; border: 1px solid var(--border); }
.dot-current { outline: 2px solid var(--blue); outline-offset: 1px; }
.dot-answered { background: #eaf1fd; border-color: #b9cef3; }
.question-panel { flex: 1; min-width: 0; }
.question-card { padding: 30px 32px; margin-bottom: 20px; }
.question-text { font-size: 17px; line-height: 1.6; margin: 0 0 22px; }
.options-list { display: flex; flex-direction: column; gap: 10px; }
.option-row { display: flex; align-items: flex-start; gap: 12px; border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; cursor: pointer; background: #fff; }
.option-row:hover { background: #faf8f2; }
.option-row.selected { border-color: var(--blue); background: #f3f6ff; }
.option-row input { margin-top: 3px; accent-color: var(--blue); flex-shrink: 0; }
.option-row .option-text { font-size: 15px; line-height: 1.5; }
.nav-row { display: flex; justify-content: space-between; align-items: center; }
.nav-row-right { display: flex; gap: 10px; }
.palette-btn.pal-correct { background: var(--green-bg); border-color: #bfe5cf; color: var(--green); }
.palette-btn.pal-wrong { background: var(--red-bg); border-color: #ecc8c8; color: var(--red); }

/* per-question confirm feedback */
.feedback-box { margin-top: 20px; padding: 16px 18px; border-radius: 10px; border: 1px solid var(--border); }
.feedback-box.fb-correct { background: var(--green-bg); border-color: #bfe5cf; }
.feedback-box.fb-wrong { background: var(--red-bg); border-color: #ecc8c8; }
.fb-verdict { font-weight: 700; font-size: 15px; margin-bottom: 8px; }
.fb-correct .fb-verdict { color: var(--green); }
.fb-wrong .fb-verdict { color: var(--red); }
.fb-explain { font-size: 14px; line-height: 1.6; color: var(--ink); }
.fb-explain strong { color: var(--ink); }
.option-row.correct-answer { border-color: #bfe5cf; background: var(--green-bg); }
.option-row.your-wrong { border-color: #ecc8c8; background: var(--red-bg); }
.option-row.locked { pointer-events: none; }
.option-row.correct-answer input { accent-color: var(--green); }
.option-row.your-wrong input { accent-color: var(--red); }
.option-row .tag { font-size: 11px; font-weight: 700; margin-left: 8px; }
.option-row.correct-answer .tag { color: var(--green); }
.option-row.your-wrong .tag { color: var(--red); }

/* review */
.review-item { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 20px 24px; margin-bottom: 16px; }
.review-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.review-qnum { font-size: 12px; color: var(--ink-soft); font-weight: 600; }
.review-domain { font-size: 11px; color: var(--ink-soft); }
.badge { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 20px; white-space: nowrap; }
.badge-correct { background: var(--green-bg); color: var(--green); }
.badge-incorrect { background: var(--red-bg); color: var(--red); }
.badge-skipped { background: #f1eee3; color: var(--ink-soft); }
.review-question { font-size: 15px; line-height: 1.55; margin: 0 0 12px; }
.review-option { font-size: 14px; padding: 10px 14px; border-radius: 8px; border: 1px solid var(--border); margin-bottom: 6px; line-height: 1.5; }
.review-option.your-wrong { background: var(--red-bg); border-color: #ecc8c8; }
.review-option.correct-answer { background: var(--green-bg); border-color: #bfe5cf; }
.review-option .tag { font-size: 11px; font-weight: 700; margin-left: 8px; }
.review-option.your-wrong .tag { color: var(--red); }
.review-option.correct-answer .tag { color: var(--green); }
.review-explain { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--border); font-size: 13.5px; color: var(--ink-soft); line-height: 1.6; }
.review-explain strong { color: var(--ink); }

.section-title { font-size: 15px; font-weight: 700; margin: 26px 0 12px; }
.result-headline.pass { color: var(--green); }
.result-headline.fail { color: var(--red); }
.spinner { text-align: center; color: var(--ink-soft); padding: 40px; }

@media (max-width: 820px) {
  .exam-body { flex-direction: column; }
  .palette-panel { width: 100%; position: static; }
  .palette-grid { grid-template-columns: repeat(10, 1fr); }
}

/* ---- admin ---- */
.admin-user { padding: 0; margin-bottom: 12px; overflow: hidden; }
.admin-user-head { display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 16px 18px; cursor: pointer; flex-wrap: wrap; }
.admin-user-head:hover { background: var(--cream); }
.admin-sub { font-size: 12px; color: var(--ink-soft); font-weight: 400; }
.admin-user-nums { display: flex; gap: 14px; font-size: 13px; color: var(--ink-soft); flex-wrap: wrap; }
.admin-user-nums span { white-space: nowrap; }
.admin-user-body { padding: 0 18px 18px; }
.admin-detail-card { padding: 22px 24px; }
.admin-detail-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.admin-detail-head .result-headline { margin: 0; }
/* 5 stat cards in one row are tighter than the results screen's 3 — shrink the
   numbers and keep them on a single line so no card wraps and grows taller. */
.admin-detail-card .stat { min-width: 120px; padding: 14px 12px; }
.admin-detail-card .stat .num { font-size: 22px; white-space: nowrap; }

/* Multiple-response items: the guide's format states how many to select. */
.select-hint {
  margin: 0 0 14px; font-size: 13px; font-weight: 600;
  color: #8a6d3b; background: #fdf6e3; border: 1px solid #f0e3c0;
  border-radius: 8px; padding: 8px 12px; display: inline-block;
}
.select-hint.complete { color: #2d6a4f; background: #eef7f1; border-color: #cfe6da; }
.select-hint.hidden { display: none; }

/* ---------- Study plan ----------
   Hero, paired panels, a numbered module list, then a card grid.
   Built on this app's own tokens rather than a CDN framework, so the page
   loads nothing extra and matches the rest of the product. */

/* Hero: intro on the left, exam figures on the right. */
.study-hero { margin-bottom: 30px; }
.hero-eyebrow { text-transform: uppercase; font-size: 11.5px; letter-spacing: .09em; font-weight: 700; color: var(--blue-dark); margin: 0 0 10px; }
.hero-title { font-family: Georgia, "Times New Roman", serif; font-size: 30px; line-height: 1.2; margin: 0 0 12px; }
.hero-desc { font-size: 15.5px; line-height: 1.6; color: var(--ink-soft); margin: 0 0 20px; max-width: 56ch; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }


/* Two panels side by side: weighting and the checklist. */
.panel-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 34px; }
.panel { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 20px 22px; }
.panel-head { display: flex; align-items: center; gap: 11px; margin-bottom: 14px; }
.panel-head h2 { margin: 0; font-size: 16px; }
.icon-circle { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
.icon-circle.blue { background: #eaf1fd; color: var(--blue-dark); }
.icon-circle.green { background: var(--green-bg); color: var(--green); }
.check-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 11px; }
.check-list li { display: flex; gap: 10px; font-size: 13.5px; line-height: 1.55; color: var(--ink-soft); }
.check-list .tick { color: var(--green); font-weight: 700; flex-shrink: 0; }

/* Section heading with a count on the right of the rule. */
.sec-head { display: flex; align-items: baseline; gap: 12px; border-bottom: 1px solid var(--border); padding-bottom: 8px; margin: 0 0 6px; flex-wrap: wrap; }
.sec-head h2 { font-family: Georgia, serif; font-size: 21px; margin: 0; }
.sec-count { font-size: 12.5px; color: var(--ink-soft); font-weight: 600; }
.sec-note { font-size: 13.5px; color: var(--ink-soft); line-height: 1.55; margin: 12px 0 14px; }
.study-section { margin-bottom: 34px; }

/* Numbered module rows — the primary path through a track. */
.module-row {
  display: flex; align-items: center; gap: 18px; text-decoration: none; color: inherit;
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  padding: 14px 18px; margin-bottom: 8px; transition: border-color .15s, box-shadow .15s, background .15s;
}
.module-row:hover { border-color: var(--blue); box-shadow: 0 2px 10px rgba(30,79,216,.08); }
.module-num { font-family: Georgia, serif; font-size: 26px; font-weight: 700; color: var(--border); flex-shrink: 0; min-width: 38px; transition: color .15s; }
.module-row:hover .module-num { color: var(--blue); }
.module-main { flex: 1 1 auto; min-width: 0; }
.module-title { font-weight: 650; font-size: 15px; display: block; }
.module-desc { margin: 3px 0 0; font-size: 13px; line-height: 1.5; color: var(--ink-soft); }
.module-open { flex-shrink: 0; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--blue); white-space: nowrap; }
.module-row:hover .module-open { text-decoration: underline; }

/* Supporting courses as a card grid. */
.course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 12px; }
.course-card {
  display: flex; flex-direction: column; gap: 9px; text-decoration: none; color: inherit;
  background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 16px 17px;
  transition: border-color .15s, box-shadow .15s;
}
.course-card:hover { border-color: var(--blue); box-shadow: 0 2px 10px rgba(30,79,216,.08); }
.course-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.card-num { width: 27px; height: 27px; border-radius: 7px; background: var(--cream); border: 1px solid var(--border); color: var(--ink-soft); font-size: 12.5px; font-weight: 700; display: flex; align-items: center; justify-content: center; transition: background .15s, color .15s, border-color .15s; }
.course-card:hover .card-num { background: var(--blue); color: #fff; border-color: var(--blue); }
.card-out { color: var(--outline, #b8b1a4); font-size: 13px; }
.course-card:hover .card-out { color: var(--blue); }
.card-title { font-weight: 650; font-size: 14.5px; line-height: 1.35; }
.card-desc { font-size: 12.5px; line-height: 1.5; color: var(--ink-soft); margin: 0; }
.course-flags { margin-top: 2px; display: flex; gap: 6px; flex-wrap: wrap; }
.course-flag { font-size: 10.5px; padding: 2px 8px; border-radius: 20px; font-weight: 600; }
.course-flag.heavy { background: #fdf6e3; color: var(--amber); border: 1px solid #f0e3c0; }
.course-flag.key { background: #eaf1fd; color: var(--blue-dark); border: 1px solid #d3e2f7; }

@media (max-width: 900px) {
  .panel-pair { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .module-row { flex-wrap: wrap; gap: 12px; }
  .module-num { min-width: 0; }
  .module-open { flex-basis: 100%; }
  .hero-title { font-size: 25px; }
}
.level-tag {
  display: inline-block; margin-left: 9px; vertical-align: middle;
  font-size: 10.5px; font-weight: 700; letter-spacing: .03em;
  padding: 2px 8px; border-radius: 20px;
  background: var(--cream); border: 1px solid var(--border); color: var(--ink-soft);
}
.card-title + .level-tag { margin-left: 0; align-self: flex-start; }

/* ---------- mobile nav ----------
   The links wrap onto several lines on a phone, so below 780px they collapse
   behind a menu button and drop down as a panel. Desktop is unchanged. */
.topbar-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.nav-toggle {
  display: none; align-items: center; justify-content: center;
  width: 38px; height: 34px; padding: 0; cursor: pointer;
  background: #fff; border: 1px solid var(--border); border-radius: 8px;
}
.nav-toggle:hover { background: var(--cream); }
/* Three bars drawn from one element, so there is no icon font to load. */
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
  display: block; width: 17px; height: 2px; border-radius: 2px;
  background: var(--ink); transition: transform .18s ease, opacity .18s ease;
}
.nav-toggle-bars { position: relative; }
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -5.5px; }
.nav-toggle-bars::after { top: 5.5px; }
.nav-toggle.open .nav-toggle-bars { background: transparent; }
.nav-toggle.open .nav-toggle-bars::before { transform: translateY(5.5px) rotate(45deg); }
.nav-toggle.open .nav-toggle-bars::after { transform: translateY(-5.5px) rotate(-45deg); }

@media (max-width: 780px) {
  .topbar { flex-wrap: nowrap; padding: 10px 16px; }
  .topbar .brand { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .nav-toggle { display: flex; }
  .topbar nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--card); border-bottom: 1px solid var(--border);
    padding: 8px; box-shadow: 0 8px 20px rgba(0,0,0,.07);
  }
  .topbar nav.open { display: flex; }
  .topbar nav a { padding: 11px 13px; font-size: 15px; }
  .topbar .user-chip {
    order: 99; padding: 11px 13px; margin-top: 4px;
    border-top: 1px solid var(--border); word-break: break-all;
  }
  .topbar nav #logout-link { order: 100; }
}

/* Other certifications, offered at the foot of a track's plan. */
.other-certs { margin-top: 40px; }
.other-cert {
  display: flex; flex-direction: column; gap: 5px; text-decoration: none; color: inherit;
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  padding: 18px 19px; transition: border-color .15s, box-shadow .15s;
}
.other-cert:hover { border-color: var(--blue); box-shadow: 0 2px 10px rgba(30,79,216,.08); }
.other-code { font-size: 11.5px; letter-spacing: .1em; font-weight: 700; color: var(--blue-dark); }
.other-name { font-family: Georgia, serif; font-size: 17px; line-height: 1.3; }
.other-meta { font-size: 12.5px; color: var(--ink-soft); }
.other-go { margin-top: 6px; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--blue); }
.other-cert:hover .other-go { text-decoration: underline; }

/* ---------- study progress ---------- */
.progress-box {
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  padding: 14px 16px; margin: 0 0 20px; max-width: 520px;
}
.progress-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 13.5px; color: var(--ink-soft); margin-bottom: 9px; }
.progress-head strong { color: var(--ink); font-size: 15px; }
.progress-pct { font-weight: 700; color: var(--green); }
.progress-track { height: 8px; background: var(--border); border-radius: 6px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--green); border-radius: 6px; transition: width .25s ease; }

.done-btn {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  font-family: inherit; font-size: 12px; font-weight: 700; letter-spacing: .02em;
  padding: 6px 11px; border-radius: 20px; white-space: nowrap;
  background: #fff; border: 1px solid var(--border); color: var(--ink-soft);
  transition: background .15s, border-color .15s, color .15s;
}
.done-btn:hover { background: var(--cream); color: var(--ink); }
.done-btn .done-tick { font-size: 12px; line-height: 1; opacity: .45; }
.done-btn.on { background: var(--green-bg); border-color: #bfe3ce; color: var(--green); }
.done-btn.on .done-tick { opacity: 1; }
.done-btn:disabled { opacity: .55; cursor: default; }

/* A completed course stays readable but recedes, so what is left stands out. */
.module-row.is-done, .course-card.is-done { background: #fcfbf8; border-color: #ded7c6; }
.module-row.is-done .module-title, .course-card.is-done .card-title { color: var(--ink-soft); }
.module-row.is-done .module-num { color: var(--green); }

.module-actions { flex-shrink: 0; display: flex; align-items: center; gap: 12px; }
.card-actions { margin-top: 4px; }
.module-title { color: inherit; text-decoration: none; }
.module-title:hover { color: var(--blue); text-decoration: underline; }
.card-title { color: inherit; text-decoration: none; }
.card-title:hover { color: var(--blue); text-decoration: underline; }
.card-out { text-decoration: none; }

@media (max-width: 560px) {
  .module-actions { flex-basis: 100%; justify-content: space-between; }
}

/* Coursework progress on the dashboard and in the admin list. */
.study-card { padding: 16px 18px; margin-bottom: 26px; }
.study-card-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 11px; }
.admin-study { margin-top: 5px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12px; color: var(--ink-soft); }
.study-chip {
  font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 20px;
  background: var(--cream); border: 1px solid var(--border); color: var(--ink-soft);
}
.study-chip.part { background: #eaf1fd; border-color: #d3e2f7; color: var(--blue-dark); }
.study-chip.full { background: var(--green-bg); border-color: #bfe3ce; color: var(--green); }

/* ---------- dashboard ---------- */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 26px; }
.kpi { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 15px 16px; }
.kpi-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-soft); font-weight: 700; margin-bottom: 10px; }
.kpi-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.kpi-value { font-family: Georgia, serif; font-size: 28px; font-weight: 700; line-height: 1; display: block; }
.kpi-note { display: block; font-size: 11.5px; color: var(--ink-soft); margin-top: 4px; }
.kpi-delta { display: inline-block; font-size: 11px; font-weight: 700; margin-top: 5px; }
.kpi-delta.up { color: var(--green); }
.kpi-delta.down { color: var(--red); }
.kpi-viz { color: var(--blue); flex-shrink: 0; display: flex; align-items: flex-end; }
.mini-bars { display: flex; align-items: flex-end; gap: 3px; height: 26px; }
.mini-bars i { width: 8px; background: #cfdcf7; border-radius: 2px 2px 0 0; display: block; }
.mini-bars i.top { background: var(--blue); }
.mini-bar { width: 68px; height: 7px; background: var(--border); border-radius: 6px; overflow: hidden; }
.mini-bar i { display: block; height: 100%; background: var(--green); }

.dash-split { display: grid; grid-template-columns: 1fr 300px; gap: 18px; margin-bottom: 30px; align-items: start; }
.cta-panel { background: var(--card); border: 1px solid var(--border); border-left: 4px solid var(--blue); border-radius: 12px; padding: 18px 20px; }
.cta-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.cta-title { font-family: Georgia, serif; font-size: 19px; margin: 0 0 4px; }
.cta-sub { margin: 0; font-size: 13.5px; color: var(--ink-soft); line-height: 1.5; }
.cta-panel .study-card { border: 1px solid var(--border); box-shadow: none; margin-bottom: 14px; }

.quick-card { padding: 16px 18px; }
.quick-title { font-size: 10.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-soft); font-weight: 700; margin-bottom: 12px; }
.quick-row { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; padding: 7px 0; border-top: 1px solid #f2eee4; }
.quick-row:first-of-type { border-top: none; }
.quick-row span { color: var(--ink-soft); }

.table-wrap { overflow-x: auto; }
.table tbody tr:hover { background: #fbf9f4; }
.best-row { background: #f4f8fd; }
.best-row:hover { background: #eaf1fd; }
.best-star { color: var(--gold); margin-right: 5px; }

@media (max-width: 900px) { .dash-split { grid-template-columns: 1fr; } }
