/* ===========================================================================
   One background, one surface, one ink, one muted, one accent. Separation is
   done with 1px rules and whitespace — there are no shadows in this sheet.
   =========================================================================== */

:root {
  --bg: #f8f8f3;
  --surface: #ffffff;
  --ink: #1e2822;
  --muted: #536057;
  --accent: #315844;
  --tinted: #e9eee4;

  --rule: #dce0d6;
  --rule-strong: #bdc8bc;

  --radius: 6px;
  --measure: 62ch;
  --section: 96px;

  --serif: "Iowan Old Style", Georgia, serif;
  --grotesque: system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--grotesque);
  font-size: 16px;
  line-height: 1.65;
  font-feature-settings: "kern" 1;
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0;
}

h1 { font-size: 2.3rem; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.12rem; letter-spacing: -0.01em; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--accent); text-underline-offset: 3px; }

/* --------------------------------------------------------------- scaffolding */

.wrap {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 32px;
}

.measure { max-width: var(--measure); }

.skip { position: absolute; left: -9999px; }
.skip:focus {
  left: 16px;
  top: 16px;
  z-index: 10;
  background: var(--surface);
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  padding: 10px 14px;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ------------------------------------------------------------------ masthead */

.masthead {
  border-bottom: 1px solid var(--rule);
  background: var(--bg);
}

.masthead-inner {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 32px;
  padding: 22px 0;
  flex-wrap: wrap;
}

.masthead-nav {
  display: flex;
  align-items: baseline;
  gap: 24px;
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  flex-wrap: wrap;
}
.masthead-nav a { color: var(--muted); text-decoration: none; }
.masthead-nav a:hover { color: var(--ink); text-decoration: underline; }
.masthead-nav .who { color: var(--ink); }
.masthead-nav form { display: inline; margin: 0; }

button.link {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  color: var(--muted);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
button.link:hover { color: var(--ink); }

/* -------------------------------------------------------------------- layout */

main.wrap { padding-block: 64px var(--section); }

.page-head { margin-bottom: 64px; }
.page-head h1 { margin-bottom: 14px; }
.page-head p { color: var(--muted); max-width: var(--measure); }

.eyebrow {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 14px;
}

.section { padding-top: var(--section); }
.section + .section { border-top: 1px solid var(--rule); }

.block { margin-bottom: 56px; }
.block:last-child { margin-bottom: 0; }

hr.rule { border: 0; border-top: 1px solid var(--rule); margin: 40px 0; }

.muted { color: var(--muted); }
.faint { color: var(--muted); font-size: 0.9rem; }
.tiny { font-size: 0.84rem; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }

.row { display: flex; gap: 20px; align-items: baseline; flex-wrap: wrap; }
.row-between { justify-content: space-between; }

/* A two-up figure row, separated by a rule rather than sitting in cards. */
.figures {
  display: grid;
  gap: 0;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--surface);
}
.figure { padding: 24px 28px; border-right: 1px solid var(--rule); }
.figure:last-child { border-right: 0; }
.figure .n {
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  display: block;
  line-height: 1.1;
}
.figure .n small { font-family: var(--grotesque); font-size: 0.8rem; font-weight: 400; color: var(--muted); letter-spacing: 0; }

/* ---------------------------------------------------------------- panel/card */

.card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: 32px;
}
.card:last-child { margin-bottom: 0; }
.card-tight { padding: 20px 24px; }
.card > h2 { margin-bottom: 8px; }
.card > h2 + .muted { margin-bottom: 24px; }

/* --------------------------------------------------------------------- forms */

label {
  display: block;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="datetime-local"],
textarea,
select {
  width: 100%;
  padding: 12px 14px;
  font-family: var(--grotesque);
  font-size: 1rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
}
input:hover, textarea:hover { border-color: var(--muted); }

textarea { resize: vertical; min-height: 150px; line-height: 1.7; }

.field { margin-bottom: 28px; }
.field:last-child { margin-bottom: 0; }
.field-hint {
  font-family: var(--grotesque);
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.84rem;
}

fieldset { border: 0; margin: 0; padding: 0; }
legend { padding: 0; }

/* ------------------------------------------------------------------- actions */

/* One solid button per viewport. Everything else is an underlined text link. */
.btn {
  display: inline-block;
  font-family: var(--grotesque);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 13px 26px;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--bg);
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { background: var(--ink); border-color: var(--ink); }
.btn:disabled, .btn[disabled] { opacity: 0.4; cursor: not-allowed; }

.btn-plain,
.btn-ghost,
.link-action {
  display: inline-block;
  background: none;
  border: 0;
  padding: 0;
  font-family: var(--grotesque);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--accent);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.btn-plain:hover, .btn-ghost:hover, .link-action:hover { color: var(--ink); }

.link-action::after { content: " \2192"; text-decoration: none; }

.btn-sm { font-size: 0.88rem; padding: 9px 18px; }
.btn-plain.btn-sm, .btn-ghost.btn-sm { padding: 0; font-size: 0.88rem; }

.btn-danger { background: var(--ink); border-color: var(--ink); }

.actions {
  display: flex;
  align-items: baseline;
  gap: 28px;
  flex-wrap: wrap;
}

/* -------------------------------------------------------------------- labels */

/* Rectangular, mono, uppercase. Filled means settled, outlined means it needs
   attention, plain means nothing to do — state by weight and fill, not hue. */
.badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: var(--radius);
  border: 1px solid var(--rule-strong);
  color: var(--muted);
  background: var(--surface);
  white-space: nowrap;
}
.badge-open, .badge-done {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
}
.badge-attention {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--surface);
}
.badge-soon { border-color: var(--rule-strong); color: var(--ink); }
.badge-closed { color: var(--muted); }

/* -------------------------------------------------------------------- tables */

.table-scroll { overflow-x: auto; }

table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }

th, td {
  text-align: left;
  padding: 16px 20px 16px 0;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}
th:last-child, td:last-child { padding-right: 0; }

th {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--rule-strong);
  white-space: nowrap;
  padding-top: 0;
}

tbody tr:last-child td { border-bottom: 0; }

.num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }
th.num { text-align: right; }

/* --------------------------------------------------- assessment list (editorial) */

.assess-list { border-top: 1px solid var(--rule-strong); }

.assess {
  border-bottom: 1px solid var(--rule);
  padding: 40px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 320px);
  gap: 48px;
  align-items: start;
}
.assess-head h2 { margin-bottom: 10px; }
.assess-head .sub { color: var(--muted); font-size: 0.92rem; max-width: 46ch; }
.assess-meta { display: flex; flex-direction: column; gap: 18px; align-items: flex-start; }

.part {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 20px;
  padding: 14px 0;
  border-top: 1px solid var(--rule);
  flex-wrap: wrap;
  width: 100%;
}
.part:first-child { border-top: 0; }
.part-meta strong { display: block; font-weight: 500; }
.part-meta span {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  color: var(--muted);
}

/* ------------------------------------------------------------------ the exam */

.exam-bar {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--bg);
  border-bottom: 1px solid var(--rule-strong);
}
.exam-bar-inner {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  max-width: 1080px;
  margin: 0 auto;
  padding: 16px 32px;
  flex-wrap: wrap;
}
.exam-bar strong { font-family: var(--serif); font-size: 1.05rem; font-weight: 600; }

.clock {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 1.15rem;
  font-weight: 500;
  padding: 5px 12px;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  color: var(--ink);
}
.clock.warn { border-color: var(--accent); color: var(--accent); }
.clock.danger { background: var(--accent); border-color: var(--accent); color: var(--bg); }

.save-state {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  min-width: 9em;
}
.save-state.error { color: var(--accent); font-weight: 500; }

.q {
  border-bottom: 1px solid var(--rule);
  padding: 44px 0;
}
.q:first-of-type { border-top: 1px solid var(--rule-strong); }

.q-head { margin-bottom: 24px; max-width: var(--measure); }
.q-num {
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--muted);
  display: block;
  margin-bottom: 10px;
}
.q-text {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: -0.01em;
  margin: 0;
}
.q-marks {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  display: block;
  margin-top: 10px;
}

.opts { display: grid; gap: 0; max-width: var(--measure); border-top: 1px solid var(--rule); }

.opt {
  display: grid;
  grid-template-columns: 22px 20px 1fr;
  gap: 14px;
  align-items: start;
  padding: 16px 4px;
  border-bottom: 1px solid var(--rule);
  cursor: pointer;
  margin: 0;
  font-family: var(--grotesque);
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
}
.opt:hover { background: var(--surface); }
.opt input { margin: 5px 0 0; accent-color: var(--accent); }
.opt-letter { font-family: var(--mono); font-size: 0.9rem; color: var(--muted); }
.opt:has(input:checked) { background: var(--surface); }
.opt:has(input:checked) .opt-letter { color: var(--accent); font-weight: 500; }
.opt:has(input:checked) .opt-body { font-weight: 500; }

.scenario {
  border-left: 2px solid var(--accent);
  padding: 4px 0 4px 28px;
  margin: var(--section) 0 8px;
  max-width: var(--measure);
}
.scenario:first-of-type { margin-top: 24px; }
.scenario h2 { margin-bottom: 12px; }
.scenario p { color: var(--muted); }

.exam-foot {
  border-top: 1px solid var(--rule-strong);
  padding-top: 40px;
  margin-top: 56px;
  max-width: var(--measure);
}

/* ------------------------------------------------------------------- notices */

.notice {
  border: 1px solid var(--rule-strong);
  border-left: 2px solid var(--accent);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 18px 22px;
  margin-bottom: 40px;
  max-width: var(--measure);
}
.notice p { font-size: 0.95rem; }
.notice p + p { margin-top: 10px; }
.notice-info, .notice-good, .notice-warn, .notice-bad { /* one treatment */ }

/* -------------------------------------------------------------------- review */

.mark-block {
  border-bottom: 1px solid var(--rule);
  padding: 44px 0;
}
.mark-block:first-of-type { border-top: 1px solid var(--rule-strong); }
.mark-block.done { opacity: 0.72; }
.mark-block.done:hover { opacity: 1; }

.answer-box {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 20px 24px;
  white-space: pre-wrap;
  font-size: 1rem;
  line-height: 1.75;
  max-width: var(--measure);
}
.answer-box.empty { color: var(--muted); font-style: italic; }

.guide {
  border-left: 2px solid var(--rule-strong);
  padding-left: 24px;
  margin: 32px 0;
  max-width: var(--measure);
}

.rubric-check { list-style: none; margin: 10px 0 0; padding: 0; font-size: 0.95rem; }
.rubric-check li {
  padding: 10px 0 10px 30px;
  position: relative;
  border-bottom: 1px solid var(--rule);
}
.rubric-check li:last-child { border-bottom: 0; }
.rubric-check li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 15px;
  width: 12px;
  height: 12px;
  border: 1px solid var(--rule-strong);
  border-radius: 2px;
}

/* A plain checkbox row, for enrolment lists and similar. */
.check {
  display: flex;
  gap: 12px;
  align-items: baseline;
  font-family: var(--grotesque);
  font-size: 0.95rem;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
  margin-bottom: 10px;
  cursor: pointer;
}
.check:last-child { margin-bottom: 0; }
.check input { accent-color: var(--accent); margin: 0; }

.mark-input {
  display: flex;
  gap: 28px;
  align-items: flex-end;
  flex-wrap: wrap;
  max-width: var(--measure);
}
.mark-input .field { margin: 0; }
.mark-input input[type="number"] { width: 7em; font-family: var(--mono); }
.mark-input .grow { flex: 1; min-width: 240px; }

/* ---------------------------------------------------------------------- bars */

.bar {
  height: 3px;
  background: var(--rule);
  overflow: hidden;
  min-width: 90px;
}
.bar > span { display: block; height: 100%; background: var(--accent); }

/* --------------------------------------------------------------------- codes */

.code {
  font-family: var(--mono);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.1em;
}

.slips { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.slip {
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  padding: 24px;
  background: var(--surface);
}
.slip .name { font-family: var(--serif); font-size: 1.1rem; font-weight: 600; }
.slip .code { display: block; margin: 14px 0 6px; font-size: 1.4rem; }

/* -------------------------------------------------------------------- footer */

.footer {
  border-top: 1px solid var(--rule);
  padding: 32px 0;
}
.footer p {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 0;
}

/* ----------------------------------------------------- sign-in / enrol pages */

input.code-entry {
  font-family: var(--mono);
  font-size: 1.4rem;
  letter-spacing: 0.18em;
  padding: 16px 14px;
  text-transform: uppercase;
}

/* --------------------------------------------------------------------- print */

@media print {
  .masthead, .footer, .no-print, .exam-bar { display: none !important; }
  body { background: #fff; }
  main.wrap { padding-block: 0; }
  .slip { break-inside: avoid; }
}

/* ---------------------------------------------------------------- responsive */

@media (max-width: 900px) {
  .assess { grid-template-columns: 1fr; gap: 28px; }
}

@media (max-width: 620px) {
  :root { --section: 64px; }
  .wrap { padding: 0 20px; }
  main.wrap { padding-block: 36px var(--section); }
  h1 { font-size: 1.8rem; }
  .page-head { margin-bottom: 40px; }
  .q-text { font-size: 1.15rem; }
  .exam-bar-inner { padding: 14px 20px; gap: 12px; }
  .card { padding: 24px 20px; }
  .figure { border-right: 0; border-bottom: 1px solid var(--rule); }
  .figure:last-child { border-bottom: 0; }
  th, td { padding: 12px 14px 12px 0; }
}

/* Portal chrome */
[data-portal="penam"] {
  --bg: #f6f7f9;
  --ink: #202830;
  --muted: #4f5d69;
  --accent: #205b91;
  --tinted: #e8eff6;
  --rule: #dbe2e9;
  --rule-strong: #b9c7d4;
}
body { min-height: 100vh; display: flex; flex-direction: column; }
body > main { flex: 1; }
.masthead { background: var(--surface); }
.masthead-inner { align-items: center; min-height: 86px; padding-block: 14px; gap: 12px 28px; }

.portal-brand {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
}

.portal-logo { display: block; width: 186px; height: 40px; object-fit: contain; }
[data-portal="penam"] .portal-logo { width: 102px; height: 42px; }
.portal-brand span { border-left: 1px solid var(--rule-strong); padding-left: 18px; }
.portal-brand-partner img { display: block; width: clamp(136px, 36vw, 205px); height: auto; }
.masthead-nav { font: 0.875rem/1.4 var(--grotesque); letter-spacing: normal; text-transform: none; gap: 20px; }
[data-portal="penam"] .masthead-nav a { color: var(--ink); }
[data-portal="penam"] .masthead-nav a:hover,
[data-portal="penam"] .masthead-nav a[aria-current] {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 6px;
}
.footer { padding: 20px 0; }
.portal-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 20px; }
.portal-footer p { font: 0.875rem/1.5 var(--grotesque); letter-spacing: normal; }

/* Sign-in and enrolment */
body.gate main.wrap { max-width: 1200px; display: flex; align-items: center; padding-block: 48px; }

.split {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: clamp(2rem, 7vw, 6rem);
  align-items: stretch;
  width: 100%;
}

.split-main { display: grid; place-items: center; padding-block: 34px; }
.split-form { width: 100%; max-width: 385px; }
.split-form h1 { font-size: clamp(2rem, 3.8vw, 3.25rem); margin-bottom: 12px; }
.split-form .lead { color: var(--muted); margin-bottom: 25px; }
.split-form .btn { width: 100%; text-align: center; margin-top: 5px; }
.split-form .rule { margin-block: 25px; }
[data-portal="penam"] .split-form h1,
[data-portal="penam"] .learning-head h1,
[data-portal="penam"] .course-card h2 {
  font-family: var(--grotesque);
  font-weight: 700;
  letter-spacing: -0.035em;
}
[data-portal="penam"] .split-form h1 { font-size: clamp(2rem, 3.3vw, 2.9rem); }
[data-portal="penam"] .split-form label {
  font: 600 0.875rem/1.5 var(--grotesque);
  text-transform: none;
  letter-spacing: normal;
}
.gate-alternative { margin: 19px 0 10px; font-size: 0.9375rem; }
.gate-help { color: var(--muted); font-size: 0.875rem; }

.gate-aside {
  display: grid;
  grid-template-rows: 1fr auto;
  min-height: min(550px, 65vh);
  overflow: hidden;
  background: var(--tinted);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}

.gate-aside > img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 300px;
  max-height: 490px;
  object-fit: cover;
  object-position: 50% 28%;
}

.gate-aside-caption { padding: 24px 28px 27px; }
.gate-aside-caption h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
.gate-aside-caption p { color: var(--muted); font-size: 0.875rem; margin-bottom: 5px; }
[data-portal="penam"] .gate-aside { grid-template-rows: 1fr; place-items: center; text-align: center; }
.gate-penam-logo { display: block; width: min(100%, 190px); height: auto; margin: 0 auto 24px; }
[data-portal="penam"] .gate-aside h2 { margin-bottom: 7px; }

[data-portal="penam"] .gate-programme {
  position: relative;
  display: flex;
  align-items: flex-end;
  isolation: isolate;
  min-height: clamp(440px, 62vh, 560px);
  background: #202830;
  border-color: #202830;
  color: #fff;
  text-align: left;
}

.gate-programme > .gate-programme-image {
  position: absolute;
  inset: 0;
  min-height: 0;
  max-height: none;
  object-position: 50% 42%;
  filter: grayscale(100%);
  z-index: -2;
}

.gate-programme::before {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(16, 24, 32, 0.18), rgba(16, 24, 32, 0.55) 52%, #101820);
  content: "";
  z-index: -1;
}

.gate-programme .gate-aside-caption { padding: clamp(24px, 4vw, 45px); }
.gate-programme .gate-aside-caption h2 {
  font: 700 clamp(1.75rem, 3.3vw, 2.65rem)/1.1 var(--grotesque);
  letter-spacing: -0.035em;
}
.gate-programme .gate-aside-caption p { color: #e3eaf1; }

/* Learner dashboard and course activities */
.learning-head { margin-bottom: 30px; }
.learning-head h1 { font-size: clamp(2.15rem, 4.7vw, 3.35rem); margin-bottom: 10px; }
.course-heading { padding-bottom: 25px; border-bottom: 1px solid var(--rule); }
.programme-dates { display: flex; flex-wrap: wrap; gap: 8px 24px; padding: 0; margin: 16px 0 0; list-style: none; }
.programme-dates li, .course-venue { color: var(--muted); font-size: 0.9375rem; }
.programme-dates strong, .course-venue strong { color: var(--ink); margin-right: 6px; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 19px; font-size: 0.875rem; }
.course-list { display: grid; gap: 22px; }

.course-card {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--surface);
}

.course-card.has-photo { grid-template-columns: minmax(180px, 34%) 1fr; }
.course-card-body { padding: clamp(22px, 4vw, 47px); }
.course-card h2 { font-size: clamp(1.5rem, 3.2vw, 2.15rem); margin-bottom: 12px; }
.course-card h2 a { color: var(--ink); text-decoration: none; }
.course-card h2 a:hover { color: var(--accent); text-decoration: underline; }
.course-card p { color: var(--muted); max-width: 55ch; }
.course-card .btn { margin-top: 24px; }
.course-photo { width: 100%; height: 100%; min-height: 0; object-fit: cover; object-position: center 32%; }

.course-progress {
  display: grid;
  gap: 7px;
  max-width: 300px;
  margin-top: 20px;
  color: var(--muted);
  font-size: 0.875rem;
}

.course-progress progress { width: 100%; height: 10px; accent-color: var(--accent); }

.empty-courses, .learning-sidebar {
  padding: 25px;
  background: var(--tinted);
  border-radius: var(--radius);
}

.empty-courses h2 { margin-bottom: 6px; }
.empty-courses p { color: var(--muted); }
.learning-layout { display: grid; grid-template-columns: minmax(0, 1fr) 240px; align-items: start; gap: 36px; }
.learning-sidebar h2 { font-size: 1.25rem; }
.learning-sidebar .course-progress { margin-top: 12px; }
.activity-group + .activity-group { margin-top: 40px; }
.activity-group > h2 { margin-bottom: 12px; font-size: 1.7rem; }
.activity-intro { color: var(--muted); font-size: 0.9375rem; margin-bottom: 12px; }
.assessment-group { margin-top: 22px; }
.assessment-group > h3 { margin-bottom: 5px; font-size: 1.15rem; }

.activity-list {
  margin: 0;
  padding: 0;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}

.activity-list li { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 16px; }
.activity-list li + li { border-top: 1px solid var(--rule); }
.activity-list li h3 { font: 600 1rem/1.4 var(--grotesque); }
.activity-list li p { margin: 4px 0 0; font-size: 0.875rem; color: var(--muted); }
.activity-status { font-size: 0.875rem; color: var(--muted); white-space: nowrap; }

.lesson-content { max-width: 70ch; }
.lesson-content section { margin-bottom: 24px; }
.lesson-content h2 { margin-bottom: 8px; }
.practice { padding: 20px 22px; border-left: 3px solid var(--accent); background: var(--tinted); }
.lesson-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 28px; }
.lesson-actions p { margin: 0; color: var(--muted); }

@media (max-width: 900px) {
  .split { gap: 24px; }
  .learning-layout { grid-template-columns: minmax(0, 1fr) 205px; gap: 20px; }
}

@media (max-width: 620px) {
  body.gate main.wrap { padding-block: 20px 36px; }
  .masthead-inner { padding-block: 12px; min-height: 72px; gap: 9px; }
  .portal-brand { gap: 10px; }
  .portal-brand span { padding-left: 10px; }
  .portal-logo { width: 143px; height: 33px; }
  .masthead-nav { gap: 12px; }
  .masthead-nav .who { display: none; }
  .split, .course-card.has-photo, .learning-layout { grid-template-columns: 1fr; }
  .split-main { padding-block: 18px; }
  .gate-aside { min-height: auto; }
  .gate-aside > img { min-height: 0; height: 220px; }
  [data-portal="penam"] .gate-programme { min-height: 245px; }
  .gate-programme > .gate-programme-image { height: 100%; }
  .course-photo { height: 175px; }
  .learning-sidebar { grid-row: 1; }
}

.learner-clipboard-status {
  position: fixed;
  inset: auto 1rem 1rem;
  width: fit-content;
  max-width: calc(100vw - 2rem);
  z-index: 5;
}
.learner-clipboard-status:not(:empty) {
  padding: 10px 14px;
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--surface);
  font-size: 0.9375rem;
}

.exam-step { margin-top: 32px; }
.exam-step h1 { margin-bottom: 12px; }
.exam-step h2 { margin-bottom: 8px; }
.exam-step .q { padding: 8px 0 24px; }
.exam-step .notice { margin-bottom: 24px; }
.exam-navigation, .exam-submit { margin-top: 24px; }
.exam-question-links {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  gap: 8px 16px;
  padding: 0;
  margin: 12px 0 0;
}
.exam-question-links a { display: inline-block; padding: 4px 0; }

#certificate-mail-tools[hidden] { display: none; }
#certificate-mail-tools { margin-bottom: 1rem; }
#pass-percent { width: 8em; }

#certificate-mail-review {
  width: min(35rem, calc(100% - 2rem));
  max-height: calc(100% - 2rem);
  border: 1px solid var(--rule-strong);
  padding: 1.5rem;
  color: var(--ink);
}
#certificate-mail-review::backdrop { background: rgb(20 28 24 / .45); }
#certificate-mail-recipients { overflow-wrap: anywhere; }
