/* ============================================================
   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: 10.5px top padding + 54px
   logo (.nv-logo img below) + 9.5px bottom padding + 1px border-bottom =
   75px (H22/H26: a bigger logo, the same height, equal room above and
   below the items once the bottom line counts). 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;
}

/* H20/H38: 24px side room and 24px between the groups (logo, Explore +
   search, text links, buttons), 8px inside a group. */
#sf-nav {
  display: flex; align-items: center; gap: 16px;
  background: var(--white); border-bottom: 1px solid var(--card-border);
  padding: 10.5px 24px 9.5px; position: sticky; top: 39px; z-index: 800;
}
@media (min-width: 1200px) {
  #sf-nav { column-gap: 24px; }
}
/* H14: a soft shadow fades in over the first 40px of scroll (nothing moves);
   not with a sticky section menu right under the header (course page). */
@supports (animation-timeline: scroll()) {
  @keyframes nv-lift { to { border-bottom-color: transparent; box-shadow: var(--shadow-card); } }
  #sf-nav { animation: nv-lift linear both; animation-timeline: scroll(root); animation-range: 0 40px; }
  body:has(.sf-section-nav) #sf-nav { animation: none; }
}
/* H87: the logo never shrinks or gets cut off, whatever sits beside it. */
#sf-nav .nv-logo { display: flex; align-items: center; flex: none; min-height: 44px; overflow: visible; text-decoration: none; }
#sf-nav .nv-logo img { height: 54px; width: auto; max-width: none; flex: none; object-fit: contain; 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: var(--sf-adminbar-h, 0px); }
#sf-frame.no-toolbar #sf-sidebar { top: 0; min-height: 100vh; }

/* WP core's #wpadminbar is fixed at the viewport top (32px, 46px <=782px),
   so a sticky element at top:0 slides under it once scrolled; WP's
   html margin-top only offsets the first paint. Below 601px core makes the
   bar position:absolute (it scrolls away), so the offset drops to 0 there.
   Sticky offsets under the header add this on top of --sf-nav-h. */
body.admin-bar { --sf-adminbar-h: 32px; }
@media (max-width: 782px) {
  body.admin-bar { --sf-adminbar-h: 46px; }
}
@media (max-width: 600px) {
  body.admin-bar { --sf-adminbar-h: 0px; }
}

/* 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); }
/* H77: icons beside a label sit 1px lower, so they read as centred on
   Mulish's lowercase. */
#sf-nav .nv-explore-caret { transition: transform .15s ease; color: var(--muted-2); transform: translateY(1px); }
#sf-nav .nv-explore[open] .nv-explore-caret { transform: translateY(1px) 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);
}
/* H26: the header's light blue; H15: nothing lifts on hover. */
#sf-nav .nv-mega__page {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 12px; border-radius: var(--r-card-sm);
  background: var(--blue-tint); border: 1px solid transparent;
  text-decoration: none; color: var(--ink);
  transition: background .15s ease, border-color .15s ease;
}
#sf-nav .nv-mega__page:hover,
#sf-nav .nv-mega__page:focus-visible {
  background: var(--blue-fill);
  border-color: var(--blue-border);
  outline: none;
}
#sf-nav .nv-mega__page:focus-visible { outline: 2px solid var(--deep-blue); outline-offset: 2px; }
#sf-nav .nv-mega__page:hover .nv-mega__page-icon,
#sf-nav .nv-mega__page:focus-visible .nv-mega__page-icon { background: var(--white); }
#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; transform: translateY(1px);
}
#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;
}
/* H29: every category in view, no inner scroll. */
#sf-nav .nv-mega__cats {
  display: flex; flex-direction: column; gap: 2px;
}
#sf-nav .nv-mega__cat {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 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;
}
/* H26: no counts; every row has the chevron. */
#sf-nav .nv-mega__cat-caret {
  flex: none; margin-left: auto; color: var(--muted-2);
  transition: transform .15s ease, color .12s ease;
}
#sf-nav .nv-mega__cat-caret .sf-icon { width: 14px; height: 14px; transform: translateY(1px); }
#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 pane per category (swapped by JS). H31: all panes share one
   grid cell, so the tallest sets the menu's height whichever is shown. */
#sf-nav .nv-mega__subs {
  position: relative; min-width: 0;
  display: grid;
  background: var(--blue-tint); border-radius: var(--r-card-sm);
  padding: 16px 18px;
}
#sf-nav .nv-mega__sub-pane,
#sf-nav .nv-mega__sub-pane[hidden] { display: block; grid-area: 1 / 1; }
#sf-nav .nv-mega__sub-pane[hidden] { visibility: hidden; }
#sf-nav .nv-mega__sub-head,
#sf-nav .nv-mega__courses-head {
  margin: 0 0 10px; font-size: 13px; font-weight: 900; color: var(--muted);
}
#sf-nav .nv-mega__sub-list + .nv-mega__courses-head { margin-top: 16px; }
/* H27: topics as chips (white pills, no count), A-Z. */
#sf-nav .nv-mega__sub-list {
  list-style: none; margin: 0 0 4px; padding: 0;
  display: flex; flex-wrap: wrap; gap: 6px;
}
#sf-nav .nv-mega__sub-link {
  display: flex; align-items: center; gap: 8px;
  min-height: 32px; padding: 0 12px;
  border: 1px solid var(--card-border); border-radius: var(--r-pill);
  background: var(--white);
  font-size: 13px; font-weight: 700; color: var(--ink);
  text-decoration: none;
}
#sf-nav .nv-mega__sub-link:hover,
#sf-nav .nv-mega__sub-link:focus-visible {
  border-color: var(--blue-border); background: var(--blue-fill); color: var(--deep-blue);
}
#sf-nav .nv-mega__sub-link:focus-visible { outline: 2px solid var(--deep-blue); outline-offset: 2px; }
#sf-nav .nv-mega__sub-name {
  flex: 1; min-width: 0;
  overflow-wrap: anywhere; line-height: 1.25;
}

/* H26/H27/H34: three popular courses per category as white cards (2:1 image,
   title, students left and rating right on the bottom row). Hover: a light
   blue edge and a soft shadow; nothing moves. */
#sf-nav .nv-mega__courses {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px;
  margin: 0 0 8px; padding: 0; list-style: none;
}
#sf-nav .nv-mega__course {
  display: flex; flex-direction: column; height: 100%; overflow: hidden;
  border: 1px solid var(--card-border); border-radius: var(--r-card-sm);
  background: var(--white); color: var(--ink); text-decoration: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
#sf-nav .nv-mega__course:hover { border-color: var(--blue-border); box-shadow: var(--shadow-card); }
#sf-nav .nv-mega__course:focus-visible { outline: 2px solid var(--deep-blue); outline-offset: 2px; }
#sf-nav .nv-mega__course-media { display: block; aspect-ratio: 2 / 1; background: var(--blue-fill); }
#sf-nav .nv-mega__course-img { display: block; width: 100%; height: 100%; object-fit: cover; }
#sf-nav .nv-mega__course-title {
  display: -webkit-box; overflow: hidden; margin: 10px 12px 0;
  font-size: 14px; font-weight: 800; line-height: 1.3;
  -webkit-box-orient: vertical; -webkit-line-clamp: 2;
}
#sf-nav .nv-mega__course:hover .nv-mega__course-title { color: var(--blue-hover); }
#sf-nav .nv-mega__course-meta {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin: auto 12px 12px; padding-top: 6px;
  font-size: 13px; color: var(--muted);
}
#sf-nav .nv-mega__course-students { display: inline-flex; align-items: center; gap: 5px; }
#sf-nav .nv-mega__course-students .sf-icon { width: 14px; height: 14px; }
#sf-nav .nv-mega__course-rating { color: var(--ink); }
#sf-nav .nv-mega__course-rating .sf-icon {
  width: 13px; height: 13px; margin-right: 3px; vertical-align: -1px;
  color: var(--star); fill: currentColor;
}
#sf-nav .nv-mega__course-rating b { font-weight: 800; }
@media (prefers-reduced-motion: reduce) {
  #sf-nav .nv-mega__page, #sf-nav .nv-mega__course { transition: none; }
}

#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; }
}

/* 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; transform: translateY(1px); pointer-events: none; }
/* H35: the whole field is a click target (portal-quicksearch.js focuses the input). */
#sf-nav form.nv-search:not(.is-sheet) { cursor: text; }
/* H23/H40: a clear light blue field with a soft blue glow; while typing a white
   field with a blue gradient border. Tablet and desktop; phones show an icon. */
@media (min-width: 600px) {
  #sf-nav form.nv-search:not(.is-sheet),
  #sf-nav form.nv-search:not(.is-sheet):hover {
    background: var(--blue-tint);
    border: 1.5px solid color-mix(in srgb, var(--blue) 30%, var(--white));
    box-shadow: none;
  }
  #sf-nav form.nv-search:not(.is-sheet)::before {
    content: ""; position: absolute; z-index: -1; inset: 1px 0 -1px; border-radius: 10px;
    background: linear-gradient(90deg, var(--blue), var(--blue-hover));
    opacity: .16; filter: blur(5px); pointer-events: none;
  }
  #sf-nav form.nv-search:not(.is-sheet):focus-within {
    border-color: transparent;
    background: linear-gradient(var(--white), var(--white)) padding-box,
                linear-gradient(90deg, var(--blue), var(--blue-hover)) border-box;
    box-shadow: none;
  }
  #sf-nav form.nv-search:not(.is-sheet) .nv-search-icon { color: var(--blue-hover); }
}
#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; }
#sf-nav .nv-link .sf-icon { transform: translateY(1px); }
@media (max-width: 1199px) {
  #sf-nav .nv-links { display: none; }
}

/* Right cluster: 8px inside the group. */
#sf-nav .nv-actions { display: flex; align-items: center; gap: 8px; flex: none; margin-left: auto; }
#sf-nav .nv-links + .nv-actions { margin-left: 0; }
/* H18/H20/H36/H38/H41 desktop: the search field up to 820px; from 1200px
   Explore sits 8px from it and the pair is centred in the free room between
   the logo and the text links (the links sit right before the buttons). */
@media (min-width: 1024px) {
  #sf-nav .nv-search { max-width: 820px; min-width: 220px; margin-inline: auto; }
}
@media (min-width: 1200px) {
  #sf-nav .nv-explore:has(~ .nv-search) { margin-left: auto; }
  #sf-nav .nv-explore ~ .nv-search { margin-left: -16px; margin-right: auto; }
}
/* H1: Log in is a light blue button (button radius) beside the one red
   Start; H6: an account icon instead of the word only below 380px. */
#sf-nav .nv-login {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px;
  padding: 0 16px; border-radius: var(--r-btn); 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-login .sf-icon { display: none; }
#sf-nav .nv-cta { padding: 11px 24px; min-height: 44px; }
/* H15: Start stands still on hover; a red glow instead of the lift. */
#sf-nav .nv-cta:hover { transform: none; box-shadow: 0 4px 12px color-mix(in srgb, var(--red) 32%, transparent); }
/* H24: avatar and bell calm, 40/44px, light blue. */
#sf-nav .nv-avatar {
  width: 40px; height: 40px; flex: none; border-radius: 50%; background: var(--blue-fill); color: var(--deep-blue);
  font: 900 15px var(--font); display: grid; place-items: center; cursor: pointer;
  border: 0; text-decoration: none; overflow: hidden;
}
#sf-nav .nv-avatar:hover { background: color-mix(in srgb, var(--blue) 22%, var(--white)); }
#sf-nav .nv-avatar__img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
#sf-nav .nv-bell {
  display: inline-flex; align-items: center; justify-content: center; position: relative;
  width: 44px; min-width: 44px; min-height: 44px; border-radius: var(--r-btn);
  color: var(--ink); cursor: pointer;
}
#sf-nav .nv-bell:hover { background: var(--blue-tint); 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. H24: a
   quiet light blue 36px chip ("Level 1") in a 44px target. */
#sf-nav .nv-progress { position: relative; flex: none; display: flex; align-items: center; min-height: 44px; }
#sf-nav .nv-progress__chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px;
  border: 0; border-radius: var(--r-pill); background: var(--blue-fill);
  font: 800 14px var(--font); color: var(--deep-blue); cursor: pointer; white-space: nowrap;
}
#sf-nav .nv-progress__chip:hover,
#sf-nav .nv-progress__chip[aria-expanded="true"] { background: color-mix(in srgb, var(--blue) 22%, var(--white)); }
#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.
   H97: head (logo, close), a list that scrolls on its own, and the
   Log in / Start bar at the bottom under the header's hairline.
   ============================================================ */
.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;
  /* H51: stays visible until the slide-out and the scrim's fade are done. */
  transition: visibility 0s linear .35s;
}
@media (min-width: 1024px) {
  .nv-drawer { display: none; }
}
.nv-drawer.is-open { visibility: visible; pointer-events: auto; transition: visibility 0s; }
.nv-drawer__scrim {
  position: absolute; inset: 0; background: var(--overlay);
  opacity: 0; transition: opacity .2s ease;
}
.nv-drawer:not(.is-open) .nv-drawer__scrim { transition: opacity .35s 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: hidden;
  background: var(--white); border-right: 1px solid var(--card-border);
  display: flex; flex-direction: column;
  transform: translateX(-100%);
  transition: transform .25s ease;
}
.nv-drawer:not(.is-open) .nv-drawer__panel { transition: transform .35s cubic-bezier(.4, 0, .2, 1); }
.nv-drawer.is-open .nv-drawer__panel { transform: translateX(0); box-shadow: var(--shadow-pop); }
@media (prefers-reduced-motion: reduce) {
  .nv-drawer,
  .nv-drawer__scrim,
  .nv-drawer__panel,
  .nv-drawer:not(.is-open) .nv-drawer__scrim,
  .nv-drawer:not(.is-open) .nv-drawer__panel { transition: none; }
}
/* H47/H89: the head is the header's height (65px, 57px on phones): the logo
   at the header's size on the left, the close-panel icon on the right. */
.nv-drawer__head {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  box-sizing: border-box; height: 65px; padding: 0 10px 0 20px;
  border-bottom: 1px solid var(--card-border);
  flex: none; background: var(--white);
}
.nv-drawer__logo { display: flex; align-items: center; min-height: 44px; }
.nv-drawer__logo img { display: block; width: auto; height: 48px; }
.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 { outline: 2px solid var(--deep-blue); outline-offset: 2px; border-radius: var(--r-btn); }
.nv-drawer__body {
  display: flex; flex-direction: column; gap: 24px;
  flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  padding: 20px 20px 28px;
}
/* H74/H97: a slim rounded scrollbar, only between the head and the bar. */
.nv-drawer__body { scrollbar-width: thin; scrollbar-color: var(--blue-border) transparent; }
/* H7/H39: the search row has the header field's look and opens the search
   window (portal-quicksearch.js, [data-qs-window]). */
.nv-drawer__search {
  display: flex; align-items: center; gap: 10px;
  width: 100%; min-height: 48px; margin-top: 4px; padding: 0 14px;
  background: var(--blue-tint); border: 1.5px solid color-mix(in srgb, var(--blue) 30%, var(--white));
  border-radius: var(--r-btn);
  font: 600 15px var(--font); color: var(--muted); text-align: left;
  text-decoration: none; cursor: pointer;
}
.nv-drawer__search:focus-visible { border-color: var(--blue); background: var(--white); }
.nv-drawer__search .sf-icon { flex: none; width: 20px; height: 20px; color: var(--blue-hover); }
.nv-drawer__cats,
.nv-drawer__pages { display: flex; flex-direction: column; }
/* H39/H49: headings 16px ink above 15px rows. */
.nv-drawer__section-label {
  margin: 0 0 6px; font-size: 16px; font-weight: 900; color: var(--ink);
}
/* H49/H66: no lines between rows; grey icons, blue on the current page (H67). */
.nv-drawer__page,
.nv-drawer__cat-link {
  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;
}
.nv-drawer__page .sf-icon,
.nv-drawer__cat-icon { flex: none; color: var(--muted-2); }
.nv-drawer__page > .sf-icon,
.nv-drawer__cat-link > .sf-icon,
.nv-drawer__search > .sf-icon { transform: translateY(1px); }
@media (hover: hover) {
  .nv-drawer__page:hover,
  .nv-drawer__cat-link: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__page.is-current .sf-icon { color: var(--deep-blue); }
/* H49: a category is one link (icon, name, arrow) to its page. */
.nv-drawer__cat-link > span { flex: 1; min-width: 0; }
.nv-drawer__cat-arrow { flex: none; width: 18px; height: 18px; color: var(--muted-2); }
.nv-drawer__all { font-weight: 800; color: var(--deep-blue); }
.nv-drawer__cats { margin-bottom: 24px; }
/* H39/H47/H97: Log in (light blue) and Start (red, its glow) as in the
   header, in a bar at the bottom of the panel (thumb reach). */
.nv-drawer__actions {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  flex: none; padding: 12px 20px calc(16px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--card-border); background: var(--white);
}
.nv-drawer__login {
  display: flex; align-items: center; justify-content: center;
  min-height: 48px; font-size: 15px; font-weight: 800; color: var(--deep-blue);
  text-decoration: none; border: 0; border-radius: var(--r-btn); background: var(--blue-fill);
}
@media (hover: hover) { .nv-drawer__login:hover { background: var(--blue-border); color: var(--deep-blue); } }
.nv-drawer__cta,
.nv-drawer__cta:hover {
  justify-content: center; text-align: center; min-height: 48px;
  border-radius: var(--r-btn); font-size: 15px; font-weight: 800;
  box-shadow: 0 4px 12px color-mix(in srgb, var(--red) 32%, transparent); transform: none;
}

/* Header responsive (D2): one switch at 1024px.
   >=1024  desktop: Explore mega-menu, search field, bell, avatar.
   600-1023 menu button + logo + full search field + actions.
   <=599   compact: the search becomes an 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; }
  /* H22/H26: a 48px logo in the same 65px (8.5 / 7.5px padding). */
  #sf-nav { gap: 12px; padding: 8.5px 20px 7.5px; }
  #sf-nav .nv-logo img { height: 48px; }
  #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-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; }
  /* H53/H60: a 40px menu button; its icon starts 20px from the edge, like
     Start's on the right. */
  #sf-nav .nv-menu-toggle {
    display: inline-flex; width: 40px; min-width: 40px; height: 40px; min-height: 40px;
    margin-left: -13px; margin-right: -4px;
  }
  /* 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; }
  /* H52/H53: logo 40px; menu, search, Log in and Start all 40px high. */
  #sf-nav { gap: 6px; padding: 6px 12px; }
  #sf-nav .nv-menu-toggle { margin-left: -6px; }
  #sf-nav .nv-logo img { height: 40px; }
  #sf-nav .nv-actions { gap: 6px; margin-left: 0; }
  .nv-drawer__head { height: 57px; }
  .nv-drawer__logo img { height: 40px; }
  /* A9 / V4: the field becomes an icon that opens the search window
     (portal-quicksearch.js). H54: a bare icon like the menu button. */
  #sf-nav .nv-search:not(.is-sheet) {
    flex: none; margin-left: auto; width: 40px; height: 40px; min-height: 40px; max-width: none; padding: 0;
    justify-content: center; background: transparent; border-color: transparent;
    box-shadow: none; color: var(--ink);
  }
  #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; width: 40px; height: 40px; color: var(--ink); }
  #sf-nav .nv-search:not(.is-sheet) .nv-search__open .nv-search-icon { width: 22px; height: 22px; color: var(--ink); }
  #sf-nav a.nv-search span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  /* H24: no level chip on phones (it is in the account). */
  #sf-nav .nv-progress { display: none; }
  #sf-nav .nv-login,
  #sf-nav .nv-cta { min-height: 40px; height: 40px; padding: 0 14px; font-size: 13px; }
}
@media (max-width: 379px) {
  /* H6: an account icon instead of the word on the narrowest phones. */
  #sf-nav .nv-login { width: 40px; min-width: 40px; padding: 0; }
  #sf-nav .nv-login .sf-icon { display: block; width: 22px; height: 22px; }
  #sf-nav .nv-login__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* ============================================================
   Bar above the header (template-parts/chrome/top-bar.php, H21/H22).
   It scrolls away with the page; the header sticks under it.
   ============================================================ */
.sf-topbar.is-closed { display: none; }
/* USPs: one quiet 40px line; two on tablets, one on phones. */
.sf-topbar--usp { background: var(--blue-tint); border-bottom: 1px solid var(--card-border); }
.sf-topbar__usps {
  display: flex; justify-content: center; align-items: center; gap: 8px 48px;
  max-width: var(--container-max); min-height: 40px; margin: 0 auto; padding: 0 24px;
  list-style: none; font-size: 14px; line-height: 1.3;
}
.sf-topbar__usps li {
  display: flex; align-items: center; gap: 6px; margin: 0;
  color: var(--ink); white-space: nowrap;
}
.sf-topbar__usps .sf-icon { flex: none; width: 20px; height: 20px; margin-right: 2px; color: var(--blue); }
.sf-topbar__usps strong { font-weight: 800; }
.sf-topbar__usps small { font-size: 14px; font-weight: 600; color: var(--muted); }
@media (max-width: 1199px) {
  .sf-topbar__usps li:nth-child(n+3) { display: none; }
}
/* Campaign: navy, the offer with its end date under it, a white button. */
.sf-topbar--promo { position: relative; background: var(--player-dark); color: var(--on-navy); }
.sf-topbar__promo {
  display: flex; align-items: center; justify-content: center; gap: 12px 24px;
  max-width: var(--container-max); min-height: 64px; margin: 0 auto; padding: 8px 64px;
  box-sizing: border-box;
}
.sf-topbar__text {
  display: flex; flex-direction: column; gap: 2px; margin: 0;
  font-size: 16px; line-height: 1.25; text-align: left;
}
.sf-topbar__text strong { font-weight: 900; }
.sf-topbar__when { align-self: flex-start; font-size: 13px; font-weight: 600; color: var(--on-navy-muted); }
/* The last two days: "Ends tomorrow" as a small pill. */
.sf-topbar__when.is-soon {
  display: inline-flex; align-items: center; min-height: 22px; margin-top: 2px; padding: 0 8px;
  border-radius: var(--r-pill); background: var(--on-navy-fill); color: var(--on-navy); font-weight: 800;
}
.sf-topbar__cta {
  display: inline-flex; flex: none; align-items: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: var(--r-btn);
  background: var(--on-navy); color: var(--player-dark);
  font-size: 15px; font-weight: 800; text-decoration: none; white-space: nowrap;
  transition: background-color .15s ease;
}
.sf-topbar__cta:hover { background: var(--on-navy-tint); color: var(--player-dark); }
.sf-topbar__cta .sf-icon { width: 16px; height: 16px; }
.sf-topbar__close {
  position: absolute; top: 50%; right: 8px; transform: translateY(-50%);
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; padding: 0; border: 0; border-radius: var(--r-btn);
  background: transparent; color: var(--on-navy-muted); cursor: pointer;
}
.sf-topbar__close:hover { background: var(--on-navy-fill); color: var(--on-navy); }
.sf-topbar--promo a:focus-visible,
.sf-topbar--promo button:focus-visible { outline: 2px solid var(--on-navy); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  .sf-topbar__cta { transition: none; }
}
@media (max-width: 640px) {
  .sf-topbar__usps { padding: 0 16px; }
  .sf-topbar__usps li:nth-child(n+2) { display: none; }
  .sf-topbar__promo { flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px 56px 12px 16px; }
  .sf-topbar__text { font-size: 15px; }
  .sf-topbar__cta { min-height: 44px; padding: 0 14px; font-size: 14px; }
  .sf-topbar__close { top: 8px; transform: none; }
}

/* 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) ----------
   Soofos Design lab, site-footer E (notes F1-F34). Desktop: four link
   columns, a social row, and a calm 13 px bottom row (made with love, the
   light ISO / NRTO logos, legal links, compact language menu).
   768-1023 px: the same four columns; the language button sits on the
   social row. Up to 767 px: four folding sections (one open at a time),
   the store badges and the social row on rows of their own, the bottom
   row centred. The moves and the folding: app-shell.js (initFooterFold). */
#sf-footer { background: var(--ink); color: var(--white); padding: 48px 64px 14px; }
#sf-footer .ft-cols,
#sf-footer .ft-social-row,
#sf-footer .ft-bottom { max-width: 1200px; margin-left: auto; margin-right: auto; }
#sf-footer .ft-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; }
#sf-footer .ft-heading { font-size: 15px; 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 a:focus-visible { outline: 2px solid var(--blue-fill); outline-offset: 2px; }
#sf-footer .ft-list a { padding: 6px 0; }

/* Column = <details>: from 768 px the heading is just a heading. */
#sf-footer .ft-acc__sum { display: block; list-style: none; cursor: default; }
#sf-footer .ft-acc__sum::-webkit-details-marker { display: none; }
#sf-footer .ft-acc__chev { display: none; }

/* Official store badges (Apple's and Google's own files), equal width. */
#sf-footer .ft-apps { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; margin-top: 16px; }
#sf-footer .ft-badge { display: block; padding: 0; }
#sf-footer .ft-badge img { display: block; width: 112px; height: auto; }

/* Social row: plain icons, the first one flush left. */
#sf-footer .ft-social-row { margin-top: 20px; }
#sf-footer .ft-socials { display: flex; flex-wrap: wrap; gap: 4px; }
#sf-footer .ft-socials a {
  display: inline-flex; align-items: center; justify-content: center; min-width: 36px; min-height: 36px; padding: 0;
  border-radius: var(--r-btn); color: color-mix(in srgb, var(--on-navy) 85%, transparent); transition: color .15s ease;
}
#sf-footer .ft-socials li:first-child a { justify-content: flex-start; min-width: 28px; }
#sf-footer .ft-socials a:hover { color: var(--white); }
#sf-footer .ft-socials .sf-icon { width: 20px; height: 20px; }

/* Bottom row */
#sf-footer .ft-bottom {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px;
  margin-top: 32px; padding-top: 14px; border-top: 1px solid var(--on-navy-line);
  font-size: 13px; color: var(--faint); font-weight: 600;
}
#sf-footer .ft-social-row + .ft-bottom { margin-top: 16px; }
#sf-footer .ft-marks { display: inline-flex; align-items: center; gap: 14px; }
#sf-footer .ft-marks img { display: block; width: auto; height: 28px; opacity: .85; }
#sf-footer .ft-marks a { display: inline-flex; padding: 0; }
#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: 32px; padding: 0; font-size: 13px; font-weight: 600; }
#sf-footer .ft-bottom .sf-lang { margin-left: 8px; }

/* Footer language switch (template-parts/chrome/language-switch.php): a
   menu button that names this site's language, a quiet outline on the
   navy footer; it opens a compact list of Soofos sites above it. The slim
   account footer has no language menu; the list (.sf-lang__menu) is shared. */
#sf-footer .sf-lang-switch {
  display:inline-flex; align-items:center; gap:5px; width:max-content;
  box-sizing:border-box; min-height:30px; padding:0 11px;
  background:transparent; color:var(--white); border:1px solid color-mix(in srgb, var(--on-navy) 32%, transparent); border-radius:var(--r-pill);
  font-family:inherit; font-size:13px; font-weight:600; 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:color-mix(in srgb, var(--on-navy) 70%, transparent); color:var(--white); }
#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-on-navy); }
/* The footer's list is compact: content width, 34 px rows, small flags. */
#sf-footer .sf-lang__menu { min-width:0; padding:4px; border-radius:10px; }
#sf-footer .sf-lang__item { gap:8px; min-height:34px; padding:0 10px; border-radius:6px; font-size:13px; font-weight:600; }
#sf-footer .sf-lang__flag { font-size:14px; }
#sf-footer .sf-lang .sf-lang__mark { width:14px; height:14px; margin-left:6px; }
@media (prefers-reduced-motion: reduce) {
  #sf-footer .sf-lang-switch,
  #sf-footer .ft-socials a { transition:none; }
}

/* Footer responsive. Link rows of 40 px wherever people tap: below 1024px
   and on touch screens of any width (WCAG 2.5.8 asks 24 px; a deliberate
   exception to the 44 px rule for this long list, lab F27). */
@media (max-width: 1023px), (hover: none), (pointer: coarse) {
  #sf-footer .ft-list a { display: flex; align-items: center; min-height: 40px; }
  #sf-footer .ft-legal a { min-height: 40px; }
  #sf-footer .ft-socials a { min-width: 44px; min-height: 44px; }
  #sf-footer .sf-lang-switch { min-height: 44px; padding: 0 14px; }
  #sf-footer .sf-lang__item { min-height: 44px; }
}
@media (min-width: 1024px) {
  #sf-footer { padding-top: 55px; }
}

/* Tablets (768-1023): four columns as on desktop; the language button on
   the social row (right), so the bottom row fits on one line. */
@media (min-width: 768px) and (max-width: 1023px) {
  #sf-footer { padding: 40px 32px 14px; }
  #sf-footer .ft-cols { gap: 24px; }
  #sf-footer .ft-list a { line-height: 1.3; }
  #sf-footer .ft-bottom { flex-wrap: nowrap; row-gap: 4px; }
}
@media (max-width: 1023px) {
  #sf-footer .ft-social-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
  #sf-footer .ft-social-row .sf-lang { margin: 0; }
  #sf-footer .ft-social-row .sf-lang-switch { min-height: 36px; padding: 0 12px; }
}

/* Phones and small tablets (up to 767): one list of four folding
   sections; badges, socials and language on rows of their own; the bottom
   rows centred, about half the length of four open columns. */
@media (max-width: 767px) {
  #sf-footer { padding: 20px 28px calc(24px + env(safe-area-inset-bottom, 0px)); }
  #sf-footer .ft-cols { grid-template-columns: minmax(0, 1fr); gap: 0; }
  #sf-footer .ft-col { border-bottom: 1px solid var(--on-navy-line); }
  #sf-footer .ft-acc__sum {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    min-height: 52px; cursor: pointer;
  }
  #sf-footer .ft-acc__sum .ft-heading { margin: 0; color: var(--white); }
  #sf-footer .ft-acc__chev {
    display: block; flex: none; width: 18px; height: 18px;
    color: color-mix(in srgb, var(--on-navy) 70%, transparent); transition: transform .15s ease;
  }
  #sf-footer .ft-acc[open] .ft-acc__chev { transform: rotate(180deg); }
  #sf-footer .ft-acc__sum:focus-visible { outline: 2px solid var(--blue-fill); outline-offset: 2px; }
  #sf-footer .ft-acc__body { padding-bottom: 12px; }
  /* Without JavaScript the badges stay in Support, side by side. */
  #sf-footer .ft-acc__body .ft-apps { flex-direction: row; flex-wrap: wrap; margin-top: 8px; }

  /* The badges' own row (app-shell.js moves them here): 44 px tall, one
     flush left and one flush right. */
  #sf-footer .ft-apps-row { margin-top: 20px; }
  #sf-footer .ft-apps-row .ft-apps { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 0; }
  #sf-footer .ft-apps-row .ft-badge img { width: auto; height: 44px; }

  #sf-footer .ft-socials { gap: 6px; }
  #sf-footer .ft-socials .sf-icon { width: 24px; height: 24px; }
  #sf-footer .ft-socials li:first-child a { min-width: 32px; }
  #sf-footer .ft-social-row + .ft-bottom { margin-top: 20px; }

  #sf-footer .ft-bottom {
    display: grid; grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "legal" "made" "marks";
    justify-items: center; gap: 6px 12px; text-align: center;
  }
  #sf-footer .ft-bottom .ft-legal { grid-area: legal; justify-content: center; margin: 0; }
  #sf-footer .ft-bottom .ft-made { grid-area: made; color: color-mix(in srgb, var(--on-navy-tint) 78%, transparent); }
  #sf-footer .ft-bottom .ft-marks { grid-area: marks; justify-content: center; margin-top: 12px; }
  #sf-footer .ft-bottom .sf-lang { margin: 0; }
}
/* Small tablets and landscape phones: the badges side by side on the left. */
@media (min-width: 600px) and (max-width: 767px) {
  #sf-footer .ft-apps-row .ft-apps { justify-content: flex-start; gap: 12px; }
}
@media (max-width: 599px) {
  #sf-footer .ft-bottom .ft-legal { gap: 0 18px; }
}
@media (max-width: 460px) {
  #sf-footer { padding-left: 20px; padding-right: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  #sf-footer .ft-acc__chev { transition: none; }
}

/* ---------- 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; }
}

/* ---------- Consent banner (maatos-analytics 3.1, vanilla-cookieconsent) ----------
   Theme style override only; the consent plugin and its logic are untouched.
   The library is themed through its own --cc-* variables, mapped to our
   tokens: Mulish, white card with the hairline border, brand blue "Accept
   all" (ADR-017), an equal-size neutral "Decline all" (green is reserved for
   success, red for purchase), blue/grey toggles, AA text. The plugin's
   layout stays (a compact box, bottom left; full width on phones). `html
   #cc-main` outranks the plugin sheet, which may load later. */
html #cc-main {
  --cc-font-family: var(--font);
  --cc-bg: var(--white);
  --cc-primary-color: var(--ink);
  --cc-secondary-color: var(--muted);
  --cc-link-color: var(--deep-blue);
  --cc-modal-border-radius: var(--r-card-sm);
  --cc-btn-border-radius: var(--r-btn);
  --cc-btn-primary-bg: var(--blue);
  --cc-btn-primary-border-color: var(--blue);
  --cc-btn-primary-color: var(--on-navy);
  --cc-btn-primary-hover-bg: var(--blue-hover);
  --cc-btn-primary-hover-border-color: var(--blue-hover);
  --cc-btn-primary-hover-color: var(--on-navy);
  --cc-btn-secondary-bg: var(--white);
  --cc-btn-secondary-border-color: var(--card-border);
  --cc-btn-secondary-color: var(--ink);
  --cc-btn-secondary-hover-bg: var(--blue-tint);
  --cc-btn-secondary-hover-border-color: var(--blue-border);
  --cc-btn-secondary-hover-color: var(--ink);
  --cc-separator-border-color: var(--card-border);
  --cc-toggle-on-bg: var(--deep-blue);
  --cc-toggle-off-bg: var(--muted-2);
  --cc-toggle-on-knob-bg: var(--white);
  --cc-toggle-off-knob-bg: var(--white);
  --cc-toggle-readonly-bg: var(--card-border);
  --cc-toggle-readonly-knob-bg: var(--white);
  --cc-toggle-readonly-knob-icon-color: var(--muted);
  --cc-toggle-enabled-icon-color: var(--on-navy);
  --cc-toggle-disabled-icon-color: var(--on-navy);
  --cc-section-category-border: var(--card-border);
  --cc-cookie-category-block-bg: var(--page);
  --cc-cookie-category-block-border: var(--card-border);
  --cc-cookie-category-block-hover-bg: var(--blue-tint);
  --cc-cookie-category-block-hover-border: var(--blue-border);
  --cc-cookie-category-expanded-block-bg: var(--page);
  --cc-cookie-category-expanded-block-hover-bg: var(--blue-tint);
  --cc-overlay-bg: var(--overlay);
  --cc-footer-bg: var(--page);
  --cc-footer-color: var(--muted);
  --cc-footer-border-color: var(--card-border);
  /* 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 2147483000. */
  --cc-z-index: 905;
}
/* The Preferences modal is a modal like ours (1000). */
html.show--preferences #cc-main { --cc-z-index: 1000; }
html #cc-main .cm,
html #cc-main .pm {
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-pop);
  font-size: 14px;
}
html #cc-main .cm { margin-bottom: env(safe-area-inset-bottom, 0px); }
html #cc-main .cm__title,
html #cc-main .pm__title { font-weight: 900; color: var(--ink); }
html #cc-main .cm__desc a,
html #cc-main .pm__section-desc a { font-weight: 800; text-decoration: underline; }
/* "Decline all": the neutral twin of "Accept all" (same size, our tokens),
   not the plugin's tint of the button colour. */
html #cc-main .cm__btn[data-role="necessary"],
html #cc-main .pm__btn[data-role="necessary"] {
  background: var(--white); border-color: var(--card-border); color: var(--ink);
}
html #cc-main .cm__btn[data-role="necessary"]:hover,
html #cc-main .pm__btn[data-role="necessary"]:hover {
  background: var(--blue-tint); border-color: var(--blue-border); color: var(--ink);
}
/* "Preferences": a quiet text button, still a 44px target. */
html #cc-main .cm__btn[data-role="show"] {
  min-height: 44px; color: var(--deep-blue); text-decoration: underline;
}
html #cc-main .cm__btn[data-role="show"]:hover {
  background: var(--blue-tint); border-color: var(--blue-tint); color: var(--deep-blue);
}
html #cc-main .cm__btn,
html #cc-main .pm__btn { min-height: 44px; font-weight: 800; }
html #cc-main .pm__close-btn { width: 44px; height: 44px; }
html #cc-main button:focus-visible,
html #cc-main a:focus-visible,
html #cc-main input:focus-visible + .section__toggle,
.mc-cookie-icon:focus-visible {
  outline: 2px solid var(--deep-blue); outline-offset: 2px;
}
/* The button that reopens the preferences after a choice: our card
   surface, under the header and every drawer, and above the course page's
   sticky buy bar. */
.mc-cookie-icon {
  z-index: 890;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  border-color: var(--card-border); background: var(--white); color: var(--ink);
  box-shadow: var(--shadow-soft);
}
.mc-cookie-icon:hover { color: var(--deep-blue); box-shadow: var(--shadow-pop); }
html.sf-sticky-active .mc-cookie-icon { bottom: calc(var(--sf-sticky-h, 68px) + 12px); }
/* 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. Pages with the slim logged-in
   footer get no reserve at all: the card covers its line until answered
   (focus still scrolls clear, scroll-padding-bottom below). The library
   sets html.show--consent while the card is open. */
html.show--consent body { padding-bottom: var(--sf-consent-h, 280px); }
html.show--consent body:has(#sf-footer),
html.show--consent body:has(.sf-footer-slim) { padding-bottom: 0; }
html.show--consent #sf-footer::after {
  content: ""; display: block; height: var(--sf-consent-h, 280px);
}
/* N1 (WCAG 2.4.11): mid-page, a field that receives keyboard focus is
   scrolled clear of the card instead of landing under it. */
html.show--consent { scroll-padding-bottom: var(--sf-consent-h, 280px); }
/* Course pages: both the card and the sticky buy bar sit at the bottom;
   keep focus clear of whichever reaches higher. */
html.show--consent.sf-sticky-active {
  scroll-padding-bottom: max(var(--sf-consent-h, 280px), calc(var(--sf-sticky-h, 68px) + 8px));
}
@media (prefers-reduced-motion: reduce) {
  html #cc-main { --cc-modal-transition-duration: 0s; }
  html #cc-main * { transition: none !important; animation: none !important; }
}

/* ---------- 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 the consent card removing
   the focused 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; }
