/* ============================================================
   Soofos — Base shell styling
   Ported from Presentation/assets/shell.css.
   Structure consumed by TASK-002 (shell PHP templates/partials).
   All visual values reference CSS custom properties from tokens.css.
   ============================================================ */

/* ---------- Prototype toolbar (staff controls) ---------- */
#sf-toolbar {
  position: sticky; top: 0; z-index: 900;
  display: flex; align-items: center; gap: 14px;
  background: var(--ink); color: var(--white);
  padding: 7px 18px; font: 800 13px var(--font);
  border-bottom: 1px solid rgba(255,255,255,.12);
}
#sf-toolbar .tb-brand { font-weight: 900; letter-spacing: -.2px; display:flex; align-items:center; gap:7px; }
#sf-toolbar .tb-brand b { color: var(--white); }
#sf-toolbar .tb-dot { color: var(--blue); }
#sf-toolbar a { color: var(--blue-fill); }
#sf-toolbar .tb-home { color:var(--white); background:rgba(255,255,255,.12); padding:5px 12px; border-radius:8px; font-weight:800; }
#sf-toolbar .tb-home:hover { background: rgba(255,255,255,.22); }
#sf-toolbar .tb-crumb { color:var(--faint); font-weight:700; }
#sf-toolbar .tb-crumb b { color:var(--white); }
#sf-toolbar .tb-spacer { flex: 1; }
#sf-toolbar .tb-label { color:var(--faint); font-weight:800; font-size:11px; }

.tb-select {
  background: rgba(255,255,255,.10); color:var(--white); border:1px solid rgba(255,255,255,.2);
  border-radius:8px; padding: 5px 10px; font: 800 12px var(--font); cursor: pointer;
}
.tb-select:hover { background: rgba(255,255,255,.18); }
.tb-seg { display:inline-flex; background: rgba(255,255,255,.08); border-radius:8px; padding:2px; }
.tb-seg button {
  border:none; background:none; color:var(--blue-fill); cursor:pointer;
  padding:4px 11px; border-radius:8px; font:800 12px var(--font);
}
.tb-seg button.on { background:var(--blue); color:var(--white); }

/* ---------- Page frame ---------- */
#sf-frame { min-height: 100vh; background: var(--page); }
#sf-main-wrap { display: block; }
#sf-main { margin: 0 auto; }
.layout-app #sf-body { display: flex; align-items: flex-start; }
.layout-app #sf-sidebar { flex: none; }
.layout-app #sf-main { flex: 1; min-width: 0; }

/* ---------- Marketing / app top nav ----------
   Calm Workspace header: big logo, Explore dropdown, search as the primary
   (central, dominant) control, icon-based right cluster. Global — this partial
   renders on marketing, portal, player and Studio surfaces.

   --sf-nav-h is the header's own rendered height: 14px top padding + 46px
   logo (.nv-logo img below) + 14px bottom padding + 1px border-bottom =
   75px. Exposed as a custom property so any sticky element that needs to
   sit flush below #sf-nav (e.g. .sf-section-nav in pages/course.css) can
   derive its offset from this single source instead of re-guessing a
   pixel value that then drifts out of sync with the header. */
:root {
  --sf-nav-h: 75px;
}

#sf-nav {
  display: flex; align-items: center; gap: 20px;
  background: var(--white); border-bottom: 1px solid var(--card-border);
  padding: 14px 40px; position: sticky; top: 39px; z-index: 800;
}
#sf-nav .nv-logo { display: flex; align-items: center; flex: none; min-height: 44px; text-decoration: none; }
#sf-nav .nv-logo img { height: 46px; width: auto; display: block; }

/* Pages composed via header.php never render the prototype toolbar, so the
   nav (and any sticky offset tuned to the 39px toolbar) sticks to the top. */
#sf-frame.no-toolbar #sf-nav { top: 0; }
#sf-frame.no-toolbar #sf-sidebar { top: 0; min-height: 100vh; }

/* Explore — native <details> disclosure holding the catalogue links. */
#sf-nav .nv-explore { position: relative; flex: none; }
#sf-nav .nv-explore-toggle {
  list-style: none; display: inline-flex; align-items: center; gap: 6px;
  min-height: 44px; padding: 8px 14px; border-radius: var(--r-btn);
  font-size: 15px; font-weight: 800; color: var(--ink); cursor: pointer;
}
#sf-nav .nv-explore-toggle::-webkit-details-marker { display: none; }
#sf-nav .nv-explore-toggle:hover { background: var(--blue-tint); }
#sf-nav .nv-explore-caret { transition: transform .15s ease; color: var(--muted-2); }
#sf-nav .nv-explore[open] .nv-explore-caret { transform: rotate(180deg); }

/* ============================================================
   Explore mega-menu (HEADER).
   Two-row layout matching the soofos.nl browse pattern:
     row 1 = "important pages" (Plus, For Business, Teach, Programs)
     row 2 = category list (left) + sub-category panel (right)
   Footer row = "Browse all courses" link.
   All values via tokens.css — no hardcoded hex / px / font family.
   ============================================================ */
#sf-nav .nv-mega {
  position: absolute; top: calc(100% + 10px); left: 0;
  display: flex; flex-direction: column; gap: 16px;
  width: min(820px, calc(100vw - 32px));
  padding: 20px 22px 18px;
  background: var(--white); border: 1px solid var(--card-border);
  border-radius: var(--r-card); box-shadow: var(--shadow-pop); z-index: 60;
}

/* ---- Row 1: important pages (4 pill cards) ------------------ */
#sf-nav .nv-mega__row--pages {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--card-border);
}
#sf-nav .nv-mega__page {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 12px; border-radius: var(--r-card-sm);
  background: var(--strip); border: 1px solid transparent;
  text-decoration: none; color: var(--ink);
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}
#sf-nav .nv-mega__page:hover,
#sf-nav .nv-mega__page:focus-visible {
  background: var(--white);
  border-color: var(--blue-border);
  transform: translateY(-1px);
  outline: none;
}
#sf-nav .nv-mega__page.is-current { background: var(--blue-fill); border-color: var(--blue-border); }
#sf-nav .nv-mega__page-icon {
  flex: none; width: 36px; height: 36px; border-radius: 10px;
  background: var(--blue-fill); color: var(--deep-blue);
  display: grid; place-items: center;
}
#sf-nav .nv-mega__page-icon .sf-icon { width: 20px; height: 20px; }
#sf-nav .nv-mega__page-body { display: flex; flex-direction: column; min-width: 0; }
/* P0-5: labels and descriptions wrap instead of being cut off ("Unlimited
   Lear…"); descriptions in --muted (AA; --muted-2 was 3.1:1). */
#sf-nav .nv-mega__page-label {
  font-size: 14px; font-weight: 800; color: var(--ink); line-height: 1.2;
  overflow-wrap: anywhere;
}
#sf-nav .nv-mega__page-desc {
  font-size: 13px; font-weight: 600; color: var(--muted);
  margin-top: 3px; line-height: 1.3;
}
/* Four tiles side by side only where the panel can be wide enough for
   their labels; 2 x 2 up to 1199px. */
@media (max-width: 1199px) {
  #sf-nav .nv-mega__row--pages { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1200px) {
  #sf-nav .nv-mega { width: min(960px, calc(100vw - 32px)); }
}

/* ---- Row 2: category list + sub-category fly-out ------------- */
#sf-nav .nv-mega__row--cats {
  display: grid; grid-template-columns: 260px 1fr; gap: 18px;
  min-height: 240px;
}
#sf-nav .nv-mega__cats {
  display: flex; flex-direction: column; gap: 2px;
  max-height: 320px; overflow-y: auto;
  padding-right: 4px; /* room for the scrollbar inside the panel */
}
#sf-nav .nv-mega__cat {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: var(--r-btn);
  font-size: 14px; font-weight: 700; color: var(--ink);
  text-decoration: none; cursor: pointer;
  transition: background .12s ease, color .12s ease;
}
#sf-nav .nv-mega__cat:hover,
#sf-nav .nv-mega__cat:focus-visible,
#sf-nav .nv-mega__cat.is-active {
  background: var(--blue-tint); color: var(--deep-blue); outline: none;
}
#sf-nav .nv-mega__cat.is-active { background: var(--blue-fill); }
#sf-nav .nv-mega__cat-name {
  flex: 1; min-width: 0;
  overflow-wrap: anywhere; line-height: 1.25;
}
/* P0-5: counts in --muted / --deep-blue (were 3.5:1 and 2.5:1). */
#sf-nav .nv-mega__cat-count {
  flex: none; font-size: 13px; font-weight: 800; color: var(--muted);
}
#sf-nav .nv-mega__cat:hover .nv-mega__cat-count,
#sf-nav .nv-mega__cat.is-active .nv-mega__cat-count { color: var(--deep-blue); }
#sf-nav .nv-mega__cat-caret {
  flex: none; color: var(--muted-2);
  transition: transform .15s ease, color .12s ease;
}
#sf-nav .nv-mega__cat-caret .sf-icon { width: 14px; height: 14px; }
#sf-nav .nv-mega__cat:hover .nv-mega__cat-caret,
#sf-nav .nv-mega__cat.is-active .nv-mega__cat-caret { color: var(--deep-blue); }
#sf-nav .nv-mega__cat.is-active .nv-mega__cat-caret { transform: translateX(2px); }

/* Right-hand sub-category panel (one pane per parent, swapped by JS). */
#sf-nav .nv-mega__subs {
  position: relative; min-width: 0;
  background: var(--strip); border-radius: var(--r-card-sm);
  padding: 16px 18px;
}
#sf-nav .nv-mega__sub-pane { display: block; }
#sf-nav .nv-mega__sub-pane[hidden] { display: none; }
#sf-nav .nv-mega__sub-head {
  margin: 0 0 10px; font-size: 13px; font-weight: 900; color: var(--muted);
}
#sf-nav .nv-mega__sub-list {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 14px;
}
#sf-nav .nv-mega__sub-link {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 8px; border-radius: var(--r-btn);
  font-size: 14px; font-weight: 700; color: var(--ink);
  text-decoration: none;
}
#sf-nav .nv-mega__sub-link:hover,
#sf-nav .nv-mega__sub-link:focus-visible {
  background: var(--white); color: var(--deep-blue); outline: none;
}
#sf-nav .nv-mega__sub-name {
  flex: 1; min-width: 0;
  overflow-wrap: anywhere; line-height: 1.25;
}
#sf-nav .nv-mega__sub-count {
  flex: none; font-size: 13px; font-weight: 800; color: var(--muted);
}
#sf-nav .nv-mega__sub-link:hover .nv-mega__sub-count { color: var(--deep-blue); }

#sf-nav .nv-mega__sub-cta {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 14px; padding: 7px 10px;
  font-size: 13px; font-weight: 800; color: var(--deep-blue);
  text-decoration: none; border-radius: var(--r-btn);
}
#sf-nav .nv-mega__sub-cta:hover { background: var(--white); color: var(--blue-hover); }
#sf-nav .nv-mega__sub-cta-icon .sf-icon { width: 14px; height: 14px; }

/* ---- Footer: All courses link ------------------------------- */
#sf-nav .nv-mega__row--foot {
  padding-top: 12px;
  border-top: 1px solid var(--card-border);
}
#sf-nav .nv-mega__foot-link {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 800; color: var(--deep-blue);
  text-decoration: none;
}
#sf-nav .nv-mega__foot-link .sf-icon { width: 16px; height: 16px; }
#sf-nav .nv-mega__foot-link:hover { color: var(--blue-hover); }
#sf-nav .nv-mega__sub-cta:focus-visible,
#sf-nav .nv-mega__foot-link:focus-visible {
  outline: 2px solid var(--deep-blue); outline-offset: 2px;
}

/* P0-5 (+ M1-r2-15): touch screens (landscape tablets at 1024+) get 44px
   rows; mouse desktops keep the compact menu. */
@media (hover: none), (pointer: coarse) {
  #sf-nav .nv-mega__cat,
  #sf-nav .nv-mega__sub-link,
  #sf-nav .nv-mega__sub-cta,
  #sf-nav .nv-mega__foot-link { min-height: 44px; }
  #sf-nav .nv-mega__cat { padding-top: 6px; padding-bottom: 6px; }
  #sf-nav .nv-mega__cats { max-height: min(400px, calc(100vh - 300px)); }
}

/* Search — the primary control: fills the middle, larger, calm.
   V4: a real field (form.nv-search) with the suggestion list dropping down
   from it (portal-quicksearch.css). On /search/ it stays a jump link
   (a.nv-search--page). */
#sf-nav .nv-search {
  position: relative;
  flex: 1; max-width: 640px; min-width: 0; display: flex; align-items: center; gap: 10px;
  min-height: 44px; background: var(--strip); border: 1px solid var(--card-border);
  border-radius: var(--r-btn); padding: 0 6px 0 16px; margin: 0;
  font-size: 15px; color: var(--muted); font-weight: 600; text-decoration: none;
}
#sf-nav a.nv-search { padding: 10px 18px; cursor: pointer; }
#sf-nav .nv-search:hover { background: var(--white); border-color: var(--blue-border); }
#sf-nav .nv-search:focus-within { background: var(--white); border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-tint); }
#sf-nav .nv-search-icon { color: var(--muted-2); }
#sf-nav .nv-search__icon { display: inline-flex; flex: none; }
#sf-nav .nv-search__input {
  flex: 1; min-width: 0; height: 42px; border: 0; outline: 0; background: transparent;
  font: 600 15px var(--font); color: var(--ink); padding: 0;
  -webkit-appearance: none; appearance: none;
}
#sf-nav .nv-search__input::placeholder { color: var(--muted); opacity: 1; }
#sf-nav .nv-search__input::-webkit-search-cancel-button,
#sf-nav .nv-search__input::-webkit-search-decoration { -webkit-appearance: none; }
/* The phone opener (icon button) and the sheet's close button only show in
   their own states (below). */
#sf-nav .nv-search__open,
#sf-nav .nv-search__close { display: none; }
#sf-nav .nv-search__open,
#sf-nav .nv-search__close {
  align-items: center; justify-content: center; flex: none;
  width: 44px; height: 44px; padding: 0; border: 0; border-radius: var(--r-btn);
  background: transparent; color: var(--muted); cursor: pointer;
}
#sf-nav .nv-search__open:hover,
#sf-nav .nv-search__close:hover { background: var(--blue-tint); color: var(--ink); }
#sf-nav .nv-search__open:focus-visible,
#sf-nav .nv-search__close:focus-visible { outline: 2px solid var(--deep-blue); outline-offset: 2px; }

/* S1: "For business" and "Plans" text links (visitors and members without
   a plan). From 1200px; below that they live in the Explore menu. */
#sf-nav .nv-links { display: flex; align-items: center; gap: 4px; flex: none; }
#sf-nav .nv-link {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px;
  border-radius: var(--r-btn); font-size: 15px; font-weight: 800; color: var(--ink);
  text-decoration: none; white-space: nowrap;
}
#sf-nav .nv-link:hover { background: var(--blue-tint); color: var(--deep-blue); }
#sf-nav .nv-link.is-current { color: var(--deep-blue); }
#sf-nav .nv-link:focus-visible { outline: 2px solid var(--deep-blue); outline-offset: 2px; }
@media (max-width: 1199px) {
  #sf-nav .nv-links { display: none; }
}

/* Right cluster */
#sf-nav .nv-actions { display: flex; align-items: center; gap: 12px; flex: none; margin-left: auto; }
/* Full-width header: the links + actions cluster sits flush at the right
   edge (same 40px side padding as the logo on the left); the search keeps
   its 640px cap and the free space opens up between it and the cluster. */
#sf-nav .nv-search ~ .nv-links { margin-left: auto; }
#sf-nav .nv-search ~ .nv-links + .nv-actions { margin-left: 0; }
/* S1: Log in is a light button next to the red Start. */
#sf-nav .nv-login {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px;
  padding: 0 20px; border-radius: var(--r-pill); background: var(--blue-fill); color: var(--deep-blue);
  font-size: 15px; font-weight: 800; cursor: pointer; text-decoration: none; white-space: nowrap;
}
#sf-nav .nv-login:hover { background: var(--blue-border); color: var(--deep-blue); }
#sf-nav .nv-cta { padding: 11px 24px; min-height: 44px; }
#sf-nav .nv-avatar {
  width: 44px; height: 44px; flex: none; border-radius: 50%; background: var(--blue-fill); color: var(--deep-blue);
  font: 900 14px var(--font); display: grid; place-items: center; cursor: pointer;
  border: 2px solid var(--blue-border); text-decoration: none;
}
#sf-nav .nv-bell {
  display: inline-flex; align-items: center; justify-content: center; position: relative;
  min-width: 44px; min-height: 44px; border-radius: var(--r-btn);
  color: var(--muted); cursor: pointer;
}
#sf-nav .nv-bell:hover { color: var(--deep-blue); }
/* Cart icon (template-parts/cart/menu-icon.php): only shown once something
   is in the cart; opens the cart dialog. 44px target, badge like the bell's. */
#sf-nav .nv-cart {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; min-height: 44px; border-radius: var(--r-btn); color: var(--muted);
}
#sf-nav .nv-cart[hidden] { display: none; }
#sf-nav .nv-cart .sf-icon { width: 24px; height: 24px; }
#sf-nav .nv-cart:hover { color: var(--deep-blue); }
#sf-nav .nv-cart:focus-visible { outline: 2px solid var(--deep-blue); outline-offset: 2px; }
#sf-nav .nv-cart .sf-cart-icon__count {
  position: absolute; top: 4px; right: 2px; pointer-events: none;
  min-width: 18px; height: 18px; padding: 0 4px; box-sizing: border-box;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--r-pill); box-shadow: 0 0 0 2px var(--white);
  background: var(--deep-blue); color: var(--white);
  font: 900 13px var(--font); line-height: 1;
}
#sf-nav .nv-bell__badge {
  position: absolute; top: 4px; right: 2px;
  min-width: 18px; height: 18px; padding: 0 4px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--r-pill); box-shadow: 0 0 0 2px var(--white);
  background: var(--deep-blue); color: var(--white);
  font: 900 13px var(--font); line-height: 1;
}
/* S3: one compact chip for streak + level; details in a popover. */
#sf-nav .nv-progress { position: relative; flex: none; }
#sf-nav .nv-progress__chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px;
  border: 1px solid var(--card-border); border-radius: var(--r-pill); background: var(--white);
  font: 900 14px var(--font); color: var(--ink); cursor: pointer; white-space: nowrap;
}
#sf-nav .nv-progress__chip:hover,
#sf-nav .nv-progress__chip[aria-expanded="true"] { border-color: var(--blue-border); background: var(--blue-tint); }
#sf-nav .nv-progress__chip:focus-visible { outline: 2px solid var(--deep-blue); outline-offset: 2px; }
#sf-nav .nv-progress__streak { display: inline-flex; align-items: center; gap: 3px; color: var(--amber-text-2); }
#sf-nav .nv-progress__streak .sf-icon { width: 16px; height: 16px; }
#sf-nav .nv-progress__sep { color: var(--muted-2); }
#sf-nav .nv-progress__level { color: var(--deep-blue); }
#sf-nav .nv-progress__pop {
  position: absolute; top: calc(100% + 10px); right: 0; z-index: 60;
  width: 280px; padding: 16px 18px; box-sizing: border-box;
  background: var(--white); border: 1px solid var(--card-border); border-radius: var(--r-card);
  box-shadow: var(--shadow-pop);
}
#sf-nav .nv-progress__pop[hidden] { display: none; }
#sf-nav .nv-progress__title { margin: 0 0 10px; font-size: 15px; font-weight: 900; color: var(--ink); }
#sf-nav .nv-progress__rank {
  display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: var(--r-pill);
  background: var(--blue-fill); color: var(--deep-blue); font-size: 13px; font-weight: 800; vertical-align: 1px;
}
#sf-nav .nv-progress__bar { height: 8px; border-radius: var(--r-pill); background: var(--blue-fill); overflow: hidden; }
#sf-nav .nv-progress__bar > span { display: block; height: 100%; border-radius: inherit; background: var(--blue); }
#sf-nav .nv-progress__meta { margin: 8px 0 0; font-size: 14px; font-weight: 700; color: var(--muted); }
#sf-nav .nv-progress__streak-line {
  display: flex; align-items: flex-start; gap: 8px; margin: 14px 0 0; padding-top: 12px;
  border-top: 1px solid var(--card-border); font-size: 14px; font-weight: 700; color: var(--ink);
}
#sf-nav .nv-progress__streak-line .sf-icon { flex: none; width: 18px; height: 18px; color: var(--amber-text-2); }
#sf-nav .nv-progress__link {
  display: inline-flex; align-items: center; min-height: 44px; margin-top: 4px;
  font-size: 14px; font-weight: 800; color: var(--deep-blue); text-decoration: none;
}
#sf-nav .nv-progress__link:hover { color: var(--blue-hover); }
#sf-nav .nv-progress__link:focus-visible { outline: 2px solid var(--deep-blue); outline-offset: 2px; }

/* The one menu button (D1 A-left) — first in the row, left of the logo.
   Hidden on desktop, shown below 1024px (D2) where it replaces the Explore
   mega-menu + the row's Log in link. Logged in it opens the role drawer,
   logged out the visitor drawer. Padding/border reset because it also
   carries .portal__menu-toggle (the role drawer opener's class). */
#sf-nav .nv-menu-toggle {
  display: none; align-items: center; justify-content: center; flex: none;
  width: 44px; height: 44px; min-width: 44px; min-height: 44px; padding: 0;
  margin-left: -10px;
  border: none; border-radius: var(--r-btn); background: transparent;
  color: var(--ink); cursor: pointer;
}
#sf-nav .nv-menu-toggle:hover { background: var(--blue-tint); }

/* A7: a visible keyboard focus ring on every header control (the toggle
   used outline:none on a 1.06:1 tint before). */
#sf-nav .nv-menu-toggle:focus-visible,
#sf-nav .nv-logo:focus-visible,
#sf-nav .nv-search:focus-visible,
#sf-nav .nv-search-jump:focus-visible,
#sf-nav .nv-bell:focus-visible,
#sf-nav .nv-avatar:focus-visible,
#sf-nav .nv-login:focus-visible,
#sf-nav .nv-cta:focus-visible,
#sf-nav .nv-explore-toggle:focus-visible {
  outline: 2px solid var(--deep-blue); outline-offset: 2px;
}

/* D6: "Search courses" in the browse surfaces' dock slot, below 1024px.
   Jumps to and focuses the page's own finder (browse.js). M7-r2-25: a
   compact 44px icon (same treatment as the /search/ header, S6-r2-10), not
   a second search field directly above the finder. The accessible name
   stays "Search courses" (aria-label). */
#sf-nav .nv-search-jump { display: none; }
@media (max-width: 1023px) {
  #sf-nav .nv-search-jump:not([hidden]) {
    display: flex; align-items: center; justify-content: center; flex: none;
    width: 44px; height: 44px; min-height: 44px; padding: 0;
    background: transparent; border: 1px solid transparent; border-radius: var(--r-btn);
    color: var(--muted); cursor: pointer;
  }
  #sf-nav .nv-search-jump .nv-search-icon { color: var(--muted); }
  #sf-nav .nv-search-jump__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  #sf-nav .nv-search-jump:hover { background: var(--blue-tint); }
  /* Docked finder controls never show below 1024 (browse.js), so the slot
     only holds this button there. */
  #sf-nav .nv-dock-slot { justify-content: flex-end; }
}

/* ============================================================
   Visitor off-canvas drawer (#nv-drawer). Left-side panel + scrim,
   toggled by nv-mobile.js via the .is-open class. Kept in the DOM at
   all times (visibility + pointer-events, not display) so the slide
   transition can animate and focus can leave cleanly.
   ============================================================ */
.nv-drawer {
  position: fixed; inset: 0; z-index: 1150;
  visibility: hidden; pointer-events: none;
  /* A17: clip the off-screen panel so it never adds page overflow. */
  overflow: hidden;
}
@media (min-width: 1024px) {
  .nv-drawer { display: none; }
}
.nv-drawer.is-open { visibility: visible; pointer-events: auto; }
.nv-drawer__scrim {
  position: absolute; inset: 0; background: var(--overlay);
  opacity: 0; transition: opacity .2s ease;
}
.nv-drawer.is-open .nv-drawer__scrim { opacity: 1; }
/* D1 A-left: the visitor drawer slides in from the left, like the role
   drawer and the desktop sidebar. */
.nv-drawer__panel {
  position: absolute; top: 0; left: 0; bottom: 0;
  width: 320px; max-width: 86vw; overflow-y: auto;
  background: var(--white); border-right: 1px solid var(--card-border);
  display: flex; flex-direction: column;
  transform: translateX(-100%);
  transition: transform .25s ease;
}
.nv-drawer.is-open .nv-drawer__panel { transform: translateX(0); box-shadow: var(--shadow-pop); }
@media (prefers-reduced-motion: reduce) {
  .nv-drawer__scrim, .nv-drawer__panel { transition: none; }
}
/* P0-9: the head (with Close) stays at the top while the drawer scrolls. */
.nv-drawer__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 10px 14px 20px; border-bottom: 1px solid var(--card-border);
  flex: none;
  position: sticky; top: 0; z-index: 1; background: var(--white);
}
.nv-drawer__title { font-size: 15px; font-weight: 900; color: var(--ink); }
.nv-drawer__close {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border: none; border-radius: var(--r-btn);
  background: transparent; color: var(--muted-2); cursor: pointer;
}
.nv-drawer__close:hover { background: var(--blue-tint); color: var(--ink); }
@media (hover: none) {
  /* P0-13: no sticky hover tint after a tap. */
  .nv-drawer__close:hover { background: transparent; color: var(--muted-2); }
}
.nv-drawer a:focus-visible,
.nv-drawer button:focus-visible,
.nv-drawer summary:focus-visible { outline: 2px solid var(--deep-blue); outline-offset: 2px; border-radius: var(--r-btn); }
.nv-drawer__body {
  display: flex; flex-direction: column; gap: 24px;
  padding: 20px 20px 28px;
}
.nv-drawer__search {
  display: flex; align-items: center; gap: 10px;
  min-height: 44px; background: var(--page); border: 1px solid var(--card-border);
  border-radius: var(--r-btn); padding: 10px 14px;
  font-size: 14px; font-weight: 600; color: var(--muted-2);
  text-decoration: none; cursor: pointer;
}
.nv-drawer__search:hover,
.nv-drawer__search:focus-visible { background: var(--white); border-color: var(--blue-border); outline: none; }
.nv-drawer__cats,
.nv-drawer__pages { display: flex; flex-direction: column; }
/* A5/A10: 12px, --muted (was 11px --faint). */
.nv-drawer__section-label {
  margin: 0 0 8px; font-size: 13px; font-weight: 900; color: var(--muted);
}
.nv-drawer__page {
  display: flex; align-items: center; gap: 12px; min-height: 44px;
  padding: 4px 2px; font-size: 15px; font-weight: 700; color: var(--ink);
  text-decoration: none; border-bottom: 1px solid var(--card-border);
}
.nv-drawer__page:last-child { border-bottom: none; }
.nv-drawer__page .sf-icon { color: var(--deep-blue); }
@media (hover: hover) { .nv-drawer__page:hover { color: var(--blue-hover); } }
/* M8-r2-13: the Explore page being viewed. */
.nv-drawer__page.is-current {
  color: var(--deep-blue); font-weight: 800;
  background: var(--blue-fill); border-radius: var(--r-btn);
  padding-left: 10px; padding-right: 10px; margin: 0 -10px;
}
.nv-drawer__cat { border-bottom: 1px solid var(--card-border); }
.nv-drawer__cat > summary { list-style: none; justify-content: space-between; cursor: pointer; border-bottom: none; }
.nv-drawer__cat > summary::-webkit-details-marker { display: none; }
.nv-drawer__cat-caret { flex: none; color: var(--muted-2); transition: transform .15s ease; }
.nv-drawer__cat[open] .nv-drawer__cat-caret { transform: rotate(180deg); }
.nv-drawer__subs { list-style: none; margin: 0 0 8px; padding: 0 0 0 12px; }
.nv-drawer__sub-link {
  display: flex; align-items: center; min-height: 44px; padding: 0 2px;
  font-size: 14px; font-weight: 600; color: var(--ink); text-decoration: none;
}
@media (hover: hover) { .nv-drawer__sub-link:hover { color: var(--blue-hover); } }
.nv-drawer__sub-all { font-weight: 800; color: var(--deep-blue); }
@media (prefers-reduced-motion: reduce) { .nv-drawer__cat-caret { transition: none; } }
.nv-drawer__cat-link {
  display: flex; align-items: center; min-height: 44px;
  padding: 4px 2px; font-size: 15px; font-weight: 700; color: var(--ink);
  text-decoration: none; border-bottom: 1px solid var(--card-border);
}
.nv-drawer__cat-link:last-child { border-bottom: none; }
@media (hover: hover) { .nv-drawer__cat-link:hover { color: var(--blue-hover); } }
/* The open category reads as the current one (AA deep blue). */
.nv-drawer__cat[open] > summary { color: var(--deep-blue); }
.nv-drawer__all { font-weight: 800; color: var(--deep-blue); }
.nv-drawer__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.nv-drawer__login {
  display: flex; align-items: center; justify-content: center;
  min-height: 44px; font-size: 15px; font-weight: 800; color: var(--ink);
  text-decoration: none; border: 1px solid var(--card-border); border-radius: var(--r-btn);
}
@media (hover: hover) { .nv-drawer__login:hover { color: var(--blue-hover); border-color: var(--blue-border); } }
.nv-drawer__cta { justify-content: center; text-align: center; min-height: 44px; }

/* Header responsive (D2): one switch at 1024px.
   >=1024  desktop: Explore mega-menu, search field, bell, avatar (unchanged).
   600-1023 menu button + logo + full search field + actions.
   <=599   compact: the search becomes a 44px icon button (A9).
   --sf-nav-h follows the rendered height so sticky children (course section
   nav, browse finder) keep sitting flush under the header (A1). */
@media (max-width: 1023px) {
  :root { --sf-nav-h: 65px; }
  #sf-nav { gap: 12px; padding: 10px 20px; }
  #sf-nav .nv-logo img { height: 36px; }
  #sf-nav .nv-search { font-size: 14px; padding: 0 6px 0 14px; }
  #sf-nav a.nv-search { padding: 10px 14px; }
  #sf-nav .nv-search__input { font-size: 14px; }
  #sf-nav .nv-actions { gap: 8px; }
  #sf-nav .nv-explore { display: none; }
  /* R2-D1: returning visitors keep a header "Log in" below 1024px too. */
  #sf-nav .nv-login { min-width: 44px; justify-content: center; }
  #sf-nav .nv-menu-toggle { display: inline-flex; }
  /* S6-r2-10: on /search/ the page has its own field; the header search is
     only a jump to it, so it stays an icon (no second field above it). */
  #sf-nav .nv-search--page {
    flex: none; margin-left: auto; width: 44px; max-width: none; padding: 0;
    justify-content: center; background: transparent; border-color: transparent;
  }
  #sf-nav .nv-search--page span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
@media (max-width: 599px) {
  :root { --sf-nav-h: 57px; }
  #sf-nav { gap: 4px; padding: 6px 12px; }
  #sf-nav .nv-menu-toggle { margin-left: -6px; }
  #sf-nav .nv-logo img { height: 30px; }
  #sf-nav .nv-actions { gap: 4px; margin-left: 0; }
  /* A9 / V4: the field becomes a 44px icon that opens the full-screen
     search sheet (portal-quicksearch.js). */
  #sf-nav .nv-search:not(.is-sheet) {
    flex: none; margin-left: auto; width: 44px; max-width: none; padding: 0;
    justify-content: center; background: transparent; border-color: transparent;
    box-shadow: none; color: var(--muted);
  }
  #sf-nav .nv-search:not(.is-sheet) .nv-search__icon,
  #sf-nav .nv-search:not(.is-sheet) .nv-search__input { display: none; }
  #sf-nav .nv-search:not(.is-sheet) .nv-search__open { display: inline-flex; }
  #sf-nav .nv-search .nv-search-icon { color: var(--muted); }
  #sf-nav a.nv-search span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  #sf-nav .nv-progress__chip { padding: 0 8px; gap: 4px; }
  /* Streak only (the level stays when there is no streak to show). */
  #sf-nav .nv-progress__sep,
  #sf-nav .nv-progress__sep + .nv-progress__level { display: none; }
  #sf-nav .nv-cta { padding: 9px 16px; }
  #sf-nav .nv-login { padding: 0 12px; font-size: 14px; }
}
@media (max-width: 359px) {
  /* Narrow phones: the logo gives way so Log in + Start still fit. */
  #sf-nav .nv-logo img { height: 26px; }
  #sf-nav .nv-cta { padding: 9px 12px; }
}

/* Learner drawer appended on pages without a portal shell (nav-top.php).
   Its stylesheet (portal-shell.css) prints late, in the footer; keep the
   closed drawer out of view until then. */
.sf-role-drawer-host .portal__sidebar { position: fixed; top: 0; left: 0; visibility: hidden; }
@media (min-width: 1024px) { .sf-role-drawer-host { display: none; } }

/* flow / minimal nav */
#sf-nav.nav-flow { justify-content: space-between; }
#sf-nav.nav-flow .nv-exit { font-size:14px; font-weight:800; color:var(--muted-2); cursor:pointer; }
#sf-nav.nav-flow .nv-exit:hover { color: var(--blue); }

/* ---------- Sidebar (portal / instructor / manager) ---------- */
#sf-sidebar {
  width: 240px; background: var(--white); border-right: 1px solid var(--card-border);
  min-height: calc(100vh - 39px); padding: 18px 14px; position: sticky; top: 39px;
  align-self: stretch;
}
.sb-profile { display:flex; align-items:center; gap:10px; padding:6px 8px 16px; border-bottom:1px solid var(--card-border); margin-bottom:14px; }
.sb-profile .av { width:36px;height:36px;border-radius:50%;background:var(--blue-fill);color:var(--deep-blue);font:900 14px var(--font);display:grid;place-items:center; }
.sb-profile .nm { font:900 14px var(--font); color:var(--ink); }
.sb-profile .rk { font:700 12px var(--font); color:var(--muted-2); }
.sb-group { font-size:11px; font-weight:900; color:var(--faint); padding:16px 10px 8px; }
.sb-group:first-of-type { padding-top: 4px; }
.sb-nav { display:flex; flex-direction:column; gap:2px; }
.sb-item {
  display:flex; align-items:center; gap:10px; padding:9px 10px; border-radius:10px;
  font:700 14px var(--font); color:var(--near-ink); cursor:pointer;
}
.sb-item:hover { background: var(--blue-tint); }
.sb-item.on { background: var(--blue-fill); color: var(--deep-blue); font-weight: 800; }
.sb-item .sb-tag { margin-left:auto; }

/* ---------- Footer (marketing) — S6 C ----------
   .com brand row on top, four .nl-style link columns, .nl bottom bar. */
#sf-footer { background: var(--ink); color: var(--white); padding: 48px 64px 28px; }
#sf-footer .ft-brand,
#sf-footer .ft-cols,
#sf-footer .ft-bottom { max-width: 1200px; margin-left: auto; margin-right: auto; }
#sf-footer .ft-brand {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px;
  padding-bottom: 28px; margin-bottom: 32px; border-bottom: 1px solid var(--on-navy-line);
}
#sf-footer .ft-logo img { display: block; height: 28px; width: auto; }
#sf-footer .ft-tagline { margin: 0; max-width: 320px; color: var(--faint); font-size: 14px; font-weight: 600; line-height: 1.5; }
#sf-footer .ft-rating {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px;
  border-radius: var(--r-pill); background: var(--on-navy-fill);
  font-size: 13px; font-weight: 800; color: var(--white);
}
#sf-footer .ft-rating .sf-icon { color: var(--star); }
#sf-footer .ft-brand .sf-lang { margin-left: auto; }
#sf-footer .ft-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; }
#sf-footer .ft-heading { font-size: 14px; font-weight: 800; color: var(--blue-on-navy); margin: 0 0 12px; }
/* Footer nav columns are <ul> lists (menu or fallback) — reset list defaults */
#sf-footer ul { list-style: none; margin: 0; padding: 0; }
#sf-footer li { list-style: none; display: block; margin: 0; padding: 0; }
#sf-footer a { display: block; color: var(--blue-fill); font-size: 14px; font-weight: 600; padding: 5px 0; text-decoration: none; }
#sf-footer a:hover { color: var(--white); }
#sf-footer .ft-socials { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
#sf-footer .ft-socials a {
  display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0;
  border-radius: 50%; background: var(--on-navy-fill); color: var(--white);
}
#sf-footer .ft-apps { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-top: 14px; }
#sf-footer .ft-app {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 4px 14px 4px 12px;
  border: 1px solid var(--on-navy-line); border-radius: var(--r-btn); background: var(--on-navy-fill);
  color: var(--white); font-size: 14px; font-weight: 800; line-height: 1.1;
}
#sf-footer .ft-app small { display: block; font-size: 11px; font-weight: 600; color: var(--faint); }
#sf-footer .ft-app .sf-icon { width: 20px; height: 20px; }
#sf-footer .ft-app:hover { border-color: var(--blue-on-navy); color: var(--white); }
#sf-footer .ft-bottom {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px;
  margin-top: 32px; padding-top: 18px; border-top: 1px solid var(--on-navy-line);
  font-size: 14px; color: var(--faint); font-weight: 700;
}
#sf-footer .ft-marks { display: inline-flex; align-items: center; gap: 8px; }
#sf-footer .ft-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; min-height: 44px; padding: 3px; box-sizing: border-box;
  border-radius: var(--r-btn); background: var(--white);
}
#sf-footer .ft-mark img { width: 100%; height: 100%; object-fit: contain; display: block; color: var(--ink); font-size: 11px; }
#sf-footer .ft-legal { display: flex; flex-wrap: wrap; gap: 0 20px; margin-left: auto; }
#sf-footer .ft-legal a { display: inline-flex; align-items: center; min-height: 44px; padding: 0; }

/* Footer language switch (template-parts/chrome/language-switch.php): a
   menu button that names this site's language, as a white pill on the navy
   footer; it opens the list of Soofos sites above it. The slim account
   footer styles the same button in portal-shell.css; the list (.sf-lang__menu)
   is the same in both. */
#sf-footer .sf-lang-switch {
  display:inline-flex; align-items:center; gap:5px; width:max-content;
  box-sizing:border-box; min-height:33px; padding:0 12px;
  background:var(--white); color:var(--ink); border:1.5px solid var(--white); border-radius:var(--r-pill);
  font-family:inherit; font-size:14px; font-weight:700; line-height:1; text-decoration:none; cursor:pointer;
  transition: border-color .15s ease;
}
.sf-lang { position:relative; display:inline-flex; flex-direction:column; align-items:flex-start; }
.sf-lang-switch__chevron { width:14px; height:14px; transition:transform .15s ease; }
.sf-lang-switch[aria-expanded="true"] .sf-lang-switch__chevron { transform:rotate(180deg); }
:is(#sf-footer, .sf-footer-slim, .sf-lang) .sf-lang__menu {
  box-sizing:border-box; min-width:200px; margin:8px 0 0; padding:6px; list-style:none;
  background:var(--white); border:1px solid var(--card-border); border-radius:var(--r-card-sm);
  box-shadow:var(--shadow-pop); text-align:left;
}
:is(#sf-footer, .sf-footer-slim, .sf-lang) .sf-lang__menu[hidden] { display:none; }
.sf-lang .sf-lang__menu li { margin:0; padding:0; }
/* With JavaScript the list floats above the button (footers sit at the bottom of the page). */
:is(#sf-footer, .sf-footer-slim) .sf-lang--js .sf-lang__menu { position:absolute; z-index:60; right:0; bottom:calc(100% + 8px); margin:0; }
:is(#sf-footer, .sf-footer-slim) .sf-lang--js.sf-lang--start .sf-lang__menu { right:auto; left:0; }
:is(#sf-footer, .sf-footer-slim, .sf-lang) .sf-lang__item {
  display:flex; align-items:center; gap:10px; min-height:44px; padding:0 12px;
  border-radius:var(--r-btn); color:var(--ink); font-size:14px; font-weight:700; line-height:1.2;
  text-decoration:none; white-space:nowrap;
}
:is(#sf-footer, .sf-footer-slim, .sf-lang) .sf-lang__item:hover { background:var(--blue-fill); color:var(--ink); }
:is(#sf-footer, .sf-footer-slim, .sf-lang) .sf-lang__item.is-current { background:var(--blue-tint); }
:is(#sf-footer, .sf-footer-slim, .sf-lang) .sf-lang__item:focus-visible { outline:2px solid var(--blue); outline-offset:-2px; }
.sf-lang__flag { font-size:18px; line-height:1; }
.sf-lang__name { flex:1 1 auto; }
.sf-lang .sf-lang__mark { flex:none; width:16px; height:16px; color:var(--muted); }
.sf-lang .is-current .sf-lang__mark { color:var(--deep-blue); }
@media (prefers-reduced-motion: reduce) { .sf-lang-switch__chevron { transition:none; } }
#sf-footer .sf-lang-switch:hover { border-color:var(--blue); color:var(--ink); }
#sf-footer .sf-lang-switch:focus-visible { outline:2px solid var(--blue); outline-offset:3px; }
#sf-footer .sf-lang-switch__globe { width:15px; height:15px; color:var(--blue); }
@media (prefers-reduced-motion: reduce) { #sf-footer .sf-lang-switch { transition:none; } }

/* Footer responsive: the 5-track grid never fit small screens — columns
   clipped out of view and the bottom bar wrapped word-per-line. */
/* A8: legal row items and the outline heart; NRTO mark readable if its
   remote image fails. */
#sf-footer a:focus-visible { outline: 2px solid var(--blue-fill); outline-offset: 2px; }
@media (max-width: 1023px) {
  #sf-footer .ft-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  #sf-footer { padding: 40px 28px 28px; }
  /* A8: 44px link rows (were 27px). */
  #sf-footer .ft-list a { display: flex; align-items: center; min-height: 44px; padding: 0; }
  #sf-footer .ft-brand .sf-lang { margin-left: 0; }
  #sf-footer .ft-made { flex-basis: 100%; }
  #sf-footer .ft-legal { margin-left: 0; }
}
@media (max-width: 460px) {
  #sf-footer { padding: 34px 20px 24px; }
  #sf-footer .ft-cols { gap: 24px; }
}
/* M1-r2-15 / P0-11: 44px link rows wherever people tap — below 1024px and
   on touch screens of any width (landscape tablets). The language switch
   follows (was 33px). */
@media (max-width: 1023px), (hover: none), (pointer: coarse) {
  #sf-footer .ft-list a { display: flex; align-items: center; min-height: 44px; padding: 0; }
  #sf-footer .sf-lang-switch { min-height: 44px; padding: 0 16px; }
}

/* ---------- Modal ---------- */
#sf-modal-bg {
  position: fixed; inset: 0; background: rgba(33,52,75,.55); z-index: 1000;
  display: none; align-items: center; justify-content: center; padding: 30px;
}
#sf-modal-bg.on { display: flex; }
#sf-modal {
  background: var(--white); border-radius: 18px; max-width: 640px; width: 100%;
  max-height: 88vh; overflow: auto; box-shadow: 0 24px 60px rgba(33,52,75,.4);
}

/* ---------- Toast ---------- */
#sf-toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: var(--white); padding: 13px 22px; border-radius:8px;
  font: 800 14px var(--font); z-index: 1100; opacity: 0; transition: all .25s; pointer-events: none;
  box-shadow: 0 10px 30px rgba(33,52,75,.35);
}
#sf-toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Variant show/hide helper (shell.js toggles .sf-hidden) ---------- */
.sf-hidden { display: none !important; }

/* ---------- Employee frame: hide all sales / upgrade / buy triggers ----------
   Any upsell, buy, or plan-change element gets class .sales-only so the
   company-provided employee view never shows purchase triggers. */
body[data-persona="employee"] .sales-only { display: none !important; }

/* A1: clip (never scroll) sideways overflow on the frame. `overflow-x: clip`
   does not create a scroll container, so `position: sticky` keeps working for
   #sf-nav and every sticky descendant at every width. (The old <=820px
   `overflow-x: auto` turned the frame into the scroller and silently killed
   sticky on phones and tablets.) Content wider than the screen is a page bug
   to fix where it happens, not something to hide behind a sideways scroll. */
#sf-frame { overflow-x: clip; }

/* ---------- Shared course card (template-parts/card/course-card.php) ----------
   C3 A (wave joris-feedback): .nl content in Calm Workspace style. One card
   site-wide: image with level/duration chips, "New" inline before the title,
   price (sale price in ink, regular struck through, never red), stars +
   (reviews) left and learners right, instructor left and the wishlist heart
   right. The whole card is the link; the heart is a sibling button laid over
   the footer row. All values via tokens. */
.course-card-wrap { position: relative; display: flex; flex-direction: column; min-width: 0; }
.course-card {
  display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0;
  border-radius: var(--r-card-sm); border: 1px solid var(--card-border); background: var(--white);
  overflow: hidden; text-decoration: none; color: inherit;
  transition: box-shadow .18s, border-color .18s;
}
.course-card:hover { box-shadow: var(--shadow-card); border-color: var(--blue-border); }
.course-card:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.course-card__thumb {
  position: relative; aspect-ratio: 16 / 9; background: var(--strip); overflow: hidden;
}
.course-card__thumb img,
.course-card__thumb .ph { width: 100%; height: 100%; object-fit: cover; display: block; }
.course-card__badge {
  position: absolute; top: 8px; left: 8px; z-index: 1;
  padding: 3px 8px; border-radius: var(--r-pill);
  background: var(--blue-fill); color: var(--deep-blue);
  font: 900 12px/1.2 var(--font); letter-spacing: .02em;
}
.course-card__level-chip {
  position: absolute; bottom: 8px; z-index: 1;
  padding: 3px 8px; border-radius: var(--r-pill);
  background: var(--white); color: var(--ink); box-shadow: var(--shadow-soft);
  font: 800 12px/1.2 var(--font); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* The duration lives in the card's size line only (no pill on the image). */
.course-card__level-chip { left: 8px; max-width: calc(100% - 16px); }
.course-card__body { padding: 12px 14px 12px; display: flex; flex-direction: column; gap: 6px; flex: 1 1 auto; }
.course-card__title {
  font-size: 15px; font-weight: 800; color: var(--ink); line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.course-card__new {
  display: inline-block; vertical-align: 1px; margin-right: 2px;
  padding: 1px 7px; border-radius: var(--r-pill);
  background: var(--blue-fill); color: var(--deep-blue);
  font-size: 12px; font-weight: 900; line-height: 1.5;
}
.course-card__progress-bar {
  height: 4px; background: var(--card-border); border-radius: var(--r-pill); overflow: hidden;
}
.course-card__progress-fill {
  height: 100%; background: var(--blue); border-radius: var(--r-pill); transition: width .4s ease;
}
.course-card__price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px; }
.sf-card-price-main { font-size: 16px; font-weight: 900; color: var(--ink); }
.sf-card-price-original { font-size: 13px; font-weight: 700; color: var(--muted); text-decoration: line-through; }
.course-card__proof {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-size: 13px; color: var(--muted); font-weight: 700;
}
.course-card__rating { display: inline-flex; align-items: center; gap: 4px; min-width: 0; }
.course-card__rating-value { color: var(--ink); font-weight: 900; }
.course-card__meta { font-size: 13px; color: var(--muted); font-weight: 700; }
.course-card__students { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; white-space: nowrap; }
.course-card__students-icon { display: inline-flex; }
.course-card__students-icon .sf-icon { width: 15px; height: 15px; }
.sf-stars { position: relative; display: inline-flex; line-height: 0; }
.sf-stars__track,
.sf-stars__fill { display: inline-flex; gap: 1px; }
.sf-stars .sf-icon { width: 13px; height: 13px; stroke-width: 1.5; }
.sf-stars__track { color: var(--star-track); }
.sf-stars__track .sf-icon { fill: currentColor; color: var(--card-border); }
.sf-stars__fill {
  position: absolute; inset: 0 auto 0 0; overflow: hidden;
  width: var(--sf-stars-fill, 0%); color: var(--star);
}
.sf-stars__fill .sf-icon { fill: currentColor; }
.course-card__instructor {
  display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 4px;
  min-height: 28px; font-size: 13px; font-weight: 700; color: var(--muted);
}
.course-card-wrap.has-save .course-card__instructor { padding-right: 40px; }
.course-card__instructor-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.course-card__avatar {
  width: 24px; height: 24px; flex: none; border-radius: 50%; object-fit: cover;
}
.course-card__avatar--initial {
  display: grid; place-items: center; background: var(--blue-fill); color: var(--deep-blue);
  font-size: 12px; font-weight: 900;
}
/* Wishlist heart: a sibling of the card link, laid over the footer row. 44px
   hit area; outline at rest, filled brand blue once saved (red is reserved
   for purchase/destructive). */
.course-card__save {
  position: absolute; right: 4px; bottom: 2px; z-index: 2;
  width: 44px; height: 44px; border: 0; border-radius: 50%;
  background: transparent; color: var(--muted-2); cursor: pointer;
  display: grid; place-items: center; transition: color .15s ease, background .15s ease;
}
.course-card__save:hover { color: var(--deep-blue); background: var(--blue-fill); }
.course-card__save:focus-visible { outline: 3px solid var(--blue); outline-offset: -3px; }
.course-card__save.is-wishlisted { color: var(--deep-blue); }
.course-card__save.is-wishlisted .sf-icon { fill: currentColor; }
.course-card__save .sf-icon { width: 20px; height: 20px; }
/* The "Included" chip in a card's price slot (soofos_browse_included_chip()):
   brand blue tint, not success green (M7-r2-17). */
.sf-included-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: var(--r-pill);
  background: var(--blue-fill); color: var(--deep-blue);
  font: 800 13px/1.2 var(--font); white-space: nowrap;
}
.sf-included-chip__icon { display: inline-flex; line-height: 0; }
.sf-included-chip .sf-icon { width: 14px; height: 14px; }
@media (prefers-reduced-motion: reduce) {
  .course-card, .course-card__save, .course-card__progress-fill { transition: none; }
}

/* ---------- Cookie notice (Klaro, maatos-analytics) — D7 option A ----------
   Theme style override only; the consent plugin and its logic are untouched.
   The notice root used to be a transparent full-screen layer (z 1e8) that
   swallowed every tap until a choice was made. Now it is a compact card at
   the bottom and the page stays usable behind it. "Accept all" uses the brand
   blue (deep blue: AA with white text), "I decline" is an equal-size neutral
   button (green is reserved for success). #klaro raises specificity over the
   plugin sheet, which loads later (async). */
/* P0-1: the card sits under every modal layer — header 800 < card 905 <
   role-drawer scrim 910 / drawer 920 < modals 1000 < visitor drawer 1150 <
   search overlay 1200 — so an open drawer or the search covers it instead
   of the card hiding their last rows. (The plugin puts it at 1e8.) */
#klaro .cookie-notice:not(.cookie-modal-notice):not(.cn-embedded) {
  top: auto; bottom: 0; left: 0; right: 0; height: auto;
  background: none; pointer-events: none;
  z-index: 905;
}
#klaro .cookie-notice:not(.cookie-modal-notice):not(.cn-embedded) .cn-body {
  pointer-events: auto;
  left: 0; right: 0; bottom: 0;
  width: calc(100% - 24px); max-width: 640px;
  margin: 0 auto calc(12px + env(safe-area-inset-bottom, 0px));
  padding: 12px 14px; gap: 8px;
  background: var(--white); border: 1px solid var(--card-border);
  border-radius: var(--r-card-sm); box-shadow: var(--shadow-pop);
  font: 600 14px/1.35 var(--font); color: var(--ink);
}
#klaro .cookie-notice:not(.cookie-modal-notice) .cn-body p { margin: 0; color: var(--ink); }
/* P0-1: the privacy-policy link (TrackingConsent::localize_klaro_copy). */
#klaro .cookie-notice:not(.cookie-modal-notice) .cn-body p a {
  color: var(--deep-blue); font-weight: 800; text-decoration: underline;
}
/* Short copy on narrow phones (two lines instead of five). */
#klaro .sf-cn-short { display: none; }
@media (max-width: 480px) {
  #klaro .sf-cn-long { display: none; }
  #klaro .sf-cn-short { display: inline; }
}
/* While the card shows, the page end scrolls clear of it (footer legal
   links, the login form's last rows). nv-mobile.js measures the card into
   --sf-consent-h; pages without it (login) use the fallback. Pages with the
   marketing footer extend the footer itself, so the reserve reads as
   footer, not as a blank band under it. */
body:has(#klaro .cookie-notice:not(.cookie-modal-notice):not(.cn-embedded):not(.cookie-notice-hidden)) {
  padding-bottom: var(--sf-consent-h, 160px);
}
body:has(#sf-footer):has(#klaro .cookie-notice:not(.cookie-modal-notice):not(.cn-embedded):not(.cookie-notice-hidden)) {
  padding-bottom: 0;
}
body:has(#klaro .cookie-notice:not(.cookie-modal-notice):not(.cn-embedded):not(.cookie-notice-hidden)) #sf-footer::after {
  content: ""; display: block; height: var(--sf-consent-h, 160px);
}
/* N1 (WCAG 2.4.11): mid-page, a field that receives keyboard focus is
   scrolled clear of the card instead of landing under it. :has(), not
   .sf-consent-open: standalone templates (/team-signup/, /login/) do not
   load nv-mobile.js and use the fallback (the card measures 126px at 360,
   158px at 768). */
html:has(#klaro .cookie-notice:not(.cookie-modal-notice):not(.cn-embedded):not(.cookie-notice-hidden)) {
  scroll-padding-bottom: var(--sf-consent-h, 160px);
}
/* Course pages: both the card and the sticky buy bar sit at the bottom;
   keep focus clear of whichever reaches higher (course.css rule otherwise
   loses to the one above). */
html.sf-sticky-active:has(#klaro .cookie-notice:not(.cookie-modal-notice):not(.cn-embedded):not(.cookie-notice-hidden)) {
  scroll-padding-bottom: max(var(--sf-consent-h, 160px), calc(var(--sf-sticky-h, 68px) + 8px));
}
/* One row: Preferences, then the two equal-width choices. */
#klaro .cookie-notice:not(.cookie-modal-notice) .cn-body .cn-ok {
  width: 100%; align-items: center; justify-content: space-between;
  flex-direction: row; flex-wrap: wrap; gap: 8px 12px;
}
#klaro .cookie-notice:not(.cookie-modal-notice) .cn-body .cn-ok .cn-buttons {
  flex: 1 1 200px; gap: 8px;
}
@media (max-width: 480px) {
  /* Preferences and both choices on one row at 360+ (card ~112px tall). */
  #klaro .cookie-notice:not(.cookie-modal-notice):not(.cn-embedded) .cn-body { padding: 10px 12px; }
  #klaro .cookie-notice:not(.cookie-modal-notice) .cn-body .cn-ok { gap: 8px; }
  #klaro .cookie-notice:not(.cookie-modal-notice) .cn-body .cn-ok .cn-buttons { flex-basis: 176px; }
  #klaro .cookie-notice:not(.cookie-modal-notice) .cn-body .cn-learn-more { padding: 0 4px; }
  #klaro .cookie-notice:not(.cookie-modal-notice) .cn-body .cn-buttons button.cm-btn { padding: 0 8px; }
}
#klaro .cookie-notice:not(.cookie-modal-notice) .cn-body .cn-buttons button.cm-btn {
  flex: 1; min-height: 44px; padding: 0 12px;
  border-radius: var(--r-btn); box-shadow: none; transform: none;
  font: 800 14px var(--font);
}
#klaro .cookie-notice:not(.cookie-modal-notice) .cn-body .cn-buttons .cm-btn-success {
  background: var(--blue); color: var(--white); border: 1px solid var(--blue);
}
#klaro .cookie-notice:not(.cookie-modal-notice) .cn-body .cn-buttons .cm-btn-success:hover {
  background: var(--ink); border-color: var(--ink); filter: none; transform: none;
}
#klaro .cookie-notice:not(.cookie-modal-notice) .cn-body .cn-buttons .cn-decline {
  background: var(--white); color: var(--ink); border: 1px solid var(--card-border);
  font-weight: 800 !important; /* the plugin forces 500 with !important */
}
#klaro .cookie-notice:not(.cookie-modal-notice) .cn-body .cn-buttons .cn-decline:hover {
  border-color: var(--blue-border); background: var(--blue-tint); filter: none;
}
#klaro .cookie-notice:not(.cookie-modal-notice) .cn-body .cn-learn-more {
  display: inline-flex; align-items: center; min-height: 44px;
  font: 700 14px var(--font); color: var(--deep-blue); text-decoration: underline;
}
#klaro .cookie-notice .cm-btn:focus-visible,
#klaro .cookie-notice .cn-learn-more:focus-visible {
  outline: 2px solid var(--deep-blue); outline-offset: 2px;
}

/* ---------- Klaro "Preferences" modal — P0-2 ----------
   Same treatment as the card: tokens, Mulish, AA text, brand-blue primary,
   neutral toggles (blue on / grey off — green and red are reserved for
   success and destructive), 44px controls, buttons that wrap instead of
   running out of the modal. Focus handling: nv-mobile.js. */
#klaro .cookie-modal { z-index: 1000; }
#klaro .cookie-modal .cm-bg { background: var(--overlay); }
#klaro .cookie-modal .cm-modal.cm-klaro {
  width: calc(100% - 24px); max-width: 640px; max-height: calc(100% - 24px);
  padding: 0; overflow-x: hidden; overflow-y: auto;
  background: var(--white); border: 1px solid var(--card-border);
  border-radius: var(--r-card); box-shadow: var(--shadow-pop);
  font-family: var(--font); color: var(--ink);
}
#klaro .cookie-modal p,
#klaro .cookie-modal li,
#klaro .cookie-modal h1,
#klaro .cookie-modal strong,
#klaro .cookie-modal label { color: var(--ink); font-family: var(--font); }
#klaro .cookie-modal .cm-modal .cm-header { padding: 16px 60px 4px 20px; }
#klaro .cookie-modal .cm-modal .cm-header h1 { font: 900 20px/1.3 var(--font); margin: 0 0 6px; }
#klaro .cookie-modal .cm-modal .cm-header h1:focus { outline: none; }
#klaro .cookie-modal .cm-modal .cm-header h1:focus-visible { outline: 2px solid var(--deep-blue); outline-offset: 2px; }
#klaro .cookie-modal .cm-modal .cm-header p { font: 600 14px/1.5 var(--font); color: var(--muted); margin: 0 0 8px; }
#klaro .cookie-modal .cm-modal .cm-header p a { color: var(--deep-blue); font-weight: 800; text-decoration: underline; }
/* Close: 44px, ink (the plugin's white-on-white 24x20 cross). */
#klaro .cookie-modal .cm-modal .hide {
  top: 8px; right: 8px; width: 44px; height: 44px; padding: 0;
  display: grid; place-items: center; border-radius: var(--r-btn); color: var(--ink);
}
#klaro .cookie-modal .cm-modal .hide svg { stroke: var(--ink); }
#klaro .cookie-modal .cm-modal .cm-body { padding: 8px 20px; border-bottom: 1px solid var(--card-border); }
#klaro .cookie-modal .cm-list-title { font: 800 15px var(--font); color: var(--ink); }
#klaro .cookie-modal .cm-list-description,
#klaro .cookie-modal p.purposes,
#klaro .cookie-modal span.cm-required,
#klaro .cookie-modal span.cm-opt-out { font-size: 14px; line-height: 1.45; color: var(--muted); }
#klaro .cookie-modal .cm-caret a {
  display: inline-flex; align-items: center; gap: 4px; min-height: 44px;
  font: 800 14px var(--font); color: var(--deep-blue);
}
#klaro .cookie-modal .cm-toggle-all { border-top-color: var(--card-border); }
/* Toggles: off grey, on deep blue, partly on / always on mid blue. */
#klaro .cookie-modal .cm-list-label .slider { background-color: var(--muted-2); }
#klaro .cookie-modal .cm-list-input:checked + .cm-list-label .slider { background-color: var(--deep-blue); }
#klaro .cookie-modal .cm-list-input.half-checked:checked + .cm-list-label .slider,
#klaro .cookie-modal .cm-list-input.only-required + .cm-list-label .slider,
#klaro .cookie-modal .cm-list-input.required:checked + .cm-list-label .slider {
  background-color: var(--blue); opacity: 1;
}
/* Partly on ("Enable or disable all" with a mixed selection): an outlined
   pale track with a deep-blue knob in the middle (the plugin centres it), so
   it no longer reads as fully on (solid track, white knob on the right). */
#klaro .cookie-modal .cm-list-input.half-checked:checked + .cm-list-label .slider,
#klaro .cookie-modal .cm-list-input.only-required:not(.required) + .cm-list-label .slider {
  background-color: var(--blue-fill); box-shadow: inset 0 0 0 2px var(--deep-blue);
}
#klaro .cookie-modal .cm-list-input.half-checked:checked + .cm-list-label .slider::before,
#klaro .cookie-modal .cm-list-input.only-required:not(.required) + .cm-list-label .slider::before {
  background-color: var(--deep-blue);
}
#klaro .cookie-modal .cm-list-input:focus-visible + .cm-list-label .slider,
#klaro .cookie-modal .cm-list-label[tabindex]:focus-visible .slider {
  outline: 2px solid var(--deep-blue); outline-offset: 2px;
}
#klaro .cookie-modal .cm-modal .cm-footer { padding: 14px 20px 18px; }
#klaro .cookie-modal .cm-modal .cm-footer-buttons {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end;
}
#klaro .cookie-modal .cm-btn {
  flex: 1 1 auto; min-height: 44px; padding: 0 16px;
  border-radius: var(--r-btn); box-shadow: none; transform: none; filter: none;
  white-space: normal; font: 800 14px var(--font);
}
#klaro .cookie-modal .cm-btn.cm-btn-decline {
  background: var(--white); color: var(--ink); border: 1px solid var(--card-border);
  font-weight: 800 !important; /* the plugin forces 500 with !important */
}
#klaro .cookie-modal .cm-btn.cm-btn-accept {
  background: var(--blue-fill); color: var(--deep-blue); border: 1px solid var(--blue-border);
}
#klaro .cookie-modal .cm-btn.cm-btn-accept-all {
  background: var(--blue); color: var(--white); border: 1px solid var(--blue);
}
#klaro .cookie-modal .cm-btn:hover { transform: none; filter: none; }
#klaro .cookie-modal .cm-btn.cm-btn-decline:hover { background: var(--blue-tint); border-color: var(--blue-border); }
#klaro .cookie-modal .cm-btn.cm-btn-accept:hover { background: var(--blue-tint); }
#klaro .cookie-modal .cm-btn.cm-btn-accept-all:hover { background: var(--ink); border-color: var(--ink); }
#klaro .cookie-modal a:focus-visible,
#klaro .cookie-modal button:focus-visible {
  outline: 2px solid var(--deep-blue); outline-offset: 2px;
}
@media (max-width: 480px) {
  #klaro .cookie-modal .cm-modal .cm-header { padding: 12px 56px 2px 16px; }
  #klaro .cookie-modal .cm-modal .cm-body { padding: 4px 16px; }
  #klaro .cookie-modal .cm-modal .cm-footer { padding: 12px 16px 16px; }
  #klaro .cookie-modal .cm-btn { flex-basis: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  #klaro .cookie-notice, #klaro .cookie-notice .cm-btn { transition: none; animation: none; }
  #klaro .cookie-modal .slider, #klaro .cookie-modal .slider::before, #klaro .cookie-modal .cm-btn { transition: none; }
}

/* ---------- Skip link — P0-11 ---------- */
.sf-skip-link {
  position: absolute; left: 8px; top: -200px; z-index: 1300;
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px;
  background: var(--white); color: var(--deep-blue);
  border: 2px solid var(--deep-blue); border-radius: var(--r-btn);
  font: 800 15px var(--font); text-decoration: none;
}
/* Shown on keyboard focus only (a click or Klaro removing the focused
   card button never reveals it). */
.sf-skip-link:focus-visible { top: 8px; outline: none; box-shadow: var(--shadow-pop); }

/* ---------- Notifications popover — P0-10 ----------
   (notifications.css is the bell's own sheet; these override from the
   shell, which owns the header.) */
#sf-nav .nv-bell-panel__mark-all { min-height: 44px; padding: 0 10px; }
#sf-nav .nv-bell-panel__time { color: var(--muted); }
#sf-nav .nv-bell-panel__heading:focus { outline: none; }
#sf-nav .nv-bell-panel__heading:focus-visible { outline: 2px solid var(--deep-blue); outline-offset: 2px; }
