/* ==========================================================================
   Meridian Exam Portal — Design System
   Palette: deep ledger indigo + brass gold + parchment, on an exam-paper /
   hall-ticket motif. Display face Fraunces, body Source Sans 3, data/mono
   IBM Plex Mono for roll numbers, timers and figures.
   ========================================================================== */

:root {
  --ink: #17403a;
  --ink-2: #0d2521;
  --ink-soft: #2c5a52;
  --parchment: #f1ecdf;
  --parchment-2: #e8dfc6;
  --paper: #fbf9f3;
  --white: #ffffff;
  --gold: #c5994f;
  --gold-dark: #a87d3a;
  --terracotta: #b3783e;
  --terracotta-dark: #935f2c;
  --red: #a13d3d;
  --red-bg: #f7e9e6;
  --green: #2f6b4f;
  --green-bg: #e7f0ea;
  --text: #22271f;
  --text-muted: #5f6659;
  --text-on-ink: #edf1ec;
  --text-on-ink-muted: #a9bcb4;
  --border: #ded2af;
  --border-soft: rgba(23, 64, 58, 0.14);

  --font-display: "Fraunces", "Georgia", serif;
  --font-body: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(15, 24, 44, 0.06), 0 1px 1px rgba(15, 24, 44, 0.04);
  --shadow-md: 0 8px 24px rgba(15, 24, 44, 0.10);
  --shadow-lg: 0 24px 60px rgba(15, 24, 44, 0.20);
}

/* ---------- Reset ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); font-weight: 600; line-height: 1.12; }
p { margin: 0; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: inherit; }

:focus-visible {
  outline: 2px solid var(--gold-dark);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 28px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-gold { background: var(--gold); color: var(--ink-2); box-shadow: var(--shadow-sm); }
.btn-gold:hover { background: var(--gold-dark); box-shadow: var(--shadow-md); }

.btn-ink { background: var(--ink); color: var(--text-on-ink); }
.btn-ink:hover { background: var(--ink-2); box-shadow: var(--shadow-md); }

.btn-outline { background: transparent; color: var(--ink); border-color: var(--border-soft); }
.btn-outline:hover { border-color: var(--ink); background: rgba(27, 42, 74, 0.04); }

.btn-outline-light { background: transparent; color: var(--text-on-ink); border-color: rgba(238, 241, 248, 0.35); }
.btn-outline-light:hover { border-color: var(--text-on-ink); background: rgba(255, 255, 255, 0.06); }

.btn-ghost { background: transparent; color: var(--text-on-ink-muted); border-color: rgba(238, 241, 248, 0.18); }
.btn-ghost:hover { color: var(--text-on-ink); border-color: rgba(238, 241, 248, 0.4); }

.btn-danger { background: var(--red-bg); color: var(--red); }
.btn-danger:hover { background: var(--red); color: var(--white); }

.btn-sm { padding: 8px 14px; font-size: 0.85rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.5; pointer-events: none; }

/* ==========================================================================
   Public site chrome (landing / login / register)
   ========================================================================== */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(15, 24, 44, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(238, 241, 248, 0.08);
}
.site-nav .container { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--text-on-ink); }
.brand-logo {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--parchment);
  padding: 3px;
  box-shadow: 0 0 0 1px rgba(197, 153, 79, 0.5);
  flex-shrink: 0;
  overflow: hidden;
}
.brand-logo img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 8px;
  background: linear-gradient(155deg, var(--gold), var(--gold-dark));
  color: var(--ink-2); font-family: var(--font-display); font-weight: 700;
  display: flex; align-items: center; justify-content: center; font-size: 1.05rem;
}
.brand-name { font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; letter-spacing: 0.01em; }
.brand-tag { display: block; font-family: var(--font-mono); font-size: 0.65rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-on-ink-muted); }
.site-nav-links { display: flex; align-items: center; gap: 10px; }

.public-body { background: var(--ink); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: radial-gradient(ellipse 900px 500px at 18% -10%, rgba(200, 155, 60, 0.18), transparent 60%), var(--ink);
  color: var(--text-on-ink);
  padding: 88px 0 120px;
  overflow: hidden;
}
.hero .container { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--gold); border: 1px solid rgba(200, 155, 60, 0.4); border-radius: 999px; padding: 6px 14px;
  margin-bottom: 24px;
}
.eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }
.hero h1 { font-size: clamp(2.4rem, 4.2vw, 3.4rem); letter-spacing: -0.01em; margin-bottom: 22px; }
.hero h1 em { font-style: italic; color: var(--gold); }
.hero p.lead { font-size: 1.12rem; line-height: 1.6; color: var(--text-on-ink-muted); max-width: 46ch; margin-bottom: 36px; }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 44px; }
.hero-meta { display: flex; gap: 32px; flex-wrap: wrap; }
.hero-meta div { border-left: 2px solid rgba(200, 155, 60, 0.5); padding-left: 12px; }
.hero-meta .num { font-family: var(--font-mono); font-size: 1.5rem; font-weight: 600; color: var(--white); display: block; }
.hero-meta .lbl { font-size: 0.82rem; color: var(--text-on-ink-muted); }

/* ---------- Signature element: the Hall Ticket ---------- */
.ticket-wrap { position: relative; display: flex; justify-content: center; }
.ticket {
  width: 100%; max-width: 380px;
  background: var(--parchment);
  color: var(--ink);
  border-radius: var(--radius-lg);
  padding: 28px 26px 24px;
  box-shadow: var(--shadow-lg);
  transform: rotate(3deg);
  position: relative;
  border: 1px solid var(--border);
  animation: ticket-in 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.ticket::before {
  content: "";
  position: absolute; inset: 10px;
  border: 1.5px dashed rgba(27, 42, 74, 0.25);
  border-radius: calc(var(--radius-lg) - 8px);
  pointer-events: none;
}
@keyframes ticket-in {
  from { opacity: 0; transform: rotate(3deg) translateY(24px) scale(0.96); }
  to { opacity: 1; transform: rotate(3deg) translateY(0) scale(1); }
}
.ticket-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 18px; }
.ticket-head .t-label { font-family: var(--font-mono); font-size: 0.65rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); }
.ticket-head .t-title { font-family: var(--font-display); font-size: 1.2rem; font-weight: 600; }
.ticket-body { display: flex; gap: 16px; margin-bottom: 18px; }
.ticket-photo {
  width: 64px; height: 76px; border-radius: 6px; flex-shrink: 0;
  background: linear-gradient(155deg, var(--ink-soft), var(--ink));
  display: flex; align-items: center; justify-content: center;
  color: var(--gold); font-family: var(--font-display); font-size: 1.6rem; font-weight: 600;
  border: 1px solid var(--border);
}
.ticket-fields { flex: 1; display: flex; flex-direction: column; gap: 7px; }
.ticket-field .f-lbl { font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); }
.ticket-field .f-val { font-size: 0.92rem; font-weight: 600; }
.ticket-barcode { display: flex; gap: 3px; align-items: flex-end; height: 30px; margin-bottom: 10px; }
.ticket-barcode span { display: block; background: var(--ink); width: 3px; }
.ticket-foot { display: flex; justify-content: space-between; align-items: center; }
.ticket-foot .f-code { font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-muted); }
.ticket-stamp {
  width: 58px; height: 58px; border-radius: 50%;
  border: 2px solid var(--terracotta);
  color: var(--terracotta-dark);
  display: flex; align-items: center; justify-content: center; text-align: center;
  font-family: var(--font-mono); font-size: 0.55rem; letter-spacing: 0.06em; text-transform: uppercase; font-weight: 700;
  transform: rotate(-14deg);
  opacity: 0.9;
  animation: stamp-in 0.5s ease 0.7s both;
}
@keyframes stamp-in {
  from { opacity: 0; transform: rotate(-14deg) scale(1.6); }
  to { opacity: 0.9; transform: rotate(-14deg) scale(1); }
}
.ticket-glow {
  position: absolute; width: 320px; height: 320px; border-radius: 50%;
  background: radial-gradient(circle, rgba(200, 155, 60, 0.25), transparent 70%);
  top: -60px; right: -60px; z-index: -1;
}

/* ---------- Sections ---------- */
.section { padding: 96px 0; }
.section-paper { background: var(--paper); }
.section-parchment { background: var(--parchment); }
.section-ink { background: var(--ink); color: var(--text-on-ink); }
.section-head { max-width: 640px; margin: 0 auto 56px; text-align: center; }
.section-head .eyebrow { color: var(--gold-dark); border-color: rgba(156, 120, 35, 0.35); }
.section-ink .section-head .eyebrow { color: var(--gold); border-color: rgba(200, 155, 60, 0.4); }
.section-head h2 { font-size: clamp(1.8rem, 3vw, 2.3rem); margin-bottom: 14px; }
.section-head p { color: var(--text-muted); font-size: 1.05rem; line-height: 1.6; }
.section-ink .section-head p { color: var(--text-on-ink-muted); }

/* ---------- Benefits grid (yoga benefits section) ---------- */
.benefit-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.benefit-card { background: var(--white); border: 1px solid var(--border-soft); border-radius: var(--radius-md); padding: 30px 26px; box-shadow: var(--shadow-sm); }
.benefit-card .b-icon { font-size: 1.9rem; margin-bottom: 16px; display: block; }
.benefit-card h3 { font-size: 1.15rem; margin-bottom: 10px; }
.benefit-card p { color: var(--text-muted); font-size: 0.92rem; line-height: 1.6; }

.pathway-pills { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 18px; }
.pathway-pill {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid rgba(200, 155, 79, 0.5); border-radius: 999px; padding: 8px 16px;
  font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.04em; color: var(--gold);
}
.pathway-pill::before { content: "●"; font-size: 0.5rem; color: var(--gold); }

/* ---------- Feature sections (practitioners / instructors) ---------- */
.paper-section { display: grid; grid-template-columns: 220px 1fr; gap: 40px; padding: 44px 0; border-top: 1px solid var(--border); }
.paper-section:last-child { border-bottom: 1px solid var(--border); }
.paper-section-label .ps-mark { width: 34px; height: 3px; background: var(--gold); border-radius: 2px; margin-bottom: 14px; }
.paper-section-label .ps-name { font-family: var(--font-display); font-size: 1.35rem; font-weight: 600; color: var(--ink); line-height: 1.25; }
.paper-section-body h3 { font-size: 1.3rem; margin-bottom: 8px; }
.paper-section-body p.desc { color: var(--text-muted); margin-bottom: 22px; max-width: 60ch; line-height: 1.6; }
.checklist { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 32px; }
.checklist li { display: flex; gap: 10px; align-items: flex-start; font-size: 0.95rem; }
.checklist li::before {
  content: "✓"; flex-shrink: 0; width: 20px; height: 20px; border-radius: 5px;
  background: var(--green-bg); color: var(--green); font-size: 0.72rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center; margin-top: 2px;
}

/* ---------- Stat / trust strip ---------- */
.stat-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: rgba(238, 241, 248, 0.12); border-radius: var(--radius-lg); overflow: hidden; }
.stat-cell { background: var(--ink-2); padding: 30px 24px; }
.stat-cell .s-num { font-family: var(--font-mono); font-size: 2rem; font-weight: 600; color: var(--gold); }
.stat-cell .s-lbl { font-size: 0.85rem; color: var(--text-on-ink-muted); margin-top: 6px; }

/* ---------- CTA banner ---------- */
.cta-banner {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  border-radius: var(--radius-lg);
  padding: 56px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  color: var(--ink-2);
}
.cta-banner h3 { font-size: 1.7rem; margin-bottom: 8px; }
.cta-banner p { color: rgba(15, 24, 44, 0.75); }

/* ---------- Public footer ---------- */
.site-footer { background: var(--ink-2); color: var(--text-on-ink-muted); padding: 56px 0 32px; }
.site-footer .foot-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; flex-wrap: wrap; margin-bottom: 40px; }
.site-footer .foot-bottom { border-top: 1px solid rgba(238, 241, 248, 0.1); padding-top: 24px; font-size: 0.85rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }

/* ==========================================================================
   Auth pages (login / register)
   ========================================================================== */
.auth-shell { min-height: 100vh; display: flex; }
.auth-visual {
  flex: 1; background: var(--ink); position: relative; display: flex; flex-direction: column; justify-content: space-between;
  padding: 48px; color: var(--text-on-ink); overflow: hidden;
}
.auth-visual::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse 700px 500px at 80% 100%, rgba(200, 155, 60, 0.16), transparent 60%);
}
.auth-visual-quote { position: relative; z-index: 1; max-width: 40ch; font-family: var(--font-display); font-size: 1.5rem; line-height: 1.4; }
.auth-visual-quote span { display: block; margin-top: 16px; font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-on-ink-muted); }
.auth-form-side { width: 460px; max-width: 100%; display: flex; align-items: center; justify-content: center; padding: 40px; background: var(--paper); }
.auth-card { width: 100%; max-width: 360px; }
.auth-card h1 { font-size: 1.7rem; margin-bottom: 8px; }
.auth-card p.sub { color: var(--text-muted); margin-bottom: 28px; }
.demo-box {
  margin-top: 28px; padding: 16px 18px; background: var(--parchment); border: 1px solid var(--border); border-radius: var(--radius-md);
  font-size: 0.82rem; color: var(--text-muted);
}
.demo-box strong { color: var(--text); }
.demo-box code { font-family: var(--font-mono); background: var(--white); padding: 1px 6px; border-radius: 4px; border: 1px solid var(--border); }

/* ---------- Forms ---------- */
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 6px; color: var(--text); }
.field .hint { font-size: 0.78rem; color: var(--text-muted); margin-top: 5px; }
.field input[type="text"],
.field input[type="email"],
.field input[type="password"],
.field input[type="number"],
.field input[type="tel"],
.field select,
.field textarea {
  width: 100%; padding: 11px 14px; border: 1px solid var(--border-soft); border-radius: var(--radius-sm);
  background: var(--white); font-size: 0.95rem; color: var(--text); transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field textarea { resize: vertical; min-height: 90px; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--gold-dark); box-shadow: 0 0 0 3px rgba(200, 155, 60, 0.18); outline: none;
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-alert { padding: 12px 16px; border-radius: var(--radius-sm); font-size: 0.88rem; margin-bottom: 18px; }
.form-alert-error { background: var(--red-bg); color: var(--red); }

/* ==========================================================================
   App shell (dashboard, admin, student areas)
   ========================================================================== */
.app-body { background: var(--parchment-2); }
.app-shell { display: flex; min-height: 100vh; }

.app-sidebar {
  width: 250px; flex-shrink: 0; background: var(--ink-2); color: var(--text-on-ink);
  display: flex; flex-direction: column; padding: 24px 18px; position: sticky; top: 0; height: 100vh;
}
.sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 6px 8px 26px; }
.sidebar-brand .brand-name { font-size: 1.05rem; }
.sidebar-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.sidebar-nav a {
  padding: 11px 14px; border-radius: var(--radius-sm); font-size: 0.92rem; font-weight: 500;
  color: var(--text-on-ink-muted); transition: background 0.15s ease, color 0.15s ease;
}
.sidebar-nav a:hover { background: rgba(238, 241, 248, 0.06); color: var(--text-on-ink); }
.sidebar-nav a.is-active { background: rgba(200, 155, 60, 0.14); color: var(--gold); }
.sidebar-foot { border-top: 1px solid rgba(238, 241, 248, 0.1); padding-top: 16px; margin-top: 16px; }
.sidebar-user { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.user-avatar {
  width: 36px; height: 36px; border-radius: 50%; background: var(--gold); color: var(--ink-2);
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-family: var(--font-display); flex-shrink: 0;
}
.user-name { font-size: 0.88rem; font-weight: 600; color: var(--text-on-ink); }
.user-role { font-size: 0.75rem; color: var(--text-on-ink-muted); text-transform: capitalize; }

.app-main { flex: 1; padding: 34px 40px 60px; min-width: 0; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.page-head h1 { font-size: 1.7rem; }
.page-head p.sub { color: var(--text-muted); margin-top: 6px; }
.page-eyebrow { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold-dark); margin-bottom: 6px; display: block; }

.flash { padding: 13px 18px; border-radius: var(--radius-sm); margin-bottom: 22px; font-size: 0.9rem; font-weight: 500; }
.flash-success { background: var(--green-bg); color: var(--green); }
.flash-error { background: var(--red-bg); color: var(--red); }

/* ---------- Cards / grids ---------- */
.card { background: var(--white); border: 1px solid var(--border-soft); border-radius: var(--radius-md); padding: 24px; box-shadow: var(--shadow-sm); }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 32px; }
.stat-card { background: var(--white); border: 1px solid var(--border-soft); border-radius: var(--radius-md); padding: 20px 22px; box-shadow: var(--shadow-sm); }
.stat-card .sc-lbl { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
.stat-card .sc-val { font-family: var(--font-display); font-size: 2rem; font-weight: 600; color: var(--ink); margin-top: 6px; }
.stat-card .sc-val.accent { color: var(--gold-dark); }

.panel { background: var(--white); border: 1px solid var(--border-soft); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); overflow: hidden; margin-bottom: 26px; }
.panel-head { padding: 18px 24px; border-bottom: 1px solid var(--border-soft); display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.panel-head h2 { font-size: 1.1rem; }
.panel-body { padding: 24px; }
.panel-body.no-pad { padding: 0; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table.data-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.data-table th {
  text-align: left; padding: 12px 20px; font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--text-muted); background: var(--parchment); border-bottom: 1px solid var(--border-soft);
  white-space: nowrap;
}
.data-table td { padding: 14px 20px; border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: rgba(200, 155, 60, 0.05); }
.cell-muted { color: var(--text-muted); }
.cell-mono { font-family: var(--font-mono); font-size: 0.85rem; }
.empty-row td { text-align: center; padding: 44px 20px; color: var(--text-muted); }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; font-size: 0.76rem; font-weight: 600; }
.badge-gold { background: rgba(200, 155, 60, 0.16); color: var(--gold-dark); }
.badge-green { background: var(--green-bg); color: var(--green); }
.badge-red { background: var(--red-bg); color: var(--red); }
.badge-muted { background: var(--parchment); color: var(--text-muted); }

/* ---------- Exam list cards ---------- */
.exam-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.exam-card { background: var(--white); border: 1px solid var(--border-soft); border-radius: var(--radius-md); padding: 22px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 14px; }
.exam-card .ec-title { font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; }
.exam-card .ec-desc { color: var(--text-muted); font-size: 0.88rem; line-height: 1.5; flex: 1; }
.exam-card .ec-meta { display: flex; gap: 14px; font-size: 0.8rem; color: var(--text-muted); font-family: var(--font-mono); }

/* ---------- Exam-taking screen ---------- */
.exam-shell { max-width: 760px; margin: 0 auto; }
.exam-timer-bar {
  position: sticky; top: 0; z-index: 20; background: var(--ink); color: var(--text-on-ink);
  border-radius: var(--radius-md); padding: 16px 22px; display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 24px; box-shadow: var(--shadow-md);
}
.exam-timer-bar .et-title { font-family: var(--font-display); font-size: 1.05rem; }
.exam-timer-bar .et-clock { font-family: var(--font-mono); font-size: 1.3rem; font-weight: 600; color: var(--gold); }
.exam-timer-bar .et-clock.warn { color: #e07a5f; animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: 0.5; } }

.q-card { background: var(--white); border: 1px solid var(--border-soft); border-radius: var(--radius-md); padding: 24px; margin-bottom: 16px; box-shadow: var(--shadow-sm); }
.q-card .q-num { font-family: var(--font-mono); font-size: 0.75rem; color: var(--gold-dark); letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 8px; display: block; }
.q-card .q-text { font-size: 1.05rem; font-weight: 600; margin-bottom: 16px; line-height: 1.5; }
.opt-list { display: flex; flex-direction: column; gap: 10px; }
.opt {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px; border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm); cursor: pointer; transition: border-color 0.15s ease, background 0.15s ease;
}
.opt:hover { border-color: var(--gold); background: rgba(200, 155, 60, 0.05); }
.opt input { accent-color: var(--gold-dark); width: 17px; height: 17px; flex-shrink: 0; }
.opt .opt-letter { font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-muted); font-weight: 700; }
.opt-list input:checked ~ .opt-letter { color: var(--gold-dark); }
.opt:has(input:checked) { border-color: var(--gold-dark); background: rgba(200, 155, 60, 0.08); }

.practice-reveal-opt { cursor: default; display: flex; align-items: center; }
.practice-reveal-opt.correct { border-color: var(--green); background: var(--green-bg); }
.practice-reveal-opt.incorrect { border-color: var(--red); background: var(--red-bg); }
.practice-reveal-opt .ri-icon { font-size: 0.82rem; font-weight: 600; white-space: nowrap; }

/* ---------- Result review ---------- */
.result-hero { background: var(--ink); color: var(--text-on-ink); border-radius: var(--radius-lg); padding: 40px; text-align: center; margin-bottom: 28px; }
.result-hero .r-score { font-family: var(--font-display); font-size: 3.2rem; font-weight: 600; color: var(--gold); }
.result-hero .r-total { font-family: var(--font-mono); color: var(--text-on-ink-muted); font-size: 1rem; }
.review-item { padding: 18px 0; border-bottom: 1px solid var(--border-soft); }
.review-item:last-child { border-bottom: none; }
.review-item .ri-q { font-weight: 600; margin-bottom: 10px; }
.review-item .ri-line { display: flex; gap: 8px; align-items: center; font-size: 0.9rem; padding: 4px 0; }
.ri-line.correct { color: var(--green); }
.ri-line.incorrect { color: var(--red); }
.ri-line .ri-icon { font-family: var(--font-mono); font-weight: 700; }

/* ---------- Empty states ---------- */
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.empty-state h3 { font-size: 1.2rem; color: var(--text); margin-bottom: 8px; }

/* ---------- Utilities ---------- */
.text-muted { color: var(--text-muted); }
.mt-0 { margin-top: 0; }
.flex-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.gap-8 { gap: 8px; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero .container { grid-template-columns: 1fr; }
  .ticket-wrap { order: -1; }
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
  .paper-section { grid-template-columns: 1fr; gap: 14px; }
  .checklist { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .benefit-grid { grid-template-columns: 1fr; }
  .auth-visual { display: none; }
  .auth-form-side { width: 100%; }
}
@media (max-width: 720px) {
  .app-sidebar { position: fixed; left: -260px; z-index: 50; transition: left 0.2s ease; box-shadow: var(--shadow-lg); }
  .app-sidebar.is-open { left: 0; }
  .app-main { padding: 20px 18px 50px; }
  .mobile-topbar { display: flex; }
}
@media (max-width: 560px) {
  .field-row { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .site-nav-links .btn-outline-light span.long { display: none; }
}

.mobile-topbar {
  display: none; align-items: center; justify-content: space-between;
  background: var(--ink-2); color: var(--text-on-ink); padding: 14px 18px; margin: -34px -40px 26px;
}
@media (max-width: 720px) {
  .mobile-topbar { margin: -20px -18px 22px; }
}
.mobile-topbar button { background: none; border: none; color: var(--text-on-ink); font-size: 1.3rem; }
