/* ── Variables ─────────────────────────────────────────────────────────────── */
:root {
  --bg:       #090e1b;
  --bg-2:     #060c18;
  --header:   rgba(6,10,20,0.68);
  --panel:    rgba(13,22,44,0.55);
  --panel2:   rgba(10,18,42,0.62);
  --accent1:  #2d7dd2;
  --accent2:  #60a5fa;
  --accent:   linear-gradient(90deg,var(--accent1),var(--accent2));
  --text:     #d4dde8;
  --sub:      #6878a0;
  --border:   rgba(255,255,255,0.06);
  --glass:    rgba(255,255,255,0.03);
  --green:    #1dd1a1;
  --red:      #e74c3c;
  --gold:     #f1c40f;
  --warn:     #f39c12;
}

/* ── Reset ─────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
body {
  background-color: var(--bg);
  background-image: radial-gradient(circle at 12% 14%, rgba(45,125,210,0.07), transparent 20%),
                    radial-gradient(circle at 88% 78%, rgba(96,165,250,0.04), transparent 20%),
                    linear-gradient(180deg, rgba(9,14,27,1) 0%, rgba(6,12,24,1) 100%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  min-height: 100vh; line-height: 1.6; -webkit-font-smoothing:antialiased;
}

/* Subtle animated accent underline for links */
a { color: var(--accent1); text-decoration: none; position: relative; }
a::after { content: ''; position: absolute; left: 0; bottom: -2px; height: 2px; width: 0; background: var(--accent1); transition: width .15s ease; }
a:hover::after { width: 100%; background: linear-gradient(90deg,var(--accent1),var(--accent2)); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Navbar ────────────────────────────────────────────────────────────────── */
.navbar {
  background: var(--header);
  backdrop-filter: blur(8px) saturate(120%);
  -webkit-backdrop-filter: blur(8px) saturate(120%);
  border-bottom: 1px solid rgba(255,255,255,0.03);
  display: flex; align-items: center; justify-content: space-between;
  padding: .75rem 2rem; position: sticky; top: 0; z-index: 100;
  box-shadow: 0 6px 18px rgba(2,6,23,0.6);
}
.nav-brand { font-size: 1.1rem; font-weight: 700; color: var(--text); letter-spacing: .6px; display:flex; align-items:center; gap:.6rem; }
.nav-brand .logo-dot { width:10px; height:10px; border-radius:50%; background: linear-gradient(90deg,var(--accent1),var(--accent2)); box-shadow:0 4px 18px rgba(45,125,210,0.2) inset; }
.nav-links  { display: flex; align-items: center; gap: 1.25rem; font-size: .9rem; }
.nav-links a { color: var(--sub); }
.nav-links a:hover { color: var(--text); text-decoration: none; }
.nav-user { color: var(--sub); font-size: .85rem; }

/* ── Main content ──────────────────────────────────────────────────────────── */
.main-content { max-width: 1200px; margin: 0 auto; padding: 2.5rem 1.5rem; }

/* Glassy card utility */
.glass { background: var(--glass); border: 1px solid var(--border); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); box-shadow: 0 8px 30px rgba(2,6,23,0.6); }

/* ── Buttons ───────────────────────────────────────────────────────────────── */
.btn-primary, .btn-secondary, .btn-ghost {
  display: inline-block; padding: .6rem 1.25rem;
  border-radius: 8px; font-size: .95rem; font-weight: 700;
  cursor: pointer; border: none; transition: transform .12s ease, box-shadow .12s ease, opacity .12s ease;
  text-decoration: none; vertical-align: middle;
}
.btn-primary {
  background: linear-gradient(90deg,var(--accent1),var(--accent2)); color: #fff;
  box-shadow: 0 8px 22px rgba(45,125,210,0.22), 0 2px 6px rgba(0,0,0,0.35);
}
.btn-primary:hover { transform: translateY(-2px); opacity: .98; }
.btn-secondary { background: rgba(255,255,255,0.04); color: var(--text); border: 1px solid rgba(255,255,255,0.06); }
.btn-secondary:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,0.45); }
.btn-ghost { background: transparent; color: var(--sub); border: 1px solid rgba(255,255,255,0.04); }
.btn-ghost:hover { color: var(--text); border-color: rgba(255,255,255,0.08); }
.btn-full   { width: 100%; text-align: center; }
.btn-large  { padding: .75rem 2rem; font-size: 1rem; }
.btn-sm     { padding: .3rem .75rem; font-size: .8rem; }

/* ── Auth pages ────────────────────────────────────────────────────────────── */
.auth-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.auth-card {
  border-radius: 14px; padding: 2.5rem 2rem; width: 100%; max-width: 460px;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  border: 1px solid rgba(255,255,255,0.04); backdrop-filter: blur(6px);
  box-shadow: 0 12px 40px rgba(2,6,23,0.6);
}
.auth-logo  { font-size: 2.5rem; text-align: center; margin-bottom: .5rem; }
.auth-title { text-align: center; font-size: 1.5rem; margin-bottom: .25rem; }
.auth-sub   { text-align: center; color: var(--sub); font-size: .9rem; margin-bottom: 1.75rem; }
.auth-footer { text-align: center; margin-top: 1.25rem; font-size: .85rem; color: var(--sub); }

/* ── Forms ─────────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-size: .85rem; color: var(--sub); margin-bottom: .35rem; }
.form-group input, .short-field {
  width: 100%; padding: .6rem .85rem;
  background: var(--panel2); border: 1px solid var(--border);
  border-radius: 6px; color: var(--text); font-size: .95rem;
}
.form-group input:focus, .short-field:focus {
  outline: none; border-color: var(--accent);
}

/* ── Alerts ────────────────────────────────────────────────────────────────── */
.alert { padding: .7rem 1rem; border-radius: 6px; margin-bottom: 1rem; font-size: .9rem; }
.alert-error { background: #2a0d0d; border: 1px solid var(--red); color: var(--red); }
.alert-warning { background: #2a200d; border: 1px solid var(--warn); color: var(--warn); }
.alert-block { background: #0d1428; border: 1px solid var(--warn); border-radius: 8px; padding: 1.25rem; margin-bottom: 1.5rem; }
.alert-block h3 { color: var(--warn); margin-bottom: .75rem; }

/* ── Selector ──────────────────────────────────────────────────────────────── */
.selector-header {
  margin-bottom: 1.75rem;
  display: flex; align-items: center;
}
.selector-header-text { flex: 1; }
.selector-header-right { flex: 1; display: flex; justify-content: flex-end; align-items: center; }
.selector-header h1 { font-size: 1.6rem; }
.selector-header .sub { color: var(--sub); margin-top: .25rem; }
.topic-stars-label {
  font-size: .78rem; font-weight: 700; color: #b8860b;
  white-space: nowrap;
}

.content-ring-wrap {
  display: flex; flex-direction: column; align-items: center; gap: .3rem;
  flex-shrink: 0;
}
.content-ring-svg-wrap {
  position: relative; width: 80px; height: 80px; flex-shrink: 0;
}
.content-ring { transform: rotate(-90deg); display: block; }
.content-ring-track { fill: none; stroke: rgba(45,125,210,0.2); stroke-width: 8; }
.content-ring-fill {
  fill: none; stroke: var(--accent1); stroke-width: 8; stroke-linecap: round;
  transition: stroke-dashoffset .6s ease;
}
.star-ring-fill { stroke: #f5c518; }
.content-ring-track.gold-track { stroke: rgba(245,197,24,.18); }
.content-ring-pct {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: .82rem; font-weight: 700; color: var(--text);
  white-space: nowrap; pointer-events: none;
}
.star-ring-pct { font-size: 1rem; }
.ring-sub-label {
  font-size: .68rem; font-weight: 700; color: #f5c518;
  white-space: nowrap; text-align: center; line-height: 1;
}

.unit-group { margin-bottom: 1.5rem; }
.unit-group-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: .65rem 1rem;
  border-radius: 10px;
  background: linear-gradient(90deg, rgba(45,125,210,.08), rgba(255,255,255,.01));
  border: 1px solid rgba(255,255,255,0.06);
  margin-bottom: 0;
  cursor: pointer; user-select: none;
}
.unit-group-header:hover { background: linear-gradient(90deg, rgba(45,125,210,.13), rgba(255,255,255,.03)); }
.unit-group-header-left { display: flex; align-items: center; gap: .55rem; }
.unit-code {
  font-size: .7rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--accent1);
  background: rgba(45,125,210,.14); border-radius: 4px;
  padding: .15rem .45rem;
}
.unit-title { font-size: .95rem; font-weight: 700; color: var(--text); }
.unit-chevron {
  font-size: 1rem; color: var(--sub);
  transition: transform .14s ease; flex-shrink: 0;
  transform: rotate(90deg);
}
.unit-group.collapsed .unit-chevron { transform: rotate(0deg); }
.unit-group-body {
  overflow: hidden; max-height: 3000px;
  transition: max-height .18s ease;
  padding-top: 1rem;
}
.unit-group.collapsed .unit-group-body { max-height: 0; padding-top: 0; }
.unit-empty-state {
  display: flex; align-items: center; gap: 1rem;
  padding: 1.1rem 1.25rem; margin-bottom: .5rem;
  border-radius: 10px; border: 1px dashed rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.02);
}
.unit-empty-icon { font-size: 1.4rem; opacity: .4; flex-shrink: 0; }
.unit-empty-title { font-size: .88rem; font-weight: 600; color: var(--sub); margin: 0 0 .2rem; }
.unit-empty-sub { font-size: .75rem; color: var(--sub); opacity: .7; margin: 0; }

.topic-block { border-radius: 10px; overflow: hidden; margin-bottom: 1.5rem; background: linear-gradient(180deg, rgba(255,255,255,0.01), rgba(255,255,255,0.02)); border: 1px solid rgba(255,255,255,0.03); backdrop-filter: blur(6px); }
.topic-header {
  background: var(--header); padding: .85rem 1.25rem;
  display: flex; justify-content: space-between; align-items: center;
  border-bottom: 1px solid var(--border);
  cursor: pointer; user-select: none;
}
.topic-header-left { flex: 1; min-width: 0; }
.topic-num  { color: var(--accent); font-weight: 700; font-size: .9rem; }
.topic-title { font-weight: 600; font-size: 1rem; }
.topic-meta-wrap { flex: 1; display: flex; justify-content: flex-end; align-items: center; }
.topic-meta  { color: var(--sub); font-size: .85rem; display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; justify-content: flex-end; }
.topic-chip {
  font-size: .7rem; font-weight: 600; padding: .2rem .55rem;
  border-radius: 20px; border: 1px solid var(--border);
  color: var(--sub); background: var(--panel); white-space: nowrap;
}
.chip-done   { color: var(--green); border-color: rgba(29,209,161,.5);  background: rgba(29,209,161,.08); }
.chip-partial { color: var(--warn);  border-color: rgba(255,193,64,.5);  background: rgba(255,193,64,.08); }
.chip-todo   { color: var(--sub);   border-color: var(--border); }
.chip-locked { color: var(--sub); opacity: .5; border-color: var(--border); }
/* shared stars column — identical in selector header and every topic row */
.stars-col { width: 100px; flex-shrink: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.topic-stars-label { font-size: .78rem; font-weight: 700; color: #b8860b; white-space: nowrap; }
.topic-chevron { font-size: .8rem; transition: transform .12s; display: inline-block; }
.topic-chevron.open { transform: rotate(90deg); }
.topic-bank-avg { font-size: .75rem; font-weight: 700; padding: .15rem .5rem; border-radius: 4px; }

.section-list { display: flex; flex-direction: column; overflow: hidden; max-height: 3000px; transition: max-height .18s ease; }
.section-list.collapsed { max-height: 0; }
.section-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: .95rem 1.25rem; border-bottom: 1px solid rgba(255,255,255,0.03);
  background: rgba(255,255,255,0.02); color: var(--text); transition: transform .12s ease, background .12s ease, box-shadow .12s ease;
}
.section-row:last-child { border-bottom: none; }
.section-row:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(2,6,23,0.55); }
.section-row.section-done { background: #0d1a2e; }
.section-row.section-locked {
  cursor: default;
  background: rgba(255,193,64,.04);
  border-left: 3px solid rgba(255,193,64,.6);
}
.section-row.section-locked:hover { transform: none; box-shadow: none; }
.section-row.section-locked .section-ref   { color: var(--warn); opacity: .8; }
.section-row.section-locked .section-title { color: var(--warn); font-weight: 600; }
.section-row.section-locked .section-icon  { filter: grayscale(1); opacity: .5; }
.locked-badge {
  font-size: .7rem; font-weight: 700;
  color: var(--warn); background: rgba(255,193,64,.15);
  border: 1px solid rgba(255,193,64,.45);
  border-radius: 20px; padding: .25rem .7rem; white-space: nowrap;
}
.section-row.section-quiz  { background: #0d1428; }
.section-row.section-bank  { background: #0a1526; }

.section-accordion { flex-direction: column; align-items: stretch; padding: 0; cursor: default; }
.section-accordion:hover { transform: none; box-shadow: none; }
.section-row-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: .95rem 1.25rem; cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease;
}
.section-row-header:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(2,6,23,0.55); }
.section-chevron { color: var(--sub); font-size: .85rem; transition: transform .12s; }
.section-chevron.open { transform: rotate(90deg); }
.section-body { max-height: 0; overflow: hidden; transition: max-height .15s ease; }
.section-body.open { max-height: 120px; }
.section-body-inner { padding: .6rem 1.25rem .9rem; border-top: 1px solid rgba(255,255,255,.04); display: flex; align-items: center; gap: 1rem; }
.btn-go-lesson { display: inline-block; padding: .4rem 1rem; border-radius: 6px; background: var(--accent); color: #fff; font-size: .85rem; font-weight: 600; text-decoration: none; }
.btn-go-lesson:hover { opacity: .85; }

.section-left  { display: flex; align-items: center; gap: .85rem; }
.section-icon  { font-size: 1.25rem; }
.section-info  { display: flex; flex-direction: column; gap: .1rem; }
.section-ref   { font-size: .75rem; color: var(--accent); font-weight: 600; }
.section-title { font-size: .95rem; font-weight: 500; }
.section-title-muted { font-size: .85rem; color: var(--sub); }
.section-right { display: flex; align-items: center; gap: .75rem; }
.chevron { color: var(--sub); font-size: 1.1rem; }

.score-pill {
  font-size: .8rem; font-weight: 700; padding: .2rem .6rem;
  border-radius: 4px; white-space: nowrap;
}
.score-good { background: #0d2a1a; color: var(--green); }
.score-warn { background: #2a200d; color: var(--warn); }
.score-bad  { background: #2a0d0d; color: var(--red); }
.quiz-score-stack { display: flex; flex-direction: column; align-items: flex-end; gap: .25rem; }
.score-best { opacity: .75; font-size: .72rem; }
.pct-badge {
  display: inline-block; padding: .18rem .55rem; border-radius: 20px;
  font-size: .78rem; font-weight: 700;
}
.pct-good { background: #0d2a1a; color: var(--green); }
.pct-warn { background: #2a200d; color: var(--warn); }
.pct-bad  { background: #2a0d0d; color: var(--red); }

.badge-complete {
  background: #0d2a1a; color: var(--green);
  font-size: .72rem; font-weight: 700; padding: .15rem .5rem;
  border-radius: 3px; letter-spacing: .5px;
}

/* ── Completion ────────────────────────────────────────────────────────────── */
.centered-page { display: flex; justify-content: center; padding: 2rem 1rem; }
.completion-card {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 14px; padding: 2.5rem; max-width: 720px; width: 100%;
}
.completion-icon { font-size: 3rem; text-align: center; margin-bottom: .75rem; }
.completion-card h2 { text-align: center; font-size: 1.4rem; }
.completion-card .sub { text-align: center; color: var(--sub); margin-top: .25rem; }
.score-big { text-align: center; font-size: 2.5rem; font-weight: 700; margin: 1rem 0; }
.score-big-good { color: var(--green); }
.score-big-warn { color: var(--warn); }
.score-big-bad  { color: var(--red); }
.score-pct { font-size: 1.2rem; font-weight: 400; margin-left: .5rem; }
.completion-actions { display: flex; gap: .75rem; flex-wrap: wrap; justify-content: center; margin-top: 1.75rem; }

.response-review { margin-top: 1.75rem; }
.response-review h3 { font-size: 1rem; color: var(--sub); margin-bottom: .75rem; }
.review-row { border-bottom: 1px solid var(--border); padding: .65rem 0; }
.review-q { font-size: .9rem; margin-bottom: .3rem; display: flex; gap: .5rem; }
.review-answer { font-size: .85rem; padding: .25rem .5rem; border-radius: 4px; }
.review-correct { background: #0d2a1a; color: var(--green); }
.review-wrong   { background: #2a0d0d; color: var(--red); }
.review-note    { color: var(--sub); }

/* ── Quiz ──────────────────────────────────────────────────────────────────── */
.quiz-page { max-width: 760px; margin: 0 auto; }
.quiz-header { margin-bottom: 1.75rem; }
.quiz-header h2 { font-size: 1.4rem; margin-top: .2rem; }
.bank-stats-bar { display: flex; gap: 1.5rem; margin-top: .5rem; font-size: .85rem; color: var(--sub); }
.bank-stats-bar strong { color: var(--text); }
.bank-stats-compact { display: flex; flex-wrap: wrap; column-gap: 1rem; row-gap: .1rem; margin-top: .25rem; font-size: .78rem; color: var(--sub); line-height: 1.45; }
.bank-stats-compact .low-evidence { color: var(--warn); font-style: normal; }
.section-bank .section-left { align-items: flex-start; }

.quiz-question-card {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 10px; padding: 1.5rem; margin-bottom: 1.25rem;
}
.q-number { font-size: .75rem; color: var(--accent); font-weight: 700;
  text-transform: uppercase; letter-spacing: 1px; margin-bottom: .4rem; }
.q-text { font-size: 1rem; margin-bottom: .85rem; line-height: 1.6; }
.q-area { font-size: .72rem; color: var(--sub); background: var(--panel2);
  display: inline-block; padding: .15rem .45rem; border-radius: 3px;
  margin-bottom: .5rem; }

.options-list { list-style: none; display: flex; flex-direction: column; gap: .5rem; }
.option-label {
  display: flex; align-items: center; gap: .6rem;
  background: var(--panel2); border: 1px solid var(--border);
  border-radius: 6px; padding: .65rem .9rem; cursor: pointer;
  transition: border-color .1s; font-size: .95rem;
}
.option-label:hover { border-color: var(--accent); }
.option-label input { accent-color: var(--accent); }
.option-label.correct { border-color: var(--green); background: #0d2a1a; }
.option-label.wrong { border-color: var(--red); background: #2a0d0d; }

.option-btn {
  width: 100%; background: var(--panel2); border: 1px solid var(--border);
  border-radius: 6px; padding: .65rem .9rem; text-align: left;
  color: var(--text); cursor: pointer; font-size: .95rem; transition: border-color .1s;
}
.option-btn:hover   { border-color: var(--accent); }
.option-btn.selected { border-color: var(--accent); background: #0d182e; }
.option-btn.correct  { border-color: var(--green);  background: #0d2a1a; }
.option-btn.wrong    { border-color: var(--red);    background: #2a0d0d; }

.quiz-footer { display: flex; gap: 1rem; align-items: center; margin-top: 1.5rem; }

/* ── Data tables ───────────────────────────────────────────────────────────── */
.data-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.data-table th {
  background: var(--header); padding: .55rem .75rem;
  text-align: left; font-weight: 600; color: var(--sub);
  font-size: .78rem; text-transform: uppercase; letter-spacing: .5px;
}
.data-table td {
  padding: .55rem .75rem; border-bottom: 1px solid var(--border);
  vertical-align: middle; font-variant-numeric: tabular-nums;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: rgba(255,255,255,.015); }

/* ── Dashboard ─────────────────────────────────────────────────────────────── */
.dash-page  { max-width: 1000px; margin: 0 auto; }
.dash-title { font-size: 1.5rem; margin-bottom: 1.5rem; }
.dash-back  { margin-bottom: 1rem; font-size: .85rem; }
.dash-back a { color: var(--sub); }

.class-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.class-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: 10px;
  padding: 1.25rem; display: block; color: var(--text); transition: border-color .12s;
}
.class-card:hover { border-color: var(--accent); text-decoration: none; }
.class-name { font-size: 1rem; font-weight: 600; margin-bottom: .3rem; }
.class-meta { color: var(--sub); font-size: .85rem; margin-bottom: .5rem; }
.class-code { font-size: .8rem; color: var(--sub); }
.class-code code { color: var(--text); background: var(--panel2); padding: .1rem .35rem; border-radius: 3px; }

.student-chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.5rem; }
.student-chip {
  background: var(--panel2); border: 1px solid var(--border);
  border-radius: 20px; padding: .3rem .85rem; font-size: .85rem;
  color: var(--text); transition: border-color .12s;
}
.student-chip:hover { border-color: var(--accent); text-decoration: none; }

.section-block { margin-bottom: 1.75rem; }
.section-block h3 { font-size: 1rem; margin-bottom: .75rem; color: var(--sub); }

.sub-section { padding: 1rem 1.25rem; border-top: 1px solid var(--border); }
.sub-section h4 { font-size: .85rem; color: var(--sub); text-transform: uppercase;
  letter-spacing: .5px; margin-bottom: .65rem; }

/* ── Stats pills ───────────────────────────────────────────────────────────── */
.stat-pills { display: flex; flex-wrap: wrap; gap: .5rem; }
.stat-pill {
  background: var(--panel2); border: 1px solid var(--border);
  border-radius: 5px; padding: .3rem .75rem; font-size: .82rem; color: var(--sub);
}
.stat-pill strong { color: var(--text); }

/* ── Area bars ─────────────────────────────────────────────────────────────── */
.area-bars { display: flex; flex-direction: column; gap: .5rem; }
.area-row  { display: flex; align-items: center; gap: .75rem; font-size: .85rem; }
.area-name { width: 200px; flex-shrink: 0; color: var(--sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.area-bar-wrap { flex: 1; background: var(--border); border-radius: 4px; height: 8px; }
.area-bar { height: 8px; border-radius: 4px; transition: width .18s; min-width: 2px; }
.bar-good { background: var(--green); }
.bar-warn { background: var(--warn); }
.bar-bad  { background: var(--red); }
.area-pct { width: 110px; flex-shrink: 0; color: var(--sub); text-align: right; }
.area-trend { width: 220px; flex-shrink: 0; text-align: center; }
.area-sparkline { width: 190px; margin: 0 auto; opacity: .9; }
.area-trend-range { display: block; color: var(--sub); font-size: .66rem; margin-top: .12rem; white-space: nowrap; }

/* ── Progress page specific ────────────────────────────────────────────────── */
.spec-sm { font-size: .72rem; color: var(--accent); font-weight: 600;
  display: block; margin-bottom: .1rem; }

/* ── Where to focus panel ─────────────────────────────────────────────────── */
.focus-panel { margin-bottom: 1.75rem; }
.focus-panel-label { font-size: .72rem; text-transform: uppercase; letter-spacing: 1.5px; color: var(--sub); font-weight: 700; margin-bottom: .65rem; }
.focus-cards { display: flex; gap: 1rem; flex-wrap: wrap; }
.focus-card {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  flex: 1; min-width: 180px;
  background: var(--panel); border: 1px solid var(--border); border-radius: 7px;
  padding: .7rem 1rem;
}
.focus-card-text { display: flex; flex-direction: column; flex: 1; gap: .1rem; }
.focus-topic-name { font-size: .88rem; font-weight: 600; color: var(--text); }
.focus-spec-ref { font-size: .7rem; color: var(--sub); letter-spacing: .3px; }
.focus-sentence { font-size: .92rem; color: var(--sub); margin: 0; line-height: 1.6; }
.focus-sentence strong { color: var(--text); font-weight: 600; }

/* ── Misc ──────────────────────────────────────────────────────────────────── */
.sub  { color: var(--sub); font-size: .9rem; }
.empty-state { padding: 3rem; text-align: center; color: var(--sub); }
.score-bad  { color: var(--red); }
.score-good { color: var(--green); }

/* Code blocks in question text (J277 Paper 2: OCR Exam Reference Language). Written as ``` fences in the stored
   text; rendered by the codeblocks filter and static/js/codeblocks.js. inline-block + full width so an underlined
   prompt (.pause-prompt) does not underline the code. */
.code-block {
  display: inline-block; width: 100%; box-sizing: border-box;
  margin: .55rem 0 .65rem; padding: .7rem .9rem;
  background: rgba(0,0,0,0.35); border: 1px solid var(--border); border-left: 3px solid var(--accent1);
  border-radius: 6px; overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .9rem; line-height: 1.5; font-weight: 400; color: var(--text);
  white-space: pre; text-decoration: none; text-align: left;
}
.code-block code { font: inherit; background: none; padding: 0; }

/* Logic-gate pictures (J277 2.4): ```logic fences drawn as SVG by static/js/logic.js. Lines use currentColor,
   so a picture in an option turns green / red with the option when it is marked. */
.logic-diagram, .erd-diagram { display: inline-block; vertical-align: middle; line-height: 0; }
.logic-diagram svg, .erd-diagram svg { max-width: 100%; height: auto; overflow: visible; }
/* Entity relationship pictures (H446 1.3.2): ```erd fences drawn by static/js/erd.js, styled like the gates. */
div.logic-diagram, .logic-diagram.logic-block, div.erd-diagram, .erd-diagram.erd-block {
  display: block; width: fit-content; max-width: 100%; margin: .55rem 0 .65rem; padding: .6rem .8rem;
  border: 1px solid var(--border); border-radius: 6px; background: rgba(0,0,0,0.2);
}
