/* PakExamMCQs.pk — v1 styles. Pure white background in every theme.
   No gradients, no glows, no washes. Sections separated by 2px borders only.
   Fonts: Nunito (headings/brand/buttons/chips), Inter (body/options). */

:root {
  --radius: 12px;
  --font-head: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* 1. Sky Blue */
[data-theme="sky"] {
  --bg: #ffffff; --surface: #ffffff; --surface2: #ffffff; --bg-soft: #ffffff; --mint: #ffffff;
  --ink: #0a1628; --muted: #2e3d4f;
  --blue: #1299dd; --blue-dark: #0b7ab8; --blue-soft: #e3f3fd;
  --green: #1faf68; --green-dark: #128a4e; --green-soft: #e0f5e9;
  --gold: #b97e14; --gold-soft: #fdf0d3;
  --red: #c93a30; --red-soft: #fdecea;
  --border: #101828; --line-soft: #d9e4ec; --shadowc: #101828;
}

/* 2. Navy & Gold Premium — DEFAULT */
[data-theme="navy"] {
  --bg: #ffffff; --surface: #ffffff; --surface2: #ffffff; --bg-soft: #ffffff; --mint: #ffffff;
  --ink: #1b2440; --muted: #2e3d4f;
  --blue: #1b2440; --blue-dark: #11182c; --blue-soft: #e2e5ee;
  --green: #b8860b; --green-dark: #96690a; --green-soft: #f7ecd2;
  --gold: #e8b84a; --gold-soft: #f7ecd2;
  --red: #c93a30; --red-soft: #fdecea;
  --border: #1b2440; --line-soft: #ddd3ba; --shadowc: #1b2440;
}

/* 3. Pakistan Green & Gold */
[data-theme="pakgreen"] {
  --bg: #ffffff; --surface: #ffffff; --surface2: #ffffff; --bg-soft: #ffffff; --mint: #ffffff;
  --ink: #0e241a; --muted: #2e3d4f;
  --blue: #0b6b3a; --blue-dark: #08542d; --blue-soft: #dff0e4;
  --green: #a8861d; --green-dark: #8a6d15; --green-soft: #f7ecd2;
  --gold: #c9a227; --gold-soft: #f7ecd2;
  --red: #c93a30; --red-soft: #fdecea;
  --border: #0e241a; --line-soft: #cfe3d4; --shadowc: #0e241a;
}

/* 4. Teal & Amber */
[data-theme="teal"] {
  --bg: #ffffff; --surface: #ffffff; --surface2: #ffffff; --bg-soft: #ffffff; --mint: #ffffff;
  --ink: #10222b; --muted: #2e3d4f;
  --blue: #0e7c7b; --blue-dark: #0a5f5e; --blue-soft: #dcf0ef;
  --green: #d97e06; --green-dark: #b26a05; --green-soft: #fdeeda;
  --gold: #f2a93b; --gold-soft: #fdeeda;
  --red: #c93a30; --red-soft: #fdecea;
  --border: #10222b; --line-soft: #cfe2e2; --shadowc: #10222b;
}

/* 5. Royal Purple */
[data-theme="purple"] {
  --bg: #ffffff; --surface: #ffffff; --surface2: #ffffff; --bg-soft: #ffffff; --mint: #ffffff;
  --ink: #1e1633; --muted: #2e3d4f;
  --blue: #5b21b6; --blue-dark: #4c1d95; --blue-soft: #e9e2f8;
  --green: #c26d06; --green-dark: #9a5605; --green-soft: #fdeeda;
  --gold: #d97706; --gold-soft: #fdeeda;
  --red: #c93a30; --red-soft: #fdecea;
  --border: #1e1633; --line-soft: #dcd4ee; --shadowc: #1e1633;
}

/* 6. Crimson & Navy */
[data-theme="crimson"] {
  --bg: #ffffff; --surface: #ffffff; --surface2: #ffffff; --bg-soft: #ffffff; --mint: #ffffff;
  --ink: #2a1215; --muted: #2e3d4f;
  --blue: #b91c1c; --blue-dark: #991b1b; --blue-soft: #fbe3e3;
  --green: #1e40af; --green-dark: #1e3a8a; --green-soft: #e2e5ee;
  --gold: #1e40af; --gold-soft: #e2e5ee;
  --red: #c93a30; --red-soft: #fdecea;
  --border: #2a1215; --line-soft: #ecd4d4; --shadowc: #2a1215;
}

/* 7. Charcoal & Orange */
[data-theme="charcoal"] {
  --bg: #ffffff; --surface: #ffffff; --surface2: #ffffff; --bg-soft: #ffffff; --mint: #ffffff;
  --ink: #18181b; --muted: #2e3d4f;
  --blue: #c2410c; --blue-dark: #9a3412; --blue-soft: #fdebdd;
  --green: #334155; --green-dark: #1e293b; --green-soft: #e2e5ee;
  --gold: #f97316; --gold-soft: #fdebdd;
  --red: #c93a30; --red-soft: #fdecea;
  --border: #18181b; --line-soft: #e3dcd4; --shadowc: #18181b;
}

* { box-sizing: border-box; }

html { background: #ffffff; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
}

h1, h2, h3, h4, .brand, button, .chip, .pill, .tag {
  font-family: var(--font-head);
}

h1 { font-size: 1.9rem; font-weight: 900; line-height: 1.2; margin: 0 0 0.6rem; }
h2 { font-size: 1.35rem; font-weight: 900; margin: 0 0 0.6rem; }
h3 { font-size: 1.1rem; font-weight: 800; margin: 0 0 0.4rem; }
p { margin: 0 0 0.8rem; }
a { color: var(--blue); font-weight: 600; }
.muted { color: var(--muted); }
.small { font-size: 0.88rem; }

/* ---------- Header (NOT sticky — it scrolls away) ---------- */
.site-header {
  background: var(--bg);
  border-bottom: 2px solid var(--border);
  padding: 0.7rem 1rem;
}
.header-row {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.brand {
  font-weight: 900;
  font-size: 1.25rem;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.brand span { color: var(--blue); }
.theme-btn {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.theme-dot {
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--blue);
  display: inline-block;
  flex: none;
}
.theme-picker {
  max-width: 960px;
  margin: 0.6rem auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.theme-picker[hidden] { display: none; }
.theme-option {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 700;
}
.theme-option .theme-dot { background: var(--opt-color, var(--blue)); }
.theme-option[aria-pressed="true"] {
  background: var(--blue);
  color: #ffffff;
  border-color: var(--border);
}

/* ---------- Main menu (3 layers) ---------- */
.main-menu {
  max-width: 960px;
  margin: 0 auto;
  padding: 0.7rem 1rem 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
/* Only ONE button is ever filled: the section you are on. An open
   sub-menu gets no fill at all — the open panel below the menu already
   shows which menu is open, and any tint on the button reads as a
   second "active" button (flagged twice: 17:23 and 17:44). */
.menu-btn[aria-current="page"] { background: var(--blue); color: #ffffff; }
.sub-menu {
  max-width: 960px;
  margin: 0.6rem auto 0;
  padding: 0 1rem;
}
.sub-menu[hidden] { display: none; }
.sub-menu-inner {
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 5px 5px 0 var(--shadowc);
  padding: 0.8rem;
}
.sub-menu h3 { margin-bottom: 0.5rem; }
.sub-list {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.sub-list button, .sub-list a {
  text-align: left;
}
/* The option you are on stays navy-filled inside a panel — the
   category you were practising (Ali, 16 Nov 2026: coming back to the
   list, she could not tell which category she had been on), and the
   exam you are practising. Same fill as the menu buttons. */
.sub-list button[aria-current="true"] {
  background: var(--blue);
  color: #ffffff;
}
.menu-note { margin: 0.6rem 0 0; }

/* ---------- Layout ---------- */
.page, main.page {
  max-width: 960px;
  margin: 0 auto;
  padding: 1.2rem 1rem 2rem;
}
section { margin-bottom: 1.6rem; }

/* ---------- Hero ---------- */
.hero {
  border: 2px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 5px 5px 0 var(--shadowc);
  background: var(--surface);
  padding: 1.4rem 1.2rem;
  margin-bottom: 1.4rem;
}
.hero h1 { font-size: 2rem; }
.hero .lead { font-size: 1.05rem; color: var(--muted); font-weight: 500; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.8rem; }

/* ---------- Cards, chips, pills ---------- */
.card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 5px 5px 0 var(--shadowc);
  padding: 1rem 1.1rem;
  margin-bottom: 1rem;
}
.chip {
  display: inline-block;
  border: 2px solid var(--border);
  border-radius: 8px;
  padding: 0.15rem 0.6rem;
  font-size: 0.85rem;
  font-weight: 700;
  background: var(--surface);
  color: var(--ink);
}
.pill {
  display: inline-block;
  border: 2px solid var(--border);
  border-radius: 999px;
  padding: 0.15rem 0.7rem;
  font-size: 0.85rem;
  font-weight: 800;
  background: var(--blue-soft);
  color: var(--ink);
}
.tag {
  display: inline-block;
  border: 2px solid var(--border);
  border-radius: 8px;
  padding: 0.1rem 0.5rem;
  font-size: 0.8rem;
  font-weight: 700;
  background: var(--surface);
  color: var(--ink);
}
.tag.exam-tag { background: var(--blue-soft); }

/* ---------- Buttons ---------- */
button, .btn {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 10px;
  padding: 0.5rem 0.9rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
button:hover, .btn:hover { background: var(--blue-soft); }
.btn-primary, button.btn-primary {
  background: var(--blue);
  color: #ffffff;
}
/* Back button at the top of the Practice card: returns to the Subjects
   panel with the current subject already open (Ali, 16 Nov 2026 — the
   round trip Subjects → subject → category for every new category). */
.back-btn {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.2rem 0.4rem;
  margin: -0.2rem 0 0.2rem -0.4rem;
  background: none;
  border: 0;
  box-shadow: none;
  color: var(--blue);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.back-btn:hover { background: none; text-decoration: underline; }
.btn-primary:hover { background: var(--blue-dark); }
.btn-gold {
  background: var(--gold);
  color: var(--ink);
}
.btn:disabled, button:disabled { opacity: 0.55; cursor: not-allowed; }

/* ---------- Pagination ---------- */
.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  justify-content: center;
  margin: 1.2rem 0;
}
.pagination[hidden] { display: none; }
.pagination button {
  min-width: 2.6rem;
  padding: 0.45rem 0.7rem;
  box-shadow: 3px 3px 0 var(--shadowc);
}
.pagination button[aria-current="page"] {
  background: var(--blue);
  color: #ffffff;
  border-color: var(--border);
}
.pagination .page-info {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--muted);
  margin: 0 0.3rem;
}

/* ---------- Forms ---------- */
label { font-weight: 700; font-size: 0.9rem; display: block; margin-bottom: 0.25rem; }
/* iOS Safari zooms the whole page when a tapped field's text is
   smaller than 16px — so EVERY input type, including number, gets
   16px here. (The percentage field was a number input and was not
   in this rule, so tapping it zoomed and covered the screen.) */
select, input[type="text"], input[type="search"], input[type="number"], textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 10px;
  padding: 0.55rem 0.7rem;
}
select:focus, input:focus, textarea:focus {
  outline: 3px solid var(--blue-soft);
  border-color: var(--blue);
}

/* ---------- Practice card ---------- */
.practice-card .practice-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.practice-card .practice-head h2 { margin: 0; }
.count-pill { margin-left: auto; }
.breadcrumb {
  font-weight: 700;
  font-size: 0.95rem;
  margin: 0.5rem 0 0;
}
.breadcrumb .crumb-sep { color: var(--muted); padding: 0 0.2rem; }
.divider-dashed {
  border: none;
  border-top: 2px dashed var(--line-soft);
  margin: 0.9rem 0;
}
.filter-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.7rem;
}
.filter-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: end; }

/* ---------- MCQ cards ---------- */
.mcq-list { display: grid; gap: 1rem; }
.mcq-card { padding: 1.1rem; }
.mcq-top {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  margin-bottom: 0.6rem;
}
.mcq-id { font-weight: 800; font-size: 0.85rem; color: var(--muted); margin-left: auto; }
.mcq-q {
  font-size: 1.38rem;
  font-weight: 900;
  line-height: 1.35;
  margin: 0 0 0.9rem;
}
.options { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.option {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  width: 100%;
  text-align: left;
  border: 2px solid var(--border);
  border-radius: 10px;
  padding: 0.65rem 0.8rem;
  background: var(--surface);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 1rem;
  line-height: 1.45;
}
.option:hover:not(:disabled) { background: var(--blue-soft); }
.option:disabled { cursor: default; opacity: 1; }
.opt-letter {
  flex: none;
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 0.95rem;
  background: var(--surface);
}
.option.correct { background: var(--green-soft); border-color: var(--green-dark); }
.option.correct .opt-letter { background: var(--green); border-color: var(--green-dark); color: #ffffff; }
.option.wrong { background: var(--red-soft); border-color: var(--red); }
.option.wrong .opt-letter { background: var(--red); border-color: var(--red); color: #ffffff; }
.option.dimmed { opacity: 0.6; }
.feedback { margin-top: 0.9rem; }
.feedback .verdict { font-family: var(--font-head); font-weight: 900; font-size: 1.05rem; }
.feedback .verdict.good { color: var(--green-dark); }
.feedback .verdict.bad { color: var(--red); }
.explanation {
  border: 2px solid var(--line-soft);
  border-radius: 10px;
  padding: 0.8rem;
  margin-top: 0.6rem;
  background: var(--surface);
}
.explanation h4 { font-size: 1rem; font-weight: 900; margin: 0 0 0.4rem; }
.mcq-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.9rem; }
.mcq-actions button { font-size: 0.85rem; padding: 0.35rem 0.7rem; }
.mcq-actions button[aria-pressed="true"] { background: var(--gold-soft); }
.report-note {
  border: 2px dashed var(--line-soft);
  border-radius: 10px;
  padding: 0.7rem;
  margin-top: 0.7rem;
  font-size: 0.92rem;
}
.report-note[hidden] { display: none; }
.empty-state { text-align: center; padding: 1.4rem 0.6rem; }

/* ---------- Quiz Mode ---------- */
.quiz-box { padding: 1.1rem; }
.quiz-meta {
  display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center;
  margin-bottom: 0.8rem;
}
.timer {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 1.2rem;
  border: 2px solid var(--border);
  border-radius: 10px;
  padding: 0.25rem 0.7rem;
  background: var(--gold-soft);
}
.timer.low { background: var(--red-soft); color: var(--red); }
.progress-bar {
  height: 14px;
  border: 2px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
  background: var(--surface);
  margin: 0.6rem 0 1rem;
}
.progress-bar > div {
  height: 100%;
  background: var(--blue);
  width: 0%;
}
.quiz-nav { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 1rem; }
.result-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem; margin: 0.8rem 0; }
.result-stat {
  border: 2px solid var(--border);
  border-radius: 10px;
  padding: 0.7rem;
  text-align: center;
}
.result-stat .num { font-family: var(--font-head); font-weight: 900; font-size: 1.5rem; display: block; }
.result-stat .lbl { font-size: 0.85rem; font-weight: 700; color: var(--muted); }
table.score-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; margin: 0.6rem 0; }
table.score-table th, table.score-table td {
  border: 2px solid var(--line-soft);
  padding: 0.45rem 0.6rem;
  text-align: left;
}
table.score-table th { font-family: var(--font-head); font-weight: 800; background: var(--blue-soft); }

/* Quiz builder: pick a subject, set its percentage, add it — the
   running list below grows one subject at a time. */
.builder-add { display: grid; grid-template-columns: 2fr 1fr auto; gap: 0.7rem; align-items: end; }
@media (max-width: 560px) { .builder-add { grid-template-columns: 1fr; } }
/* Phone-sized tap targets for the builder controls, and the
   total-share note drops onto its own line so it never runs off
   the edge of a narrow screen. */
.builder-add .subject-picker-btn, .builder-add input, .builder-add .btn-primary,
.builder-grid input { min-height: 48px; }
@media (max-width: 560px) { #quizPctNote { display: block; margin-top: 0.2rem; } }
.builder-added { display: grid; gap: 0.3rem; margin-top: 0.5rem; }
.builder-added-row {
  display: flex; gap: 0.5rem; align-items: center;
  border: 2px solid var(--line-soft); border-radius: 10px; padding: 0.4rem 0.6rem;
}
.builder-added-row .builder-name { flex: 1; font-weight: 700; }
.builder-added-row .count { color: var(--muted); font-size: 0.85rem; white-space: nowrap; }
.builder-added-row .share { font-family: var(--font-head); font-weight: 900; }
.builder-remove {
  border: 2px solid var(--border); border-radius: 8px; background: var(--surface);
  font-weight: 900; line-height: 1; padding: 0.2rem 0.5rem; cursor: pointer;
}

/* Searchable subject picker: a button that opens a panel with a
   search box on top and the subject list below it. */
.subject-picker { position: relative; }
.subject-picker-btn {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 10px;
  padding: 0.55rem 0.7rem;
  text-align: left;
  cursor: pointer;
}
.subject-picker-btn:disabled { opacity: 0.55; cursor: default; }
.subject-picker-btn::after { content: "▾"; float: right; color: var(--muted); }
.subject-picker-panel {
  position: absolute;
  left: 0; right: 0; top: calc(100% + 0.3rem);
  z-index: 30;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 5px 5px 0 var(--shadowc);
  overflow: hidden;
}
.subject-picker-panel input[type="search"] {
  border: none;
  border-bottom: 2px solid var(--line-soft);
  border-radius: 0;
}
.subject-picker-list {
  list-style: none;
  margin: 0;
  padding: 0.3rem;
  max-height: 16rem;
  overflow-y: auto;
}
.subject-picker-list button {
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  background: none;
  border: none;
  border-radius: 8px;
  padding: 0.55rem 0.6rem;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.subject-picker-list button:hover:not(:disabled),
.subject-picker-list button:focus-visible { background: var(--blue-soft); }
.subject-picker-list button:disabled { opacity: 0.45; cursor: default; }
.subject-picker-list .count { color: var(--muted); font-size: 0.9rem; white-space: nowrap; }
.subject-picker-list #quizSubjectEmpty { padding: 0.55rem 0.6rem; }
.builder-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem; }
.builder-label { display: grid; gap: 0.3rem; font-weight: 700; }
.builder-check { display: flex; align-items: center; gap: 0.5rem; }

/* The printable paper is hidden on screen; at print time it is the
   only thing on the page. The button opens the browser's print
   dialog, where the student picks "Save as PDF". */
#quizPrint { display: none; }
@media print {
  body * { visibility: hidden; }
  #quizPrint, #quizPrint * { visibility: visible; }
  #quizPrint { display: block; position: absolute; left: 0; top: 0; width: 100%; }
  #quizPrint table { border-collapse: collapse; }
  #quizPrint td, #quizPrint th { border: 1px solid #000; padding: 4px 8px; text-align: left; }
  #quizPrint h1 { font-size: 1.3rem; }
  #quizPrint h2 { font-size: 1.1rem; }
  #quizPrint h3 { font-size: 1rem; }
}

/* ---------- Jobs ---------- */
.jobs-list { display: grid; gap: 1rem; }
/* Browse grid for the Jobs section: a dark two-column menu in the
   theme's own colours — primary background, white text, and the
   theme accent as the underline on the active cell. Never the grey
   from the reference screenshot; the variables make it follow
   whichever of the 7 themes the reader picked. The active cell also
   gets the darker primary fill, so it stays readable in every theme
   (the accent alone is too faint on some primaries). */
.jobs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--blue);
  border: 2px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  margin: 0.9rem 0;
}
.jobs-grid a {
  color: #ffffff;
  font-weight: 700;
  font-size: 1rem;
  text-align: center;
  text-decoration: none;
  padding: 0.95rem 0.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
}
.jobs-grid a:nth-child(odd) { border-right: 1px solid rgba(255,255,255,0.35); }
.jobs-grid a:nth-child(n+3) { border-top: 1px solid rgba(255,255,255,0.35); }
.jobs-grid a[aria-current="page"] {
  background: var(--blue-dark);
  box-shadow: inset 0 -3px 0 var(--gold);
}
.jobs-grid a:hover { text-decoration: underline; }

/* Keyword search on the Jobs feed pages: one box above the feed.
   (The old sticky filter bar is gone — the browse grid above covers
   organisation / date / closing-soon, and this box covers free-text
   search. The input itself takes the base input[type="search"]
   styling: 2px border, 10px radius.) */
.jobs-search { margin: 0.8rem 0 1rem; }
/* One block per advertised date: the header spans the full width, the
   cards lay out in the group's own grid below it. */
.jobs-group { display: grid; gap: 1rem; }
.jobs-date-group { grid-column: 1 / -1; margin: 0.25rem 0 0; font-size: 1.05rem; }
.jobs-group + .jobs-group .jobs-date-group { border-top: 2px solid var(--border); padding-top: 0.75rem; }
.job-card h3 { font-size: 1.25rem; }
/* Key facts as a three-stat strip above the detail list, and hairline
   dividers between the detail rows — the card's scannable facts up
   front, the rest as a clean spec list. */
.job-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; margin: 0.7rem 0 0.2rem; }
.job-fact { border: 2px solid var(--line-soft); border-radius: 10px; padding: 0.5rem 0.3rem; text-align: center; }
.job-fact .num { display: block; font-family: var(--font-head); font-weight: 900; font-size: 1.05rem; }
.job-fact .lbl { display: block; font-size: 0.78rem; color: var(--muted); font-weight: 700; }
.job-fact.soon { background: var(--gold-soft); border-color: var(--border); }
.job-fact.soon .num, .job-fact.closed .num { color: var(--red); }
.job-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; margin: 0.8rem 0 0.2rem; }
.job-meta { display: grid; gap: 0; margin: 0.6rem 0; font-size: 0.95rem; }
.job-meta dt { font-weight: 800; }
.job-meta dd { margin: 0; }
.pattern-group { margin: 0.7rem 0 0.2rem; }
.pattern-group h3 { font-size: 1rem; margin: 0 0 0.3rem; }
.pattern-group dl { margin: 0; }
.job-meta .row { display: flex; gap: 0.4rem; flex-wrap: wrap; border-bottom: 1px solid var(--line-soft); padding: 0.35rem 0; }
.job-meta .row:last-child { border-bottom: 0; }
.job-meta .row dt { flex: none; min-width: 110px; }
.deadline { font-family: var(--font-head); font-weight: 900; }
.deadline.closed { color: var(--red); }
.deadline.soon { color: var(--red); }
.never-line {
  border: 2px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 5px 5px 0 var(--shadowc);
  background: var(--gold-soft);
  padding: 0.9rem 1rem;
  font-weight: 700;
  margin-bottom: 1.2rem;
}

/* Advertisement pages: the ad's posts as a structured table. The
   wrapper scrolls sideways on narrow phones instead of squeezing
   the columns. */
.table-wrap { overflow-x: auto; }
.ad-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; margin: 0.5rem 0; }
.ad-table th, .ad-table td { border: 2px solid var(--line-soft); padding: 0.5rem 0.6rem; text-align: left; vertical-align: top; }
.ad-table th { background: var(--blue-soft); font-family: var(--font-head); }

/* ---------- Past papers ---------- */
.papers-grid { display: grid; gap: 1rem; }
.paper-card h3 { margin-bottom: 0.3rem; }

/* ---------- Progress ---------- */
.progress-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem; margin: 0.8rem 0; }
.bookmark-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.bookmark-list li {
  border: 2px solid var(--line-soft);
  border-radius: 10px;
  padding: 0.6rem 0.8rem;
}
.saved-note { font-size: 0.9rem; color: var(--muted); font-weight: 600; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 2px solid var(--border);
  padding: 1.2rem 1rem 2rem;
  text-align: center;
  background: var(--bg);
}
.site-footer nav { margin-bottom: 0.6rem; }
.site-footer a { margin: 0 0.4rem; }

/* ---------- Views ---------- */
.view[hidden] { display: none; }

/* ---------- Wider screens ---------- */
@media (min-width: 640px) {
  .filter-grid { grid-template-columns: 1fr 1fr; }
  .filter-grid .full { grid-column: 1 / -1; }
  .jobs-group { grid-template-columns: 1fr 1fr; }
  /* A lone card in the last row (odd card count in the group) spans both
     columns instead of leaving a blank column beside it. The count is
     even, not odd, because the group header is the first child. */
  .jobs-group > :last-child:nth-child(even) { grid-column: 1 / -1; }
  .papers-grid { grid-template-columns: 1fr 1fr; }
  .result-grid { grid-template-columns: repeat(4, 1fr); }
  .progress-grid { grid-template-columns: repeat(4, 1fr); }
  h1 { font-size: 2.2rem; }
  .hero h1 { font-size: 2.4rem; }
}

/* ---------- Copy protection (Ali, 17 Nov 2026) ----------
   Stops casual copying of the site's text: no selecting, no right-click
   menu, no long-press callout on phones. Form fields stay selectable so
   students can still type in the search box and quiz inputs. This is a
   deterrent, not a lock — page source and screenshots still exist. The
   admin panel re-enables selection in admin.css (Ali needs it there). */
body {
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
input, textarea, select {
  user-select: text;
  -webkit-user-select: text;
  -webkit-touch-callout: default;
}
