/* ==========================================================================
   Tilt Up — industrial hi-vis design system
   Bold black + safety-yellow brand chrome; calm "paper" learning surfaces.
   ========================================================================== */

@font-face {
  font-family: "Archivo";
  src: url("/fonts/Archivo.ttf") format("truetype-variations");
  font-weight: 100 900;
  font-stretch: 75% 125%;
  font-display: swap;
}
@font-face {
  font-family: "Public Sans";
  src: url("/fonts/PublicSans.ttf") format("truetype-variations");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Noto Sans Gurmukhi";
  src: url("/fonts/NotoSansGurmukhi.ttf") format("truetype-variations");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Noto Sans Arabic";
  src: url("/fonts/NotoSansArabic.ttf") format("truetype-variations");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Noto Sans Devanagari";
  src: url("/fonts/NotoSansDevanagari.ttf") format("truetype-variations");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --ink: #14130f;
  --ink-soft: #3a352c;
  --paper: #fbf8f1;
  --paper-2: #f1ebdc;
  --paper-3: #e7dfca;
  --hi-vis: #ffd400;
  --hi-vis-deep: #e0b400;
  --danger: #c81d36;
  --danger-bg: #fbe7ea;
  --ok: #15722f;
  --ok-bg: #e3f3e7;
  --muted: #5f5848;
  --line: #14130f;

  --font-display: "Archivo", "Public Sans", system-ui, sans-serif;
  --font-body: "Public Sans", system-ui, -apple-system, sans-serif;

  --shadow-hard: 5px 5px 0 var(--ink);
  --shadow-hard-sm: 3px 3px 0 var(--ink);
  --radius: 4px;
  --tap: 52px;
  --maxw: 1120px;
}

html[lang="pa"] {
  --font-display: "Noto Sans Gurmukhi", "Archivo", system-ui, sans-serif;
  --font-body: "Noto Sans Gurmukhi", "Public Sans", system-ui, sans-serif;
}
html[lang="hi"] {
  --font-display: "Noto Sans Devanagari", "Archivo", system-ui, sans-serif;
  --font-body: "Noto Sans Devanagari", "Public Sans", system-ui, sans-serif;
}
html[lang="ar"] {
  --font-display: "Noto Sans Arabic", "Archivo", system-ui, sans-serif;
  --font-body: "Noto Sans Arabic", "Public Sans", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  /* subtle paper grain via layered gradients */
  background-image:
    radial-gradient(circle at 20% 10%, rgba(0, 0, 0, 0.015) 0, transparent 40%),
    radial-gradient(circle at 85% 80%, rgba(0, 0, 0, 0.02) 0, transparent 45%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
}
h1 {
  font-size: clamp(2.1rem, 6vw, 3.6rem);
  font-stretch: 112%;
  text-transform: uppercase;
}
h2 {
  font-size: clamp(1.5rem, 4vw, 2.2rem);
}
h3 {
  font-size: 1.25rem;
}

a {
  color: var(--ink);
  text-underline-offset: 3px;
  text-decoration-thickness: 2px;
}

p {
  margin: 0 0 1rem;
}

img {
  max-width: 100%;
}

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

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--hi-vis);
  color: var(--ink);
  padding: 12px 16px;
  font-weight: 700;
  z-index: 100;
}
.skip-link:focus {
  left: 0;
}

/* hazard stripe divider */
.hazard {
  height: 14px;
  background: repeating-linear-gradient(
    -45deg,
    var(--hi-vis) 0,
    var(--hi-vis) 18px,
    var(--ink) 18px,
    var(--ink) 36px
  );
}

/* ---------- Top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--ink);
  color: #fff;
  border-bottom: 3px solid var(--hi-vis);
}
.topbar .wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 64px;
  padding-top: 8px;
  padding-bottom: 8px;
  flex-wrap: wrap;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 900;
  font-stretch: 125%;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-size: 1.4rem;
  background: var(--hi-vis);
  color: var(--ink);
  padding: 4px 12px;
  line-height: 1;
}
.brand:hover {
  background: #fff;
}
.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  flex-wrap: wrap;
}
.nav a {
  color: #fff;
  text-decoration: none;
  padding: 8px 12px;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius);
}
.nav a:hover {
  background: rgba(255, 255, 255, 0.12);
}
.nav a.cta {
  background: var(--hi-vis);
  color: var(--ink);
  font-weight: 800;
}
.nav a.cta:hover {
  background: #fff;
}

/* language picker */
.lang {
  position: relative;
}
.lang summary {
  list-style: none;
  cursor: pointer;
  color: #fff;
  padding: 8px 12px;
  font-weight: 600;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.lang summary::-webkit-details-marker {
  display: none;
}
.lang[open] summary {
  background: rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
}
.lang-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  background: var(--paper);
  border: 2px solid var(--ink);
  box-shadow: var(--shadow-hard-sm);
  min-width: 180px;
  padding: 6px;
  z-index: 60;
}
.lang-menu a {
  display: block;
  color: var(--ink);
  padding: 10px 12px;
  text-decoration: none;
  font-weight: 600;
}
.lang-menu a:hover,
.lang-menu a[aria-current="true"] {
  background: var(--hi-vis);
}

/* ---------- Language welcome bar (first visit) ---------- */
.langbar {
  background: var(--hi-vis);
  color: var(--ink);
  border-bottom: 2px solid var(--ink);
}
.langbar .wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 10px 20px;
}
.langbar-label {
  font-family: var(--font-display);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 0.85rem;
}
.langbar-opts {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.langbar-opts a {
  background: var(--ink);
  color: #fff;
  text-decoration: none;
  padding: 9px 18px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1;
}
.langbar-opts a:hover {
  background: #fff;
  color: var(--ink);
}
.langbar-x {
  margin-left: auto;
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
  opacity: 0.55;
  padding: 4px 8px;
}
.langbar-x:hover {
  opacity: 1;
}

/* subtle "auto-translated" note — honest, never alarming */
.i18n-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--muted);
  background: var(--paper-2);
  border: 1px solid var(--paper-3);
  border-radius: 999px;
  padding: 6px 14px;
  margin-bottom: 16px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--tap);
  padding: 8px 24px;
  max-width: 100%;
  white-space: normal; /* allow long labels (e.g. phone CTA) to wrap, not overflow */
  text-align: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--ink);
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard-sm);
  cursor: pointer;
  transition:
    transform 0.08s ease,
    box-shadow 0.08s ease;
}
.btn:hover {
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 var(--ink);
}
.btn:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--ink);
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}
.btn-primary {
  background: var(--hi-vis);
}
.btn-dark {
  background: var(--ink);
  color: #fff;
}
.btn-block {
  width: 100%;
}
.btn-lg {
  min-height: 60px;
  font-size: 1.2rem;
  padding: 0 32px;
}
.btn-ghost {
  background: transparent;
  box-shadow: none;
  border-color: transparent;
  text-transform: none;
  font-family: var(--font-body);
}
.btn-ghost:hover {
  box-shadow: none;
  background: var(--paper-2);
}

/* ---------- Cards & layout ---------- */
.section {
  padding: 56px 0;
}
.card {
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard);
  padding: 28px;
}
.stack > * + * {
  margin-top: 16px;
}
.grid {
  display: grid;
  gap: 24px;
}
@media (min-width: 720px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

.eyebrow {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--ink-soft);
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--ink);
  color: #fff;
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 5px 10px;
  border-radius: 999px;
}
.chip-vis {
  background: var(--hi-vis);
  color: var(--ink);
}
.chip-line {
  background: transparent;
  color: var(--ink);
  border: 2px solid var(--ink);
}
.price-chip {
  background: var(--ink);
  color: var(--hi-vis);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1rem;
  padding: 5px 12px;
}

/* referral share card */
.share-card {
  border-color: var(--hi-vis-deep);
}
.share-code {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.9rem;
  letter-spacing: 0.18em;
  text-align: center;
  background: var(--paper-2);
  border: 2px dashed var(--ink);
  border-radius: var(--radius);
  padding: 14px;
  margin: 12px 0 16px;
}

/* ---------- Hero (dark) ---------- */
.hero {
  background: var(--ink);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  inset: auto -10% -40% auto;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(255, 212, 0, 0.16), transparent 60%);
  pointer-events: none;
}
.hero .wrap {
  padding-top: 64px;
  padding-bottom: 64px;
  position: relative;
  z-index: 1;
}
.hero h1 {
  color: #fff;
  max-width: 16ch;
}
.hero h1 .accent {
  color: var(--hi-vis);
  display: block;
}
.hero p.lead {
  font-size: 1.2rem;
  max-width: 56ch;
  color: #e8e4d8;
}
.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.trustrow {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 0.92rem;
  color: #d8d4c7;
}
.trustrow b {
  color: var(--hi-vis);
}

/* segmented entry cards */
.entry {
  display: block;
  text-decoration: none;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard);
  padding: 24px;
  position: relative;
  transition:
    transform 0.1s ease,
    box-shadow 0.1s ease;
}
.entry:hover {
  transform: translate(-2px, -2px);
  box-shadow: 7px 7px 0 var(--ink);
}
.entry .num {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 2.4rem;
  color: var(--hi-vis-deep);
  line-height: 1;
}
.entry h3 {
  margin: 12px 0 6px;
}
.entry .go {
  margin-top: 14px;
  font-weight: 800;
  font-family: var(--font-display);
  text-transform: uppercase;
  font-size: 0.9rem;
}

/* ---------- Course catalogue ---------- */
.course-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.course-card .meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 10px 0 14px;
}
.course-card .spacer {
  flex: 1;
}
.code {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.05em;
  font-size: 0.8rem;
  color: var(--muted);
}

/* progress bar */
.bar {
  height: 12px;
  background: var(--paper-3);
  border: 2px solid var(--ink);
  border-radius: 999px;
  overflow: hidden;
}
.bar > span {
  display: block;
  height: 100%;
  background: var(--hi-vis);
  transition: width 0.3s ease;
}

/* ---------- Forms ---------- */
.field {
  margin-bottom: 18px;
}
.field label {
  display: block;
  font-weight: 700;
  margin-bottom: 6px;
}
.field input,
.field select {
  width: 100%;
  min-height: var(--tap);
  padding: 12px 14px;
  font-size: 1.05rem;
  font-family: var(--font-body);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: #fff;
}
.field .hint {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 6px;
}
.alert {
  border: 2px solid var(--danger);
  background: var(--danger-bg);
  color: #7a1020;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-weight: 600;
  margin-bottom: 18px;
}
.notice {
  border: 2px solid var(--ink);
  background: var(--hi-vis);
  padding: 12px 16px;
  border-radius: var(--radius);
  font-weight: 600;
  margin-bottom: 18px;
}
.auth-wrap {
  max-width: 460px;
  margin: 48px auto;
}

/* ---------- Lesson player ---------- */
.learn {
  display: grid;
  gap: 28px;
}
@media (min-width: 900px) {
  .learn {
    grid-template-columns: 280px 1fr;
    align-items: start;
  }
}
.lesson-list {
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  overflow: hidden;
  position: sticky;
  top: 80px;
}
.lesson-list a {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  text-decoration: none;
  border-bottom: 1px solid var(--paper-3);
  font-weight: 600;
  font-size: 0.95rem;
}
.lesson-list a:last-child {
  border-bottom: 0;
}
.lesson-list a[aria-current="true"] {
  background: var(--hi-vis);
}
.lesson-list a .dot {
  width: 22px;
  height: 22px;
  flex: none;
  border: 2px solid var(--ink);
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 0.7rem;
  font-weight: 800;
  background: #fff;
}
.lesson-list a.done .dot {
  background: var(--ok);
  color: #fff;
  border-color: var(--ok);
}

.prose {
  max-width: 70ch;
}
.prose h3 {
  margin-top: 1.6em;
  font-size: 1.3rem;
}
.prose ul,
.prose ol {
  padding-left: 1.3em;
}
.prose li {
  margin-bottom: 0.5em;
}
.prose strong {
  background: linear-gradient(transparent 60%, rgba(255, 212, 0, 0.55) 60%);
}

.audio-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 18px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: #fff;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-hard-sm);
}
.audio-btn.playing {
  background: var(--hi-vis);
}

/* native audio player + skip controls */
.audioplayer {
  margin: 6px 0 24px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--paper-2);
  padding: 14px 16px;
  box-shadow: var(--shadow-hard-sm);
}
.audio-cap {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.78rem;
  margin-bottom: 8px;
}
.audioplayer audio {
  width: 100%;
  min-height: 44px; /* let mobile Safari/Chrome render their taller native bar */
  display: block;
}
.audio-skips {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}
/* In RTL the forward control should sit on the natural leading (right) side. */
[dir="rtl"] .audio-skips {
  flex-direction: row-reverse;
}
.skip-btn {
  flex: 1;
  min-height: 46px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
}
.skip-btn:active {
  background: var(--hi-vis);
}
.lesson-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 32px;
  padding-top: 20px;
  border-top: 2px solid var(--ink);
  flex-wrap: wrap;
}

/* ---------- Quiz / exam (commit-then-reveal) ---------- */
.exam-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.scoreboard {
  font-family: var(--font-display);
  font-weight: 800;
  text-align: right;
}
.scoreboard .big {
  font-size: 1.8rem;
}
.qcard {
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard);
  background: var(--paper);
  padding: 28px;
}
.qprompt {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.4rem;
  line-height: 1.2;
  margin-bottom: 20px;
}
.options {
  display: grid;
  gap: 12px;
}
.option {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  text-align: left;
  min-height: var(--tap);
  padding: 14px 16px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: #fff;
  font-size: 1.05rem;
  font-family: var(--font-body);
  cursor: pointer;
  transition: background 0.1s ease;
}
.option:hover:not(:disabled) {
  background: var(--paper-2);
}
.option .key {
  flex: none;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 800;
  background: var(--paper-2);
}
.option.selected {
  border-width: 3px;
  background: var(--paper-2);
}
.option.correct {
  background: var(--ok-bg);
  border-color: var(--ok);
}
.option.correct .key {
  background: var(--ok);
  color: #fff;
  border-color: var(--ok);
}
.option.wrong {
  background: var(--danger-bg);
  border-color: var(--danger);
}
.option.wrong .key {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}
.option:disabled {
  cursor: default;
}
.feedback {
  margin-top: 20px;
  border: 2px solid var(--ink);
  border-left-width: 8px;
  border-radius: var(--radius);
  padding: 16px 18px;
  background: #fff;
}
.feedback.correct {
  border-color: var(--ok);
  background: var(--ok-bg);
}
.feedback.wrong {
  border-color: var(--danger);
  background: var(--danger-bg);
}
.feedback .verdict {
  font-family: var(--font-display);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.exam-progress {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
}
.exam-progress span {
  flex: 1;
  height: 8px;
  background: var(--paper-3);
  border-radius: 999px;
}
.exam-progress span.answered {
  background: var(--ink);
}
.exam-progress span.right {
  background: var(--ok);
}
.exam-progress span.wrong {
  background: var(--danger);
}
.exam-foot {
  margin-top: 24px;
  display: flex;
  justify-content: flex-end;
}

.result-hero {
  text-align: center;
  padding: 40px 24px;
}
.result-score {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(3.5rem, 14vw, 6rem);
  line-height: 1;
}
.result-score.pass {
  color: var(--ok);
}
.result-score.fail {
  color: var(--danger);
}

/* ---------- Certificate ---------- */
.certificate {
  background: #fff;
  border: 3px solid var(--ink);
  box-shadow: var(--shadow-hard);
  padding: 44px;
  position: relative;
  max-width: 820px;
  margin: 0 auto;
}
.certificate::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 2px solid var(--hi-vis-deep);
  pointer-events: none;
}
.cert-inner {
  position: relative;
  text-align: center;
}
.cert-brand {
  font-family: var(--font-display);
  font-weight: 900;
  font-stretch: 125%;
  text-transform: uppercase;
  font-size: 1.6rem;
  letter-spacing: 0.04em;
}
.cert-title {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.85rem;
  color: var(--muted);
  margin: 18px 0;
}
.cert-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 6vw, 3rem);
  margin: 8px 0;
  border-bottom: 3px solid var(--hi-vis);
  display: inline-block;
  padding-bottom: 6px;
}
.cert-course {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 18px 0 6px;
}
.cert-grid {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
  margin-top: 28px;
  font-size: 0.9rem;
}
.cert-grid .k {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.7rem;
  color: var(--muted);
  font-weight: 700;
}
.cert-grid .v {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
}
.cert-seal {
  position: absolute;
  right: 18px;
  top: 8px;
  width: 84px;
  height: 84px;
  border-radius: 999px;
  background: var(--hi-vis);
  border: 3px solid var(--ink);
  display: grid;
  place-items: center;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.62rem;
  text-transform: uppercase;
  line-height: 1.1;
  transform: rotate(-8deg);
}

.verify-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-family: var(--font-display);
  text-transform: uppercase;
  border: 2px solid var(--ok);
  background: var(--ok-bg);
  color: var(--ok);
  padding: 10px 18px;
  border-radius: 999px;
}
.verify-badge.bad {
  border-color: var(--danger);
  background: var(--danger-bg);
  color: var(--danger);
}

/* ---------- Tables (admin) ---------- */
.table {
  width: 100%;
  border-collapse: collapse;
  background: var(--paper);
  border: 2px solid var(--ink);
}
.table th,
.table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--paper-3);
  font-size: 0.92rem;
}
.table th {
  font-family: var(--font-display);
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  background: var(--ink);
  color: #fff;
}
.table tr:last-child td {
  border-bottom: 0;
}
.stat-row {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 720px) {
  .stat-row {
    grid-template-columns: repeat(4, 1fr);
  }
}
.stat {
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  padding: 18px;
  background: var(--paper);
}
.stat .n {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 2.4rem;
  line-height: 1;
}
.stat .l {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
}

.draft-banner {
  background: repeating-linear-gradient(
    -45deg,
    var(--hi-vis) 0,
    var(--hi-vis) 12px,
    var(--paper-2) 12px,
    var(--paper-2) 24px
  );
  border: 2px solid var(--ink);
  padding: 2px;
  border-radius: var(--radius);
  margin-bottom: 18px;
}
.draft-banner > span {
  display: block;
  background: var(--paper);
  padding: 10px 14px;
  font-weight: 600;
  font-size: 0.9rem;
}

/* ---------- Footer ---------- */
.footer {
  margin-top: auto;
  background: var(--ink);
  color: #cfcabb;
  padding: 36px 0;
  font-size: 0.9rem;
}
.footer a {
  color: #fff;
}
.footer .cols {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.footer .links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.muted {
  color: var(--muted);
}
.center {
  text-align: center;
}
.mt-0 {
  margin-top: 0;
}

/* ---------- RTL (Arabic) ---------- */
[dir="rtl"] .nav {
  margin-left: 0;
  margin-right: auto;
}
[dir="rtl"] .langbar-x {
  margin-left: 0;
  margin-right: auto;
}
[dir="rtl"] .lang-menu {
  right: auto;
  left: 0;
}
[dir="rtl"] .prose ul,
[dir="rtl"] .prose ol {
  padding-left: 0;
  padding-right: 1.3em;
}
[dir="rtl"] .option {
  text-align: right;
}
[dir="rtl"] .scoreboard {
  text-align: left;
}
[dir="rtl"] .feedback {
  border-left-width: 2px;
  border-right-width: 8px;
}
[dir="rtl"] .cert-seal {
  right: auto;
  left: 18px;
}
[dir="rtl"] .table th,
[dir="rtl"] .table td {
  text-align: right;
}
[dir="rtl"] .prose strong {
  /* keep highlight direction natural */
}

/* ---------- Mobile (most learners are on phones) ---------- */
@media (max-width: 899px) {
  body {
    font-size: 17px;
  }
  .section {
    padding: 36px 0;
  }
  .wrap {
    padding: 0 16px;
  }
  .card {
    padding: 20px;
  }
  .hero .wrap {
    padding-top: 44px;
    padding-bottom: 44px;
  }

  /* lesson nav becomes a compact horizontal chip row instead of a tall list */
  .lesson-list {
    position: static;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    border: 0;
    padding: 2px 0 10px;
    -webkit-overflow-scrolling: touch;
  }
  .lesson-list a {
    flex: 0 0 auto;
    min-height: 44px; /* accessible tap target */
    border: 2px solid var(--ink);
    border-radius: 999px;
    padding: 8px 12px;
  }
  .lesson-list a > span:last-child {
    display: none; /* hide long titles; the numbered dot identifies the lesson */
  }

  /* exam */
  .qcard {
    padding: 20px;
  }
  .qprompt {
    font-size: 1.2rem;
  }
  .option {
    font-size: 1rem;
  }

  /* certificate fits a phone screen */
  .certificate {
    padding: 26px 18px;
  }
  .certificate::before {
    inset: 8px;
  }
  .cert-seal {
    width: 64px;
    height: 64px;
    right: 10px;
    top: 6px;
    font-size: 0.5rem;
  }
  .cert-grid {
    gap: 18px;
  }
}

/* ---------- Print (certificate) ---------- */
@media print {
  .topbar,
  .footer,
  .no-print,
  .hazard {
    display: none !important;
  }
  body {
    background: #fff;
  }
  .certificate {
    box-shadow: none;
    border-width: 3px;
    margin: 0;
  }
}

/* ============================================================
   Employers / B2B page
   ============================================================ */
.hero-emp h1 { max-width: 16ch; }
.wrap-narrow { max-width: 720px; }
.display-xl { font-size: clamp(1.8rem, 5vw, 3rem); line-height: 1.02; }
.accent-red { color: var(--danger); }

/* light-on-dark ghost button (used on hero + dark band) */
.btn-ghost-light {
  background: transparent;
  color: #fff;
  border-color: #fff;
}
.btn-ghost-light:hover { background: rgba(255,255,255,0.12); }

/* alternating section bands */
.band {
  background: var(--paper-2);
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
}
.band-dark {
  background: var(--ink);
  color: #fff;
}
.band-dark .eyebrow { color: var(--hi-vis); }

/* three service pillars */
.pillar { border-top: 6px solid var(--hi-vis); }
.pillar-icon { font-size: 1.8rem; line-height: 1; display: block; margin-bottom: 6px; }

/* numbered how-it-works steps */
.step { position: relative; padding-left: 4px; }
.step-n {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; margin-bottom: 8px;
  background: var(--ink); color: var(--hi-vis);
  font-family: var(--font-display); font-weight: 800; font-size: 1.1rem;
  border-radius: 999px;
}

/* service tracks (recert / new operator) */
.track { position: relative; }
.track-feature { background: var(--ink); color: #fff; box-shadow: var(--shadow-hard); }
.track-feature h3 { color: #fff; }
.track-tag {
  display: inline-block; margin-bottom: 8px;
  font-family: var(--font-display); font-weight: 800; font-size: 0.72rem;
  letter-spacing: 0.12em; text-transform: uppercase;
  background: var(--hi-vis); color: var(--ink);
  padding: 3px 10px; border-radius: 999px;
}
.track-feature .track-tag { background: var(--danger); color: #fff; }

/* tick lists */
.ticklist { list-style: none; padding: 0; margin: 12px 0 0; }
.ticklist li { position: relative; padding-left: 26px; margin-bottom: 8px; line-height: 1.4; }
.ticklist li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  color: var(--ok); font-weight: 800;
}
.ticklist-light li::before { color: var(--hi-vis); }

/* equipment class cards */
.class-card { display: flex; flex-direction: column; }
.class-custom { background: var(--ink); color: #fff; }
.code-hi { color: var(--hi-vis); }
.focuslist { list-style: none; padding: 0; margin: 0; }
.focuslist li {
  position: relative; padding-left: 16px; margin-bottom: 5px;
  font-size: 0.92rem; color: var(--muted);
}
.focuslist li::before {
  content: "▸"; position: absolute; left: 0; color: var(--danger); font-weight: 700;
}

/* cost-of-inexperience edge cards */
.edge { border-left: 6px solid var(--danger); }

/* service-area chips */
.area-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

/* notice success variant */
.notice-ok { background: var(--ok-bg); border-color: var(--ok); }

/* request-a-quote form */
.quote-form { margin-top: 20px; }
.quote-form label { display: block; font-weight: 700; margin-bottom: 12px; }
.quote-form label.full { grid-column: 1 / -1; }
.quote-form input,
.quote-form textarea {
  width: 100%; min-height: var(--tap); margin-top: 6px;
  padding: 12px 14px; font-size: 1.02rem; font-family: var(--font-body);
  border: 2px solid var(--ink); border-radius: var(--radius); background: #fff;
}
.quote-form textarea { min-height: auto; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }

/* contact footer */
.phone-big {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(2.2rem, 8vw, 3.6rem); line-height: 1; margin: 16px 0 0;
}
.phone-big a { color: #fff; text-decoration: none; }
.contact-row {
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 20px;
}

@media (max-width: 640px) {
  .form-grid { grid-template-columns: 1fr; }
  .contact-row .btn { width: 100%; }
}

/* ============================================================
   Checkout
   ============================================================ */
.checkout-summary { margin-top: 16px; }
.code-apply { margin-top: 18px; }
.code-apply label { display: block; font-weight: 700; margin-bottom: 6px; }
.code-apply-row { display: flex; gap: 8px; }
.code-apply-row input {
  flex: 1; min-height: var(--tap); padding: 10px 14px; font-size: 1rem;
  border: 2px solid var(--ink); border-radius: var(--radius); background: #fff;
}
.checkout-total {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-top: 18px; padding-top: 14px; border-top: 2px solid var(--ink);
  font-family: var(--font-display);
}
.checkout-total strong { font-size: 1.6rem; }
.pay-box { background: var(--paper-2); }
.pay-steps { margin: 12px 0 0; padding-left: 20px; }
.pay-steps li { margin-bottom: 8px; line-height: 1.4; }

/* ============================================================
   QA pass: code overflow + tighter mobile top nav
   ============================================================ */
/* Long verify URLs / codes inside <code> must wrap, not overflow the card. */
code {
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  word-break: break-all;
  overflow-wrap: anywhere;
}
@media (max-width: 560px) {
  .nav { gap: 2px; }
  .nav a { padding: 6px 8px; font-size: 0.85rem; }
  .nav a.cta { padding: 7px 12px; }
  .topbar .wrap { gap: 8px; }
}

/* footer support contact line */
.footer-contact {
  margin-top: 10px;
  font-size: 0.88rem;
  color: #cfcabb;
  line-height: 1.7;
}
.footer-contact a { color: var(--hi-vis); text-decoration: none; }
.footer-contact a:hover { text-decoration: underline; }
