/* Nimbus, the shared character (nimbus.js). A page sets its colours with --nimbus-ink (the loop and
   lids), --nimbus-halo (the background behind it), --nimbus-ok, --nimbus-warn and --nimbus-flow.
   A coloured Nimbus has a body in the page's theme: a gradient from --nimbus-body-a to
   --nimbus-body-b with --nimbus-iris eyes and a sheen; right and wrong answers
   tint it with --nimbus-ok and --nimbus-warn. */
.nimbus { overflow: visible; }
.nimbus-body { transform-box: view-box; transform-origin: 32px 46px; }
.nimbus-halo { fill: var(--nimbus-halo, Canvas); stroke: var(--nimbus-halo, Canvas); stroke-width: 11; stroke-linejoin: round; }
.nimbus-loop, .nimbus-flow, .nimbus-sheen { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.nimbus-loop { stroke: var(--nimbus-ink, currentColor); stroke-width: 5; transition: stroke .35s ease; }
.nimbus-lid { fill: var(--nimbus-ink, currentColor); transition: fill .35s ease; }
.nimbus-ring { fill: none; stroke: var(--nimbus-ink, currentColor); }
/* Chameleon cues, on a coloured Nimbus only. */
.nimbus-tail, .nimbus-tail-shade, .nimbus-tail-light, .nimbus-tail-groove, .nimbus-scales { display: none; }
.nimbus.coloured :is(.nimbus-tail, .nimbus-tail-shade, .nimbus-tail-light, .nimbus-tail-groove) { display: inline; }
.nimbus.coloured .nimbus-tail { fill: var(--nimbus-paint); }
.nimbus-crest, .nimbus-crest-light { display: none; }
.nimbus.coloured .nimbus-crest { display: inline; fill: var(--nimbus-paint); stroke: var(--nimbus-paint); stroke-width: .5; stroke-linejoin: round; }
.nimbus.coloured .nimbus-crest-light { display: inline; fill: none; stroke: #fff; stroke-opacity: .4; stroke-width: .6; stroke-linecap: round; }
.nimbus-curl-a { stop-color: #000; stop-opacity: .28; }
.nimbus-curl-b { stop-color: #000; stop-opacity: 0; }
.nimbus-tail-light { fill: none; stroke: #fff; stroke-opacity: .35; stroke-width: .5; stroke-linecap: round; }
.nimbus-tail-groove { fill: none; stroke: #000; stroke-opacity: .34; stroke-width: .5; stroke-linecap: round; }
.nimbus.coloured .nimbus-scales { display: inline; fill: none; stroke-width: 5; stroke-linejoin: round; }
.nimbus-scale { fill: #fff; opacity: .26; }
/* Small, it is drawn with fewer, cleaner marks: no scales, a finer ring round the iris, a clearer catch-light. */
.nimbus.small .nimbus-scales, .nimbus.small .nimbus-crest-light { display: none; }
.nimbus.small .nimbus-iris { stroke-width: .45; }
.nimbus.small .nimbus-sheen { opacity: .85; }
/* Very small (as it forms on the header's loop), only the bold shapes are drawn: the loop, the crest and tail as plain
   outlines, and eyes of clean white and one dark pupil. The finer marks come in as it grows. */
.nimbus-sheen, .nimbus-tail-shade, .nimbus-tail-groove, .nimbus-tail-light, .nimbus-glint { transition: opacity .3s ease; }
.nimbus.tiny :is(.nimbus-sheen, .nimbus-tail-shade, .nimbus-tail-groove, .nimbus-tail-light, .nimbus-crest-light) { opacity: 0; }
.nimbus.tiny .nimbus-iris { stroke-width: 0; }
.nimbus.tiny { --nimbus-white-edge: var(--nimbus-white, #f3f5ff); }
.nimbus.coloured .nimbus-ring { stroke: var(--nimbus-paint); }
/* The bug it catches and its tongue (catchBug in nimbus.js), shown only while it hunts. */
.nimbus-tongue { fill: none; stroke: #ff6b8a; stroke-width: 2.2; stroke-linecap: round; }
.nimbus-bug { opacity: 0; }
.nimbus.hunting .nimbus-bug { opacity: 1; }
.nimbus-bug-body { fill: var(--nimbus-bug, #1d1d1f); }
.nimbus-bug-wing { fill: #8e8e93; opacity: .8; }
@media (prefers-color-scheme: dark) { .nimbus { --nimbus-bug: #e6edf3; } }
.nimbus-sheen { stroke: #fff; stroke-width: 1.3; opacity: 0; }
.nimbus-flow { stroke: var(--nimbus-flow, #2997ff); stroke-width: 2.2; stroke-dasharray: 7 93; opacity: 0; }
.nimbus.running .nimbus-flow { opacity: .95; }

/* The eyes. */
.nimbus-white-a { stop-color: var(--nimbus-white, #f3f5ff); }
.nimbus-white-b { stop-color: var(--nimbus-white-edge, #b3bfec); }
.nimbus-iris { fill: var(--nimbus-iris, #2a7df0); stroke: color-mix(in srgb, var(--nimbus-iris, #2a7df0) 55%, #07122a); stroke-width: .7; transition: fill .35s ease; }
.nimbus-pupil { fill: var(--nimbus-pupil, #07122a); }
.nimbus-glint { fill: #fff; opacity: .95; }
.nimbus-crease { fill: none; stroke: var(--nimbus-pupil, #07122a); stroke-width: .9; stroke-linecap: round; opacity: .45; }
.nimbus-star { fill: var(--nimbus-star, #ffc21a); stroke: #b77900; stroke-width: .4; stroke-linejoin: round; }
.nimbus:not(.starry) .nimbus-star, .nimbus.starry .nimbus-tick { display: none; }
.nimbus-tick { fill: none; stroke: var(--nimbus-tick, #0d7a3a); stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; opacity: 0; }

/* The colour body. The mood and the state of rest tint the whole gradient. */
.nimbus-paint-a { stop-color: var(--nimbus-body-a, transparent); transition: stop-color .35s ease; }
.nimbus-paint-b { stop-color: var(--nimbus-body-b, transparent); transition: stop-color .35s ease; }
.nimbus.coloured :is(.nimbus-loop) { stroke: var(--nimbus-paint); }
.nimbus.coloured .nimbus-lid { fill: var(--nimbus-paint); }
.nimbus.coloured .nimbus-sheen { opacity: .38; }
.nimbus.coloured .nimbus-flow { stroke: #fff; }
.nimbus.coloured[data-mood="right"] .nimbus-paint-a { stop-color: color-mix(in srgb, var(--nimbus-ok, #1d8a3a) 55%, #fff); }
.nimbus.coloured[data-mood="right"] .nimbus-paint-b { stop-color: var(--nimbus-ok, #1d8a3a); }
.nimbus.coloured[data-mood="wrong"] .nimbus-paint-a { stop-color: color-mix(in srgb, var(--nimbus-warn, #c77700) 55%, #fff); }
.nimbus.coloured[data-mood="wrong"] .nimbus-paint-b { stop-color: var(--nimbus-warn, #c77700); }
/* Drowsy, its colour fades towards grey; asleep, almost all the way. */
.nimbus.coloured.drowsy .nimbus-paint-a { stop-color: color-mix(in srgb, var(--nimbus-body-a) 65%, #a7b4c9); transition-duration: 2s; }
.nimbus.coloured.drowsy .nimbus-paint-b { stop-color: color-mix(in srgb, var(--nimbus-body-b) 65%, #6f7f99); transition-duration: 2s; }
.nimbus.coloured.asleep .nimbus-paint-a { stop-color: color-mix(in srgb, var(--nimbus-body-a) 35%, #b3bfd2); transition-duration: 2s; }
.nimbus.coloured.asleep .nimbus-paint-b { stop-color: color-mix(in srgb, var(--nimbus-body-b) 35%, #6f7f99); transition-duration: 2s; }
.nimbus:not(.coloured)[data-mood="right"] :is(.nimbus-loop) { stroke: var(--nimbus-ok, #1d8a3a); }
.nimbus:not(.coloured)[data-mood="right"] .nimbus-lid { fill: var(--nimbus-ok, #1d8a3a); }
.nimbus:not(.coloured)[data-mood="wrong"] .nimbus-loop { stroke: var(--nimbus-warn, #c77700); }
.nimbus:not(.coloured)[data-mood="wrong"] .nimbus-lid { fill: var(--nimbus-warn, #c77700); }
.nimbus[data-mood="wrong"] .nimbus-iris { fill: var(--nimbus-warn, #e07a00); }
.nimbus.coloured:is(.drowsy, .asleep) .nimbus-iris { fill: color-mix(in srgb, var(--nimbus-iris, #2a7df0) 40%, #6f7f99); }


/* The nap: two small z's drifting up. */
.nimbus-zz path { fill: none; stroke: #8f9db5; stroke-width: .7; stroke-linecap: round; stroke-linejoin: round; opacity: 0; }
@keyframes nimbus-z { 0% { opacity: 0; transform: translate(0, 2px); } 30% { opacity: .8; } 100% { opacity: 0; transform: translate(2px, -4px); } }
.nimbus.asleep .nimbus-zz path { animation: nimbus-z 3.2s ease-out infinite; }
.nimbus.asleep .nimbus-zz path:nth-child(2) { animation-delay: 1.6s; }

/* The speech bubble: plain text beside Nimbus (or below it when there is no room). */
.nimbus-bubble { position: fixed; z-index: 60; max-width: min(280px, calc(100vw - 16px)); padding: 9px 13px; border-radius: 14px;
  font: 500 14px/1.4 system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--nimbus-bubble-text, #1d1d1f);
  background: var(--nimbus-bubble, #fff); border: 1px solid rgba(0, 0, 0, .1); box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
  pointer-events: none; animation: nimbus-bubble-in .22s ease-out both; transition: opacity .25s ease, transform .25s ease; }
.nimbus-bubble.leaving { opacity: 0; transform: translateY(-4px); }
/* The pointer: a small square turned on its corner, on the side that faces Nimbus. */
.nimbus-bubble::after { content: ""; position: absolute; width: 11px; height: 11px; background: inherit; border: inherit;
  transform: rotate(45deg); clip-path: polygon(100% 0, 100% 100%, 0 100%); }
.nimbus-bubble[data-side="above"]::after { left: var(--tail, 22px); bottom: -6.5px; }
.nimbus-bubble[data-side="below"]::after { left: var(--tail, 22px); top: -6.5px; transform: rotate(225deg); }
.nimbus-bubble[data-side="right"]::after { left: -6.5px; top: calc(50% - 5.5px); transform: rotate(135deg); }
.nimbus-bubble[data-side="left"]::after { right: -6.5px; top: calc(50% - 5.5px); transform: rotate(-45deg); }
@keyframes nimbus-bubble-in { from { opacity: 0; transform: scale(.92); } }
@media (prefers-color-scheme: dark) { .nimbus-bubble { --nimbus-bubble: #2c2c2e; --nimbus-bubble-text: #f5f5f7; border-color: rgba(255, 255, 255, .12); } }

@media (prefers-reduced-motion: reduce) {
  .nimbus-loop, .nimbus-lid, .nimbus-iris, .nimbus-paint-a, .nimbus-paint-b { transition: none; }
  .nimbus.asleep .nimbus-zz path, .nimbus-bubble { animation: none; }
  .nimbus.asleep .nimbus-zz path { opacity: .5; }
}

/* The header's loop (nimbus-site.js): the logo in ink, and a light in the page's accent that
   travels round it without end; it speeds up while something loads and makes one green lap when
   progress is saved. */
.loop-mark { overflow: visible; }
.loop-mark path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.loop-mark-ink { stroke: var(--text, currentColor); stroke-width: 5; }
.loop-mark-light { stroke: var(--accent-fill, #2997ff); stroke-width: 2.6; stroke-dasharray: 18 82; animation: loop-flow 3.6s linear infinite; }
@keyframes loop-flow { to { stroke-dashoffset: -100; } }
@media (prefers-reduced-motion: reduce) { .loop-mark-light { animation: none; opacity: 0; } }
.loop-mark-light.saved { stroke: var(--ok, #30d158); }

/* Achievements (achievements.js): the shelf of earned badges, and the card for an unlock. */
.ach-shelf { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 12px; }
.ach-badge { padding: 0; border: 0; background: none; border-radius: 12px; cursor: pointer; line-height: 0; transition: transform .2s ease; }
.ach-badge:hover { transform: translateY(-2px); }
.ach-badge:focus-visible { outline: 2px solid var(--accent-fill, #2997ff); outline-offset: 2px; }
.ach-count { font-size: .8rem; color: var(--muted, #6e6e73); }
.ach-share { margin-left: 4px; padding: 5px 12px; border-radius: 980px; border: 1px solid color-mix(in srgb, currentColor 22%, transparent); background: none; color: inherit; font: inherit; font-size: .8rem; font-weight: 500; cursor: pointer; }
.ach-share:hover { background: color-mix(in srgb, currentColor 8%, transparent); }
.ach-share:focus-visible { outline: 2px solid var(--accent-fill, #2997ff); outline-offset: 2px; }
.ach-share[hidden] { display: none; }
.hero .ach-shelf { justify-content: center; margin-top: 18px; }
/* On a track's score card the row lines up with the card's own text, from the left. */
.eng-card .ach-shelf { align-self: stretch; justify-content: flex-start; text-align: left; }
.eng-card .ach-share { margin-left: 0; }
.ach-card { position: fixed; z-index: 70; left: 50%; bottom: 20px; transform: translateX(-50%); display: flex; align-items: center; gap: 14px;
  width: max-content; max-width: calc(100vw - 24px); padding: 12px 20px 12px 14px; border-radius: 18px; background: #1d1d1f; color: #fff;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .28); font: 15px/1.35 system-ui, -apple-system, "Segoe UI", sans-serif;
  animation: ach-in .35s cubic-bezier(.2, .9, .3, 1.2) both; transition: opacity .3s ease, transform .3s ease; }
.ach-card[hidden] { display: none; }
.ach-card.leaving { opacity: 0; transform: translate(-50%, 8px); }
.ach-card strong, .ach-card span, .ach-card small { display: block; }
.ach-card small { opacity: .7; font-size: .82rem; }
@keyframes ach-in { from { opacity: 0; transform: translate(-50%, 16px) scale(.96); } }
/* What to do next, after a level is ticked off (nimbus-site.js): the same card, with Nimbus and a link. */
.nimbus-next { position: fixed; z-index: 69; left: 50%; bottom: 20px; transform: translateX(-50%); display: flex; align-items: center; gap: 12px;
  width: max-content; max-width: calc(100vw - 24px); padding: 10px 12px 10px 14px; border-radius: 18px; background: #1d1d1f; color: #fff;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .28); font: 15px/1.35 system-ui, -apple-system, "Segoe UI", sans-serif; animation: ach-in .35s cubic-bezier(.2, .9, .3, 1.2) both; }
.nimbus-next[hidden], .nimbus-next a[hidden] { display: none; }
.nimbus-next .nimbus { width: 40px; flex: none; --nimbus-halo: transparent; }
.nimbus-next a { flex: none; padding: 7px 14px; border-radius: 980px; background: #fff; color: #1d1d1f; font-weight: 600; font-size: 14px; text-decoration: none; }
.nimbus-next a:focus-visible { outline: 2px solid var(--accent-fill, #2997ff); outline-offset: 2px; }
@media (prefers-color-scheme: dark) { .ach-card, .nimbus-next { background: #f5f5f7; color: #1d1d1f; } .nimbus-next a { background: #1d1d1f; color: #fff; } }
@media (prefers-reduced-motion: reduce) { .ach-card, .nimbus-next { animation: none; transition: none; } .ach-badge { transition: none; } }
/* Ask Nimbus (ask.js): a button that opens a small conversation. On a track the button is in the header beside Search; on the home
   page it is in the corner. The conversation is a card in the corner, or on a phone a sheet over the lower part of the screen. */
.ask, .ask-open { --ask-alt: var(--alt, color-mix(in srgb, var(--text, #1d1d1f) 6%, transparent)); --ask-ink: var(--btn, var(--text, #1d1d1f)); --ask-on: var(--btn-text, var(--bg, #fff)); --ask-link: var(--kubernetes, var(--accent, #0073e1)); }
.top-tools { display: inline-flex; align-items: center; gap: 8px; }
.ask-open.in-top { position: static; padding: 3px 12px 3px 6px; gap: 6px; font-size: .8rem; box-shadow: none; border-color: transparent; background: var(--code-bg, var(--ask-alt)); }
.ask-open.in-top:hover { transform: none; border-color: var(--line, #d2d2d7); }
.ask-open.in-top .nimbus { width: 30px; }
@media (max-width: 720px) { .ask-open.in-top { padding: 3px 6px; } .ask-open.in-top span { display: none; } }
/* On the narrowest phones the two buttons draw in, so the header keeps to one row. */
@media (max-width: 350px) { .top-tools { gap: 4px; } .ask-open.in-top { padding: 2px 3px; } .ask-open.in-top .nimbus { width: 24px; } }
.ask-open { position: fixed; right: 20px; bottom: 20px; z-index: 40; display: flex; align-items: center; gap: 8px; padding: 9px 16px 9px 12px; border-radius: 980px;
  border: 1px solid var(--line, #d2d2d7); background: var(--surface, #fff); color: var(--text, #1d1d1f); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; box-shadow: 0 8px 24px rgb(0 0 0 / .14); }
.ask-open:hover { transform: translateY(-1px); }
.ask-open:focus-visible, .ask-close:focus-visible, .ask-form button:focus-visible, .ask-chips button:focus-visible { outline: 2px solid var(--ask-link); outline-offset: 2px; }
.ask-open[hidden], .ask[hidden] { display: none; }
.ask-open .nimbus { width: 38px; --nimbus-halo: transparent; }
.ask { position: fixed; right: 20px; bottom: 20px; z-index: 80; width: min(380px, 100vw - 32px); height: min(520px, 100vh - 100px); display: grid; grid-template-rows: auto 1fr auto;
  transition: height .25s ease;
  border-radius: 22px; border: 1px solid var(--line, #d2d2d7); background: var(--surface, #fff); color: var(--text, #1d1d1f); box-shadow: 0 24px 64px rgb(0 0 0 / .24); overflow: hidden; animation: ask-in .28s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes ask-in { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.ask-top { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 14px 14px 12px 16px; border-bottom: 1px solid var(--line, #d2d2d7); }
.ask-top .nimbus { width: 48px; --nimbus-halo: transparent; }
.ask-title strong { display: block; font-size: 17px; letter-spacing: -.01em; }
.ask-title span { display: block; font-size: 12.5px; line-height: 1.35; color: var(--muted, #6e6e73); }
.ask-close { width: 32px; height: 32px; border: 0; border-radius: 50%; background: var(--ask-alt); color: var(--muted, #6e6e73); font: 22px/1 inherit; cursor: pointer; }
.ask-log { position: relative; overflow-y: auto; overscroll-behavior: contain; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.ask-msg { max-width: 88%; padding: 10px 14px; border-radius: 18px; font-size: 15px; line-height: 1.45; overflow-wrap: anywhere; animation: ask-in .22s ease-out both; }
.ask-msg p { margin: 0; }
.ask-msg p + p, .ask-msg pre + p, .ask-msg p + pre { margin-top: 8px; }
.ask-msg.me { align-self: flex-end; background: var(--ask-ink); color: var(--ask-on); border-bottom-right-radius: 6px; }
.ask-msg.nimbus { align-self: flex-start; background: var(--ask-alt); border-bottom-left-radius: 6px; width: auto; }
.ask-msg code { font: 13px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; padding: 1px 5px; border-radius: 6px; background: color-mix(in srgb, var(--text) 9%, transparent); }
.ask-msg pre { margin: 6px 0 0; padding: 10px 12px; border-radius: 10px; background: #1d1d1f; color: #f5f5f7; font: 13px/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.ask-head { font-weight: 600; }
.ask-msg ul { margin: 8px 0 0; padding-left: 18px; }
.ask-msg li + li { margin-top: 3px; }
.ask-chips button { text-align: left; }
.ask-label { margin-top: 10px !important; font-size: 12px; font-weight: 600; color: var(--muted, #6e6e73); }
.ask-note { font-size: 13.5px; color: var(--muted, #6e6e73); }
.ask-link { display: inline-block; margin-top: 10px; font-weight: 600; color: var(--ask-link); text-decoration: none; }
.ask-link:hover { text-decoration: underline; }
.ask-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.ask-chips button { padding: 6px 12px; border-radius: 980px; border: 1px solid var(--line, #d2d2d7); background: var(--surface, #fff); color: var(--text, #1d1d1f); font: inherit; font-size: 13.5px; cursor: pointer; }
.ask-msg.thinking { display: flex; gap: 5px; padding: 14px 16px; }
.ask-msg.thinking span { width: 7px; height: 7px; border-radius: 50%; background: var(--muted, #6e6e73); animation: ask-dot 1s ease-in-out infinite; }
.ask-msg.thinking span:nth-child(2) { animation-delay: .15s; } .ask-msg.thinking span:nth-child(3) { animation-delay: .3s; }
@keyframes ask-dot { 0%, 60%, 100% { opacity: .3; transform: none; } 30% { opacity: 1; transform: translateY(-3px); } }
.ask-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 12px; border-top: 1px solid var(--line, #d2d2d7); }
.ask-form input { min-width: 0; padding: 11px 14px; border-radius: 980px; border: 1px solid var(--line, #d2d2d7); background: var(--bg, #fff); color: var(--text, #1d1d1f); font: inherit; font-size: 16px; }
.ask-form input:focus { outline: 2px solid var(--ask-link); outline-offset: 1px; border-color: transparent; }
.ask-form button { padding: 0 18px; border: 0; border-radius: 980px; background: var(--ask-ink); color: var(--ask-on); font: inherit; font-weight: 600; cursor: pointer; }
@media (max-width: 760px) {
  .ask { right: 0; bottom: 0; width: 100%; height: min(66vh, 66dvh); border-radius: 22px 22px 0 0; border-width: 1px 0 0; }
  .ask-form { padding-bottom: max(12px, env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) { .ask, .ask-msg, .ask-msg.thinking span { animation: none; } .ask-open:hover { transform: none; } }
/* The footer's small print (privacy details, trademark notices) is folded under one line and opens when pressed. */
.foot-more summary { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; list-style: none; font-weight: 500; color: var(--text, #1d1d1f); }
.foot-more summary::-webkit-details-marker { display: none; }
.foot-more summary::after { content: "\203a"; transition: transform .2s ease; }
.foot-more[open] summary::after { transform: rotate(90deg); }
.foot-more summary:focus-visible { outline: 2px solid var(--accent-fill, #2997ff); outline-offset: 3px; border-radius: 4px; }
.foot-base .foot-more p { margin-top: 8px; }
@media (prefers-reduced-motion: reduce) { .foot-more summary::after { transition: none; } }
/* The practice terminal. Its scrollbars never sit as a light bar between the output and the line being typed: they
   are slim, the terminal's own colour, and show only while the pointer is over the terminal. */
.pg-out, .pg-term pre, .pg-term textarea { color-scheme: dark; scrollbar-width: thin; scrollbar-color: transparent transparent; transition: scrollbar-color .2s ease; }
.pg-term:hover :is(.pg-out, pre, textarea), .pg-out:hover, .pg-out:focus-within { scrollbar-color: #4a5463 transparent; }
.pg-out::-webkit-scrollbar { width: 8px; height: 8px; }
.pg-out::-webkit-scrollbar-track, .pg-out::-webkit-scrollbar-corner { background: transparent; }
.pg-out::-webkit-scrollbar-thumb { background: transparent; border-radius: 99px; }
.pg-term:hover .pg-out::-webkit-scrollbar-thumb, .pg-out:hover::-webkit-scrollbar-thumb { background: #4a5463; }
/* The incident picker above the terminal (nimbus-site.js): choose an incident without going back up to the list. */
.pg-pick { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: .86rem; }
.pg-pick label { font-weight: 600; color: var(--muted, #6e6e73); }
.pg-pick select { flex: 1 1 auto; min-width: 0; max-width: 420px; padding: 7px 10px; border-radius: 10px; border: 1px solid var(--line, #d2d2d7); background: var(--surface, #fff); color: var(--text, #1d1d1f); font: inherit; }
.pg-pick button { flex: none; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line, #d2d2d7); background: var(--surface, #fff); color: var(--text, #1d1d1f); font: 600 18px/1 inherit; cursor: pointer; }
.pg-pick button:disabled { opacity: .35; cursor: default; }
.pg-pick :is(select, button):focus-visible { outline: 2px solid var(--accent-fill, #2997ff); outline-offset: 2px; }
/* The arrow on the logo that leads back to the home page. */
.brand-back { margin-right: 2px; font-size: 1.25em; line-height: 1; color: var(--muted, #6e6e73); transition: transform .15s ease; }
.brand-hub:hover .brand-back { transform: translateX(-2px); color: inherit; }
@media (prefers-reduced-motion: reduce) { .brand-back { transition: none; } }
/* On the narrowest phones the header has no room for it: the logo alone leads back, as before. */
@media (max-width: 350px) { .brand-back { display: none; } }
/* The Learn / Fix switch: on Fix, the chip is the track's own colour, exactly as the track defines it (it was
   black). nimbus-site.js sets --fix-chip to that colour and --fix-label to white or near-black, whichever reads on it. */
.top .switch[data-side="fix"] .sw-chip { background: var(--fix-chip, var(--accent, var(--accent-fill))); }
.top .switch[data-side="fix"] .sw.fix { color: var(--fix-label, #fff); }
/* Moving from one page of the site to another, the old page fades into the new one in place of a blank flash
   (in browsers that can; the others change page as they always did). */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .2s; animation-timing-function: ease; }
@media (prefers-reduced-motion: reduce) { ::view-transition-old(root), ::view-transition-new(root) { animation: none; } }

/* Stage headings on the Path: a small numbered label, the name, then what the stage teaches in
   a quieter tone. Size, weight, tracking and leading are set together. */
#levels { counter-reset: stage; }
#levels > h3 { counter-increment: stage; margin: 3.25rem 0 1rem; font-size: clamp(1.375rem, 2.4vw, 1.75rem); font-weight: 700; line-height: 1.15; letter-spacing: -.018em; text-wrap: balance; }
#levels > h3:first-child { margin-top: 2.25rem; }
#levels > h3::before { content: "Stage " counter(stage); display: block; margin-bottom: .35rem; font-size: .8125rem; font-weight: 600; line-height: 1.3; letter-spacing: .01em; color: var(--accent, var(--a, currentColor)); }
#levels > h3 .stage-about { color: color-mix(in srgb, currentColor 55%, transparent); }

/* An opened level keeps to the width of its card: its columns may shrink below their longest
   command, and a long command wraps instead of pushing the row wider. */
.level-body > *, .eng-orderbox > *, .eng-order > *, .eng-order > li > * { min-width: 0; }
.eng-order > li > :first-child, .level-body li { overflow-wrap: anywhere; }
.level-body .chip { max-width: 100%; white-space: normal; }
