/* HEAL Learn */

:root {
  --ink: #16213a;
  --ink-soft: #4a5672;
  --ink-faint: #7a859c;
  --blue: #1759a8;
  --blue-deep: #0f3f7a;
  --blue-wash: #eaf1fa;
  --surface: #f5f8fc;
  --paper: #ffffff;
  --line: #d6dfeb;
  --line-strong: #b9c6d8;
  --leaf: #1f7a4d;
  --leaf-wash: #e6f4ec;
  --sun: #f2b705;
  --sun-wash: #fff6d6;
  --plum: #6b1c74;
  --plum-wash: #f5ebf6;
  --danger: #b42318;
  --danger-wash: #fdecea;

  --ui: "Poppins", "Segoe UI", system-ui, -apple-system, sans-serif;
  --read: "Literata", Georgia, "Times New Roman", serif;

  --r-sm: 4px;
  --r-md: 8px;
  --measure: 68ch;
  color-scheme: light;
}

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

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

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

img { max-width: 100%; display: block; }
a { color: var(--blue); text-underline-offset: 2px; }
a:hover { color: var(--blue-deep); }

h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: clamp(1.9rem, 1.3rem + 2.4vw, 2.9rem); font-weight: 700; letter-spacing: -.02em; }
h2 { font-size: 1.45rem; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }

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

.wrap { width: min(1120px, 100% - 40px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 40px); margin-inline: auto; }
.muted { color: var(--ink-soft); }
.faint { color: var(--ink-faint); font-size: .875rem; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Header ---------------------------------------------------------------- */

.site-head {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  position: sticky; top: 0; z-index: 20;
}
.site-head .wrap { display: flex; align-items: center; gap: 24px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 700; font-size: 1.05rem; }
.brand img { height: 40px; width: auto; }
.brand-sub { padding-left: 12px; border-left: 2px solid var(--line-strong); color: var(--blue); font-weight: 600; font-size: 1.15rem; line-height: 1.2; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 50%;
  background: conic-gradient(var(--blue) 0 25%, var(--leaf) 0 50%, var(--sun) 0 75%, #c8302d 0);
  position: relative;
}
.brand-mark::after { content: ""; position: absolute; inset: 7px; background: var(--paper); border-radius: 50%; }
.site-nav { display: flex; gap: 4px; margin-left: auto; align-items: center; flex-wrap: wrap; }
.site-nav a {
  text-decoration: none; color: var(--ink-soft); padding: 8px 12px; border-radius: var(--r-sm); font-size: .925rem;
}
.site-nav a:hover { color: var(--ink); background: var(--surface); }
.site-nav a[aria-current="page"] { color: var(--blue); font-weight: 600; }

/* Buttons and fields ---------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 .95rem/1 var(--ui);
  padding: 12px 20px; border-radius: var(--r-sm);
  border: 1px solid var(--blue); background: var(--blue); color: #fff;
  cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn:hover { background: var(--blue-deep); border-color: var(--blue-deep); color: #fff; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.quiet { background: var(--paper); color: var(--blue); }
.btn.quiet:hover { background: var(--blue-wash); color: var(--blue-deep); }
.btn.plain { background: transparent; border-color: transparent; color: var(--ink-soft); padding-inline: 10px; }
.btn.plain:hover { background: var(--surface); color: var(--ink); }
.btn.leaf { background: var(--leaf); border-color: var(--leaf); }
.btn.danger { background: var(--paper); color: var(--danger); border-color: #e9b4ae; }
.btn.danger:hover { background: var(--danger-wash); }
.btn.small { padding: 7px 12px; font-size: .85rem; }
.btn.wide { width: 100%; }

label { font-weight: 500; font-size: .9rem; display: block; margin-bottom: 6px; }
.hint { font-size: .825rem; color: var(--ink-faint); margin-top: 4px; }
input[type="text"], input[type="email"], input[type="number"], input[type="url"], input[type="search"],
input[type="datetime-local"], select, textarea {
  width: 100%; font: 400 .95rem/1.4 var(--ui); color: var(--ink);
  padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--paper);
}
textarea { min-height: 120px; resize: vertical; line-height: 1.55; }
textarea.code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .875rem; min-height: 260px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(23, 89, 168, .18); }
.field { margin-bottom: 18px; }
.row { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; cursor: pointer; }
.check input { margin-top: 4px; width: 17px; height: 17px; accent-color: var(--blue); }

/* Notices ---------------------------------------------------------------- */

.notice { padding: 12px 16px; border-radius: var(--r-sm); border-left: 4px solid var(--blue); background: var(--blue-wash); margin-bottom: 18px; }
.notice.good { border-color: var(--leaf); background: var(--leaf-wash); }
.notice.warn { border-color: var(--sun); background: var(--sun-wash); }
.notice.bad { border-color: var(--danger); background: var(--danger-wash); }
.notice p:last-child { margin: 0; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: #fff; padding: 12px 18px; border-radius: var(--r-md);
  opacity: 0; transition: opacity .2s, transform .2s; z-index: 100; max-width: calc(100% - 40px);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.tag { display: inline-block; font-size: .78rem; font-weight: 500; padding: 2px 9px; border-radius: 99px; background: var(--surface); color: var(--ink-soft); border: 1px solid var(--line); }
.tag.free { background: var(--leaf-wash); color: var(--leaf); border-color: #bfe0cd; }
.tag.paid { background: var(--sun-wash); color: #7a5a00; border-color: #f0d98a; }
.tag.preview { background: var(--blue-wash); color: var(--blue); border-color: #c5d8f0; }
.tag.draft { background: var(--surface); }
.tag.published { background: var(--leaf-wash); color: var(--leaf); border-color: #bfe0cd; }
.tag.archived { background: #f1f1f1; color: #666; }

.bar { height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--leaf); border-radius: 99px; transition: width .5s ease; }

.loading { padding: 60px 0; text-align: center; color: var(--ink-faint); }
.empty { padding: 40px 24px; text-align: center; border: 1px dashed var(--line-strong); border-radius: var(--r-md); color: var(--ink-soft); }

/* Catalogue -------------------------------------------------------------- */

.hero { padding: 56px 0 44px; background: var(--surface); border-bottom: 1px solid var(--line); overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 48px; align-items: center; }
.hero-cert { position: relative; aspect-ratio: 297 / 210; background: #fff; container-type: inline-size;
  transform: rotate(-3deg); box-shadow: 0 24px 50px -28px rgba(22, 33, 58, .55); border-radius: 2px; }
.hero-cert::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2.2cqw;
  background: linear-gradient(var(--blue) 0 25%, var(--leaf) 0 50%, var(--sun) 0 75%, #c8302d 0); }
.hero-cert .f { position: absolute; inset: 5cqw; border: .5cqw solid var(--plum); padding: 7cqw 8cqw; display: flex; flex-direction: column; }
.hero-cert .k { color: var(--plum); font-size: 3.4cqw; font-weight: 500; }
.hero-cert .n { font-family: var(--read); font-weight: 600; font-size: 8.5cqw; line-height: 1.1; margin: 2cqw 0 3cqw; color: var(--ink); }
.hero-cert .t { font-size: 3cqw; color: var(--ink-soft); }
.hero-cert .c { font-size: 4.6cqw; font-weight: 600; color: var(--ink); margin-top: 1cqw; }
.hero-cert .q { margin-top: auto; display: flex; justify-content: space-between; align-items: flex-end; font-size: 2.6cqw; color: var(--ink-faint); }
.hero-cert .q i { width: 13cqw; height: 13cqw; display: block;
  background: repeating-conic-gradient(var(--ink) 0 25%, #fff 0 50%) 0 0 / 3.25cqw 3.25cqw; opacity: .85; }
.hero h1 { max-width: 17ch; }
.hero p.lead { font-size: 1.1rem; color: var(--ink-soft); max-width: 52ch; }
.search { display: flex; gap: 10px; margin-top: 22px; max-width: 560px; }
.search input { padding: 13px 14px; font-size: 1rem; }

.filters { display: flex; gap: 8px; flex-wrap: wrap; margin: 28px 0 8px; }
.chip {
  font: 500 .875rem var(--ui); padding: 7px 14px; border-radius: 99px;
  border: 1px solid var(--line-strong); background: var(--paper); color: var(--ink-soft); cursor: pointer;
}
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }

.course-list { list-style: none; padding: 0; margin: 8px 0 64px; }
.course-row {
  display: grid; grid-template-columns: 220px 1fr auto; gap: 24px; align-items: center;
  padding: 22px 0; border-bottom: 1px solid var(--line);
}
.cover {
  aspect-ratio: 16 / 9; border-radius: var(--r-sm); overflow: hidden; background: var(--blue-wash);
  display: grid; place-items: center; color: var(--blue); font-weight: 700; font-size: 2rem;
}
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover.generated { background: var(--blue); color: rgba(255, 255, 255, .95); position: relative; }
.cover.generated::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px;
  background: linear-gradient(90deg, var(--blue) 0 25%, var(--leaf) 0 50%, var(--sun) 0 75%, #c8302d 0); }
.cover.generated span { position: relative; font-size: 1.9rem; letter-spacing: -.02em; }
a:has(> .cover) { text-decoration: none; display: block; }
.course-row h3 { font-size: 1.2rem; margin-bottom: 4px; }
.course-row h3 a { color: var(--ink); text-decoration: none; }
.course-row h3 a:hover { color: var(--blue); }
.course-row .sub { color: var(--ink-soft); margin-bottom: 10px; }
.meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: .85rem; color: var(--ink-faint); align-items: center; }
.course-row .side { text-align: right; min-width: 140px; }
.course-row .side .price { font-weight: 600; font-size: 1.05rem; margin-bottom: 8px; }
.mini-progress { width: 140px; margin-left: auto; }
.mini-progress small { display: block; margin-top: 4px; color: var(--ink-faint); }

/* Course page ------------------------------------------------------------ */

.course-head { background: var(--ink); color: #fff; padding: 48px 0 40px; }
.course-head a { color: #bcd3ef; }
.course-head .sub { color: #c9d3e4; font-size: 1.1rem; max-width: 60ch; }
.course-head .meta { color: #aab6cc; margin-top: 14px; }
.crumbs { font-size: .85rem; margin-bottom: 14px; }
.course-body { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 48px; padding: 40px 0 72px; align-items: start; }
.join {
  border: 1px solid var(--line); border-radius: var(--r-md); padding: 22px; background: var(--paper);
  position: sticky; top: 84px; margin-top: -110px; box-shadow: 0 10px 30px -18px rgba(22, 33, 58, .45);
}
.join .cover { margin: -22px -22px 18px; border-radius: var(--r-md) var(--r-md) 0 0; }
.join .price { font-size: 1.6rem; font-weight: 700; margin-bottom: 4px; }
.join .price s { font-size: 1rem; color: var(--ink-faint); font-weight: 400; margin-left: 6px; }
.coupon { display: flex; gap: 8px; margin: 14px 0 6px; }
.coupon input { text-transform: uppercase; }
.join ul { padding-left: 18px; color: var(--ink-soft); font-size: .9rem; margin: 16px 0 0; }

.prose { font-family: var(--read); font-size: 1.06rem; line-height: 1.75; max-width: 920px; }
.prose > p, .prose > ul, .prose > ol, .prose > h2, .prose > h3, .prose > blockquote { max-width: var(--measure); }
.prose h2, .prose h3 { font-family: var(--ui); margin-top: 1.6em; }
.prose h2 { font-size: 1.3rem; }
.prose h3 { font-size: 1.1rem; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { margin-bottom: .35em; }
.prose blockquote { margin: 1.2em 0; padding: 4px 0 4px 18px; border-left: 3px solid var(--sun); color: var(--ink-soft); }
.prose blockquote p { margin: 0 0 .6em; }
.prose blockquote p:last-child { margin-bottom: 0; }
.table-scroll { overflow-x: auto; margin: 1.2em 0 1.6em; border: 1px solid var(--line); border-radius: var(--r-md); }
.prose-table { font-family: var(--ui); font-size: .88rem; line-height: 1.5; min-width: 560px; }
.prose-table th { background: var(--blue-wash); color: var(--ink); white-space: normal; }
.prose-table td, .prose-table th { padding: 10px 12px; }
.prose-table tr:nth-child(even) td { background: var(--surface); }
.prose code { font-size: .9em; background: var(--surface); padding: 1px 5px; border-radius: 3px; }

.outline { margin-top: 36px; }
.outline-module { margin-bottom: 26px; }
.outline-module h3 { font-size: 1rem; color: var(--ink-soft); font-weight: 600; margin-bottom: 6px; }
.path { list-style: none; margin: 0; padding: 0; position: relative; }
.path::before { content: ""; position: absolute; left: 9px; top: 14px; bottom: 14px; width: 2px; background: var(--line); }
.path li { position: relative; display: flex; gap: 14px; align-items: center; padding: 9px 0; }
.dot {
  width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line-strong); background: var(--paper);
  flex: none; position: relative; z-index: 1; display: grid; place-items: center;
}
.dot.done { background: var(--leaf); border-color: var(--leaf); }
.dot.done::after { content: ""; width: 6px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg) translate(-1px, -1px); }
.dot.quiz { border-radius: 4px; }
.path .title { flex: 1; }
.path a.title { color: var(--ink); text-decoration: none; }
.path a.title:hover { color: var(--blue); text-decoration: underline; }
.path .dur { font-size: .82rem; color: var(--ink-faint); }

/* Lesson player ---------------------------------------------------------- */

.player { display: grid; grid-template-columns: 300px minmax(0, 1fr); min-height: calc(100vh - 65px); }
.player-side { border-right: 1px solid var(--line); background: var(--surface); padding: 22px 18px; position: sticky; top: 65px; height: calc(100vh - 65px); overflow: auto; }
.player-side h2 { font-size: 1rem; margin-bottom: 4px; }
.player-side .bar { margin: 10px 0 4px; }
.player-side .path li { padding: 6px 0; font-size: .9rem; }
.player-side .path li.current a { color: var(--blue); font-weight: 600; }
.player-main { padding: 36px 48px 80px; }
.lesson-head { max-width: var(--measure); margin-bottom: 22px; }
.lesson-head .faint { margin-bottom: 4px; }
.video { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: var(--r-md); overflow: hidden; margin-bottom: 26px; max-width: 900px; }
.video iframe, .video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.resource { display: flex; align-items: center; gap: 12px; max-width: var(--measure); padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-md); margin: 24px 0; }
.resource::before { content: ""; width: 28px; height: 34px; border: 2px solid var(--blue); border-radius: 3px 9px 3px 3px; flex: none; }
.lesson-foot { max-width: var(--measure); display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 22px; margin-top: 34px; }
.side-toggle { display: none; }

.quiz { max-width: var(--measure); }
.question { border: 1px solid var(--line); border-radius: var(--r-md); padding: 18px 20px; margin-bottom: 16px; }
.question legend { font-weight: 600; padding: 0 4px; margin-left: -4px; }
.question .opts { display: grid; gap: 8px; margin-top: 10px; }
.question .opt { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); cursor: pointer; font-weight: 400; margin: 0; }
.question .opt:hover { border-color: var(--line-strong); background: var(--surface); }
.question .opt input { margin-top: 4px; accent-color: var(--blue); }
.question.right { border-color: #9fcfb4; background: #f7fcf9; }
.question.wrong { border-color: #ecb7b1; background: #fffafa; }
.question .verdict { margin-top: 10px; font-size: .9rem; }
.question .opt.answer { border-color: var(--leaf); }
.score { display: flex; align-items: baseline; gap: 14px; margin-bottom: 18px; }
.score strong { font-size: 2.4rem; line-height: 1; }

.finished { max-width: var(--measure); border: 1px solid #d9c2dc; background: var(--plum-wash); border-radius: var(--r-md); padding: 26px; margin-top: 28px; }
.finished h2 { color: var(--plum); }

/* Exams */
.exam-rules ul { padding-left: 20px; margin: 0 0 18px; }
.exam-rules li { margin-bottom: 6px; }
.exam-clock { position: sticky; top: 72px; z-index: 5; display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 12px 16px; margin-bottom: 18px; border-radius: var(--r-md); background: var(--ink); color: #fff; }
.exam-clock strong { font-variant-numeric: tabular-nums; font-size: 1.1rem; }
.exam-clock.urgent { background: var(--danger); }
:fullscreen { background: var(--paper); overflow: auto; }
.course-video { margin-bottom: 28px; }

/* Sign in ---------------------------------------------------------------- */

.auth { min-height: calc(100vh - 65px); display: grid; place-items: center; background: var(--surface); padding: 40px 20px; }
.auth-box { width: min(420px, 100%); background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md); padding: 32px; }
.code-input { font-size: 1.6rem !important; letter-spacing: .4em; text-align: center; font-variant-numeric: tabular-nums; }

/* Profile ---------------------------------------------------------------- */

.page { padding: 40px 0 72px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.avatar { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; background: var(--blue-wash); display: grid; place-items: center; font-weight: 700; color: var(--blue); font-size: 1.8rem; flex: none; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.person { display: flex; gap: 20px; align-items: center; margin-bottom: 26px; }
.list-plain { list-style: none; margin: 0; padding: 0; }
.list-plain > li { padding: 14px 0; border-bottom: 1px solid var(--line); }
.list-plain > li:first-child { border-top: 1px solid var(--line); }
.cert-line { display: flex; gap: 14px; align-items: center; }
.cert-line .seal { width: 34px; height: 34px; border-radius: 50%; background: var(--plum); flex: none; position: relative; }
.cert-line .seal::after { content: ""; position: absolute; inset: 6px; border: 2px solid rgba(255, 255, 255, .6); border-radius: 50%; }

/* Certificate ------------------------------------------------------------ */

.cert-page { background: var(--surface); padding: 36px 0 72px; min-height: calc(100vh - 65px); }
.verify-strip { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: space-between; margin-bottom: 22px; }
.cert {
  background: #fff; aspect-ratio: 297 / 210; width: 100%; max-width: 1000px; margin: 0 auto;
  position: relative; container-type: inline-size; color: var(--ink);
  box-shadow: 0 20px 50px -30px rgba(22, 33, 58, .5);
  overflow: hidden;
}
.cert-frame { position: absolute; inset: 2.6cqw; border: .25cqw solid var(--plum); }
.cert-frame::before { content: ""; position: absolute; inset: .7cqw; border: .08cqw solid var(--plum); opacity: .55; }
.cert-band { position: absolute; left: 0; top: 0; bottom: 0; width: 1.2cqw; background: linear-gradient(var(--blue) 0 25%, var(--leaf) 0 50%, var(--sun) 0 75%, #c8302d 0); }
.cert-inner { position: absolute; inset: 7cqw 8.5cqw 6cqw; display: flex; flex-direction: column; }
.cert-org { display: flex; align-items: center; gap: 1.2cqw; font-size: 1.5cqw; font-weight: 600; color: var(--ink-soft); }
.cert-org img { height: 6.4cqw; width: auto; }
.cert-issuer { font-weight: 400; padding-left: 1.4cqw; border-left: .12cqw solid var(--line-strong); }
.cert-org .brand-mark { width: 3.4cqw; height: 3.4cqw; }
.cert-org .brand-mark::after { inset: .8cqw; }
.cert-kicker { margin-top: 4.6cqw; font-size: 1.55cqw; color: var(--plum); font-weight: 500; }
.cert-name { font-family: var(--read); font-weight: 600; font-size: 5.2cqw; line-height: 1.1; margin: 1.2cqw 0 1.8cqw; letter-spacing: -.01em; }
.cert-text { font-size: 1.55cqw; color: var(--ink-soft); max-width: 60ch; }
.cert-course { font-size: 2.6cqw; font-weight: 600; color: var(--ink); margin-top: .8cqw; line-height: 1.25; }
.cert-foot { margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between; gap: 3cqw; }
.cert-sign { font-size: 1.3cqw; min-width: 22cqw; }
.cert-signature { display: block; height: 8.6cqw; width: auto; margin: 0 0 -1.2cqw .6cqw; }
.cert-sign .line { border-top: .12cqw solid var(--ink); padding-top: .6cqw; }
.cert-sign strong { display: block; font-size: 1.45cqw; }
.cert-qr { display: flex; align-items: flex-end; gap: 1.4cqw; font-size: 1.15cqw; color: var(--ink-soft); text-align: right; }
.cert-qr .qr { width: 10cqw; height: 10cqw; }
.cert-qr .qr svg { width: 100%; height: 100%; }
.cert-qr code { font-size: 1.35cqw; color: var(--ink); font-weight: 600; letter-spacing: .04em; }
.cert-seal { position: absolute; right: 9cqw; top: 22cqw; width: 15cqw; height: 15cqw; color: var(--plum); }
.cert-seal svg { width: 100%; height: 100%; overflow: visible; }
.cert.revoked::after { content: "Revoked"; position: absolute; inset: 0; display: grid; place-items: center; font-size: 10cqw; font-weight: 700; color: rgba(180, 35, 24, .22); transform: rotate(-18deg); }
.cert-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 22px; }

/* Team area -------------------------------------------------------------- */

.admin-bar { background: var(--ink); color: #fff; }
.admin-bar .wrap { display: flex; gap: 6px; align-items: center; min-height: 48px; overflow-x: auto; }
.admin-bar button, .admin-bar a { background: none; border: 0; color: #c9d3e4; font: 500 .9rem var(--ui); padding: 8px 12px; cursor: pointer; border-radius: var(--r-sm); text-decoration: none; white-space: nowrap; }
.admin-bar [aria-selected="true"], .admin-bar button:hover, .admin-bar a:hover { color: #fff; background: rgba(255, 255, 255, .1); }
.figures { display: flex; flex-wrap: wrap; gap: 0; border: 1px solid var(--line); border-radius: var(--r-md); margin: 8px 0 32px; overflow: hidden; }
.figures div { flex: 1 1 150px; padding: 16px 20px; border-right: 1px solid var(--line); }
.figures div:last-child { border-right: 0; }
.figures strong { display: block; font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.figures span { font-size: .85rem; color: var(--ink-soft); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-md); }
table { border-collapse: collapse; width: 100%; font-size: .9rem; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 600; background: var(--surface); color: var(--ink-soft); font-size: .82rem; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.toolbar { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar h2 { margin: 0; }
.panel { border: 1px solid var(--line); border-radius: var(--r-md); padding: 22px; margin-bottom: 24px; background: var(--paper); }
.panel > h2, .panel > h3 { margin-bottom: 14px; }

.switch { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--r-sm); overflow: hidden; }
.switch button { font: 600 .9rem var(--ui); border: 0; background: var(--paper); color: var(--ink-soft); padding: 9px 18px; cursor: pointer; }
.switch button + button { border-left: 1px solid var(--line-strong); }
.switch button[aria-pressed="true"] { background: var(--blue); color: #fff; }
.switch.status button[data-v="published"][aria-pressed="true"] { background: var(--leaf); }
.switch.status button[data-v="archived"][aria-pressed="true"] { background: var(--ink-soft); }

.builder-module { border: 1px solid var(--line); border-radius: var(--r-md); margin-bottom: 16px; background: var(--paper); }
.builder-module > header { display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: var(--surface); border-bottom: 1px solid var(--line); border-radius: var(--r-md) var(--r-md) 0 0; }
.builder-module > header input { font-weight: 600; background: transparent; border-color: transparent; }
.builder-module > header input:hover { border-color: var(--line-strong); background: var(--paper); }
.builder-lessons { list-style: none; margin: 0; padding: 6px 12px; }
.builder-lessons li { display: flex; align-items: center; gap: 10px; padding: 8px 4px; border-bottom: 1px solid var(--line); }
.builder-lessons li:last-child { border-bottom: 0; }
.builder-lessons li .grow { flex: 1; }
.builder-lessons li.editing { background: var(--blue-wash); margin-inline: -12px; padding-inline: 16px; }
.builder-add { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px dashed var(--line); }
.icon-btn { background: none; border: 1px solid transparent; border-radius: var(--r-sm); width: 30px; height: 30px; cursor: pointer; color: var(--ink-soft); font-size: .95rem; line-height: 1; }
.icon-btn:hover { border-color: var(--line-strong); background: var(--paper); color: var(--ink); }
.editor { border: 2px solid var(--blue); border-radius: var(--r-md); padding: 22px; margin-bottom: 24px; background: var(--paper); }
.q-edit { border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px; margin-bottom: 14px; }
.opt-edit { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.opt-edit input[type="text"] { flex: 1; }
.preview-pane { border: 1px dashed var(--line-strong); border-radius: var(--r-sm); padding: 16px 20px; min-height: 120px; }

.site-foot { border-top: 1px solid var(--line); padding: 28px 0; color: var(--ink-faint); font-size: .85rem; }
.site-foot .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* Small screens ---------------------------------------------------------- */

@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-cert { display: none; }
  .course-body { grid-template-columns: 1fr; gap: 28px; }
  .join { position: static; margin-top: 0; order: -1; }
  .split { grid-template-columns: 1fr; }
  .player { grid-template-columns: 1fr; }
  .player-side { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .player-side.collapsed .path, .player-side.collapsed .outline-module { display: none; }
  .side-toggle { display: inline-flex; margin-top: 8px; }
  .player-main { padding: 26px 20px 64px; }
}
@media (max-width: 680px) {
  .brand img { height: 32px; }
  .course-row { grid-template-columns: 1fr; gap: 12px; }
  .course-row .side { text-align: left; }
  .mini-progress { margin-left: 0; }
  .site-head .wrap { flex-wrap: wrap; gap: 6px; padding: 8px 0; }
  .site-nav { margin-left: 0; width: 100%; }
  .site-nav a { padding: 6px 8px; }
  .search { flex-direction: column; }
  .hero { padding: 36px 0 26px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* Printing a certificate ------------------------------------------------- */

@media print {
  @page { size: A4 landscape; margin: 0; }
  body { background: #fff; }
  .site-head, .site-foot, .verify-strip, .cert-actions, .no-print { display: none !important; }
  .cert-page { padding: 0; background: #fff; min-height: 0; }
  .cert-page .wrap { width: 100%; }
  .cert { box-shadow: none; max-width: none; width: 297mm; height: 210mm; aspect-ratio: auto; }
  .cert-band, .brand-mark, .cert-seal { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
