/* Training Portal: shared styles. Colors follow the mockups: dark green side bar,
   green accent, light grey-green background, IBM Plex Sans. */
:root {
  --side: #14261D; --side-text: #DCE8E0; --side-muted: #B7CDBF;
  --accent: #1F6B45; --accent-dark: #17543A; --bg: #F4F6F2; --card: #FFFFFF;
  --line: #DDE3DC; --text: #1C2420; --muted: #55625B;
  --ok-bg: #E2F1E7; --ok: #1F6B45; --wn-bg: #FCEFD6; --wn: #7A4B00; --bd-bg: #FBE5E2; --bd: #8E2420;
  --info-bg: #E7F1FB; --info: #1D4E7A;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
       font-size: 15px; line-height: 1.45; color: var(--text); background: var(--bg); }
a { color: var(--accent); }
h1 { font-size: 24px; margin: 0 0 6px; }
h2 { font-size: 18px; margin: 0 0 12px; }
.mono { font-family: "IBM Plex Mono", ui-monospace, Consolas, monospace; }
.mut { color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Plain pages (sign-in, errors) */
.topbar { background: var(--side); color: #fff; padding: 14px 24px; display: flex; align-items: center; gap: 10px; font-size: 18px; }
.brand-mark { width: 26px; height: 26px; border-radius: 7px; background: #2B5A3E; display: inline-block; }
.narrow { max-width: 460px; margin: 48px auto; padding: 0 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 20px; margin-bottom: 16px; }
.narrow-card { max-width: 520px; }
.login h1 { font-size: 22px; }
.login h2 { font-weight: 500; color: var(--muted); }
.lang { display: flex; gap: 4px; justify-content: flex-end; }
.lang a { padding: 6px 10px; border-radius: 6px; text-decoration: none; color: var(--muted); border: 1px solid var(--line); min-width: 44px; text-align: center; }
.lang a.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.switch { margin: 14px 0 6px; }

/* Forms and buttons */
.fld { display: flex; flex-direction: column; gap: 4px; margin-bottom: 14px; }
.fld label { font-weight: 500; }
.fld input { font: inherit; padding: 10px 12px; min-height: 46px; border: 1px solid #B9C4BC; border-radius: 8px; background: #fff; }
.fld input:focus { outline: 3px solid #9CCBB0; border-color: var(--accent); }
.fld input.pin { font-size: 22px; letter-spacing: 8px; max-width: 160px; }
.btn { font: inherit; display: inline-block; padding: 9px 16px; min-height: 44px; border-radius: 8px; border: 1px solid #B9C4BC;
       background: #fff; color: var(--text); cursor: pointer; text-decoration: none; }
.btn.p { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 500; }
.btn.p:hover { background: var(--accent-dark); }
.btn.s { padding: 5px 12px; min-height: 36px; font-size: 14px; }
.btn.wide { width: 100%; }
.linkbtn { font: inherit; background: none; border: 0; color: var(--side-muted); text-decoration: underline; cursor: pointer; padding: 6px 0; }
form.inline { display: inline; }
.err { background: var(--bd-bg); color: var(--bd); border-radius: 8px; padding: 10px 12px; margin-bottom: 14px; }
.info { background: var(--info-bg); color: var(--info); border-radius: 8px; padding: 10px 12px; margin-bottom: 14px; }
.note { background: var(--wn-bg); color: var(--wn); border-radius: 8px; padding: 10px 12px; margin-bottom: 14px; }

/* Portal layout */
.app { display: flex; min-height: 100vh; }
.side { width: 240px; flex: 0 0 240px; background: var(--side); color: var(--side-text); padding: 18px 14px; display: flex; flex-direction: column; }
.side .logo { font-weight: 600; font-size: 17px; color: #fff; }
.side .rl { color: var(--side-muted); font-size: 13px; margin-bottom: 14px; }
.side .g { text-transform: uppercase; font-size: 12px; letter-spacing: .06em; color: var(--side-muted); margin: 14px 0 4px; }
.side .n { display: block; color: var(--side-text); text-decoration: none; padding: 8px 10px; border-radius: 6px; }
.side .n:hover { background: #1E3A2B; }
.side .n.on { background: #2B5A3E; color: #fff; }
.side .me { margin-top: auto; padding-top: 18px; font-size: 13px; color: var(--side-muted); }
.main { flex: 1; padding: 24px 32px; min-width: 0; }
.hd { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.sub { margin: 0; color: var(--muted); }
.row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 14px 18px; min-width: 150px; }
.stat b { display: block; font-size: 26px; }
.stat span { color: var(--muted); }
.sc { overflow-x: auto; position: relative; }  /* relative: keeps screen-reader labels inside the scroll box */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 13px; color: var(--muted); font-weight: 500; }
td.r { text-align: right; white-space: nowrap; }
.b { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 13px; font-weight: 500; }
.b.ok { background: var(--ok-bg); color: var(--ok); }
.b.wn { background: var(--wn-bg); color: var(--wn); }
.b.bd { background: var(--bd-bg); color: var(--bd); }
.pin-show { font-size: 40px; letter-spacing: 12px; margin: 10px 0; }

/* Learner layout */
.lr-top { background: var(--side); color: #fff; padding: 12px 20px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.lr-top > div:first-child { flex: 1; display: flex; flex-direction: column; }
.lr-top span { color: var(--side-muted); font-size: 14px; }
.lr-top .lang a { color: #fff; border-color: #3C5A49; }
.lr-body { max-width: 900px; margin: 0 auto; padding: 20px 16px; }

@media (max-width: 720px) {
  .app { flex-direction: column; }
  .side { width: auto; flex: none; }
  .main { padding: 16px; }
}

/* Step 2: admin screens */
.b.mu { background: #ECEFEA; color: var(--muted); }
.btn.d { border-color: #C98A84; color: var(--bd); }
.btn.d:hover { background: var(--bd-bg); }
.stat small { font-size: 15px; font-weight: 400; color: var(--muted); }
.hint { display: block; color: var(--muted); font-size: 13px; }
.ferr { display: block; color: var(--bd); font-size: 13px; font-weight: 500; }
.fld select { font: inherit; padding: 10px 12px; min-height: 46px; border: 1px solid #B9C4BC; border-radius: 8px; background: #fff; }
input.num { width: 110px; font: inherit; padding: 8px 10px; border: 1px solid #B9C4BC; border-radius: 8px; }
td select { font: inherit; padding: 8px 10px; border: 1px solid #B9C4BC; border-radius: 8px; background: #fff; }
.check { display: flex; gap: 8px; align-items: center; }
.check input { width: 20px; height: 20px; }
.two { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-start; }
.grow1 { flex: 1 1 300px; min-width: 0; }
.grow2 { flex: 2 1 480px; min-width: 0; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 16px; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0 16px; }
.tb { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 8px; }
.tb .fld { margin-bottom: 8px; }
.lbl-space { font-weight: 500; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.tabs a { padding: 10px 14px; text-decoration: none; color: var(--muted); border-bottom: 3px solid transparent; }
.tabs a.on { color: var(--text); border-bottom-color: var(--accent); font-weight: 500; }
.upload { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 10px 0 6px; }
.upload label { font-weight: 500; width: 100%; }
.archive { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.logo-preview { max-width: 220px; max-height: 120px; border: 1px solid var(--line); border-radius: 8px; padding: 6px; background: #fff; }
.fav-preview { width: 48px; height: 48px; border: 1px solid var(--line); border-radius: 8px; padding: 4px; background: #fff; }
.preview-bar { background: var(--side); color: #fff; border-radius: 8px; padding: 12px 14px; display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.preview-bar img { max-height: 32px; max-width: 120px; }
.side-logo { max-width: 160px; max-height: 56px; margin-bottom: 8px; background: #fff; border-radius: 6px; padding: 4px; }
.top-logo { max-height: 30px; max-width: 140px; }
.lr-logo { max-height: 40px; max-width: 120px; background: #fff; border-radius: 6px; padding: 3px; }
table.kv { width: auto; }
table.kv th { padding-right: 18px; }
.shown { border-color: #9CCBB0; background: #F3FAF5; }
.pw { font-size: 20px; letter-spacing: 2px; }
tr.cur td { background: #F3FAF5; }
meter { width: 90px; height: 10px; vertical-align: middle; margin-left: 6px; }
.melink { display: block; color: var(--side-muted); margin-top: 8px; }
.melink.on { color: #fff; }
form + .two { margin-top: 16px; }

/* Step 3: content screens */
.indent.d1 { padding-left: 20px; } .indent.d2 { padding-left: 40px; } .indent.d3 { padding-left: 60px; } .indent.d4 { padding-left: 80px; }
span.indent, label.indent { display: inline-block; }
div.indent { display: block; }
.fld textarea { font: inherit; padding: 10px 12px; border: 1px solid #B9C4BC; border-radius: 8px; background: #fff; resize: vertical; }
.fld textarea:focus, .fld select:focus { outline: 3px solid #9CCBB0; border-color: var(--accent); }
.narrow-form { max-width: 760px; }
.sp { margin-top: 18px; }
.tight { margin: 4px 0; padding-left: 20px; }
.wrap { overflow-wrap: anywhere; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.player { position: relative; padding-top: 56.25%; background: #0E1A14; border-radius: 8px; overflow: hidden; margin-bottom: 6px; }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.uploader { margin: 12px 0; }
.uploader input[type=file] { min-height: 0; padding: 8px; }
.upl-status { margin: 8px 0 4px; color: var(--muted); }
.upl-status.bad { color: var(--bd); font-weight: 500; }
.uploader progress { width: 100%; height: 12px; }
details.more { margin: 12px 0; }
details.more summary { cursor: pointer; color: var(--accent); padding: 6px 0; }
.qlist { margin: 0; padding-left: 22px; }
.qlist > li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.qlist > li.retired { color: var(--muted); }
.qhead { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.qhead .b { margin-left: 6px; }
.answers { margin: 6px 0 0; padding-left: 18px; list-style: circle; }
.answers li.right { list-style: none; margin-left: -16px; color: var(--ok); font-weight: 500; }
.opts { border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px 4px; margin: 0 0 14px; }
.opts legend { font-weight: 500; padding: 0 4px; }
.js .opts[data-off] { display: none; }
.opt { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.opt input[type=radio], .opts .check input { width: 20px; height: 20px; flex: none; }
.opt input[type=text] { flex: 1; font: inherit; padding: 8px 10px; min-height: 42px; border: 1px solid #B9C4BC; border-radius: 8px; }
.opts .check { margin-bottom: 8px; }
fieldset.groups { border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; margin: 0 0 14px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
fieldset.groups legend { font-weight: 500; padding: 0 4px; }
form.qz { margin: 0; align-items: center; gap: 10px; }
form.qz label { font-size: 14px; display: flex; gap: 6px; align-items: center; }
form.qz input.num { width: 72px; padding: 6px 8px; }
.tb .fld input[type=file] { min-height: 0; padding: 8px; }
[hidden] { display: none !important; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
form.qz input.num { flex: none; }
table.items { min-width: 760px; }
.fld select, .tb select { max-width: 100%; }

/* Step 4: learner pages */
.lr-nav { background: #1E3A2B; padding: 0 20px; display: flex; gap: 4px; }
.lr-nav a { color: var(--side-text); text-decoration: none; padding: 10px 14px; border-bottom: 3px solid transparent; }
.lr-nav a.on { color: #fff; border-bottom-color: #9CCBB0; font-weight: 500; }
.lr-body h1 { margin-top: 4px; }
.crumb { margin: 0 0 4px; color: var(--muted); font-size: 14px; }
.lgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin-bottom: 16px; }
.lcard { margin-bottom: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.lcard h2 { margin: 2px 0 0; }
.lcard h2 a { color: var(--text); text-decoration: none; }
.lcard p { margin: 0; }
.lcard .btn { margin-top: 6px; }
.meter { display: flex; align-items: center; gap: 10px; width: 100%; }
.meter progress { flex: 1; }
progress { appearance: none; -webkit-appearance: none; height: 10px; border: 0; border-radius: 999px; background: #E3E8E1; overflow: hidden; }
progress::-webkit-progress-bar { background: #E3E8E1; border-radius: 999px; }
progress::-webkit-progress-value { background: var(--accent); border-radius: 999px; }
progress::-moz-progress-bar { background: var(--accent); border-radius: 999px; }
progress.big { width: 100%; height: 12px; margin: 8px 0; }
.okbox { background: var(--ok-bg); color: var(--ok); border-radius: 8px; padding: 10px 12px; margin-bottom: 14px; font-weight: 500; }
.ok-text { color: var(--ok); font-weight: 500; }
ol.items { list-style: none; padding: 0; margin: 0; }
.item { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.item h2 { margin: 2px 0 4px; }
.item h2 a { color: var(--text); }
.item p { margin: 0; }
.item .state { font-weight: 500; color: var(--text); }
.item.passed .state, .item.done .state { color: var(--ok); }
.item.out .state { color: var(--bd); }
.item.unavailable { opacity: .7; }
.item-main { flex: 1 1 320px; min-width: 0; }
.docs { margin-top: 6px; font-size: 14px; }
.docs a { margin-right: 10px; }
.watch { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-start; }
.watch-video { flex: 2 1 520px; min-width: 0; }
.watch-side { flex: 1 1 260px; }
.watch-video .player { margin-bottom: 8px; }
.player-msg { position: absolute; inset: 0; color: #fff; display: flex; align-items: center; justify-content: center; padding: 20px; text-align: center; margin: 0; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.quiz { max-width: 720px; margin: 0 auto; }
fieldset.qbox { border: 0; padding: 0; margin: 0; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
legend.qtext { font-size: 20px; line-height: 1.35; font-weight: 600; width: 100%; margin-bottom: 4px; float: left; }
legend.qtext + * { clear: both; }
.quiz .opt { display: flex; gap: 12px; align-items: center; background: var(--card); border: 1px solid #B9C4BC; border-radius: 10px;
             padding: 14px 16px; min-height: 56px; cursor: pointer; margin: 0; }
.quiz .opt:has(input:checked) { border-color: var(--accent); background: #F3FAF5; box-shadow: 0 0 0 2px #9CCBB0; }
.quiz .opt input { width: 22px; height: 22px; flex: none; accent-color: var(--accent); }
.result { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-start; }
.score-card { flex: 1 1 240px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.score-card .btn { text-align: center; }
.score { font-size: 52px; font-weight: 600; line-height: 1.1; margin-top: 6px; }
.result-side { flex: 2 1 420px; min-width: 0; }
.result-side .card h2 { font-size: 16px; }
.result-side .card p { margin: 0 0 6px; }
.sp-s { margin-top: 8px; }
@media (max-width: 720px) {
  .lr-body { padding: 16px 12px; }
  .score { font-size: 44px; }
  legend.qtext { font-size: 18px; }
}

/* Step 5: company admin and supervisor screens */
.pager { display: flex; gap: 8px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-top: 10px; }
.pick { max-height: 320px; overflow-y: auto; border: 1px solid var(--line); border-radius: 8px; padding: 4px 12px; background: #fff; }
.pick label.check { padding: 7px 0; border-bottom: 1px solid var(--line); }
.pick label.check:last-child { border-bottom: 0; }
.fld .lbl { font-weight: 500; }
a.stat { color: var(--text); text-decoration: none; }
a.stat:hover { border-color: var(--accent); }
.stat b.bad { color: var(--bd); }
.meter-row { display: flex; flex-direction: column; gap: 2px; margin-bottom: 12px; }
.meter-row .meter span { min-width: 42px; text-align: right; font-weight: 500; }
.crumb a { color: var(--muted); }
.tb .fld .hint { min-height: 1em; }
td .b { white-space: nowrap; }

/* Step 6: certificates (sizes scale with the paper's width) */
.cert-wrap { container-type: inline-size; width: 100%; }
.cert-paper { width: 100%; aspect-ratio: 11 / 8.5; background: #fff; box-sizing: border-box; border: .3cqw solid #1F6B45;
              padding: .9cqw; color: #1B2A22; font-family: Georgia, "Times New Roman", serif; }
.cert-paper.a4 { aspect-ratio: 297 / 210; }
.cert-inner { border: .1cqw solid #1F6B45; height: 100%; box-sizing: border-box; display: flex; flex-direction: column;
              align-items: center; text-align: center; padding: 3.6cqw 5.5cqw 1.6cqw; }
.cert-inner.no-logo { padding-top: 7.2cqw; }
.cert-logo { max-height: 6.6cqw; max-width: 19cqw; margin-bottom: 1.3cqw; }
.cert-company { font: 600 1.4cqw/1 "IBM Plex Sans", Helvetica, Arial, sans-serif; letter-spacing: .2cqw; text-transform: uppercase; color: #1F6B45; }
.cert-heading { font-size: 4.8cqw; line-height: 1.1; margin: 2.1cqw 0 1.4cqw; }
.cert-small { font: 1.52cqw/1.4 "IBM Plex Sans", Helvetica, Arial, sans-serif; color: #5B6B62; }
.cert-small b { color: #1B2A22; }
.cert-name { font-size: 4.5cqw; line-height: 1.15; margin: .9cqw 0 2.4cqw; padding: 0 2.5cqw .7cqw; min-width: 40cqw;
             border-bottom: .1cqw solid #BFCAC1; overflow-wrap: anywhere; }
.cert-course { font-size: 3.3cqw; line-height: 1.15; margin: 1cqw 0 1.6cqw; }
.cert-foot { margin-top: auto; width: 100%; display: flex; justify-content: space-between; align-items: flex-end;
             font: 1.26cqw/1.45 "IBM Plex Sans", Helvetica, Arial, sans-serif; text-align: left; }
.cert-sign { width: 27cqw; }
.cert-sign-name { font: italic 2.3cqw/1.2 Georgia, serif; border-bottom: .1cqw solid #1B2A22; min-height: 3cqw; margin-bottom: .6cqw; }
.cert-qr { text-align: center; font-size: 1cqw; color: #5B6B62; }
.cert-qr svg { width: 12.5cqw; height: 12.5cqw; display: block; margin: 0 auto -.6cqw; }
.cert-ids { width: 27cqw; text-align: right; }
.cert-ids b { font-family: "IBM Plex Mono", "Courier New", monospace; font-weight: 600; }
.cert-muted { color: #5B6B62; }
.cert-micro { font: .63cqw/1 "IBM Plex Mono", monospace; color: #9AA89F; margin-top: 1.4cqw; white-space: nowrap; overflow: hidden; width: 100%; }
.cert-verify { font: 1cqw "IBM Plex Sans", Helvetica, Arial, sans-serif; color: #5B6B62; margin-top: .5cqw; }
.cert-preview { max-width: 900px; box-shadow: 0 4px 18px rgba(0,0,0,.12); margin-bottom: 16px; }
.print-body { background: #E3E8E1; margin: 0; }
.print-bar { display: flex; gap: 10px; align-items: center; justify-content: center; flex-wrap: wrap; padding: 10px; background: #fff; border-bottom: 1px solid var(--line); }
.print-sheet { margin: 16px auto; background: #fff; box-shadow: 0 4px 18px rgba(0,0,0,.18); overflow: hidden; }
.print-sheet .cert-wrap { height: 100%; }
.print-sheet .cert-paper { height: 100%; aspect-ratio: auto; }
@media print {
  .print-bar { display: none; }
  .print-body { background: #fff; }
  .print-sheet { margin: 0; box-shadow: none; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
@media screen and (max-width: 1100px) {
  .print-sheet { width: 96vw !important; height: auto !important; }
  .print-sheet .cert-wrap { height: auto; }
  .print-sheet .cert-paper { aspect-ratio: 11 / 8.5; }
  .print-sheet .cert-paper.a4 { aspect-ratio: 297 / 210; }
}
table.matrix th.c, table.matrix td.c { text-align: center; }
table.matrix th.c { min-width: 96px; }
table.matrix a.b { text-decoration: none; }
a.ok-mark { color: var(--ok); font-weight: 600; font-size: 18px; text-decoration: none; }
.verify h1 { margin: 0; font-size: 22px; }
.verdict { display: flex; gap: 14px; align-items: center; border-radius: 10px; padding: 14px 16px; margin: 8px 0 14px; }
.verdict.ok { background: var(--ok-bg); color: var(--ok); }
.verdict.wn { background: var(--wn-bg); color: var(--wn); }
.verdict.bd { background: var(--bd-bg); color: var(--bd); }
.verdict p { margin: 4px 0 0; }
.verdict-mark { font-size: 26px; font-weight: 600; width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center;
                justify-content: center; border: 2px solid currentColor; flex: none; }
.verify-kv { margin-bottom: 12px; }
.verify-kv th { white-space: nowrap; }
td.mono { white-space: nowrap; }
.lr-top .lr-who { flex: 1; display: flex; flex-direction: column; min-width: 0; }
td.nowrap, .nowrap { white-space: nowrap; }
.plain-list { list-style: none; margin: 0; padding: 0; }
.plain-list li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.plain-list li:last-child { border-bottom: 0; }
.viewas { background: #1F3B6B; color: #fff; border-radius: 8px; padding: 10px 12px; margin-bottom: 14px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.viewas .btn { background: #fff; }
tfoot th, tfoot td { font-weight: 600; border-top: 2px solid var(--line); }

/* Help: "Help for this page" on every page, and the manuals (/help, /admin/help) */
.helpbar { display: flex; justify-content: flex-end; margin: -10px 0 4px; }
.helpbar a, .lr-help, .top-help { font-size: 14px; white-space: nowrap; }
.helpbar a::before, .lr-help::before, .top-help::before { content: "?"; display: inline-flex; align-items: center; justify-content: center;
  width: 17px; height: 17px; margin-right: 6px; border: 1.5px solid currentColor; border-radius: 50%; font-size: 11px; font-weight: 600; }
.lr-nav .lr-help { margin-left: auto; }
@media (max-width: 480px) {  /* phones: just the (?) so the three tabs fit on one line */
  .lr-nav { padding: 0 8px; }
  .lr-nav a { padding: 10px 10px; }
  .lr-help span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .lr-help::before { margin-right: 0; width: 22px; height: 22px; font-size: 13px; }
}
.topbar .top-help { margin-left: auto; color: #fff; text-decoration: none; }
.top-sub { color: var(--side-muted); font-size: 15px; }
.help { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 28px; max-width: 1180px; margin: 0 auto; padding: 24px 24px 64px; }
.help-toc { position: sticky; top: 16px; align-self: start; max-height: calc(100vh - 32px); overflow: auto; font-size: 14px; }
.help-toc ol { list-style: none; margin: 6px 0 0; padding: 0; }
.help-toc ol ol { padding-left: 12px; margin: 0 0 6px; }
.help-toc a { display: block; padding: 3px 0; color: var(--text); text-decoration: none; }
.help-toc a:hover { color: var(--accent); }
.help-body { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 28px 32px; max-width: 860px; min-width: 0; }
.help-body h1 { font-size: 26px; }
.help-body h2 { font-size: 21px; margin: 34px 0 10px; padding-top: 18px; border-top: 1px solid var(--line); }
.help-body h3 { font-size: 17px; margin: 24px 0 8px; }
.help-body p, .help-body li { max-width: 72ch; }
.help-body li { margin-bottom: 4px; }
.help-body td, .help-body th { vertical-align: top; }
.help-body .sc { margin: 8px 0 16px; }
.help-body code, .help-body pre { font-family: "IBM Plex Mono", ui-monospace, Consolas, monospace; font-size: 13px; }
.help-body pre { background: #F0F3EF; border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; overflow-x: auto; }
.help-body [id] { scroll-margin-top: 16px; }
.help-body p:target, .help-body li:target, .help-body h2:target, .help-body h3:target { background: #FCF3D9; box-shadow: 0 0 0 6px #FCF3D9; border-radius: 3px; }
.help-lang { max-width: 1132px; margin: 16px auto 0; padding: 10px 16px; border-radius: 8px; background: var(--info-bg); color: var(--info); }
.flow-fig { margin: 16px 0 20px; }
.flow-fig figcaption { color: var(--muted); font-size: 13px; margin-top: 4px; }
.flow { width: 100%; max-width: 760px; height: auto; }
.flow .ink { fill: var(--text); }
.flow .quiet { fill: var(--muted); }
.flow .edge { stroke: #8A968F; }
.flow .edge-fill { fill: #8A968F; }
.flow .renew { stroke: var(--accent); }
.flow .accent-fill { fill: var(--accent); }
.flow .box { fill: none; stroke: #8A968F; }
.flow .box.main { fill: rgba(31, 107, 69, .12); stroke: var(--accent); }
@media (max-width: 900px) {
  .help { grid-template-columns: 1fr; padding: 16px; gap: 16px; }
  .help-toc { position: static; max-height: none; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
  .help-body { padding: 20px 18px; }
  .help-lang { margin: 16px 16px 0; }
}
@media print {
  .help-page .topbar, .help-toc, .help-lang { display: none; }
  .help { display: block; padding: 0; }
  .help-body { border: 0; padding: 0; max-width: none; }
  .help-body p:target, .help-body li:target { background: none; box-shadow: none; }
}
