/* Career Launcher UAE — the student portal (server/portal/). Career Launcher's own brand (docs/design-system.md): ivory,
   ink and Career Launcher orange, the dark olive panel and the orange-dot eyebrow of careerlauncheruae.com, Plus Jakarta
   Sans, an 8px grid, 8/16/24px radii, one soft shadow at most. Phone first; nothing loaded from anywhere else.
   Redrawn 24 Oct 2026 (owner: "it doesn't look professional ... be true to brand color and way"). */

@font-face {
  font-family: 'Plus Jakarta Sans';
  src: url('/assets/plus-jakarta-sans.woff2') format('woff2');
  font-weight: 200 800;
  font-display: swap;
}
:root {
  --background: #f9f8f4;
  --foreground: #252721;
  --card: #fff;
  --muted: #efeee8;
  --muted-foreground: #66675f;
  --primary: #c7441c;
  --primary-hover: #a93816;
  --orange-light: #f4e6dd;
  --border: #e0e0d6;
  --border-strong: #cfcdc1;
  --dark: #282b24;
  --on-dark: #f9f8f4;
  --on-dark-muted: #c9c8bd;
  --peach: #eeb093;
  --right: #2f7d4f;
  --right-light: #e6f2ea;
  --wrong: #b3261e;
  --wrong-light: #f8e3e1;
  --shadow: 0 16px 32px -20px rgba(37, 39, 33, 0.28);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}
* { box-sizing: border-box; }
/* Hidden means hidden, whatever display a class gives (the exam's buttons, the filters, Hand in once the exam runs). */
[hidden] { display: none !important; }
html, body { margin: 0; }
html { scroll-padding-top: 16px; }
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--background);
  color: var(--foreground);
  font-family: 'Plus Jakarta Sans', 'Arial', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); font-weight: 600; }
:focus-visible { outline: 3px solid var(--foreground); outline-offset: 2px; }
h1, h2, h3 { color: var(--foreground); }

/* ── The frame: header, page, footer ─────────────────────────────────────────────────────────────────────────── */
.portal-top { background: var(--card); border-bottom: 1px solid var(--border); }
.portal-top-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  max-width: 1344px; min-height: 72px; margin: 0 auto; padding: 8px 24px;
}
.portal-brand { display: inline-flex; align-items: center; gap: 16px; color: var(--foreground); text-decoration: none; }
.portal-brand img { display: block; width: 112px; height: auto; }
.portal-name {
  padding-left: 16px; border-left: 1px solid var(--border); font-size: 14px; font-weight: 700; letter-spacing: 0.01em;
  white-space: nowrap;
}
.portal-nav { display: none; align-items: center; gap: 24px; }
.portal-nav a { white-space: nowrap; }
.portal-nav a { display: inline-flex; align-items: center; min-height: 44px; color: var(--foreground); font-size: 14px; text-decoration: none; }
.portal-nav a:hover { color: var(--primary); }
.portal-nav-site { display: none !important; }
.portal-nav-site::after { content: '↗'; margin-left: 4px; font-size: 12px; color: var(--primary); }

.portal-main { flex: 1; width: 100%; max-width: 1344px; margin: 0 auto; padding: 24px 24px 64px; }

.portal-foot { border-top: 1px solid var(--border); background: var(--card); font-size: 14px; color: var(--muted-foreground); }
.portal-foot-inner { display: grid; gap: 4px; max-width: 1344px; margin: 0 auto; padding: 24px 24px 32px; }
.portal-foot p { margin: 0; }
.portal-foot a { color: var(--foreground); }
.portal-by { font-size: 12px; color: var(--muted-foreground); }

@media (min-width: 768px) {
  .portal-top-inner { padding: 8px 48px; }
  .portal-brand img { width: 126px; }
  .portal-nav { display: flex; }
  .portal-nav-site { display: inline-flex !important; }
  .portal-main { padding: 32px 48px 96px; }
  .portal-foot-inner { grid-template-columns: 1fr auto; align-items: center; padding: 24px 48px; }
}

/* ── Type: the eyebrow, headings, lead, crumbs ───────────────────────────────────────────────────────────────── */
.pt-eyebrow {
  display: flex; align-items: center; gap: 8px; margin: 0 0 16px; font-size: 12px; font-weight: 700; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--foreground);
}
.pt-eyebrow::before { content: ''; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--primary); }
.pt-lead { max-width: 62ch; margin: 0; font-size: 17px; line-height: 1.65; color: var(--muted-foreground); }
.pt-hint { margin: 0; font-size: 14px; color: var(--muted-foreground); }
.pt-crumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 0 0 24px; padding: 0; list-style: none; font-size: 14px; }
.pt-crumbs li { display: inline-flex; align-items: center; gap: 8px; color: var(--muted-foreground); }
.pt-crumbs li + li::before { content: '/'; color: var(--border-strong); }
.pt-crumbs a { display: inline-flex; align-items: center; min-height: 32px; color: var(--muted-foreground); font-weight: 500; text-decoration: none; }
.pt-crumbs a:hover { color: var(--primary); }
.pt-crumbs [aria-current] { color: var(--foreground); font-weight: 600; }
@media (max-width: 599px) {
  .pt-crumbs li { display: none; }
  .pt-crumbs li:nth-last-child(2) { display: inline-flex; }
  .pt-crumbs li:nth-last-child(2)::before { content: '←'; color: var(--primary); }
  .pt-crumbs li:nth-last-child(2) a { color: var(--primary); font-weight: 600; }
}

.pt-head h1, .pt-hero h1, .pt-home h1 {
  margin: 0 0 16px; font-size: clamp(34px, 2.2vw + 22px, 52px); font-weight: 700; line-height: 1.08; letter-spacing: -0.025em;
  overflow-wrap: break-word; hyphens: auto;
}
.pt-head { margin-bottom: 32px; }
.pt-head--narrow { max-width: 760px; }
.pt-head-actions { margin: 24px 0 0; }
.pt-meta { margin: 0 0 16px; font-size: 15px; font-weight: 600; color: var(--muted-foreground); }

/* ── Buttons ─────────────────────────────────────────────────────────────────────────────────────────────────── */
.portal-button, .pt-start, .pt-sheet, .pt-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 24px;
  border: 1px solid transparent; border-radius: 8px; font: inherit; font-size: 15px; font-weight: 700; line-height: 1.2;
  text-decoration: none; text-align: center; cursor: pointer;
  transition: background-color 0.18s var(--ease), border-color 0.18s var(--ease), color 0.18s var(--ease), transform 0.18s var(--ease);
}
.portal-button, .pt-start { background: var(--primary); color: #fff; }
.portal-button:hover, .pt-start:hover { background: var(--primary-hover); }
.pt-start::after { content: '→'; content: '→' / ''; transition: transform 0.18s var(--ease); }
.pt-start:hover::after { transform: translateX(3px); }
.pt-sheet { border-color: var(--primary); background: var(--card); color: var(--primary); }
.pt-sheet:hover { background: var(--orange-light); }
.pt-btn { border-color: var(--border); background: var(--card); color: var(--foreground); }
.pt-btn:hover { border-color: var(--foreground); }
.pt-btn[aria-pressed="true"] { border-color: var(--primary); background: var(--orange-light); color: var(--primary); }
.portal-button:active, .pt-start:active, .pt-sheet:active, .pt-btn:active { transform: scale(0.98); }

/* An outside link (NCERT's book, an exemplar, a textbook): a quiet link with its arrow. */
.pt-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 0; }
.pt-ext {
  display: inline-flex; align-items: center; min-height: 32px; color: var(--primary); font-size: 14px; font-weight: 600;
  text-decoration: underline; text-decoration-color: rgba(199, 68, 28, 0.35); text-underline-offset: 3px;
}
.pt-ext::after { content: '↗'; margin-left: 4px; font-size: 12px; text-decoration: none; }
.pt-ext:hover { text-decoration-color: currentColor; }
.pt-links--set { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; }
.pt-links-label { font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted-foreground); }
.pt-links-list { display: flex; flex-wrap: wrap; gap: 4px 16px; }

/* Facts as chips; a notice. */
.pt-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; padding: 0; list-style: none; }
.pt-chips li { padding: 6px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--card); font-size: 13px; font-weight: 600; }
.pt-notice {
  display: flex; align-items: center; gap: 12px; margin: 0 0 24px; padding: 12px 16px; border: 1px solid #ecd2c4; border-radius: 12px;
  background: var(--orange-light); font-size: 14px; font-weight: 600;
}
.pt-notice::before { content: ''; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--primary); }

/* ── The opening page: the hero and its steps, then the grades ───────────────────────────────────────────────── */
.pt-hero, .pt-home { display: grid; gap: 32px; align-items: center; margin: 8px 0 48px; }
.pt-home { display: flex; flex-direction: column; align-items: stretch; gap: 0; margin-bottom: 0; }
.pt-home .pt-steps { order: 3; margin-top: 56px; }
.pt-home-grades { order: 2; }
.pt-home .pt-hero-text { margin-bottom: 48px; }
.pt-hero h1, .pt-home h1 { font-size: clamp(40px, 2.4vw + 24px, 60px); line-height: 1.04; letter-spacing: -0.035em; }
.pt-hero h1 span, .pt-home h1 span { display: block; color: var(--primary); }
.pt-hero .pt-notice { margin: 24px 0 0; }
.pt-facts { display: flex; flex-wrap: wrap; gap: 16px 40px; margin: 32px 0 0; padding: 24px 0 0; border-top: 1px solid var(--border); list-style: none; }
.pt-facts li { display: grid; font-size: 14px; color: var(--muted-foreground); }
.pt-facts strong { font-size: 32px; font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; color: var(--foreground); font-variant-numeric: tabular-nums; }

.pt-steps { padding: 32px 24px; border-radius: 24px; background: var(--dark); color: var(--on-dark); }
.pt-steps-label { margin: 0 0 24px; font-size: 12px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--peach); }
.pt-steps ol { display: grid; gap: 24px; margin: 0; padding: 0; list-style: none; }
.pt-steps li { display: grid; grid-template-columns: 48px 1fr; gap: 4px 16px; }
.pt-step-no {
  grid-row: span 2; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px;
  border: 1px solid rgba(238, 176, 147, 0.5); border-radius: 50%; color: var(--peach); font-size: 13px; font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.pt-step-title { font-size: 17px; font-weight: 700; line-height: 1.35; color: var(--on-dark); }
.pt-step-text { font-size: 14px; line-height: 1.55; color: var(--on-dark-muted); }

.pt-section { margin-top: 56px; scroll-margin-top: 16px; }
.pt-section-head { margin-bottom: 24px; }
.pt-section-head h2 { margin: 0; font-size: clamp(26px, 1vw + 20px, 34px); line-height: 1.15; letter-spacing: -0.02em; }
.pt-section-head .pt-hint { margin-top: 8px; max-width: 46ch; }
.pt-hero + .pt-section { margin-top: 0; }

.pt-grades { display: grid; gap: 16px; }
.pt-grade, .pt-subject {
  position: relative; display: flex; flex-direction: column; gap: 4px; padding: 24px; border: 1px solid var(--border);
  border-radius: 16px; background: var(--card); color: var(--foreground); text-decoration: none;
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.pt-grade:hover, .pt-subject:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow); }
.pt-grade:active, .pt-subject:active { transform: translateY(0); }
.pt-grade-label { font-size: 12px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted-foreground); }
.pt-grade-no { margin: 0 0 8px; font-size: 56px; font-weight: 700; line-height: 1; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.pt-grade-count { font-size: 15px; font-weight: 700; }
.pt-grade-subjects { margin-bottom: 16px; font-size: 14px; line-height: 1.5; color: var(--muted-foreground); }
.pt-grade .pt-progress, .pt-subject .pt-progress { margin-top: auto; }
/* The round arrow in a grade's or subject's corner. */
.pt-go {
  position: absolute; top: 20px; right: 20px; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px;
  border: 1px solid var(--border); border-radius: 50%; color: var(--primary); transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.pt-go::before { content: '→'; font-size: 16px; font-weight: 700; }
.pt-grade:hover .pt-go, .pt-subject:hover .pt-go { border-color: var(--primary); background: var(--primary); color: #fff; }

@media (min-width: 600px) { .pt-grades { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) {
  .pt-hero { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 64px; margin: 24px 0 72px; }
  .pt-home { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); column-gap: 64px; align-items: center; margin-top: 24px; }
  .pt-home .pt-hero-text { grid-column: 1; grid-row: 1; margin-bottom: 72px; }
  .pt-home .pt-steps { grid-column: 2; grid-row: 1; margin: 0 0 72px; }
  .pt-home-grades { grid-column: 1 / -1; grid-row: 2; margin-top: 0; }
  .pt-steps { padding: 40px; }
}
@media (min-width: 1180px) { .pt-grades { grid-template-columns: repeat(5, minmax(0, 1fr)); } .pt-grade { min-height: 260px; } }

/* ── The efficiency bar ──────────────────────────────────────────────────────────────────────────────────────── */
.pt-progress-bar { height: 8px; border-radius: 999px; background: var(--muted); overflow: hidden; }
.pt-progress-bar span { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--primary); transition: width 0.6s var(--ease); }
.pt-progress-text { margin: 8px 0 0; font-size: 14px; font-weight: 600; color: var(--muted-foreground); }
.pt-progress.is-started .pt-progress-text { color: var(--foreground); }
.pt-progress--small .pt-progress-bar { height: 6px; }
.pt-progress--small .pt-progress-text { margin-top: 6px; font-size: 12px; }
.pt-progress--card { padding: 24px; border: 1px solid var(--border); border-radius: 16px; background: var(--card); }
.pt-progress-title { margin: 0 0 8px; font-size: 12px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted-foreground); }
.pt-progress-head { display: flex; align-items: baseline; gap: 8px; margin: 0 0 16px; }
.pt-progress-pct { font-size: 40px; font-weight: 700; line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.pt-progress-label { font-size: 14px; font-weight: 600; color: var(--muted-foreground); }
.pt-progress-note { margin: 16px 0 0; padding-top: 16px; border-top: 1px solid var(--border); font-size: 12px; color: var(--muted-foreground); }

/* ── A grade's page: its head, subjects, textbooks and reference books ───────────────────────────────────────── */
.pt-head--split { display: grid; gap: 24px; align-items: end; }
.pt-jump { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.pt-jump a {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--card); color: var(--foreground); font-size: 14px; text-decoration: none;
}
.pt-jump a:hover { border-color: var(--primary); color: var(--primary); }
.pt-subjects { display: grid; gap: 16px; }
.pt-subject { padding: 20px 64px 20px 24px; min-height: 128px; }
.pt-subject-name { font-size: 19px; font-weight: 700; line-height: 1.25; overflow-wrap: break-word; hyphens: auto; }
.pt-subject-count { margin-bottom: 12px; font-size: 14px; font-weight: 500; color: var(--muted-foreground); }
.pt-subgroup { margin: 32px 0 16px; font-size: 12px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted-foreground); }
.pt-subgroup:first-child { margin-top: 0; }

.pt-booklist { margin: 0; padding: 0; list-style: none; border: 1px solid var(--border); border-radius: 16px; background: var(--card); overflow: hidden; }
.pt-booklist > li { display: grid; gap: 4px 24px; padding: 16px 24px; border-top: 1px solid var(--border); }
.pt-booklist > li:first-child { border-top: 0; }
.pt-booklist-subject { font-size: 15px; font-weight: 700; }
.pt-booklist .pt-ext { white-space: normal; text-align: left; line-height: 1.35; }
.pt-ref-note { font-size: 14px; color: var(--muted-foreground); }
.pt-reflist { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.pt-reflist li { display: grid; }
.pt-ref-title { font-size: 15px; font-weight: 600; }
.pt-ref-by { font-size: 14px; color: var(--muted-foreground); }

@media (min-width: 640px) { .pt-subjects { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 900px) { .pt-booklist > li { grid-template-columns: 220px minmax(0, 1fr); align-items: start; } .pt-booklist > li > :not(.pt-booklist-subject) { grid-column: 2; } }
@media (min-width: 1024px) {
  .pt-head--split { grid-template-columns: minmax(0, 1fr) 380px; gap: 48px; }
  .pt-section--split { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 48px; align-items: start; }
  .pt-section--split .pt-section-head { position: sticky; top: 24px; }
}
@media (min-width: 1180px) { .pt-subjects { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ── A subject's page: the side card, then its chapters ──────────────────────────────────────────────────────── */
.pt-subject-layout { display: grid; gap: 24px; }
.pt-side, .pt-subject-main, .pt-side > * { min-width: 0; }
.pt-side { display: grid; gap: 16px; align-content: start; }
.pt-side-card { padding: 24px; border: 1px solid var(--border); border-radius: 16px; background: var(--card); }
.pt-side-card h1 { margin: 0 0 8px; font-size: clamp(32px, 1.6vw + 22px, 44px); font-weight: 700; line-height: 1.08; letter-spacing: -0.025em;  overflow-wrap: break-word; hyphens: auto; }
.pt-side-lead { margin: 0 0 24px; font-size: 15px; color: var(--muted-foreground); }
.pt-side-note { margin: 24px 0 0; padding-top: 16px; border-top: 1px solid var(--border); font-size: 13px; line-height: 1.55; color: var(--muted-foreground); }
.pt-side-card .pt-links { margin-top: 16px; }
@media (max-width: 1023px) { .pt-side-note, .pt-progress-note { display: none; } .pt-progress--card .pt-progress-pct { font-size: 32px; } }
.pt-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.pt-stats div { min-width: 0; padding: 12px 14px; border-left: 1px solid var(--border); }
.pt-stats div:first-child { border-left: 0; }
.pt-stats dt { font-size: 12px; font-weight: 600; color: var(--muted-foreground); }
.pt-stats dd { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }

.pt-bookset { margin-top: 40px; }
.pt-bookset:first-child { margin-top: 0; }
.pt-book-head { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 4px 16px; margin-bottom: 16px; }
.pt-book-of { grid-column: 1 / -1; margin: 0; font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--primary); }
.pt-book-name { margin: 0; font-size: 22px; line-height: 1.25; letter-spacing: -0.01em; }
.pt-book-count { margin: 0; font-size: 14px; font-weight: 600; color: var(--muted-foreground); white-space: nowrap; }
.pt-book-open { grid-column: 1 / -1; margin: 0; }

.pt-chapters { margin: 0; padding: 0; list-style: none; border: 1px solid var(--border); border-radius: 16px; background: var(--card); overflow: hidden; }
.pt-ch {
  display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 16px; padding: 20px; border-top: 1px solid var(--border);
  transition: background-color 0.18s var(--ease);
}
.pt-ch:first-child { border-top: 0; }
.pt-ch:hover { background: #fcfbf8; }
.pt-ch-no { display: flex; flex-direction: column; align-items: flex-start; padding-top: 2px; }
.pt-ch-kind { font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted-foreground); }
.pt-ch-num { font-size: 22px; font-weight: 700; line-height: 1.1; color: var(--primary); font-variant-numeric: tabular-nums; }
.pt-ch-title { margin: 0 0 4px; font-size: 17px; font-weight: 700; line-height: 1.35; }
.pt-ch-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin: 0 0 8px; font-size: 14px; font-weight: 500; color: var(--muted-foreground); }
.pt-ch-sheet { display: inline-flex; align-items: center; gap: 6px; color: var(--foreground); font-weight: 600; }
.pt-ch-sheet::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--right); }
.pt-ch-best { padding: 2px 8px; border-radius: 999px; background: var(--right-light); color: var(--right); font-size: 12px; font-weight: 700; }
.pt-ch-buttons { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (max-width: 767px) { .pt-ch { grid-template-columns: 40px minmax(0, 1fr); gap: 12px 16px; } .pt-ch .pt-links-list { display: contents; } .pt-ch .pt-links--set { gap: 0 12px; } }
.pt-ch-buttons > :only-child { grid-column: 1 / -1; }
.pt-ch-buttons .pt-start, .pt-ch-buttons .pt-sheet { min-height: 44px; padding: 0 16px; font-size: 14px; }
.pt-ch.is-done .pt-start { border-color: var(--primary); background: var(--card); color: var(--primary); }
.pt-ch.is-done .pt-start:hover { background: var(--orange-light); }

/* A row lays out by the room its list has (the side card takes some on a computer), not by the screen. */
.pt-subject-main { container-type: inline-size; }
@container (min-width: 560px) {
  .pt-ch { grid-template-columns: 56px minmax(0, 1fr); gap: 8px 24px; padding: 20px 24px; }
  .pt-ch-buttons { grid-column: 2; display: flex; gap: 8px; }
  .pt-ch-buttons .pt-start, .pt-ch-buttons .pt-sheet { min-width: 140px; }
}
@container (min-width: 780px) {
  .pt-ch { grid-template-columns: 56px minmax(0, 1fr) auto; align-items: center; gap: 24px; }
  .pt-ch-buttons { grid-column: auto; }
}
@media (min-width: 1024px) {
  .pt-subject-layout { grid-template-columns: 340px minmax(0, 1fr); gap: 40px; align-items: start; }
  .pt-side { position: sticky; top: 24px; }
}

/* ── A test: its head, Before you start, the exam ────────────────────────────────────────────────────────────── */
.pt-head--test { max-width: 960px; }
.pt-head--test h1 { font-size: clamp(30px, 1.6vw + 22px, 46px); }
.pt-head--test .pt-links--set { margin-top: 4px; }

.pt-intro {
  display: grid; gap: 24px; padding: 32px 24px; border-radius: 24px; background: var(--dark); color: var(--on-dark);
}
.pt-intro h2 { margin: 0 0 16px; font-size: 24px; color: var(--on-dark); letter-spacing: -0.01em; }
.pt-intro-list { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.pt-intro-list li { position: relative; padding-left: 24px; color: var(--on-dark-muted); font-size: 15px; line-height: 1.55; }
.pt-intro-list li::before { content: ''; position: absolute; left: 2px; top: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--peach); }
.pt-intro-list strong { color: var(--on-dark); }
.pt-intro-go { display: grid; gap: 16px; align-content: center; }
.pt-intro-time { margin: 0; font-size: 15px; color: var(--on-dark-muted); }
.pt-intro-time strong { font-size: 28px; color: var(--on-dark); font-variant-numeric: tabular-nums; }
.pt-begin { min-height: 56px; font-size: 17px; border: 0; }
.pt-exam.is-intro .pt-bar, .pt-exam.is-intro .pt-exam-grid { display: none !important; }
@media (min-width: 768px) {
  .pt-intro { grid-template-columns: minmax(0, 1fr) 280px; gap: 48px; padding: 40px; }
  .pt-intro-go { padding-left: 40px; border-left: 1px solid rgba(249, 248, 244, 0.14); }
}

.pt-bar {
  position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  margin: 0 -24px 16px; padding: 12px 24px; border-bottom: 1px solid var(--border); background: var(--card); font-size: 15px; font-weight: 600;
}
.pt-bar-status { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; min-width: 0; }
.pt-clock {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: var(--dark); color: var(--on-dark);
  font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.pt-clock::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--peach); }
.pt-clock.is-low { background: var(--wrong); }
.pt-clock.is-low::before { background: #fff; }
.pt-count { color: var(--muted-foreground); font-size: 14px; white-space: nowrap; }
.pt-palette-toggle {
  min-height: 44px; padding: 0 16px; border: 1px solid var(--border); border-radius: 8px; background: var(--card);
  font: inherit; font-size: 14px; font-weight: 600; color: var(--foreground); cursor: pointer; white-space: nowrap;
}

.pt-q { position: relative; min-width: 0; margin: 0 0 16px; padding: 24px; border: 1px solid var(--border); border-radius: 16px; background: var(--card); }
.pt-q-head { float: left; width: 100%; display: flex; align-items: baseline; gap: 8px; margin: 0 0 16px; padding: 0 0 16px; border-bottom: 1px solid var(--border); }
.pt-q-head + * { clear: both; }
.pt-q-no { font-size: 15px; font-weight: 700; color: var(--primary); }
.pt-q-of { font-size: 14px; color: var(--muted-foreground); }
.pt-q-head .pt-tag { margin-left: auto; }
.pt-stem { margin: 0 0 12px; font-size: 17px; line-height: 1.65; overflow-wrap: anywhere; }
.pt-statements { margin: 0 0 12px; padding: 0; list-style: none; }
.pt-statements li { margin-bottom: 4px; }
.pt-statements span { margin-right: 4px; font-weight: 700; }
.pt-match-wrap { overflow-x: auto; margin-bottom: 12px; }
.pt-match { width: 100%; border-collapse: collapse; font-size: 15px; }
.pt-match th, .pt-match td { padding: 8px 12px; border: 1px solid var(--border); text-align: left; vertical-align: top; }
.pt-match th { background: var(--muted); white-space: nowrap; }
.pt-match td { overflow-wrap: anywhere; hyphens: auto; }
.pt-match td:first-child { width: 40%; }
@media (max-width: 359px) { .pt-match { font-size: 14px; } .pt-match th, .pt-match td { padding: 8px; } }
.pt-figure { display: block; max-width: 100%; height: auto; margin: 0 0 12px; }
.pt-passage { margin: 0 0 16px; padding: 20px 24px; border-left: 4px solid var(--primary); border-radius: 0 16px 16px 0; background: var(--orange-light); }
.pt-passage h2, .pt-passage h3 { margin: 0 0 8px; font-size: 13px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--primary); }
.pt-passage p { margin: 0; }
.pt-choices { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.pt-choice {
  display: flex; align-items: center; gap: 16px; min-height: 56px; padding: 12px 16px; border: 1px solid var(--border);
  border-radius: 12px; background: var(--background); font-size: 16px; line-height: 1.45; overflow-wrap: anywhere;
  transition: border-color 0.15s var(--ease), background-color 0.15s var(--ease);
}
label.pt-choice { position: relative; cursor: pointer; }
label.pt-choice:hover { border-color: var(--border-strong); background: #fff; }
label.pt-choice:has(input:checked) { border-color: var(--primary); background: var(--orange-light); }
label.pt-choice:has(input:focus-visible) { outline: 3px solid var(--foreground); outline-offset: 2px; }
.pt-choice input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.pt-letter {
  display: inline-flex; align-items: center; justify-content: center; flex: none; width: 32px; height: 32px; border: 1.5px solid var(--border-strong);
  border-radius: 50%; background: var(--card); font-size: 14px; font-weight: 700; text-transform: lowercase;
}
label.pt-choice:has(input:checked) .pt-letter { border-color: var(--primary); background: var(--primary); color: #fff; }
.pt-choice-text { flex: 1; min-width: 0; }
.pt-choice.is-answer { border-color: var(--right); background: var(--right-light); }
.pt-choice.is-chosen-wrong { border-color: var(--wrong); background: var(--wrong-light); }
.pt-choice.is-answer .pt-letter { border-color: var(--right); background: var(--right); color: #fff; }
.pt-choice.is-chosen-wrong .pt-letter { border-color: var(--wrong); background: var(--wrong); color: #fff; }
.pt-why-tag { flex: none; padding: 2px 8px; border-radius: 999px; background: var(--right); color: #fff; font-size: 12px; font-weight: 700; }
.pt-why-tag--you { background: var(--foreground); }
.pt-choice .pt-why-tag:first-of-type { margin-left: auto; }
.pt-tag { padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.pt-tag.is-right { background: var(--right-light); color: var(--right); }
.pt-tag.is-wrong { background: var(--wrong-light); color: var(--wrong); }
.pt-tag.is-blank { background: var(--muted); color: var(--muted-foreground); }
.pt-q.is-right { border-left: 4px solid var(--right); }
.pt-q.is-wrong { border-left: 4px solid var(--wrong); }
.pt-why { margin-top: 16px; font-size: 15px; }
.pt-why summary { display: flex; align-items: center; min-height: 44px; font-weight: 700; color: var(--primary); cursor: pointer; }
.pt-why p { margin: 0; overflow-wrap: anywhere; }
.pt-submit { display: grid; justify-items: start; gap: 8px; margin-top: 24px; }

.pt-exam.is-paged .pt-q { margin-bottom: 0; }
.pt-exam-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 16px; }
.pt-nav-btn {
  min-height: 48px; padding: 0 16px; border: 1px solid var(--border); border-radius: 8px; background: var(--card);
  font: inherit; font-size: 15px; font-weight: 600; color: var(--foreground); cursor: pointer;
}
.pt-nav-btn:hover:not(:disabled) { border-color: var(--foreground); }
.pt-nav-btn:disabled { opacity: 0.45; cursor: default; }
.pt-nav-mark[aria-pressed="true"] { border-color: var(--primary); background: var(--orange-light); color: var(--primary); }
.pt-nav-next { grid-column: 1 / -1; width: 100%; border: 0; }
.pt-palette { display: none; }
.pt-palette.is-open {
  display: block; position: fixed; z-index: 20; left: 0; right: 0; bottom: 0; max-height: 80vh; overflow: auto; padding: 16px 16px 24px;
  border-radius: 24px 24px 0 0; background: var(--card); box-shadow: 0 -8px 32px rgba(37, 39, 33, 0.16);
}
.pt-palette-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.pt-palette-head h2 { margin: 0; font-size: 17px; }
.pt-palette-close { min-height: 44px; padding: 0 16px; border: 0; background: none; font: inherit; font-weight: 700; color: var(--primary); cursor: pointer; }
.pt-palette-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 8px; }
.pt-pal {
  height: 44px; border: 1.5px solid var(--border); border-radius: 8px; background: var(--background);
  font: inherit; font-size: 14px; font-weight: 700; color: var(--foreground); cursor: pointer; font-variant-numeric: tabular-nums;
}
.pt-pal:hover { border-color: var(--foreground); }
.pt-pal.is-answered { border-color: var(--right); background: var(--right); color: #fff; }
.pt-pal.is-marked { border-color: var(--primary); background: var(--orange-light); color: var(--primary); }
.pt-pal.is-answered.is-marked { border-width: 3px; border-color: var(--primary); background: var(--right); color: #fff; }
.pt-pal.is-current { outline: 3px solid var(--foreground); outline-offset: 2px; }
.pt-palette-key { display: grid; gap: 8px; margin: 16px 0; padding: 16px 0 0; border-top: 1px solid var(--border); list-style: none; font-size: 13px; color: var(--muted-foreground); }
.pt-palette-key li { display: flex; align-items: center; gap: 8px; }
.pt-key { width: 16px; height: 16px; border: 1.5px solid var(--border); border-radius: 4px; background: var(--background); }
.pt-key.is-answered { border-color: var(--right); background: var(--right); }
.pt-key.is-marked { border-color: var(--primary); background: var(--orange-light); }
.pt-palette-submit { width: 100%; border: 0; }
.pt-confirm { width: min(460px, calc(100vw - 48px)); padding: 32px; border: 0; border-radius: 24px; box-shadow: 0 24px 64px rgba(37, 39, 33, 0.3); }
.pt-confirm::backdrop { background: rgba(37, 39, 33, 0.5); }
.pt-confirm h2 { margin: 0 0 16px; font-size: 22px; }
.pt-confirm-sum { display: grid; gap: 4px; margin: 0 0 16px; padding: 0; list-style: none; font-size: 16px; }
.pt-confirm-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 24px; }
.pt-confirm-actions .portal-button { border: 0; }
@media (max-width: 479px) { .pt-bar-status { gap: 4px 12px; } }
@media (min-width: 768px) {
  .pt-bar { top: 8px; margin: 0 0 16px; padding: 12px 16px; border: 1px solid var(--border); border-radius: 12px; }
  .pt-q { padding: 32px; }
}
@media (min-width: 960px) {
  .pt-exam.is-paged .pt-exam-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
  .pt-exam.is-paged .pt-palette {
    display: block; position: sticky; top: 88px; padding: 20px; border: 1px solid var(--border); border-radius: 16px; background: var(--card);
  }
  .pt-palette-close, .pt-exam.is-paged .pt-palette-toggle { display: none; }
  .pt-exam-nav { grid-template-columns: auto 1fr auto; }
  .pt-nav-next { grid-column: auto; width: auto; padding: 0 32px; }
  .pt-nav-mark { justify-self: center; }
}

/* ── The marks: the score ring, the question map, filters, every question ────────────────────────────────────── */
.pt-result-grid { display: grid; gap: 16px; margin-bottom: 24px; }
.pt-score, .pt-map { padding: 24px; border: 1px solid var(--border); border-radius: 16px; background: var(--card); }
.pt-score-top { display: flex; align-items: center; gap: 24px; margin-bottom: 24px; }
.pt-ring {
  --pct: 0; position: relative; flex: none; width: 112px; height: 112px; border-radius: 50%;
  background: conic-gradient(var(--primary) calc(var(--pct) * 1%), var(--muted) 0);
}
.pt-ring::before { content: ''; position: absolute; inset: 10px; border-radius: 50%; background: var(--card); }
.pt-ring-pct {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 26px; font-weight: 700;
  letter-spacing: -0.02em; font-variant-numeric: tabular-nums;
}
.pt-score-big { margin: 0; font-size: 18px; color: var(--muted-foreground); }
.pt-score-big strong { font-size: 48px; font-weight: 700; line-height: 1; letter-spacing: -0.03em; color: var(--foreground); }
.pt-score-pct { margin: 8px 0 0; font-size: 14px; font-weight: 600; color: var(--muted-foreground); }
.pt-score-parts { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; padding: 0; list-style: none; font-size: 14px; font-weight: 700; }
.pt-score-parts li { padding: 6px 14px; border-radius: 999px; }
.pt-score-parts .is-right { background: var(--right-light); color: var(--right); }
.pt-score-parts .is-wrong { background: var(--wrong-light); color: var(--wrong); }
.pt-score-parts .is-blank { background: var(--muted); color: var(--muted-foreground); }
.pt-score-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin: 0; }
.pt-link { display: inline-flex; align-items: center; min-height: 44px; }
.pt-map h2 { margin: 0 0 16px; font-size: 18px; }
.pt-map-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 8px; }
.pt-map-q {
  display: inline-flex; align-items: center; justify-content: center; height: 44px; border-radius: 8px; color: #fff;
  font-size: 14px; font-weight: 700; text-decoration: none; font-variant-numeric: tabular-nums;
}
.pt-map-q.is-right { background: var(--right); }
.pt-map-q.is-wrong { background: var(--wrong); }
.pt-map-q.is-blank { background: var(--muted); color: var(--muted-foreground); }
.pt-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.pt-filter {
  min-height: 40px; padding: 0 16px; border: 1px solid var(--border); border-radius: 999px; background: var(--card);
  font: inherit; font-size: 14px; font-weight: 600; color: var(--foreground); cursor: pointer;
}
.pt-filter span { margin-left: 4px; color: var(--muted-foreground); }
.pt-filter[aria-pressed="true"] { border-color: var(--foreground); background: var(--foreground); color: #fff; }
.pt-filter[aria-pressed="true"] span { color: #d6d6cf; }
.pt-review .pt-q { scroll-margin-top: 16px; }
@media (min-width: 960px) { .pt-result-grid { grid-template-columns: 400px minmax(0, 1fr); align-items: start; } }

/* ── A worksheet: the outline beside the questions, in Easy, Medium and Hard ─────────────────────────────────── */
.ws-layout { display: grid; gap: 24px; }
.ws-side-card { padding: 20px; border: 1px solid var(--border); border-radius: 16px; background: var(--card); }
.ws-side-title { margin: 0 0 16px; font-size: 12px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted-foreground); }
.ws-outline { display: none; margin: 0 0 16px; padding: 0; list-style: none; }
.ws-outline > li + li { margin-top: 16px; }
.ws-outline-part { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 8px; color: var(--foreground); font-size: 15px; font-weight: 700; text-decoration: none; }
.ws-outline-part span { font-size: 12px; font-weight: 600; color: var(--muted-foreground); }
.ws-outline-qs { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; margin: 0; padding: 0; list-style: none; }
.ws-outline-qs a {
  display: flex; align-items: center; justify-content: center; height: 36px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--background); color: var(--foreground); font-size: 13px; font-weight: 700; text-decoration: none; font-variant-numeric: tabular-nums;
}
.ws-outline-qs a:hover { border-color: var(--primary); color: var(--primary); }
.ws-tools { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.ws-tools .pt-start { grid-column: 1 / -1; }
.ws-tools > :only-child { grid-column: 1 / -1; }
@media (max-width: 1023px) { .ws-side-title, .ws-tools [data-print] { display: none; } .ws-tools { grid-template-columns: 1fr; } }
.ws-tools .pt-btn, .ws-tools .pt-start { min-height: 44px; padding: 0 12px; font-size: 14px; }
.ws-main { min-width: 0; }
.ws-part { margin-bottom: 40px; }
.ws-part-head { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 4px 16px; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--border); scroll-margin-top: 16px; }
.ws-part-head .pt-book-of { grid-column: 1 / -1; }
.ws-part-head .pt-book-name { font-size: 26px; letter-spacing: -0.02em; scroll-margin-top: 24px; }
.ws-q { margin-bottom: 16px; scroll-margin-top: 16px; }
.ws-q .pt-q-head { flex-wrap: wrap; align-items: center; row-gap: 8px; }
.ws-q .pt-q-no, .ws-q .pt-q-of { white-space: nowrap; }
.ws-tags { display: inline-flex; flex-wrap: nowrap; gap: 8px; margin-left: auto; }
@media (max-width: 599px) { .ws-tags { flex-basis: 100%; margin-left: 0; } }
.ws-style, .ws-marks { padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.ws-style { background: var(--orange-light); color: var(--primary); }
.ws-marks { background: var(--muted); color: var(--foreground); }
.ws-marks-inline { font-size: 14px; color: var(--muted-foreground); }
.ws-options { display: grid; gap: 8px; margin: 0 0 8px; padding: 0; list-style: none; }
.ws-options li { display: flex; align-items: center; gap: 16px; padding: 10px 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--background); }
/* An option's text may be narrower than its widest formula or word, so fitMath() draws the formula to fit and a long
   word breaks, instead of the option widening the page (Grade 11 and 12 worksheets, 25 Oct 2026). */
.ws-options li, .ws-options li > span:last-child { min-width: 0; }
.ws-options li > span:last-child { overflow-wrap: break-word; hyphens: auto; }
.ws-parts { display: grid; gap: 8px; margin: 16px 0 0; padding: 0; list-style: none; }
.ws-parts li { display: grid; grid-template-columns: 40px 1fr; gap: 8px; }
.ws-part-no { font-weight: 700; color: var(--primary); }
.ws-answer { margin-top: 16px; }
.ws-answer summary {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border: 1px solid var(--primary); border-radius: 8px;
  color: var(--primary); list-style: none; transition: background-color 0.15s var(--ease);
}
.ws-answer summary::-webkit-details-marker { display: none; }
.ws-answer summary::after { content: ''; width: 7px; height: 7px; margin-top: -3px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform 0.2s var(--ease); }
.ws-answer[open] summary::after { margin-top: 3px; transform: rotate(-135deg); }
.ws-answer summary:hover { background: var(--orange-light); }
.ws-answer[open] .ws-show, .ws-answer:not([open]) .ws-hide { display: none; }
.ws-answer[open] summary { background: var(--orange-light); }
.ws-answer-body { margin-top: 16px; padding: 20px; border-radius: 12px; background: var(--orange-light); }
.ws-answer-body p { margin: 0 0 8px; }
.ws-marking-title { margin-top: 16px !important; font-weight: 700; }
.ws-marking { margin: 0; padding-left: 24px; }
@media (min-width: 1024px) {
  .ws-layout { grid-template-columns: 280px minmax(0, 820px); gap: 40px; align-items: start; }
  .ws-side { position: sticky; top: 24px; }
  .ws-outline { display: block; }
  .ws-tools { grid-template-columns: 1fr; }
}
@media print {
  .portal-top, .portal-foot, .pt-crumbs, .ws-side, .pt-links, .pt-notice, .ws-answer summary, .pt-chips { display: none !important; }
  body { background: #fff; }
  .portal-main { padding: 0; }
  .ws-layout { display: block; }
  .ws-answer, .ws-answer-body { margin-top: 0; }
  .ws-q { break-inside: avoid; border-color: #ccc; }
}

/* ── Maths (KaTeX) ───────────────────────────────────────────────────────────────────────────────────────────── */
.katex { font-size: 1.05em; }
.katex-display { overflow-x: auto; overflow-y: hidden; padding: 4px 0; }
/* A formula too wide to draw small enough for its line (portal-test.js, fitMath()): it scrolls, the page doesn't. */
.katex.katex-scroll { display: inline-block; max-width: 100%; overflow-x: auto; overflow-y: hidden; vertical-align: middle; }
/* The punctuation after a formula, drawn inside its last piece (portal-test.js drawMath): never a comma at the start of
   a line. In the text's own font and size (KaTeX draws at 1.21em); the text's copy is for screen readers only. */
.katex .math-punct { font-family: 'Plus Jakarta Sans', 'Arial', sans-serif; font-size: calc(1em / 1.21); font-style: normal; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* ── Proficiency (owner, 24 Oct 2026): the share right and its level, for a test, a chapter, a subject, a grade ────── */
:root { --developing: #a86a05; --developing-light: #fbefd5; }
.pt-level {
  display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 999px; background: var(--muted); color: var(--muted-foreground);
  font-size: 12px; font-weight: 700; white-space: nowrap;
}
.pt-level.is-beginning { background: var(--orange-light); color: var(--primary); }
.pt-level.is-developing { background: var(--developing-light); color: var(--developing); }
.pt-level.is-proficient { background: var(--right-light); color: var(--right); }
.pt-level.is-mastered { background: var(--right); color: #fff; }
.pt-prof-bar { height: 6px; border-radius: 999px; background: var(--muted); overflow: hidden; }
.pt-prof-bar span, .pt-progress-bar span { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--primary); transition: width 0.6s var(--ease); }
.is-developing .pt-prof-bar span, .pt-progress.is-developing .pt-progress-bar:not(.pt-progress-bar--done) span { background: #d9952b; }
.is-proficient .pt-prof-bar span, .pt-progress.is-proficient .pt-progress-bar:not(.pt-progress-bar--done) span { background: #3f8f5f; }
.is-mastered .pt-prof-bar span, .pt-progress.is-mastered .pt-progress-bar:not(.pt-progress-bar--done) span { background: var(--right); }
.pt-prof-text { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 8px 0 0; font-size: 13px; font-weight: 600; color: var(--muted-foreground); }
.pt-ch .pt-prof { max-width: 420px; margin: 4px 0 12px; }
.pt-progress-head .pt-level { align-self: center; }
.pt-progress-sub { margin: 16px 0 6px; font-size: 12px; font-weight: 700; color: var(--muted-foreground); }
.pt-progress-bar--done { height: 6px; }
.pt-progress-bar--done span { background: var(--dark); }

/* The marks page: this test, the chapter, the subject. */
.pt-levels { margin: 0 0 24px; padding: 24px; border: 1px solid var(--border); border-radius: 16px; background: var(--card); }
.pt-levels h2 { margin: 0 0 16px; font-size: 18px; }
.pt-levels-grid { display: grid; gap: 16px; }
.pt-level-row { min-width: 0; }
.pt-level-row + .pt-level-row { padding-top: 16px; border-top: 1px solid var(--border); }
.pt-level-name { margin: 0 0 8px; font-size: 15px; font-weight: 700; }
.pt-level-name span { display: block; font-size: 13px; font-weight: 500; color: var(--muted-foreground); }
.pt-levels .pt-prof-bar { height: 10px; }
@media (min-width: 900px) {
  .pt-levels-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; }
  .pt-level-row { padding: 0 24px; }
  .pt-level-row:first-child { padding-left: 0; }
  .pt-level-row:last-child { padding-right: 0; }
  .pt-level-row + .pt-level-row { padding-top: 0; border-top: 0; border-left: 1px solid var(--border); }
}

/* Before a test, the worksheet. */
.pt-ask { width: min(520px, calc(100vw - 32px)); }
.pt-ask .pt-eyebrow { margin-bottom: 12px; }
.pt-ask-text { margin: 0 0 12px; color: var(--muted-foreground); }
.pt-ask-q { margin: 0; font-weight: 700; }
.pt-ask .pt-confirm-actions { justify-content: stretch; }
.pt-ask .pt-confirm-actions > * { flex: 1 1 200px; }
.pt-intro-sheet { margin: 24px 0 0; padding-top: 16px; border-top: 1px solid rgba(249, 248, 244, 0.14); font-size: 15px; color: var(--on-dark-muted); }
.pt-intro-sheet a { color: var(--peach); }

/* ── The portal's tabs under the header: Chapter tests, Diagnostics (25 Oct 2026) ────────────────────────────────── */
.portal-tabs { border-top: 1px solid var(--border); }
.portal-tabs-inner { display: flex; gap: 32px; max-width: 1344px; margin: 0 auto; padding: 0 24px; overflow-x: auto; scrollbar-width: none; }
.portal-tabs a {
  display: inline-flex; align-items: center; min-height: 48px; border-bottom: 3px solid transparent; color: var(--muted-foreground);
  font-size: 15px; font-weight: 700; text-decoration: none; white-space: nowrap;
}
.portal-tabs a:hover { color: var(--foreground); }
.portal-tabs a[aria-current="page"] { border-bottom-color: var(--primary); color: var(--foreground); }
@media (min-width: 768px) { .portal-tabs-inner { padding: 0 48px; } }

/* ── Diagnostics, with AI-abled (25 Oct 2026; made quieter the same day, owner: "what we see now is loud"). Career
   Launcher's own frame: ivory, ink, CL orange as the one accent, Plus Jakarta, one soft shadow. AI-abled is the guest
   brand, shown by its mark and its wordmark (Unbounded) only. Radii: 8 for controls and chips, 16 for cards and the tab
   bar (10 inside it), 24 for the two dark panels. The pictures are real pages of AI-abled's sample reports. ─────────── */
@font-face { font-family: 'Unbounded'; src: url('/assets/unbounded-black.ttf') format('truetype'); font-weight: 900; font-display: swap; }
.dg { --dg-page-shadow: 0 24px 40px -20px rgba(18, 20, 15, 0.55); }
@media (prefers-reduced-motion: no-preference) { html:has(.dg) { scroll-behavior: smooth; } }
/* On the dark panels the focus ring turns ivory. */
.dg-stage a:focus-visible, .dg-why a:focus-visible { outline-color: var(--on-dark); }

/* The hero: the words, then (beside them from 1200px) a dark stage with three real report pages rising into it. */
.dg-hero { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; align-items: center; }
.dg-cobrand {
  display: inline-flex; align-items: center; gap: 12px; margin: 0 0 28px; padding: 8px 16px 8px 12px; border: 1px solid var(--border);
  border-radius: 8px; background: var(--card);
}
.dg-cobrand img { display: block; width: 88px; height: auto; }
.dg-x { font-size: 16px; color: var(--muted-foreground); }
.dg-ai { display: inline-flex; align-items: center; gap: 8px; }
.dg-mark { display: block; flex: none; }
.dg-ai-name { font-family: 'Unbounded', 'Plus Jakarta Sans', 'Arial', sans-serif; font-size: 16px; font-weight: 900; letter-spacing: -0.02em; color: #16130d; }
.dg h1 { max-width: 15ch; margin: 0 0 20px; font-size: clamp(36px, 1.7vw + 26px, 54px); font-weight: 800; line-height: 1.05; letter-spacing: -0.035em; }
.dg-lead { max-width: 44ch; margin: 0; font-size: 18px; line-height: 1.6; color: var(--muted-foreground); }
.dg-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 32px 0 0; }

.dg-stage { position: relative; height: 248px; overflow: hidden; border-radius: 24px; background: radial-gradient(120% 90% at 50% 0%, #3b3f35 0%, var(--dark) 64%); }
.dg-fan-page {
  --x: 0px; --y: 0px; --r: 0deg; --lift: 0px;
  position: absolute; bottom: -40px; left: 50%; z-index: 1; display: block; width: 164px; overflow: hidden; border: 1px solid rgba(18, 20, 15, 0.2);
  border-radius: 6px; background: #fff; box-shadow: var(--dg-page-shadow);
  transform: translate(calc(-50% + var(--x)), calc(var(--y) - var(--lift))) rotate(var(--r)); transform-origin: 50% 100%;
  transition: transform 0.5s var(--ease);
}
.dg-fan-page img { display: block; width: 100%; height: auto; }
.dg-fan-page--1 { --x: -96px; --r: -6deg; }
.dg-fan-page--2 { --y: -16px; z-index: 2; }
.dg-fan-page--3 { --x: 96px; --r: 6deg; }
.dg-fan-page:hover, .dg-fan-page:focus-visible { --lift: 14px; z-index: 3; }
/* The narrowest phones: the badge fits in one line. */
@media (max-width: 379px) {
  .dg-cobrand { gap: 8px; padding: 6px 12px 6px 10px; }
  .dg-cobrand img { width: 72px; }
  .dg-ai-name { font-size: 15px; }
}
@media (min-width: 768px) {
  .dg-stage { height: 320px; }
  .dg-fan-page { bottom: -56px; width: 214px; }
  .dg-fan-page--1 { --x: -132px; }
  .dg-fan-page--3 { --x: 132px; }
}
@media (min-width: 1200px) {
  .dg-hero { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 64px; }
  .dg-stage { height: 420px; }
  .dg-fan-page { bottom: -40px; width: 264px; }
  .dg-fan-page--1 { --x: -156px; }
  .dg-fan-page--2 { --y: -20px; }
  .dg-fan-page--3 { --x: 156px; }
}
@media (prefers-reduced-motion: no-preference) {
  .dg-fan-page { animation: dg-rise 0.9s var(--ease) backwards; }
  .dg-fan-page--1 { animation-delay: 0.12s; }
  .dg-fan-page--3 { animation-delay: 0.22s; }
}
@keyframes dg-rise { from { opacity: 0; transform: translate(-50%, 64px) rotate(0deg); } }

/* The five kinds: one quiet tab bar (it scrolls sideways on a phone). */
.dg-choose { margin: 72px 0 32px; scroll-margin-top: 16px; }
.dg-tabs {
  display: flex; gap: 4px; width: fit-content; max-width: 100%; padding: 6px; overflow-x: auto; border: 1px solid var(--border); border-radius: 16px;
  background: var(--card); scrollbar-width: none;
}
.dg-tabs::-webkit-scrollbar { display: none; }
/* position: relative keeps each tab's screen-reader words inside the scrolling bar (else the page scrolls sideways). */
.dg-tab {
  position: relative; display: inline-flex; flex: none; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px 0 14px; border-radius: 10px;
  color: var(--muted-foreground); font-size: 15px; font-weight: 600; text-decoration: none; white-space: nowrap;
  transition: background-color 0.18s var(--ease), color 0.18s var(--ease);
}
.dg-tab:hover { background: var(--muted); color: var(--foreground); }
.dg-tab[aria-selected="true"] { background: var(--foreground); color: #fff; }
.dg-tab small {
  display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 6px;
  background: var(--muted); color: var(--foreground); font-size: 12px; font-weight: 700;
}
.dg-tab[aria-selected="true"] small { background: rgba(255, 255, 255, 0.16); color: #fff; }
.dg-panels.is-tabbed .dg-panel:not(.is-active) { display: none; }
.dg-panel + .dg-panel { margin-top: 72px; }
.dg-panels.is-tabbed .dg-panel + .dg-panel { margin-top: 0; }
.dg-panel { scroll-margin-top: 16px; }
.dg-panel-head { max-width: 720px; margin-bottom: 32px; }
.dg-panel-head h2 { margin: 0 0 12px; font-size: clamp(26px, 1vw + 20px, 36px); font-weight: 700; line-height: 1.15; letter-spacing: -0.025em; }
.dg-line { margin: 0; font-size: 16px; line-height: 1.6; color: var(--muted-foreground); }
.dg-overview { margin: 12px 0 0; }

/* The cards: two up from 760px; an odd count's first spans the row (and from 1024px lies on its side). Each opens with
   the top of its sample report's first page. */
.dg-cards { display: grid; gap: 24px; }
@media (min-width: 760px) { .dg-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } .dg-card--wide { grid-column: 1 / -1; } }
.dg-card { display: flex; flex-direction: column; min-width: 0; overflow: hidden; border: 1px solid var(--border); border-radius: 16px; background: var(--card); }
.dg-peek { position: relative; display: block; flex: none; height: 168px; overflow: hidden; background: var(--muted); }
.dg-peek img {
  position: absolute; top: 28px; left: 50%; width: 62%; max-width: 288px; height: auto; border: 1px solid var(--border-strong); border-radius: 4px;
  background: #fff; box-shadow: var(--shadow); transform: translate(-50%, 0); transition: transform 0.5s var(--ease);
}
.dg-peek:hover img, .dg-card:has(.dg-btn--primary:hover) .dg-peek img { transform: translate(-50%, -8px); }
.dg-body { display: flex; flex: 1; flex-direction: column; min-width: 0; padding: 24px 24px 28px; }
.dg-name { margin: 0; font-size: 22px; font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.dg-tag { margin: 4px 0 14px; font-size: 14px; font-weight: 600; line-height: 1.45; color: var(--muted-foreground); }
.dg-what { max-width: 62ch; margin: 0 0 18px; font-size: 15px; line-height: 1.65; }
.dg-facts { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.dg-facts li { padding: 4px 10px; border-radius: 8px; background: var(--muted); font-size: 13px; font-weight: 600; line-height: 1.5; }
.dg-also { margin: 14px 0 0; font-size: 14px; }
.dg-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; margin: auto 0 0; padding-top: 24px; }
@media (min-width: 1024px) {
  .dg-card--wide { display: grid; grid-template-columns: minmax(0, 320px) minmax(0, 1fr); }
  .dg-card--wide .dg-peek { height: auto; min-height: 320px; }
  .dg-card--wide .dg-peek img { top: 36px; width: 228px; }
  .dg-card--wide .dg-body { padding: 32px 36px; }
}
@media (prefers-reduced-motion: no-preference) {
  .dg-panel.is-active .dg-card { animation: dg-in 0.45s var(--ease) backwards; animation-delay: calc(var(--i, 0) * 60ms); }
}
@keyframes dg-in { from { opacity: 0; transform: translateY(8px); } }

/* Buttons: CL orange for the one main action, ink outline for the other, Details as a plain link. The arrows are for
   the eye only (the page tells screen readers about the new tab). */
.dg-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border: 1px solid var(--foreground);
  border-radius: 8px; background: var(--card); color: var(--foreground); font-size: 15px; font-weight: 700; text-decoration: none; white-space: nowrap;
  transition: background-color 0.18s var(--ease), border-color 0.18s var(--ease), transform 0.18s var(--ease);
}
.dg-btn:hover { background: var(--muted); }
.dg-btn:active { transform: scale(0.98); }
.dg-btn--primary { border-color: var(--primary); background: var(--primary); color: #fff; }
.dg-btn--primary:hover { border-color: var(--primary-hover); background: var(--primary-hover); }
.dg-more {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; color: var(--foreground); font-size: 15px; font-weight: 700;
  text-decoration: underline; text-decoration-color: var(--border-strong); text-decoration-thickness: 1px; text-underline-offset: 5px;
}
.dg-more:hover { color: var(--primary); text-decoration-color: currentColor; }
.dg-btn[target="_blank"]::after, .dg-more::after { content: '↗'; content: '↗' / ''; font-size: 13px; }
.dg-btn--down::after { content: '↓'; content: '↓' / ''; font-size: 13px; }

/* How it works: three steps on a thin line (down the side on a phone, across from 900px). */
.dg-how { display: grid; gap: 32px; margin-top: 96px; padding-top: 48px; border-top: 1px solid var(--border); }
.dg-how h2 { margin: 0; font-size: clamp(24px, 0.8vw + 19px, 30px); font-weight: 700; letter-spacing: -0.02em; }
.dg-rail { display: grid; gap: 28px; margin: 0; padding: 0 0 0 32px; list-style: none; }
.dg-rail li { position: relative; display: grid; align-content: start; gap: 6px; }
.dg-rail li::before {
  content: ''; position: absolute; top: 4px; left: -32px; width: 16px; height: 16px; box-sizing: border-box; border: 2px solid var(--primary);
  border-radius: 50%; background: var(--background);
}
.dg-rail li:not(:last-child)::after { content: ''; position: absolute; top: 24px; bottom: -28px; left: -25px; width: 2px; background: var(--border-strong); }
.dg-rail strong { font-size: 17px; font-weight: 700; }
.dg-rail span { font-size: 15px; line-height: 1.6; color: var(--muted-foreground); }
@media (min-width: 900px) {
  .dg-how { grid-template-columns: minmax(0, 260px) minmax(0, 1fr); gap: 48px; }
  .dg-rail { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; padding: 36px 0 0; }
  .dg-rail li::before { top: -36px; left: 0; }
  .dg-rail li:not(:last-child)::after { top: -29px; right: -28px; bottom: auto; left: 20px; width: auto; height: 2px; }
}

/* Why AI-abled: the second dark panel, closing the page as the stage opens it. */
.dg-why { display: grid; gap: 32px; margin-top: 64px; padding: 36px 24px; border-radius: 24px; background: var(--dark); color: var(--on-dark); }
.dg-why h2 { display: flex; align-items: center; gap: 12px; margin: 0 0 20px; font-size: 17px; font-weight: 700; color: var(--on-dark); }
.dg-why-big { margin: 0 0 12px; font-size: clamp(28px, 1.2vw + 22px, 40px); font-weight: 800; line-height: 1.1; letter-spacing: -0.03em; }
.dg-why-lead p:last-child { margin: 0; font-size: 16px; line-height: 1.6; color: var(--on-dark-muted); }
.dg-why-points { display: grid; gap: 24px; margin: 0; padding: 0; list-style: none; }
.dg-why-points li { display: grid; align-content: start; gap: 6px; padding-top: 16px; border-top: 1px solid rgba(249, 248, 244, 0.18); }
.dg-why-points strong { font-size: 16px; }
.dg-why-points span { font-size: 15px; line-height: 1.6; color: var(--on-dark-muted); }
@media (min-width: 640px) { .dg-why-points { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 32px; } }
@media (min-width: 1024px) { .dg-why { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 64px; padding: 56px; } }
/* AI-abled's name never breaks at its hyphen. */
.dg-nw { white-space: nowrap; }
.dg-note { max-width: 80ch; margin: 24px 0 0; font-size: 13px; line-height: 1.6; color: var(--muted-foreground); }

/* ── Signed in (owner, 25 Oct 2026): the header's bell and account menu, the tabs (Library, Assignments, Diagnostics),
   sign-in and password forms, Assignments, the notifications dialog and Settings. Career Launcher's own system: ivory,
   ink, CL orange as the one accent, the dark olive for the one quiet panel, Plus Jakarta; radii 8 for controls and chips,
   16 for cards and dialogs, 24 for the dark panel; one soft shadow, on what floats (menu, dialog). ─────────────────── */
.portal-actions { display: flex; align-items: center; gap: 8px; }
.portal-top-inner { gap: 12px; }
.portal-signin {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border: 1px solid var(--primary); border-radius: 8px;
  color: var(--primary); font-size: 15px; font-weight: 700; text-decoration: none; white-space: nowrap;
}
.portal-signin:hover { background: var(--orange-light); }
@media (min-width: 768px) { .portal-top-inner > .portal-nav { margin-left: auto; } }
@media (max-width: 479px) { .portal-name { display: none; } }
.portal-bell {
  position: relative; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 1px solid var(--border);
  border-radius: 8px; background: var(--card); color: var(--foreground); transition: border-color 0.18s var(--ease);
}
.portal-bell:hover { border-color: var(--border-strong); }
.portal-bell-count {
  position: absolute; top: -6px; right: -6px; display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 5px;
  border: 2px solid var(--card); border-radius: 10px; background: var(--primary); color: #fff; font-size: 11px; font-weight: 700; line-height: 1;
}
.portal-avatar {
  display: inline-flex; flex: none; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%;
  background: var(--dark); color: var(--on-dark); font-size: 14px; font-weight: 700;
}
.portal-me { position: relative; }
.portal-me > summary { list-style: none; }
.portal-me > summary::-webkit-details-marker { display: none; }
.portal-me-button {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 8px 0 6px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--card); font-size: 14px; font-weight: 600; cursor: pointer;
}
.portal-me-button svg { color: var(--muted-foreground); transition: transform 0.18s var(--ease); }
.portal-me[open] .portal-me-button svg { transform: rotate(180deg); }
.portal-me-name { max-width: 12ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 599px) { .portal-me-name { display: none; } }
.portal-me-panel {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 20; display: grid; width: 280px; padding: 8px; border: 1px solid var(--border);
  border-radius: 16px; background: var(--card); box-shadow: var(--shadow);
}
.portal-me-panel a, .portal-me-panel button {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 0 12px; border: 0; border-radius: 8px; background: none;
  color: var(--foreground); font: inherit; font-size: 15px; font-weight: 600; text-align: left; text-decoration: none; cursor: pointer;
}
.portal-me-panel a:hover, .portal-me-panel button:hover { background: var(--muted); }
.portal-me-panel svg { color: var(--muted-foreground); }
.portal-me-panel form { margin: 0; padding-top: 4px; border-top: 1px solid var(--border); }
.portal-me-who { display: grid; gap: 2px; margin: 0 0 4px; padding: 8px 12px 12px; border-bottom: 1px solid var(--border); }
.portal-me-who strong { font-size: 15px; }
.portal-me-who span { font-size: 13px; color: var(--muted-foreground); }
.portal-tabs a { gap: 8px; }
.portal-tabs a svg { flex: none; color: var(--muted-foreground); }
.portal-tabs a[aria-current="page"] svg { color: var(--primary); }
.portal-tab-count {
  display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 6px;
  background: var(--orange-light); color: var(--primary-hover); font-size: 12px; font-weight: 700;
}
@media (max-width: 479px) { .portal-tabs-inner { gap: 24px; } .portal-tabs a svg { display: none; } }

/* Forms: a label above each box, the hint under the label, the error under the box. Boxes are 52px, text 16px (no zoom on
   a phone). */
.pt-field { display: grid; gap: 6px; }
.pt-field label { font-size: 14px; font-weight: 700; }
.pt-field-hint { margin: 0; font-size: 13px; line-height: 1.5; color: var(--muted-foreground); }
.pt-field-error { margin: 0; font-size: 14px; font-weight: 600; color: var(--wrong); }
.pt-input {
  width: 100%; min-height: 52px; padding: 0 16px; border: 1px solid #8a8a80; border-radius: 8px; background: var(--card);
  color: var(--foreground); font: inherit; font-size: 16px; transition: border-color 0.18s var(--ease);
}
.pt-input:hover { border-color: var(--foreground); }
.pt-input:focus { border-color: var(--foreground); }
.pt-field.has-error .pt-input { border-color: var(--wrong); }
.pt-password { position: relative; }
.pt-password .pt-input { padding-right: 84px; }
.pt-reveal {
  position: absolute; top: 6px; right: 6px; min-width: 64px; height: 40px; padding: 0 12px; border: 0; border-radius: 6px; background: var(--muted);
  color: var(--foreground); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer;
}
.pt-alert { margin: 0 0 20px; padding: 12px 16px; border: 1px solid; border-radius: 8px; font-size: 15px; line-height: 1.5; }
.pt-alert p { display: flex; align-items: flex-start; gap: 8px; margin: 0; }
.pt-alert--error { border-color: #ebc4c0; background: var(--wrong-light); color: var(--wrong); }
.pt-alert--ok { border-color: #c6dfce; background: var(--right-light); color: #24613d; }
.pt-alert--ok svg { flex: none; margin-top: 2px; }

/* Sign in and the password pages: one card, and on a computer the dark panel beside it saying what the portal holds. */
.pt-auth { display: grid; gap: 32px; max-width: 1040px; margin: 8px auto 0; }
.pt-auth-card { padding: 28px 24px; border: 1px solid var(--border); border-radius: 16px; background: var(--card); }
.pt-auth-card h1 { margin: 0 0 8px; font-size: clamp(28px, 1.2vw + 22px, 34px); font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; }
.pt-auth-lead { margin: 0 0 24px; font-size: 16px; line-height: 1.6; color: var(--muted-foreground); }
.pt-auth-note { margin: -8px 0 20px; font-size: 14px; color: var(--muted-foreground); }
.pt-auth-form { display: grid; gap: 20px; }
.pt-auth-submit { width: 100%; margin-top: 4px; }
.pt-auth-alt { margin: 24px 0 0; padding-top: 20px; border-top: 1px solid var(--border); font-size: 15px; color: var(--muted-foreground); }
.pt-auth-aside { display: none; }
@media (min-width: 900px) {
  .pt-auth { grid-template-columns: minmax(0, 480px) minmax(0, 1fr); align-items: start; gap: 48px; margin-top: 24px; }
  .pt-auth-card { padding: 40px; }
  .pt-auth-aside { display: block; padding: 40px; border-radius: 24px; background: var(--dark); color: var(--on-dark); }
  .pt-auth-aside-title { margin: 0 0 24px; font-size: 22px; font-weight: 700; letter-spacing: -0.01em; }
  .pt-auth-aside ul { display: grid; gap: 20px; margin: 0; padding: 0; list-style: none; }
  .pt-auth-aside li { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 14px; }
  .pt-auth-aside svg { margin-top: 2px; color: var(--peach); }
  .pt-auth-aside strong { display: block; margin-bottom: 2px; font-size: 16px; }
  .pt-auth-aside span { font-size: 15px; line-height: 1.55; color: var(--on-dark-muted); }
}

.pt-narrow { max-width: 760px; }
.pt-narrow h1, .pt-page-head h1 { margin: 0; font-size: clamp(30px, 1.4vw + 22px, 40px); font-weight: 700; line-height: 1.1; letter-spacing: -0.025em; }
.pt-narrow > h1 { margin-bottom: 12px; }
.pt-page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; margin-bottom: 12px; }
.pt-page-head--stack { display: block; margin-bottom: 24px; }
.pt-page-head--stack .pt-lead { margin-top: 12px; }
.pt-empty {
  display: grid; justify-items: start; gap: 12px; padding: 32px 28px; border: 1px dashed var(--border-strong); border-radius: 16px; background: var(--card);
  color: var(--muted-foreground);
}
.pt-empty > svg { color: var(--primary); }
.pt-empty p { max-width: 56ch; margin: 0; font-size: 16px; line-height: 1.6; }
.pt-empty strong { color: var(--foreground); }
.pt-empty-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px !important; }
.pt-empty--small { padding: 24px 20px; border: 0; }

/* Assignments: the count at a glance, then a card each, still to do first; done folded underneath. */
.pt-asg-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0 0 32px; padding: 0; list-style: none; }
@media (min-width: 768px) { .pt-asg-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.pt-asg-tile { display: grid; gap: 2px; padding: 16px 18px; border: 1px solid var(--border); border-radius: 16px; background: var(--card); }
.pt-asg-tile strong { font-size: 28px; font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; }
.pt-asg-tile span { font-size: 14px; font-weight: 600; color: var(--muted-foreground); }
.pt-asg-tile.is-soon { border-color: #ecc7b3; background: var(--orange-light); }
.pt-asg-tile.is-soon strong { color: var(--primary-hover); }
.pt-asg-tile.is-late { border-color: #ebc4c0; background: var(--wrong-light); }
.pt-asg-tile.is-late strong { color: var(--wrong); }
.pt-asg-h2 { margin: 0 0 16px; font-size: 20px; font-weight: 700; }
.pt-asg-list { display: grid; gap: 16px; }
@media (min-width: 960px) { .pt-asg-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pt-asg-card {
  display: flex; flex-direction: column; min-width: 0; padding: 20px 22px; border: 1px solid var(--border); border-radius: 16px; background: var(--card);
  scroll-margin-top: 24px;
}
.pt-asg-card:target { border-color: var(--primary); box-shadow: 0 0 0 3px var(--orange-light); }
.pt-asg-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.pt-asg-kind, .pt-asg-status { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--muted-foreground); }
.pt-asg-card.is-done .pt-asg-status { color: var(--right); }
.pt-asg-card h3 { margin: 12px 0 2px; font-size: 20px; font-weight: 700; line-height: 1.25; letter-spacing: -0.01em; overflow-wrap: break-word; }
.pt-asg-meta { margin: 0 0 16px; font-size: 14px; color: var(--muted-foreground); }
.pt-asg-facts { display: flex; flex-wrap: wrap; gap: 8px 32px; margin: 0; }
.pt-asg-facts div { display: grid; gap: 2px; }
.pt-asg-facts dt { font-size: 12px; font-weight: 600; color: var(--muted-foreground); }
.pt-asg-facts dd { margin: 0; font-size: 15px; font-weight: 700; }
.pt-asg-card.is-late .pt-asg-when { color: var(--wrong); }
.pt-asg-card.is-soon .pt-asg-when { color: var(--primary); }
.pt-asg-note { margin: 16px 0 0; padding: 12px 16px; border-radius: 8px; background: var(--muted); font-size: 15px; line-height: 1.55; }
.pt-asg-action { margin: auto 0 0; padding-top: 20px; }
.pt-asg-paused { display: block; color: var(--muted-foreground); font-size: 15px; line-height: 1.5; }
.pt-asg-done { margin-top: 40px; }
.pt-asg-done > summary {
  display: flex; align-items: center; gap: 10px; min-height: 48px; margin-bottom: 16px; font-size: 20px; font-weight: 700; list-style: none; cursor: pointer;
}
.pt-asg-done > summary::-webkit-details-marker { display: none; }
.pt-asg-done > summary svg { color: var(--muted-foreground); transition: transform 0.18s var(--ease); }
.pt-asg-done[open] > summary svg { transform: rotate(180deg); }
.pt-asg-done-n {
  display: inline-flex; align-items: center; justify-content: center; min-width: 28px; height: 28px; padding: 0 8px; border-radius: 8px;
  background: var(--muted); font-size: 14px;
}
.pt-asg-banner {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 24px; padding: 12px 16px; border: 1px solid #ecc7b3; border-radius: 12px;
  background: var(--orange-light);
}
.pt-asg-banner > svg { flex: none; color: var(--primary); }
.pt-asg-banner p { flex: 1 1 260px; margin: 0; font-size: 15px; line-height: 1.5; }
.pt-asg-banner form { margin: 0; }
.pt-asg-banner.is-done { border-color: #c6dfce; background: var(--right-light); }
.pt-asg-banner.is-done > svg { color: var(--right); }

/* The bell's dialog: anchored under the bell on a computer, a sheet from the top on a phone. */
.pn-dialog {
  width: min(440px, calc(100vw - 32px)); max-height: min(640px, calc(100dvh - 96px)); margin: 72px auto auto; padding: 0; border: 1px solid var(--border);
  border-radius: 16px; background: var(--card); color: var(--foreground); box-shadow: 0 24px 48px -24px rgba(37, 39, 33, 0.45);
}
.pn-dialog[open] { display: flex; flex-direction: column; }
.pn-dialog::backdrop { background: rgba(37, 39, 33, 0.32); }
@media (min-width: 768px) { .pn-dialog { margin: 72px 32px auto auto; } }
@media (min-width: 1440px) { .pn-dialog { margin-right: calc((100vw - 1344px) / 2 + 48px); } }
@media (prefers-reduced-motion: no-preference) {
  .pn-dialog[open] { animation: pn-in 0.22s var(--ease); }
  .portal-me[open] .portal-me-panel { animation: pn-in 0.18s var(--ease); }
}
@keyframes pn-in { from { opacity: 0; transform: translateY(-6px); } }
.pn-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 16px 12px 12px 20px; border-bottom: 1px solid var(--border); }
.pn-head h2 { margin: 0; font-size: 18px; font-weight: 700; }
.pn-count { margin: 2px 0 0; font-size: 13px; color: var(--muted-foreground); }
.pn-close {
  display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 0; border-radius: 8px; background: none;
  color: var(--foreground); cursor: pointer;
}
.pn-close:hover { background: var(--muted); }
.pn-scroll { overflow-y: auto; }
.pn-list { margin: 0; padding: 0; list-style: none; }
.pn-item + .pn-item { border-top: 1px solid var(--border); }
.pn-item form { margin: 0; }
.pn-open {
  display: grid; gap: 4px; width: 100%; padding: 14px 20px; border: 0; background: none; color: var(--foreground); font: inherit; text-align: left; cursor: pointer;
}
.pn-open:hover { background: var(--background); }
.pn-item.is-unread .pn-open { background: #fcf5f0; }
.pn-item.is-unread .pn-open:hover { background: var(--orange-light); }
.pn-title { font-size: 15px; font-weight: 600; line-height: 1.4; }
.pn-item.is-unread .pn-title { font-weight: 700; }
.pn-new {
  display: inline-flex; align-items: center; height: 20px; margin-right: 4px; padding: 0 6px; border-radius: 6px; background: var(--primary); color: #fff;
  font-size: 11px; font-weight: 700; vertical-align: 2px;
}
.pn-body { font-size: 14px; line-height: 1.5; color: var(--muted-foreground); }
.pn-time { font-size: 12px; font-weight: 600; color: var(--muted-foreground); }
.pn-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 12px; border-top: 1px solid var(--border); }
.pn-foot form { margin: 0; }
.pn-link {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 8px; border: 0; background: none; color: var(--primary); font: inherit;
  font-size: 14px; font-weight: 700; text-decoration: none; cursor: pointer;
}
.pn-page { overflow: hidden; border: 1px solid var(--border); border-radius: 16px; background: var(--card); }

/* Whose portal: one card per student on the address. */
.pt-who { display: grid; gap: 12px; margin: 24px 0 0; padding: 0; list-style: none; }
.pt-who form { margin: 0; }
.pt-who-card {
  display: flex; align-items: center; gap: 16px; width: 100%; min-height: 76px; padding: 14px 18px; border: 1px solid var(--border); border-radius: 16px;
  background: var(--card); color: var(--foreground); font: inherit; text-align: left; cursor: pointer; transition: border-color 0.18s var(--ease);
}
.pt-who-card:hover { border-color: var(--foreground); }
.pt-who-card[aria-current] { border-color: var(--primary); }
.pt-who-card .portal-avatar { width: 44px; height: 44px; font-size: 18px; }
.pt-who-text { display: grid; flex: 1; gap: 2px; min-width: 0; }
.pt-who-text strong { font-size: 17px; }
.pt-who-text span { font-size: 14px; color: var(--muted-foreground); }
.pt-who-on { font-size: 13px; font-weight: 700; color: var(--primary); }

/* Settings: General, Password, Sign out. */
.pt-settings-layout { display: grid; gap: 20px; }
.pt-settings-nav { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.pt-settings-nav a {
  display: inline-flex; flex: none; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--card); color: var(--muted-foreground); font-size: 15px; font-weight: 600; text-decoration: none;
}
.pt-settings-nav a:hover { color: var(--foreground); }
.pt-settings-nav a[aria-current="page"] { border-color: var(--foreground); color: var(--foreground); }
.pt-settings-panel { min-width: 0; padding: 24px 20px; border: 1px solid var(--border); border-radius: 16px; background: var(--card); }
.pt-settings-panel h2 { margin: 0 0 6px; font-size: 22px; font-weight: 700; }
.pt-settings-lead { margin: 0 0 24px; font-size: 15px; line-height: 1.6; color: var(--muted-foreground); }
.pt-settings-form { display: grid; gap: 20px; max-width: 440px; }
.pt-settings-actions { margin: 0; }
.pt-settings-facts { display: grid; gap: 0; max-width: 560px; margin: 32px 0 0; border-top: 1px solid var(--border); }
.pt-settings-facts div { display: grid; gap: 2px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.pt-settings-facts dt { font-size: 13px; font-weight: 600; color: var(--muted-foreground); }
.pt-settings-facts dd { margin: 0; font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.pt-settings-note { margin: 20px 0 0; font-size: 14px; line-height: 1.6; color: var(--muted-foreground); }
.pt-settings-choices { display: grid; gap: 16px; }
.pt-settings-choices form { margin: 0; padding: 20px; border: 1px solid var(--border); border-radius: 16px; }
.pt-settings-choices h3 { margin: 0 0 4px; font-size: 17px; }
.pt-settings-choices p { margin: 0 0 16px; font-size: 14px; line-height: 1.55; color: var(--muted-foreground); }
@media (min-width: 600px) { .pt-settings-facts div { grid-template-columns: 180px minmax(0, 1fr); gap: 16px; } }
@media (min-width: 900px) {
  .pt-settings-layout { grid-template-columns: 220px minmax(0, 1fr); align-items: start; gap: 32px; }
  .pt-settings-nav { flex-direction: column; overflow: visible; }
  .pt-settings-nav a { border-color: transparent; background: none; }
  .pt-settings-nav a[aria-current="page"] { border-color: var(--border); background: var(--card); }
  .pt-settings-panel { padding: 32px 36px; }
  .pt-settings-choices { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ── Classes: the week's timetable and the month's attendance (owner, 25 Oct 2026; classes.php) ────────────────── */
.pc-switch { display: inline-flex; gap: 4px; margin: 0 0 24px; padding: 4px; border: 1px solid var(--border); border-radius: 12px; background: var(--muted); }
.pc-switch a {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 8px; color: var(--muted-foreground);
  font-size: 15px; font-weight: 700; text-decoration: none; transition: background-color 0.18s var(--ease), color 0.18s var(--ease);
}
.pc-switch a:hover { color: var(--foreground); }
.pc-switch a[aria-current="page"] { background: var(--card); color: var(--foreground); box-shadow: 0 1px 2px rgba(37, 39, 33, 0.14); }
.pc-switch a[aria-current="page"] svg { color: var(--primary); }

/* Choosing a week or a month: the list and Show (no script needed), the one before and after beside them. */
.pc-pick { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin: 0 0 24px; }
.pc-pick-field { flex: 1 1 240px; max-width: 440px; }
.pc-select { position: relative; display: block; }
.pc-select select { appearance: none; -webkit-appearance: none; padding-right: 48px; cursor: pointer; text-overflow: ellipsis; }
.pc-select svg { position: absolute; top: 50%; right: 16px; transform: translateY(-50%); color: var(--muted-foreground); pointer-events: none; }
.pc-pick-go { min-height: 52px; }
.pc-steps { display: inline-flex; gap: 8px; }
.pc-step {
  display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--card); color: var(--foreground); transition: border-color 0.18s var(--ease);
}
.pc-step:hover { border-color: var(--foreground); }
.pc-step.is-off { background: transparent; color: var(--border-strong); }

/* The week: every day, today ringed, a day with no class one quiet line. */
.pc-summary { margin: 0 0 16px; font-size: 15px; color: var(--muted-foreground); }
.pc-summary strong { margin-right: 4px; color: var(--foreground); }
.pc-week { display: grid; gap: 12px; }
.pc-day { padding: 16px 20px; border: 1px solid var(--border); border-radius: 16px; background: var(--card); }
.pc-day.is-today { border-color: var(--primary); box-shadow: 0 0 0 3px var(--orange-light); }
.pc-day.is-empty { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; padding-block: 12px; border-style: dashed; background: transparent; }
.pc-day-h { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; font-size: 16px; font-weight: 700; }
.pc-day.is-empty .pc-day-h { font-weight: 600; color: var(--muted-foreground); }
.pc-today { padding: 2px 8px; border-radius: 999px; background: var(--primary); color: #fff; font-size: 12px; font-weight: 700; }
.pc-none { margin: 0; font-size: 14px; color: var(--muted-foreground); }
.pc-classes { display: grid; margin: 8px 0 0; padding: 0; list-style: none; }
.pc-class { display: grid; gap: 4px 16px; padding: 12px 0; border-top: 1px solid var(--border); }
.pc-class:first-child { padding-top: 4px; border-top: 0; }
.pc-time { font-size: 14px; font-weight: 700; color: var(--primary-hover); font-variant-numeric: tabular-nums; }
.pc-what { display: grid; gap: 2px; min-width: 0; }
.pc-what strong { font-size: 16px; line-height: 1.35; overflow-wrap: break-word; }
.pc-facts { font-size: 14px; line-height: 1.5; color: var(--muted-foreground); overflow-wrap: break-word; }
.pc-mark {
  display: inline-flex; align-items: center; gap: 6px; justify-self: start; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 700;
  line-height: 1.6;
}
.pc-mark::before { content: ''; flex: none; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.pc-mark.is-present { background: var(--right-light); color: var(--right); }
.pc-mark.is-absent { background: var(--wrong-light); color: var(--wrong); }
.pc-mark.is-not_recorded, .pc-mark.is-pending { background: var(--muted); color: var(--muted-foreground); }
@media (min-width: 768px) {
  .pc-class { grid-template-columns: 160px minmax(0, 1fr) auto; align-items: center; }
  .pc-mark { justify-self: end; }
}
.pc-note { display: flex; align-items: flex-start; gap: 8px; max-width: 72ch; margin: 24px 0 0; font-size: 14px; line-height: 1.55; color: var(--muted-foreground); }
.pc-note svg { flex: none; margin-top: 3px; }

/* The month: the share attended as a ring, the counts, then a calendar of dots beside the classes day by day. */
.pc-month-sum {
  display: flex; flex-wrap: wrap; align-items: center; gap: 20px 28px; margin: 0 0 24px; padding: 20px 24px; border: 1px solid var(--border);
  border-radius: 16px; background: var(--card);
}
.pc-ring { background: conic-gradient(var(--right) calc(var(--pct) * 1%), var(--muted) 0); }
.pc-month-words { display: grid; flex: 1 1 240px; gap: 12px; }
.pc-month-pct { margin: 0; font-size: 16px; color: var(--muted-foreground); }
.pc-month-pct strong { color: var(--foreground); }
.pc-stats { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 0; padding: 0; list-style: none; }
.pc-stat { display: grid; }
.pc-stat strong { font-size: 24px; font-weight: 700; line-height: 1.15; font-variant-numeric: tabular-nums; }
.pc-stat span { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted-foreground); }
.pc-stat span::before { content: ''; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--border-strong); }
.pc-stat.is-present strong { color: var(--right); }
.pc-stat.is-present span::before { background: var(--right); }
.pc-stat.is-absent strong { color: var(--wrong); }
.pc-stat.is-absent span::before { background: var(--wrong); }
.pc-att { display: grid; gap: 24px; }
@media (min-width: 1024px) { .pc-att { grid-template-columns: minmax(0, 560px) minmax(0, 1fr); align-items: start; } }
.pc-cal-wrap { padding: 16px; border: 1px solid var(--border); border-radius: 16px; background: var(--card); }
.pc-cal { width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 4px; }
.pc-cal th { padding: 0 0 4px; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; text-align: center; color: var(--muted-foreground); }
.pc-cal abbr { text-decoration: none; }
.pc-cal td { padding: 0; vertical-align: top; }
.pc-cal-day {
  display: flex; flex-direction: column; align-items: center; gap: 6px; min-height: 56px; padding: 8px 2px; border-radius: 10px; color: var(--foreground);
  font-size: 15px; font-weight: 600; text-decoration: none;
}
a.pc-cal-day { background: var(--background); transition: background-color 0.18s var(--ease); }
a.pc-cal-day:hover { background: var(--muted); }
.pc-cal-day.is-off { color: var(--border-strong); }
.pc-cal-day.is-today { box-shadow: inset 0 0 0 2px var(--primary); }
.pc-cal-n { line-height: 1; font-variant-numeric: tabular-nums; }
.pc-dots { display: flex; flex-wrap: wrap; justify-content: center; gap: 3px; min-height: 8px; }
.pc-dot { display: inline-block; flex: none; width: 8px; height: 8px; border-radius: 50%; }
.pc-dot.is-present { background: var(--right); }
.pc-dot.is-absent { background: var(--wrong); }
.pc-dot.is-not_recorded { background: var(--border-strong); }
.pc-dot.is-pending { background: transparent; box-shadow: inset 0 0 0 1.5px var(--muted-foreground); }
.pc-dot-more { font-size: 10px; font-weight: 700; line-height: 8px; color: var(--muted-foreground); }
.pc-legend {
  display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 12px 4px 0; padding: 12px 0 0; border-top: 1px solid var(--border); list-style: none;
  font-size: 13px; color: var(--muted-foreground);
}
.pc-legend li { display: inline-flex; align-items: center; gap: 6px; }
@media (max-width: 479px) {
  .pc-switch { display: flex; }
  .pc-switch a { flex: 1; justify-content: center; padding: 0 12px; }
  .pc-cal-wrap { padding: 8px; }
  .pc-cal { border-spacing: 2px; }
  .pc-cal-day { min-height: 48px; padding: 6px 0; font-size: 14px; }
  .pc-dot { width: 7px; height: 7px; }
}
.pc-list { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.pc-list-day { padding: 14px 18px; border: 1px solid var(--border); border-radius: 14px; background: var(--card); scroll-margin-top: 24px; }
.pc-list-day:target { border-color: var(--primary); box-shadow: 0 0 0 3px var(--orange-light); }
.pc-list-day h3 { margin: 0 0 8px; font-size: 15px; font-weight: 700; }
.pc-list-day ul { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.pc-list-day li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.pc-list-what { display: flex; flex: 1 1 160px; flex-wrap: wrap; gap: 0 10px; min-width: 0; }
.pc-list-what strong { font-size: 15px; overflow-wrap: break-word; }
.pc-list-what span { font-size: 14px; color: var(--muted-foreground); }
/* Four tabs on a phone (Classes, 25 Oct 2026): closer together and a touch smaller, so all four fit from a 360px phone;
   narrower still (320px), the row scrolls as before. */
@media (max-width: 479px) { .portal-tabs-inner { gap: 14px; } .portal-tabs a { font-size: 14px; } }
@media (max-width: 389px) { .portal-tabs-inner { gap: 10px; } .portal-tabs a { font-size: 13px; } }

/* ── Home, Progress, Revise and search (owner, 25 Oct 2026: "build the most useful portal"; home.php, progress.php, revise.php) */
/* On a phone the tabs sit at the bottom of the screen, as an app's do (five once signed in); never over a test being taken. */
.portal-dock { display: none; }
@media (max-width: 767px) {
  .portal-tabs { display: none; }
  .portal-dock {
    position: fixed; right: 0; bottom: 0; left: 0; z-index: 40; display: grid; grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column;
    padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); border-top: 1px solid var(--border); background: var(--card);
    box-shadow: 0 -12px 24px -22px rgba(37, 39, 33, 0.45);
  }
  .portal-dock a {
    position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-width: 0; min-height: 56px;
    padding: 6px 2px 4px; color: var(--muted-foreground); font-size: 11px; font-weight: 700; line-height: 1.2; text-decoration: none;
  }
  .portal-dock a > span:first-of-type { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .portal-dock a svg { flex: none; width: 22px; height: 22px; }
  .portal-dock a[aria-current="page"] { color: var(--primary); }
  .portal-dock a[aria-current="page"]::before {
    content: ''; position: absolute; top: -4px; left: 50%; width: 28px; height: 3px; border-radius: 0 0 3px 3px; background: var(--primary); transform: translateX(-50%);
  }
  .portal-dock .portal-tab-count { position: absolute; top: 2px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; font-size: 11px; }
  body { padding-bottom: calc(66px + env(safe-area-inset-bottom)); }
  body:has(.pt-exam) .portal-dock { display: none; }
  body:has(.pt-exam) { padding-bottom: 0; }
}
@media (max-width: 359px) { .portal-dock a { font-size: 10px; letter-spacing: -0.01em; } }

/* Home: what to do next, a card each. */
.hm-head { margin: 0 0 20px; }
.hm-date { margin: 0 0 4px; font-size: 13px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted-foreground); }
.hm-head h1 { margin: 0; font-size: clamp(28px, 1.4vw + 22px, 40px); font-weight: 700; line-height: 1.1; letter-spacing: -0.025em; overflow-wrap: break-word; }
.hm-grid { display: grid; gap: 16px; }
@media (min-width: 720px) { .hm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .hm-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .hm-c-next { grid-column: span 2; } }
.hm-card { display: flex; flex-direction: column; min-width: 0; padding: 20px 22px; border: 1px solid var(--border); border-radius: 16px; background: var(--card); }
.hm-card.is-late { border-color: #ebc4c0; }
.hm-card.is-due { border-color: #ecc7b3; }
.hm-card-h {
  display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted-foreground);
}
.hm-card-h svg { flex: none; color: var(--primary); }
.hm-quiet { margin: 0; font-size: 15px; line-height: 1.55; color: var(--muted-foreground); }
.hm-big { margin: 0 0 8px; font-size: 15px; color: var(--muted-foreground); }
.hm-big strong { margin-right: 4px; font-size: 32px; font-weight: 700; letter-spacing: -0.02em; color: var(--foreground); font-variant-numeric: tabular-nums; }
.hm-late { margin-left: 6px; color: var(--wrong); font-weight: 700; }
.hm-more { margin: auto 0 0; padding-top: 16px; }
.hm-more a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-size: 15px; text-decoration: none; }
.hm-more a:hover { text-decoration: underline; }
.hm-next-when { margin: 0; font-size: 16px; color: var(--primary-hover); }
.hm-next-what { margin: 4px 0 2px; font-size: 24px; font-weight: 700; line-height: 1.25; letter-spacing: -0.01em; overflow-wrap: break-word; }
.hm-next-facts { margin: 0; font-size: 15px; color: var(--muted-foreground); overflow-wrap: break-word; }
.hm-todo, .hm-results { display: grid; margin: 0; padding: 0; list-style: none; }
.hm-todo li + li, .hm-results li + li { border-top: 1px solid var(--border); }
.hm-todo a { display: grid; gap: 2px; padding: 10px 0; color: var(--foreground); text-decoration: none; }
.hm-todo a:hover .hm-todo-what { color: var(--primary); }
.hm-todo-what { font-size: 15px; font-weight: 700; overflow-wrap: break-word; }
.hm-todo-due { font-size: 13px; font-weight: 500; color: var(--muted-foreground); }
.hm-todo li.is-late .hm-todo-due { color: var(--wrong); font-weight: 700; }
.hm-go { margin: 12px 0 0; }
.hm-att { display: flex; align-items: center; gap: 16px; }
.hm-att p { margin: 0; font-size: 15px; color: var(--muted-foreground); }
.hm-att strong { color: var(--foreground); }
.hm-att .hm-late { display: block; margin: 4px 0 0; }
.hm-ring { width: 88px; height: 88px; }
.hm-ring::before { inset: 8px; }
.hm-ring .pt-ring-pct { font-size: 20px; }
.hm-results li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; }
.hm-res-what { display: grid; min-width: 0; font-size: 15px; font-weight: 700; overflow-wrap: break-word; }
.hm-res-what span { font-size: 13px; font-weight: 500; color: var(--muted-foreground); }
.hm-res-score { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.hm-contact { display: grid; gap: 10px; margin: 12px 0 0; padding: 0; list-style: none; }
.hm-contact li { display: flex; align-items: center; gap: 10px; min-width: 0; font-size: 15px; }
.hm-contact svg { flex: none; color: var(--muted-foreground); }
.hm-contact a { min-width: 0; overflow-wrap: anywhere; }

/* Progress: what to practise next, each subject's chapters by level, the weeks, the latest tests. */
.pg-tile-note { font-size: 12px !important; font-weight: 500 !important; }
.pg-next-wrap { margin: 0 0 32px; }
.pg-next-list { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 720px) { .pg-next-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pg-next { display: flex; flex-direction: column; min-width: 0; padding: 18px 20px; border: 1px solid var(--border); border-radius: 16px; background: var(--card); }
.pg-next.is-weak { border-left: 4px solid #d9952b; }
.pg-next-sub { margin: 0; font-size: 13px; font-weight: 700; color: var(--muted-foreground); }
.pg-next h3 { margin: 4px 0; font-size: 18px; line-height: 1.3; overflow-wrap: break-word; }
.pg-next-why { margin: 0 0 12px; font-size: 14px; color: var(--muted-foreground); }
.pg-next-go { display: flex; flex-wrap: wrap; gap: 8px; margin: auto 0 0; }
.pg-grid { display: grid; gap: 24px; }
@media (min-width: 1024px) { .pg-grid { grid-template-columns: minmax(0, 1fr) 380px; align-items: start; } }
.pg-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0 0 12px; padding: 0; list-style: none; font-size: 13px; color: var(--muted-foreground); }
.pg-legend li { display: inline-flex; align-items: center; gap: 6px; }
.pg-legend .pg-seg { display: inline-block; width: 12px; height: 12px; border-radius: 3px; }
.pg-seg.is-mastered { background: var(--right); }
.pg-seg.is-proficient { background: #7db592; }
.pg-seg.is-developing { background: #d9952b; }
.pg-seg.is-beginning { background: var(--peach); }
.pg-seg.is-not { background: var(--muted); }
.pg-legend .pg-seg.is-not { box-shadow: inset 0 0 0 1px var(--border-strong); }
.pg-subject { margin: 0 0 12px; border: 1px solid var(--border); border-radius: 16px; background: var(--card); }
.pg-subject > summary { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 12px; align-items: center; padding: 16px 20px; list-style: none; cursor: pointer; }
.pg-subject > summary::-webkit-details-marker { display: none; }
.pg-subject-top { display: grid; gap: 2px; min-width: 0; }
.pg-subject-top strong { font-size: 17px; overflow-wrap: break-word; }
.pg-subject-top span { font-size: 14px; color: var(--muted-foreground); }
.pg-subject > summary svg { grid-row: 1; grid-column: 2; color: var(--muted-foreground); transition: transform 0.18s var(--ease); }
.pg-subject[open] > summary svg { transform: rotate(180deg); }
.pg-levels { display: flex; grid-column: 1 / -1; height: 10px; overflow: hidden; border-radius: 999px; background: var(--muted); }
.pg-chapters { margin: 0; padding: 0 12px 12px; list-style: none; }
.pg-chapters a {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 12px; min-height: 48px; padding: 8px; border-top: 1px solid var(--border);
  color: var(--foreground); font-size: 15px; font-weight: 600; text-decoration: none;
}
.pg-chapters a:hover { background: var(--background); }
.pg-ch { min-width: 0; overflow-wrap: break-word; }
.pg-ch-best { font-size: 14px; color: var(--muted-foreground); font-variant-numeric: tabular-nums; }
@media (max-width: 479px) { .pg-chapters a { grid-template-columns: minmax(0, 1fr) auto; } .pg-ch-best { display: none; } }
.pg-side { display: grid; gap: 16px; }
.pg-card { padding: 20px 22px; border: 1px solid var(--border); border-radius: 16px; background: var(--card); }
.pg-card h2 { margin: 0 0 4px; font-size: 18px; }
.pg-bars { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 6px; align-items: end; margin: 16px 0 0; padding: 0; list-style: none; }
.pg-bars li { display: grid; justify-items: center; gap: 4px; min-width: 0; }
.pg-bar { display: flex; align-items: flex-end; width: 100%; max-width: 28px; height: 96px; overflow: hidden; border-radius: 6px; background: var(--muted); }
.pg-bar-fill { display: block; width: 100%; border-radius: 6px 6px 0 0; background: var(--primary); }
.pg-bar-n { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pg-bar-wk { font-size: 11px; color: var(--muted-foreground); white-space: nowrap; }
@media (max-width: 479px) { .pg-wk-m { display: none; } }
.pg-recent { display: grid; margin: 12px 0 0; padding: 0; list-style: none; }
.pg-recent li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); }
.pg-recent-what { display: grid; min-width: 0; font-size: 15px; }
.pg-recent-what strong { overflow-wrap: break-word; }
.pg-recent-what span { font-size: 13px; color: var(--muted-foreground); }
.pg-recent-score { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pg-recent-score span { margin-left: 4px; font-size: 13px; color: var(--muted-foreground); }

/* Revise: today's round, by subject, and how it works. */
.rv-start { display: grid; gap: 16px; margin: 0 0 32px; padding: 24px; border: 1px solid #ecc7b3; border-radius: 16px; background: var(--orange-light); }
@media (min-width: 900px) { .rv-start { grid-template-columns: minmax(0, 1fr) minmax(0, 320px) auto; align-items: center; } }
.rv-start h2 { margin: 0 0 4px; font-size: 22px; line-height: 1.25; }
.rv-subjects { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.rv-subjects li { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; }
.rv-subjects strong { font-variant-numeric: tabular-nums; }
.rv-go { margin: 0; }
.rv-steps { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; counter-reset: rv; }
@media (min-width: 768px) { .rv-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.rv-steps li { display: grid; gap: 4px; padding: 16px 18px; border: 1px solid var(--border); border-radius: 14px; background: var(--card); counter-increment: rv; }
.rv-steps li::before { content: counter(rv, decimal-leading-zero); font-size: 12px; font-weight: 700; letter-spacing: 0.1em; color: var(--primary); }
.rv-steps span { font-size: 14px; color: var(--muted-foreground); }
.rv-from { margin: 24px 0 8px; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted-foreground); }
.rv-round .pt-form > .rv-from:first-of-type, .rv-round .pt-form > input + .rv-from { margin-top: 0; }
.rv-how { margin-top: 8px; }

/* Find a chapter. */
.pt-search { display: grid; gap: 6px; max-width: 640px; margin: 0 0 24px; }
.pt-search-label { font-size: 14px; font-weight: 700; }
.pt-search-row { display: flex; gap: 8px; }
.pt-search-box { position: relative; flex: 1; min-width: 0; }
.pt-search-box svg { position: absolute; top: 50%; left: 16px; color: var(--muted-foreground); transform: translateY(-50%); pointer-events: none; }
.pt-search-box .pt-input { padding-left: 44px; }
.pt-search .pt-btn { min-height: 52px; }
.pt-search-count { margin: 0 0 20px; font-size: 15px; color: var(--muted-foreground); }
.pt-search-group { margin: 0 0 32px; }
/* On a phone: the bar's items as wide as their words (Assignments needs more than Home), and a page's switch without its icons. */
@media (max-width: 767px) {
  .portal-dock { display: flex; justify-content: space-around; }
  .portal-dock a { flex: 1 1 auto; }
}
@media (max-width: 479px) {
  .pc-switch a { gap: 6px; padding: 0 8px; font-size: 14px; }
  .pc-switch a svg { display: none; }
}
/* Home's next class: the classes after it this week and next. */
.hm-later-h { margin: 16px 0 6px; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted-foreground); }
.hm-later { display: grid; margin: 0; padding: 0; list-style: none; }
.hm-later li { display: grid; gap: 0 16px; padding: 8px 0; border-top: 1px solid var(--border); }
.hm-later-when { font-size: 13px; font-weight: 700; color: var(--primary-hover); }
.hm-later-what { font-size: 15px; font-weight: 600; overflow-wrap: break-word; }
@media (min-width: 720px) { .hm-later li { grid-template-columns: 200px minmax(0, 1fr); align-items: baseline; } }

/* Announcements (owner, 25 Oct 2026; announcements.php): on Home first, then the page with each in full. */
.hm-card.is-news { border-color: #ecc7b3; background: #fffaf6; }
.hm-news-text { margin-top: 2px; font-size: 14px; line-height: 1.5; color: var(--foreground); overflow-wrap: break-word; }
@media (min-width: 1100px) { .hm-c-news { grid-column: 1 / -1; } }
.an-list { display: grid; gap: 16px; }
.an-item { padding: 20px 22px; border: 1px solid var(--border); border-radius: 16px; background: var(--card); scroll-margin-top: 24px; }
.an-item:target { border-color: var(--primary); box-shadow: 0 0 0 3px var(--orange-light); }
.an-meta { margin: 0 0 4px; font-size: 13px; font-weight: 700; color: var(--muted-foreground); }
.an-item h2 { margin: 0 0 8px; font-size: 20px; line-height: 1.3; overflow-wrap: break-word; }
.an-body { margin: 0; font-size: 16px; line-height: 1.65; overflow-wrap: break-word; }
.an-until { margin: 12px 0 0; padding-top: 12px; border-top: 1px solid var(--border); font-size: 13px; color: var(--muted-foreground); }

/* ── Every screen size (audit, 25 Oct 2026: "all visual render in all screen sizes are perfect") ─────────────────────── */
/* The bell's count sits inside its button, so nothing spills over the header's edge. */
.portal-bell-count { top: 2px; right: 2px; }
/* The phone's bottom bar never under 11px: on the narrowest phones each tab gives up a little padding instead. */
@media (max-width: 359px) { .portal-dock a { padding-right: 0; padding-left: 0; font-size: 11px; letter-spacing: -0.02em; } }
/* A subject's figures (Tests, Worksheets, Questions): each column as wide as its word needs, the rest shared, so "Worksheets"
   never spills in the narrow side card (phone or computer). */
.pt-stats { grid-template-columns: repeat(3, auto); }
.pt-stats div { padding: 12px 10px; }
@media (max-width: 479px) { .pt-stats div { padding: 10px 8px; } }
/* Settings' three tabs side by side on a phone, each a third, never a row that scrolls sideways. */
@media (max-width: 899px) {
  .pt-settings-nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: visible; }
  .pt-settings-nav a { justify-content: center; min-width: 0; padding: 0 8px; }
  .pt-settings-nav a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
@media (max-width: 399px) { .pt-settings-nav a { padding: 0 6px; font-size: 14px; } .pt-settings-nav a svg { display: none; } }
/* Diagnostics' five kinds below a laptop's width: two to a row (the first across the top; one to a row on the narrowest
   phones), never a bar that scrolls sideways. */
@media (max-width: 1023px) {
  .dg-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; overflow: visible; }
  .dg-tab { justify-content: space-between; min-width: 0; padding: 0 10px 0 12px; white-space: normal; line-height: 1.25; }
  .dg-tab:first-child { grid-column: 1 / -1; }
}
@media (max-width: 399px) { .dg-tabs { grid-template-columns: minmax(0, 1fr); } }
/* How it works, three steps on a computer: one line runs under the dots (the steps' own connectors reached past their boxes). */
@media (min-width: 900px) {
  .dg-rail { position: relative; }
  .dg-rail::before { content: ''; position: absolute; top: 7px; right: calc((100% - 64px) / 3); left: 16px; height: 2px; background: var(--border-strong); }
  .dg-rail li:not(:last-child)::after { display: none; }
}

/* ── Board papers (board.php): Grades 10 and 12, every paper CBSE's own file on CBSE's site ──────────────────── */
/* A link inside the portal, beside the outside ones: the same quiet link, with → for ↗. */
.pt-inlink {
  display: inline-flex; align-items: center; min-height: 32px; color: var(--primary); font-size: 14px; font-weight: 600;
  text-decoration: underline; text-decoration-color: rgba(199, 68, 28, 0.35); text-underline-offset: 3px;
}
.pt-inlink::after { content: '→'; content: '→' / ''; margin-left: 4px; font-size: 13px; text-decoration: none; transition: transform 0.18s var(--ease); }
.pt-inlink:hover { text-decoration-color: currentColor; }
.pt-inlink:hover::after { transform: translateX(2px); }

/* The grade page's band: what they are, then a pill a subject. Tinted, so it reads apart from the tiles above and the
   book lists below. */
.pt-bp-band { display: grid; gap: 24px; padding: 28px 24px; border-radius: 16px; background: var(--orange-light); }
.pt-bp-band h2 { margin: 0; font-size: clamp(26px, 1vw + 20px, 34px); line-height: 1.15; letter-spacing: -0.02em; }
.pt-bp-band-text > p { max-width: 46ch; margin: 8px 0 0; font-size: 15px; line-height: 1.6; color: var(--foreground); }
.pt-bp-band-text > .pt-bp-band-more { margin-top: 20px; }
.pt-bp-chips { display: flex; flex-wrap: wrap; align-content: center; gap: 8px; }
.pt-bp-chips a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border: 1px solid rgba(199, 68, 28, 0.22); border-radius: 999px;
  background: var(--card); color: var(--foreground); font-size: 14px; font-weight: 600; text-decoration: none;
  transition: border-color 0.18s var(--ease), color 0.18s var(--ease), transform 0.18s var(--ease);
}
.pt-bp-chips a:hover { border-color: var(--primary); color: var(--primary); }
.pt-bp-chips a:active { transform: scale(0.98); }
@media (min-width: 900px) { .pt-bp-band { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: center; gap: 48px; padding: 40px; } }

/* The index: Good to know beside the head, then a tile a subject. */
.pt-bp-know { align-self: stretch; padding: 24px; border: 1px solid var(--border); border-radius: 16px; background: var(--card); }
.pt-bp-know h2 { margin: 0 0 12px; font-size: 15px; font-weight: 700; }
.pt-bp-know ul { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.pt-bp-know li { position: relative; padding-left: 18px; font-size: 14px; line-height: 1.55; color: var(--muted-foreground); }
.pt-bp-know li::before { content: ''; position: absolute; top: 0.7em; left: 0; width: 8px; height: 2px; background: var(--primary); }
.pt-bp-tile { min-height: 0; }
.pt-bp-tile .pt-subject-count { margin: 8px 0 0; }
.pt-bp-tile-of { font-size: 14px; font-weight: 500; color: var(--muted-foreground); }

/* A subject: each variant's next-exam sample paper, tinted and first, then the past years two to a row. */
.pt-bp-jump { margin: 0 0 24px; }
.pt-bp-set { scroll-margin-top: 16px; }
.pt-bp-set + .pt-bp-set { margin-top: 48px; padding-top: 40px; border-top: 1px solid var(--border); }
.pt-bp-set-title { margin: 0 0 16px; font-size: clamp(24px, 1vw + 18px, 30px); line-height: 1.15; letter-spacing: -0.02em; }
.pt-bp-next { display: grid; gap: 20px; padding: 24px; border-radius: 16px; background: var(--orange-light); }
.pt-bp-next-for { margin: 0 0 6px; font-size: 13px; font-weight: 700; color: var(--primary); }
.pt-bp-next-title { margin: 0; font-size: 24px; line-height: 1.2; letter-spacing: -0.02em; }
.pt-bp-next-text > p:last-child { max-width: 48ch; margin: 8px 0 0; font-size: 15px; line-height: 1.55; color: var(--foreground); }
.pt-bp-next-go { display: flex; flex-wrap: wrap; gap: 12px; margin: 0; }
.pt-bp-next .pt-start::after { content: '↗'; content: '↗' / ''; }
.pt-bp-next .pt-start:hover::after { transform: translate(2px, -2px); }
.pt-bp-next .pt-btn { border-color: rgba(199, 68, 28, 0.28); }
.pt-bp-next .pt-btn::after { content: '↗'; content: '↗' / ''; color: var(--primary); }
.pt-bp-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pt-bp-next .pt-btn:hover { border-color: var(--primary); color: var(--primary); }
.pt-bp-cta .pt-bp-type { padding: 1px 6px; background: rgba(255, 255, 255, 0.18); color: inherit; }
.pt-bp-next .pt-btn .pt-bp-type { background: var(--muted); color: var(--muted-foreground); }
.pt-bp-past { margin: 40px 0 16px; font-size: 19px; font-weight: 700; letter-spacing: -0.01em; }
.pt-bp-years { display: grid; gap: 16px; margin: 0; padding: 0; list-style: none; }
.pt-bp-year { display: grid; align-content: start; gap: 16px; min-width: 0; padding: 20px; border: 1px solid var(--border); border-radius: 16px; background: var(--card); }
.pt-bp-y { margin: 0; font-size: 28px; font-weight: 700; line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.pt-bp-group { display: grid; gap: 2px; min-width: 0; }
.pt-bp-group + .pt-bp-group { padding-top: 14px; border-top: 1px solid var(--border); }
.pt-bp-group-label { margin: 0 0 4px; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted-foreground); }
/* One of CBSE's files: a row as tall as a fingertip, its name, its type, and ↗ for CBSE's site. */
.pt-bp-file {
  display: flex; align-items: center; gap: 10px; min-height: 44px; margin: 0 -10px; padding: 6px 10px; border-radius: 8px;
  color: var(--foreground); font-size: 15px; font-weight: 600; line-height: 1.35; text-decoration: none;
  transition: background-color 0.18s var(--ease), color 0.18s var(--ease);
}
.pt-bp-file::after { content: '↗'; content: '↗' / ''; flex: none; color: var(--primary); font-size: 13px; }
.pt-bp-file:hover { background: var(--muted); color: var(--primary); }
.pt-bp-file-name { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.pt-bp-type {
  flex: none; padding: 2px 8px; border-radius: 999px; background: var(--muted); color: var(--muted-foreground);
  font-size: 11px; font-weight: 700; letter-spacing: 0.06em; line-height: 1.4;
}
.pt-bp-file:hover .pt-bp-type { background: var(--card); }
.pt-bp-none { margin: 0; font-size: 14px; line-height: 1.5; color: var(--muted-foreground); }
@media (min-width: 640px) { .pt-bp-next { padding: 28px 32px; } }
@media (min-width: 720px) { .pt-bp-years { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (prefers-reduced-motion: reduce) { .pt-inlink::after, .pt-bp-chips a, .pt-bp-file { transition: none; } }
.pt-bp-nb { white-space: nowrap; }
/* The index's head starts level with Good to know, not at its foot. */
.pt-bp-head { align-items: start; }
/* On a phone the next exam's two buttons are each the card's width. */
@media (max-width: 639px) { .pt-bp-next-go > a { flex: 1 1 100%; } }
/* In a button the file's name, type and ↗ sit together in the middle. */
.pt-bp-cta .pt-bp-file-name { flex: 0 1 auto; }

/* ── A staff preview (owner, 26 Oct 2026; portal-preview.php): the strip above every page, whose portal and the way out ── */
.pt-preview { background: var(--dark); color: var(--on-dark); }
.pt-preview-inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px;
  max-width: 1344px; margin: 0 auto; padding: 12px 24px;
}
.pt-preview p { display: grid; gap: 2px; min-width: 0; margin: 0; font-size: 14px; line-height: 1.45; }
.pt-preview strong { font-size: 15px; }
.pt-preview span { color: var(--on-dark-muted); }
.pt-preview .pt-btn { min-height: 44px; border-color: rgba(249, 248, 244, 0.45); background: transparent; color: var(--on-dark); }
.pt-preview .pt-btn:hover { border-color: var(--on-dark); }
.pt-preview .pt-btn:focus-visible { outline-color: var(--on-dark); }
@media (max-width: 599px) { .pt-preview-inner { padding: 12px 16px; } .pt-preview form, .pt-preview .pt-btn { width: 100%; } }
/* In line with the header and the page from 768px, as they are. */
@media (min-width: 768px) { .pt-preview-inner { padding: 12px 48px; } }
