:root {
  --brand: #e8004e; --brand-dark: #c40042; --brand-ink: #fff; --brand-soft: #fde6ee;
  --ink: #1f2933; --muted: #5f6b76; --line: #e3e5e8; --bg: #f6f6f7; --card: #fff; --hover: #f0f1f3;
  --ok: #138a4f; --warn: #b76e00; --bad: #c62828; --navy: #23263a;
  /* Header in Uptime colours (Jamie, 20 Nov 2026: obviously different from LearnUpon's pink Certify): navy with a pink line. */
  --top-bg: #1f2744; --top-line: #ea0053;
  --radius: 6px; --top: 80px; --side: 240px;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --ink: #e8eaed; --muted: #a5adb6; --line: #2f333a; --bg: #15171b; --card: #1e2126; --hover: #262a30; --brand-soft: #3a1422; } }
:root[data-theme="dark"] { --ink: #e8eaed; --muted: #a5adb6; --line: #2f333a; --bg: #15171b; --card: #1e2126; --hover: #262a30; --brand-soft: #3a1422; }
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 15px/1.45 Inter, system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--ink); background: var(--bg); }
a { color: var(--brand); text-decoration: none; } a:hover { text-decoration: underline; }
button, .btn { font: inherit; font-weight: 600; font-size: 14px; padding: 8px 16px; border-radius: var(--radius); border: 1px solid var(--brand); background: var(--brand); color: var(--brand-ink); cursor: pointer; display: inline-flex; align-items: center; gap: 8px; text-decoration: none !important; }
button:hover, .btn:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
button.outline, .btn.outline { background: transparent; color: var(--brand); } button.outline:hover, .btn.outline:hover { background: var(--brand-soft); }
button.link { background: none; border: 0; color: var(--brand); padding: 0; font-weight: 500; }
button:disabled { opacity: .5; cursor: default; }
input, select, textarea { font: inherit; padding: 9px 10px; border: 1px solid #b9bec5; border-radius: 4px; background: var(--card); color: var(--ink); width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); outline-offset: -1px; border-color: transparent; }
textarea { min-height: 100px; resize: vertical; }
label.f { display: block; font-size: 13px; font-weight: 600; margin-bottom: 14px; } label.f > :is(input, select, textarea) { margin-top: 5px; font-weight: 400; }

/* top bar */
.topbar { position: fixed; inset: 0 0 auto 0; height: var(--top); background: var(--top-bg); border-bottom: 3px solid var(--top-line); box-sizing: border-box; color: #fff; display: flex; align-items: center; padding: 0 22px; gap: 18px; z-index: 20; }
.topbar .burger { background: none; border: 0; padding: 6px; color: inherit; } .topbar .burger:hover { background: rgba(255,255,255,.12); }
.logo { display: flex; align-items: center; gap: 6px; color: inherit; text-decoration: none !important; font-size: 26px; letter-spacing: -.5px; }
.logo .mark { font-weight: 800; position: relative; padding-left: 4px; }
.logo .mark::before { content: "✱"; position: absolute; left: -6px; top: -4px; font-size: 13px; background: var(--navy); color: var(--brand); width: 17px; height: 17px; border-radius: 4px; display: grid; place-items: center; }
.logo .sub { font-weight: 300; font-size: 20px; letter-spacing: .5px; opacity: .95; }
.topbar .tabs-top { display: flex; gap: 6px; margin-left: 20px; }
.topbar .tabs-top a { color: #fff; padding: 12px 16px; border-radius: 4px; font-size: 17px; display: flex; gap: 8px; align-items: center; text-decoration: none; }
.topbar .tabs-top a.on, .topbar .tabs-top a:hover { background: rgba(255,255,255,.16); }
.topbar .right { margin-left: auto; display: flex; gap: 14px; align-items: center; }
.icon-btn { background: none; border: 0; color: inherit; padding: 8px; border-radius: 50%; } .icon-btn:hover { background: rgba(255,255,255,.15); }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: #eef0f2; color: #3b4651; display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }
.topbar .avatar { width: 38px; height: 38px; border: 2px solid rgba(255,255,255,.6); cursor: pointer; }

/* side nav */
.side { position: fixed; top: var(--top); bottom: 0; left: 0; width: var(--side); background: var(--card); border-right: 1px solid var(--line); padding: 22px 12px; overflow-y: auto; z-index: 10; }
.side .switch { margin: 0 20px 22px; width: calc(100% - 40px); justify-content: center; }
.side nav a { display: flex; align-items: center; gap: 14px; padding: 10px 14px; color: var(--ink); border-left: 3px solid transparent; border-radius: 0 4px 4px 0; text-decoration: none; font-size: 15px; }
.side nav a:hover { background: var(--hover); }
.side nav a.on { background: var(--hover); color: var(--brand); border-left-color: var(--brand); }
.side nav svg { width: 22px; height: 22px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.5; }
.side hr { border: 0; border-top: 1px solid var(--line); margin: 12px 2px; }
.side .who { display: flex; gap: 10px; align-items: center; background: var(--bg); border-radius: 6px; padding: 12px; margin-bottom: 12px; font-weight: 600; font-size: 17px; }
.side .count { margin-left: auto; color: var(--muted); }
.side .sub a { padding-left: 42px; font-size: 14px; }

/* page */
.page { margin: var(--top) 0 0 var(--side); min-height: calc(100vh - var(--top)); }
.subbar { background: var(--card); border-bottom: 1px solid var(--line); box-shadow: 0 1px 2px rgba(0,0,0,.05); height: 46px; display: flex; align-items: center; justify-content: center; position: relative; }
.subbar a { color: var(--muted); padding: 12px 10px; margin: 0 2px; font-weight: 500; text-decoration: none; border-bottom: 2px solid transparent; }
.subbar a.on { color: var(--brand); border-bottom-color: var(--brand); font-weight: 700; }
.subbar .act { position: absolute; right: 24px; top: 7px; display: flex; gap: 8px; }
.content { padding: 14px 24px 48px; }
.crumbs { font-size: 13px; color: var(--muted); margin: 2px 0 14px; display: flex; gap: 8px; align-items: center; } .crumbs a { color: var(--ink); }
h1 { font-size: 30px; font-weight: 700; margin: 6px 0 20px; } h2 { font-size: 17px; margin: 0 0 14px; } h3 { font-size: 15px; margin: 0 0 10px; }
.card { background: var(--card); border-radius: var(--radius); padding: 18px; box-shadow: 0 1px 2px rgba(16,24,40,.06); border: 1px solid var(--line); }
.stack > * + * { margin-top: 16px; }
.cols { display: grid; grid-template-columns: 290px 1fr; gap: 24px; align-items: start; }
.grid4 { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.tip { text-align: center; color: var(--muted); font-size: 13px; padding: 26px 22px; } .tip b { display: block; color: var(--ink); font-size: 17px; font-weight: 600; margin: 8px 0 10px; }
.tip svg { width: 28px; height: 28px; stroke: #8a939c; fill: none; stroke-width: 1.5; }

/* dashboard widgets */
.widget h3 { display: flex; justify-content: space-between; } .widget ul { list-style: none; padding: 0; margin: 0; } .widget li { padding: 9px 0; }
.widget li a { display: flex; gap: 10px; align-items: center; } .widget li svg { width: 14px; height: 14px; stroke: #8a939c; fill: none; stroke-width: 2; }
.kpi { font-size: 30px; font-weight: 700; } .kpi + div { color: var(--muted); font-size: 13px; }
.chart { width: 100%; height: 150px; }

/* lists */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.toolbar input, .toolbar select { width: auto; min-width: 180px; padding: 7px 10px; }
.chip { border: 1px solid #b9bec5; border-radius: 999px; padding: 6px 14px; background: var(--card); font-size: 14px; color: var(--ink); font-weight: 500; }
.chip.on { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.rowcard { display: flex; align-items: center; gap: 14px; background: var(--card); border-radius: var(--radius); padding: 12px 18px; margin-bottom: 12px; box-shadow: 0 1px 2px rgba(16,24,40,.06); border: 1px solid var(--line); }
.rowcard .main { flex: 1; min-width: 0; } .rowcard .main a { font-weight: 600; font-size: 15px; } .rowcard .main div { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rowcard .meta { color: var(--brand); font-size: 13px; font-weight: 600; min-width: 70px; display: flex; gap: 5px; align-items: center; }
table.t { width: 100%; border-collapse: collapse; background: var(--card); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); font-size: 14px; }
table.t th { text-align: left; font-weight: 600; padding: 12px 14px; border-bottom: 1px solid var(--line); color: var(--ink); background: var(--card); white-space: nowrap; }
table.t td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; } table.t tr:last-child td { border-bottom: 0; } table.t tr:hover td { background: var(--hover); }
.scroll { overflow-x: auto; }
.pill { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: #eef0f2; color: #3b4651; white-space: nowrap; display: inline-block; }
.pill.published, .pill.passed, .pill.completed, .pill.active { background: #e3f4ea; color: var(--ok); }
.pill.in_progress, .pill.draft { background: #fff2dc; color: var(--warn); } .pill.failed, .pill.archived { background: #fde8e8; color: var(--bad); }
.pill.cataloged { background: #e6ecfb; color: #2c4fb8; }
.muted { color: var(--muted); } .small { font-size: 13px; } code { font-size: 12.5px; word-break: break-all; }
.empty { text-align: center; color: var(--muted); padding: 40px; }
.pager { display: flex; justify-content: flex-end; gap: 12px; align-items: center; margin-top: 12px; font-size: 13px; color: var(--muted); }

/* settings tiles on course info */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; } .tiles .card { padding: 13px 18px; font-weight: 700; display: flex; gap: 12px; align-items: center; cursor: pointer; }
.tiles .card svg { width: 16px; height: 16px; stroke: var(--brand); fill: none; stroke-width: 2.2; }

/* learner */
.hero { background: var(--navy); border-radius: 8px; color: #fff; display: flex; align-items: center; justify-content: space-between; padding: 36px 48px; min-height: 220px; overflow: hidden; position: relative; }
.hero .ring { position: absolute; right: 120px; width: 300px; height: 300px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 26px rgba(255,255,255,.06), 0 0 0 52px rgba(255,255,255,.04); }
.hero h2 { font-size: 26px; margin: 0 0 14px; position: relative; } .hero p { opacity: .8; margin: 0 0 18px; max-width: 460px; position: relative; } .hero .btn { position: relative; }
.ccard { background: var(--card); border-radius: 8px; overflow: hidden; border: 1px solid var(--line); box-shadow: 0 1px 2px rgba(16,24,40,.06); display: flex; flex-direction: column; color: var(--ink); text-decoration: none !important; transition: box-shadow .15s, transform .15s; }
.ccard:hover { box-shadow: 0 6px 18px rgba(16,24,40,.12); transform: translateY(-1px); }
.ccard .img { aspect-ratio: 3/2; background: linear-gradient(135deg, var(--brand), #6a1b9a) center/cover; }
.ccard .body { padding: 14px 14px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.ccard .kicker { font-size: 12px; font-weight: 700; letter-spacing: 1.2px; color: #3b4651; } .ccard .title { font-weight: 600; font-size: 15px; }
.bar { height: 4px; border-radius: 4px; background: #e6e8eb; overflow: hidden; } .bar > i { display: block; height: 100%; background: var(--brand); }

/* player */
.player { display: grid; grid-template-columns: 320px 1fr; height: 100vh; background: var(--card); }
/* The course page is a fixed frame, like an app screen: it fills exactly the visible area and never slides, bounces or
   zooms; only the lesson inside (and the module list) scrolls. 100vh on a phone is taller than the screen, so it moved. */
html:has(.player), body:has(.player) { height: 100%; overflow: hidden; overscroll-behavior: none; -webkit-text-size-adjust: 100%; }
.player { position: fixed; inset: 0; height: auto; overscroll-behavior: none; touch-action: manipulation; }
.player.collapsed { grid-template-columns: 0 1fr; } .player.collapsed .rail { visibility: hidden; }
.rail { border-right: 1px solid var(--line); overflow-y: auto; display: flex; flex-direction: column; }
.rail .head { padding: 18px 16px 18px; border-bottom: 1px solid var(--line); }
.rail .exit { display: flex; justify-content: space-between; align-items: center; margin: 0 0 20px 10px; } .rail .exit a { color: var(--ink); display: flex; gap: 10px; align-items: center; font-size: 15px; }
.rail .ctitle { color: var(--brand); font-weight: 700; font-size: 18px; line-height: 1.25; margin-bottom: 16px; }
.rail .pct { font-size: 12px; margin-top: 8px; color: var(--ink); }
.steps { list-style: none; margin: 0; padding: 0; } .steps li a { display: flex; gap: 14px; padding: 14px 16px; color: var(--ink); text-decoration: none; position: relative; font-size: 15px; }
.steps li a:hover, .steps li.on a { background: var(--hover); } .steps li.on a { font-weight: 700; }
.steps .dot { width: 18px; height: 18px; border: 2px solid #3b4651; border-radius: 50%; flex: none; margin-top: 1px; background: var(--card); position: relative; z-index: 1; display: grid; place-items: center; }
.steps li:not(:last-child) a::after { content: ""; position: absolute; left: 24.5px; top: 34px; bottom: -14px; border-left: 1px solid #c3c8ce; }
.steps .dot.done { background: var(--ok); border-color: var(--ok); } .steps .dot.done::after { content: "✓"; color: #fff; font-size: 11px; font-weight: 800; }
.steps .dot.half { border-color: var(--brand); } .steps .dot.half::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }
.steps .dot.fail { border-color: var(--bad); }
.steps .dot.lock { border-color: #c3c8ce; background: var(--hover); } .steps .dot.lock::after { content: ""; width: 6px; height: 5px; border: 1.5px solid #8a939c; border-radius: 1px; margin-top: 3px; }
.steps li.locked a { color: var(--muted); }
.steps .tag { display: block; font-style: normal; font-size: 12px; font-weight: 600; color: var(--brand); margin-top: 2px; letter-spacing: .01em; }
.stage { display: grid; grid-template-rows: auto 1fr auto; grid-template-columns: minmax(0, 1fr); min-width: 0; min-height: 0; } /* a long title never widens the page */
.stage .crumbs { padding: 22px 36px 0; margin: 0; font-size: 13px; } .stage .crumbs a { color: var(--brand); }
.stage .view { position: relative; display: grid; place-items: center; padding: 20px 36px; min-height: 0; }
.stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #fff; }
.start { background: var(--bg); border-radius: 10px; padding: 60px 40px; display: flex; gap: 40px; align-items: center; max-width: 800px; width: 100%; }
.start h2 { font-size: 26px; margin: 0 0 14px; }
.stage .foot { border-top: 1px solid var(--line); padding: 12px 24px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
#toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 6px; display: none; z-index: 99; max-width: 90vw; }
dialog { border: 0; border-radius: 10px; padding: 0; width: min(560px, 92vw); max-height: 90vh; overflow: auto; color: var(--ink); background: var(--card); box-shadow: 0 20px 60px rgba(0,0,0,.25); }
dialog::backdrop { background: rgba(20,22,30,.45); } dialog .dh { padding: 18px 20px; border-bottom: 1px solid var(--line); font-weight: 700; font-size: 17px; } dialog .db { padding: 20px; } dialog .df { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; }
.palette input { border: 0; font-size: 18px; padding: 16px 20px; border-bottom: 1px solid var(--line); border-radius: 0; } .palette .res a { display: block; padding: 10px 20px; color: var(--ink); } .palette .res a:hover, .palette .res a.sel { background: var(--hover); text-decoration: none; }

@media (max-width: 900px) {
  :root { --side: 0px; --top: 64px; }
  .side { transform: translateX(-100%); width: 260px; transition: transform .2s; } body.nav-open .side { transform: none; box-shadow: 0 0 40px rgba(0,0,0,.2); }
  .logo { font-size: 21px; } .logo .sub { font-size: 16px; } .topbar .tabs-top a span { display: none; }
  .cols, .tiles { grid-template-columns: 1fr; } .content { padding: 12px 16px 40px; }
  .player { grid-template-columns: minmax(0, 1fr); } .player .rail { display: none; } .player.rail-open .rail { display: flex; position: fixed; inset: 0 20% 0 0; z-index: 30; background: var(--card); }
  .stage .crumbs { padding: 14px 16px 0; } .stage .view { padding: 12px 16px; } .start { flex-direction: column; padding: 30px 20px; text-align: center; gap: 16px; }
  .hero { padding: 26px; } .hero .ring { display: none; } .subbar { justify-content: flex-start; overflow-x: auto; } .subbar .act { position: static; margin-left: auto; padding-right: 10px; }
}
@media (min-width: 901px) { .mobile-only { display: none !important; } }
/* Phone course header: one slim line with a clear way out (Jamie, 19 Nov 2026). */
.mbar { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--line); min-height: 44px; }
.mbar .mexit { color: var(--brand); font-weight: 600; white-space: nowrap; font-size: 15px; }
.mbar .mtitle { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; color: var(--ink); }
@media (max-width: 900px) {
  .desktop-only { display: none !important; }
  .stage .foot { padding: 8px 12px; } .stage .foot .btn { padding: 8px 12px; font-size: 14px; }
  .stage .foot.single { display: none; } /* one module: the top bar's Exit is the way out; the course has its own Next bar */
}
.logo-img { height: 36px; width: auto; display: block; }
@media (max-width: 900px) { .logo-img { height: 28px; } }

/* Before and after (assessment results) and course set-up */
.ba-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.ba-kpi .kpi { font-size: 32px; letter-spacing: -.02em; } .ba-kpi > div + div { margin-top: 2px; }
.ba-insight { border-left: 4px solid var(--brand); font-size: 15px; }
.ba-legend { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; font-size: 13px; font-weight: 600; }
.ba-legend .k { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; margin-right: 4px; }
.ba-legend .k.ba-start, .ba-bar.ba-start i { background: #c3c8ce; } .ba-legend .k.ba-end, .ba-bar.ba-end i { background: var(--brand); }
.ba-skill { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr) 72px; gap: 16px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.ba-name { display: flex; gap: 10px; align-items: center; min-width: 0; } .ba-name b { font-weight: 600; }
.ba-bars { display: grid; gap: 6px; }
.ba-bar { position: relative; display: block; padding: 0; height: 18px; background: var(--hover); border-radius: 4px; overflow: hidden; }
.ba-bar i { position: absolute; inset: 0 auto 0 0; border-radius: 4px; transition: width .4s ease; }
.ba-bar span { position: absolute; right: 8px; top: 0; line-height: 18px; font-size: 12px; font-weight: 700; color: var(--ink); }
.ba-change { text-align: right; }
.delta { font-weight: 700; font-size: 13px; white-space: nowrap; } .delta.up { color: var(--ok); } .delta.down { color: var(--bad); }
.skill-row { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; padding: 10px 0; border-top: 1px solid var(--line); }
.skill-row:first-child { border-top: 0; }
@media (max-width: 900px) { .ba-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ba-skill { grid-template-columns: 1fr; gap: 8px; } .ba-change { text-align: left; } }

/* Course picture field */
.pic-field { display: flex; gap: 12px; align-items: center; } .pic-field > span { display: grid; gap: 6px; flex: 1; min-width: 0; }
.pic-field img { width: 120px; height: 68px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); background: var(--hover); flex: none; }

/* Course page: the logo always sits top left and goes home */
.rail .head .plogo { display: inline-block; margin: 0 0 12px; background: var(--brand); padding: 7px 10px; border-radius: 8px; } .rail .head .plogo img { height: 22px; width: auto; display: block; }
.mbar .mlogo { display: flex; flex: none; } .mbar .mlogo img { width: 26px; height: 26px; border-radius: 6px; display: block; }

/* Add from Uptime Scorm Studio */
.studio-steps { margin: 0; padding-left: 20px; display: grid; gap: 14px; } .studio-steps li > div { margin-top: 8px; }
.copyrow { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; } .copyrow code { background: var(--hover); padding: 6px 10px; border-radius: 6px; font-size: 13px; word-break: break-all; }

/* A note from the learner's network on the course or an episode */
.nnote { width: 100%; max-width: 760px; margin: 0 0 14px; padding: 14px 16px; border-radius: 10px; background: #fff7e6; border: 1px solid #f3d48b; color: var(--ink); }
.nnote b { display: block; margin-bottom: 4px; } .nnote-body { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; line-height: 1.5; }
.stage .view:has(.nnote) { place-items: start center; align-content: start; overflow-y: auto; }
.nn-card .nn-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.mdesc { margin: 0 0 10px; white-space: pre-wrap; max-width: 520px; font-size: 14px; line-height: 1.5; color: var(--ink); }
.inst-list { display: grid; gap: 8px; }
.mrules-d { margin-top: 6px; } .mrules-d summary { cursor: pointer; color: var(--brand); }
.mrules { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 6px 14px; margin-top: 8px; min-width: 260px; }
.mrules label { display: grid; gap: 3px; align-content: start; }
.mrules .wh { display: flex; align-items: center; gap: 6px; }
.mrules select, .mrules input { width: 100% !important; min-width: 0; }
.path-steps { margin: 12px 0 0; padding-left: 22px; display: grid; gap: 8px; }
.path-steps li { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; }
.path-steps li.locked { opacity: .6; }

.route-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }

/* Help (public /help and admin #/help) */
.help-wrap { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 28px; max-width: 1180px; margin: 0 auto; padding: 20px 16px 60px; }
.help-wrap.in-admin { padding: 14px 0 40px; margin: 0; }
.help-site .help-wrap { padding-top: 88px; }
.help-nav { position: sticky; top: 84px; align-self: start; max-height: calc(100vh - 100px); overflow: auto; }
.help-nav input { width: 100%; margin-bottom: 10px; }
.help-list, #hlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.help-list a, #hlist a { display: block; padding: 8px 10px; border-radius: 8px; text-decoration: none; color: inherit; }
.help-list a span, #hlist a span { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.help-list a.on, #hlist a.on, .help-list a:hover, #hlist a:hover { background: var(--card, #fff); box-shadow: inset 3px 0 0 var(--brand); }
.help-main { min-width: 0; line-height: 1.6; }
.help-main h1 { margin-top: 0; } .help-main h2 { margin-top: 30px; } .help-main h3 { margin-top: 20px; }
.help-main code { background: rgba(0,0,0,.06); padding: 1px 5px; border-radius: 4px; font-size: .92em; }
.hcode { position: relative; } .hcode pre { background: #1f2744; color: #f3f4f8; padding: 14px; border-radius: 8px; overflow: auto; font-size: 13px; }
.hcode pre code { background: none; padding: 0; color: inherit; } .hcode .hcopy { position: absolute; right: 8px; top: 6px; color: #fff; }
.hnote { border-left: 4px solid var(--brand); background: var(--card, #fff); padding: 10px 14px; border-radius: 6px; margin: 12px 0; }
.hscroll { overflow-x: auto; }
.subbar a.help-link { position: absolute; left: 20px; font-size: 13px; font-weight: 600; color: var(--brand); white-space: nowrap; padding: 6px 10px; border: 1px solid var(--line); border-radius: 99px; background: var(--card); }
@media (max-width: 820px) { .subbar a.help-link { position: static; margin-left: 8px; } }
@media (max-width: 820px) { .help-wrap { grid-template-columns: 1fr; } .help-nav { position: static; max-height: none; } }

/* Menu sections and the sign-out word (newcomer review, 21 Nov 2026). */
.side nav .navsec { font-size: 11px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--muted, #6b7280); padding: 14px 14px 4px; }
.signout { font-size: 14px; font-weight: 600; white-space: nowrap; }
.icon-btn:has(.signout) { border-radius: 6px; padding: 6px 10px; }
/* Get started steps on the dashboard */
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.steps li { display: flex; gap: 12px; align-items: flex-start; }
.steps .n { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: var(--hover); color: var(--brand); }
.steps li.done .n { background: var(--brand); color: #fff; }
.steps li.done b::after { content: ' · done'; font-weight: 400; color: var(--ok, #1a7f37); }
a.card.kpi-link { text-decoration: none; color: inherit; display: block; } a.card.kpi-link:hover { box-shadow: 0 0 0 2px var(--brand); }
/* Course settings sections */
.panes { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
[data-pane][hidden] { display: none !important; }

/* Phone and small laptop (newcomer review, 21 Nov 2026) */
@media (max-width: 1200px) {
  .subbar { justify-content: flex-start; height: auto; min-height: 46px; flex-wrap: wrap; padding: 0 12px; row-gap: 4px; }
  .subbar .act { position: static; margin-left: auto; padding: 6px 0; flex-wrap: wrap; }
  .subbar a.help-link { position: static; margin-right: 6px; }
}
@media (max-width: 600px) {
  .subbar { overflow-x: visible; }
  .subbar .act { width: 100%; justify-content: flex-end; }
  .topbar .avatar { display: none; }
  .topbar .right { gap: 2px; }
  .signout { font-size: 13px; }
  .rowcard { flex-wrap: wrap; padding: 12px; }
  .rowcard .main { flex: 1 1 calc(100% - 52px); }
  /* Tables become one card per row, each value labelled */
  table.t.cards thead { display: none; }
  table.t.cards, table.t.cards tbody, table.t.cards tr, table.t.cards td { display: block; width: 100%; box-sizing: border-box; }
  table.t.cards tr { border-bottom: 1px solid var(--line); padding: 6px 0; }
  table.t.cards tr:last-child { border-bottom: 0; }
  table.t.cards td { border: 0; padding: 4px 14px; display: flex; gap: 12px; justify-content: space-between; align-items: center; }
  table.t.cards td > .cell { text-align: right; min-width: 0; overflow-wrap: anywhere; }
  table.t.cards td::before { content: attr(data-label); font-weight: 600; color: var(--muted); flex: none; text-align: left; }
  table.t.cards td[data-label=""]::before { content: none; }
  table.t.cards td[data-label=""] { justify-content: flex-end; }
  table.t.cards tr:hover td { background: none; }
}
/* Help on a phone: the article first, the list of topics under it */
@media (max-width: 820px) { .help-wrap { display: flex; flex-direction: column; } .help-wrap .help-nav { order: 2; } }

/* Content tab: main add buttons, the rest folded away */
.addbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; justify-content: flex-end; }
.addmore { position: relative; } .addmore summary { list-style: none; cursor: pointer; } .addmore summary::-webkit-details-marker { display: none; }
.addmore[open] .addmore-list { position: absolute; right: 0; top: calc(100% + 6px); z-index: 15; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(0,0,0,.12); padding: 10px; display: flex; flex-direction: column; gap: 6px; min-width: 240px; }
.addmore-list button, .addmore-list .btn { width: 100%; justify-content: flex-start; }
@media (max-width: 600px) { .topbar { padding: 0 10px; gap: 8px; } .logo-img { height: 22px; } .addmore[open] .addmore-list { position: static; box-shadow: none; } }

/* Help: a one-line summary first; developer and bot parts folded (22 Nov 2026) */
.help-lead { font-size: 16px; color: var(--ink); background: var(--hover); border-radius: var(--radius); padding: 10px 14px; margin: 0 0 14px; }
details.help-more { border: 1px solid var(--line); border-radius: var(--radius); margin: 18px 0; padding: 0 14px; background: var(--card); }
details.help-more > summary { cursor: pointer; font-weight: 700; font-size: 17px; padding: 12px 0; list-style-position: inside; }
details.help-more > summary::after { content: '  (for developers and bots)'; font-weight: 400; font-size: 13px; color: var(--muted); }
details.help-more[open] > summary { border-bottom: 1px solid var(--line); margin-bottom: 8px; }

/* Light or dark switch at the foot of the main menu (shell.js setTheme). */
.side .themesw { display: flex; gap: 4px; margin: 4px 14px 8px; padding: 3px; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; }
.side .themesw button { flex: 1; padding: 6px 0; font-size: 13px; font-weight: 600; background: transparent; color: var(--muted); border: 0; border-radius: 6px; }
.side .themesw button:hover { background: var(--hover); color: var(--ink); }
.side .themesw button[aria-pressed="true"] { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.15); }
