/* Header lockup and breadcrumbs (Kalima). */
.nav__lockup { display: block; block-size: 1.6rem; background: currentColor; color: var(--color-text);
  mask-repeat: no-repeat; mask-position: center; mask-size: contain; -webkit-mask-repeat: no-repeat; -webkit-mask-position: center; -webkit-mask-size: contain; }
/* The lockups' own proportions (their viewBox): English 4041 × 750, Arabic 3873 × 1025. */
.nav__lockup--en { aspect-ratio: 4041 / 750; mask-image: url("/brand/logo-lockup-en.svg"); -webkit-mask-image: url("/brand/logo-lockup-en.svg"); }
.nav__lockup--ar { aspect-ratio: 3873 / 1025; block-size: 1.9rem; mask-image: url("/brand/logo-lockup-ar.svg"); -webkit-mask-image: url("/brand/logo-lockup-ar.svg"); }
/* Phone: one header row. "Courses" goes where the logo goes, so it steps aside; the lockup a size down. */
@media (max-width: 37.49rem) {
  .nav__brand + .nav__link { display: none; }
  .nav__lockup { block-size: 1.35rem; }
  .nav__lockup--ar { block-size: 1.6rem; }
}
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.35rem;
  font: var(--type-caption-weight) var(--type-caption-size) / var(--type-caption-leading) var(--type-caption-family); color: var(--color-text-subtle); }
.crumbs li + li::before { content: "/"; margin-inline-end: 0.35rem; color: var(--color-border-strong); }
.crumbs a { color: var(--color-text-muted); text-decoration: none; }
.crumbs a:hover { color: var(--color-text); text-decoration: underline; }
.crumbs [aria-current="page"] { color: var(--color-text); }

/* The header (21st.dev rebuild, 5 Nov): a glass bar with the lockup, the Tubelight Navbar (fixed, centred; a bottom
   bar on phones) and the search, language and theme controls. HideOnScroll slides it away while reading down. */
#top { z-index: 40; background: color-mix(in srgb, var(--color-canvas) 78%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%); }
.topbar { display: flex; align-items: center; gap: 1rem; max-width: 74rem; margin-inline: auto; padding: 1.15rem clamp(1rem, 3vw, 1.5rem); min-block-size: 4.75rem; }
.topbar__end { margin-inline-start: auto; display: flex; align-items: center; gap: 0.5rem; }
.topbar__start { display: flex; align-items: center; gap: 0.5rem; min-inline-size: 0; }
.topbar__start .nav__brand { margin-inline-end: 0.5rem; }
.topbar .nav__brand { display: inline-flex; align-items: center; color: var(--color-text); }
.topbar .nav__search { display: inline-flex; align-items: center; gap: 0.6rem; block-size: 2.25rem; padding-inline: 0.85rem 0.45rem; border-radius: 999px;
  border: 1px solid var(--color-border); background: var(--color-surface); color: var(--color-text-muted); cursor: pointer;
  font: 500 13.5px / 1 var(--type-label-family); }
.topbar .nav__search:hover { color: var(--color-text); }
.topbar .nav__lang { block-size: 2.25rem; padding-inline: 0.85rem; border-radius: 999px; border: 1px solid var(--color-border); background: var(--color-surface);
  color: var(--color-text); cursor: pointer; font: 600 13.5px / 1 var(--type-label-family); }
.topbar .nav__lang:hover { border-color: var(--color-border-strong); }
.topbar .nav__lang:focus-visible, .topbar .nav__search:focus-visible { outline: 2px solid var(--color-focus-ring); outline-offset: 2px; }
/* The pill sits over the bar on desktop; leave room so the lockup and the controls never run under it. */
/* From 52rem the navbar sits in the header row (between the lockup group and the controls) instead of fixed, so it can
   never run into them; below that it is the bottom bar. The lockup group (lockup, language, theme; Bader, 6 Nov) is
   wider than search, so the navbar centres between the two until 75rem, then on the page. */
@media (min-width: 52rem) {
  .topbar { padding-inline: clamp(1rem, 3vw, 1.5rem); }
  .topbar { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; }
  .topbar > .topbar__start { justify-self: start; }
  .topbar > .topbar__nav { justify-self: center; }
  .topbar > .topbar__nav.fx-tube--fixed { position: relative; inset: auto; transform: none; margin: 0; padding: 0; z-index: 41; }
  .topbar > .topbar__end { justify-self: end; margin-inline-start: 0; }
}
@media (min-width: 75rem) { .topbar { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); } }
.topbar .nav__search-icon { display: inline-grid; place-items: center; }
.topbar .nav__search-icon svg { inline-size: 15px; block-size: 15px; }
.topbar .nav__lang, .topbar .nav__search { white-space: nowrap; }
@media (max-width: 63.99rem) { .topbar .nav__search-label, .topbar .nav__search kbd { display: none; }
  .topbar .nav__search { inline-size: 2.25rem; padding: 0; justify-content: center; } }
/* Phones: the navbar is a bottom bar, so the page keeps room for it. */
@media (max-width: 51.99rem) { body { padding-block-end: 5.5rem; } }

/* Your profile in the header (Bader, 7 Nov): your initials in a round tile once signed in, a person icon before. */
.nav__me { display: inline-grid; place-items: center; inline-size: 36px; block-size: 36px; border-radius: 999px; flex: none; text-decoration: none;
  background: var(--color-accent-soft); color: var(--color-text-brand); font: 700 13px / 1 var(--type-label-family); border: 1px solid color-mix(in srgb, var(--color-accent) 30%, var(--color-border)); }
.nav__me--icon { background: var(--color-surface); color: var(--color-text); border-color: var(--color-border); }
.nav__me svg { inline-size: 18px; block-size: 18px; }
.nav__me:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.topbar .nav__signin { display: inline-flex; align-items: center; gap: 0.45rem; min-block-size: 36px; padding: 0.4rem 0.9rem; font-size: 14px; white-space: nowrap; }
.nav__signin svg { inline-size: 17px; block-size: 17px; }
@media (max-width: 37.49rem) { .topbar .nav__signin { inline-size: 36px; padding: 0; justify-content: center; border-radius: 999px; } .nav__signin-label { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; } }
/* Signed out (Bader, 9 Nov 2026): Sign up leads as the one solid pill; Sign in sits beside it only on very wide screens. */
.nav__auth { display: inline-flex; align-items: center; gap: 0.4rem; }
.topbar .nav__signup { display: inline-flex; align-items: center; min-block-size: 36px; padding: 0.4rem 1rem; border-radius: 999px; font-size: 14px; white-space: nowrap; }
@media (max-width: 99.99rem) { .nav__auth .nav__signin { display: none; } } /* the header is full at laptop widths; the sign-up page says the same button signs you in */
/* The language and theme buttons keep their size (on a phone the theme button was squeezed to a sliver, 9 Nov). */
.topbar__start > * { flex: none; }
/* Phones, signed out: Sign up stays in the header (Bader, 9 Nov); search steps aside to make room. */
@media (max-width: 37.49rem) { .topbar:has(.nav__signup) .nav__search { display: none; } }
/* The narrowest phones (360): a slightly smaller lockup and tighter buttons, so Sign up never covers the theme button. */
@media (max-width: 24rem) {
  .topbar { gap: 0.5rem; }
  .topbar__start { gap: 0.35rem; }
  .topbar__start .nav__brand { margin-inline-end: 0.15rem; }
  .nav__lockup { block-size: 1.3rem; } .nav__lockup--ar { block-size: 1.55rem; }
  .topbar .nav__lang { padding-inline: 0.6rem; }
  .topbar .nav__signup { padding-inline: 0.8rem; }
}
/* Six items in the phone's bottom bar (Prices joined, Bader 10 Nov 2026): tighter, so the bar fits a 360px screen. */
@media (max-width: 33rem) {
  .topbar__nav .fx-tube__pill { gap: 0.2rem; }
  .topbar__nav .fx-tube__item.has-icon { padding-inline: 1rem; }
}
/* Wide screens: six items (Prices joined) and the cart button share the header row (10 Nov 2026). The items sit a
   little closer; on laptops they're smaller; on tablets the nav shows its icons only, as the phone bar does. */
@media (min-width: 52rem) { .topbar__nav .fx-tube__item { padding-inline: 1.1rem; } .topbar__nav .fx-tube__pill { gap: 0.35rem; } }
@media (min-width: 64rem) and (max-width: 74.99rem) { .topbar__nav .fx-tube__item { padding-inline: 0.75rem; font-size: 0.8125rem; } }
@media (min-width: 52rem) and (max-width: 63.99rem) {
  .topbar__nav .fx-tube__item.has-icon { padding-inline: 0.8rem; }
  .topbar__nav .fx-tube__item.has-icon .fx-tube__icon { display: inline; }
  .topbar__nav .fx-tube__item.has-icon .fx-tube__label { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
}
/* Phones with the cart button (checkout, 10 Nov 2026): a little less space between the header's buttons so all of
   them fit at 390px; signed out, Sign up keeps its place and the cart waits behind sign-up (the course page's Buy now
   still opens it); on the narrowest phones, search steps aside, as it does for Sign up. */
@media (max-width: 37.49rem) {
  .topbar:has(.nav__cart) { gap: 0.5rem; }
  .topbar:has(.nav__cart) .topbar__start, .topbar:has(.nav__cart) .topbar__end { gap: 0.35rem; }
  .topbar:has(.nav__cart) .nav__lang { padding-inline: 0.6rem; }
  .topbar:has(.nav__signup) .nav__cart { display: none; }
}
@media (max-width: 24rem) { .topbar:has(.nav__cart) .nav__search { display: none; } }
/* Laptops: the search button is its icon (as below 64rem), so the six-item nav keeps clear of it. */
@media (min-width: 64rem) and (max-width: 74.99rem) { .topbar .nav__search-label, .topbar .nav__search kbd { display: none; }
  .topbar .nav__search { inline-size: 2.25rem; padding: 0; justify-content: center; } }

/* Header fit (Bader, 15 Nov 2026: the nav ran over the theme button and the search). Seven nav items now (orism.ai
   joined). Each column is at least as wide as what's in it, so nothing can slide under anything again; the three
   groups keep one even gap; search is its icon (⌘K still opens it); the nav is a step tighter at each size, and shows
   icons only until the row has room for its words (68rem). */
@media (min-width: 52rem) {
  .topbar { column-gap: 1.25rem; grid-template-columns: max-content minmax(max-content, 1fr) max-content; }
  .topbar__start .nav__brand { margin-inline-end: 0.25rem; }
  .topbar .nav__search-label, .topbar .nav__search kbd { display: none; }
  .topbar .nav__search { inline-size: 2.25rem; padding: 0; justify-content: center; }
}
@media (min-width: 75rem) {
  .topbar { grid-template-columns: minmax(max-content, 1fr) max-content minmax(max-content, 1fr); }
  .topbar__nav .fx-tube__item { padding-inline: 0.9rem; } .topbar__nav .fx-tube__pill { gap: 0.25rem; }
}
@media (min-width: 68rem) and (max-width: 74.99rem) {
  .topbar__nav .fx-tube__item { padding-inline: 0.6rem; font-size: 0.8125rem; } .topbar__nav .fx-tube__pill { gap: 0.15rem; }
}
@media (min-width: 52rem) and (max-width: 67.99rem) {
  .topbar { column-gap: 0.75rem; padding-inline: 1rem; }
  .topbar__nav .fx-tube__item.has-icon { padding-inline: 0.65rem; }
  .topbar__nav .fx-tube__item.has-icon .fx-tube__icon { display: inline; }
  .topbar__nav .fx-tube__item.has-icon .fx-tube__label { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
  .topbar__nav .fx-tube__pill { gap: 0.1rem; }
}
/* Very wide screens, where Sign in joins Sign up (9 Nov): Sign in is its icon, as on phones, so the row still fits. */
@media (min-width: 100rem) {
  .topbar .nav__signin { inline-size: 36px; padding: 0; justify-content: center; border-radius: 999px; }
  .topbar .nav__signin-label { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .topbar__nav .fx-tube__item { padding-inline: 0.85rem; }
}
