/* Navbar, footer and toasts (ported from Monia, in Rand's navy + gold).
   Rand has one theme and a text brand instead of a logo image. */
:root {
  --fs-2xs: 0.6875rem; --fs-xs: 0.8125rem; --fs-sm: 0.875rem; --fs-lg: 1.125rem;
  --fs-h1: clamp(1.9rem, 1.4rem + 2vw, 2.75rem);
  --color-primary-border: var(--color-border-strong);
  --ring-primary: 0 0 0 3px rgba(var(--rgb-navy), 0.28);
  --color-on-primary: var(--color-on-dark);
  --lh-relaxed: 1.75;
}
/* ══ SITE CHROME ══════════════════════════════════════════════════
   Navbar, account menu, phone/tablet menu panel and footer. Loaded right
   after style.css and overrides its older navbar / footer rules. The
   floating contact buttons stay as style.css draws them, and mobile.css
   (loaded last) still owns the phone action bar. */

/* ── Desktop navbar ── */
.nav-links, .nav-auth, .nav-tools { display: contents; }
.nav-panel-head, .nav-wa, .theme-toggle__label { display: none; }
.nav-link.is-disabled { opacity: 0.6; cursor: default; }
.nav-link.is-disabled:hover { background: none; color: var(--color-text-secondary); }
.nav-link small { font-size: 0.75em; }
.nav-auth .btn-ghost { margin-inline-start: var(--sp-2); }
.lang-toggle svg { width: 17px; height: 17px; }

.theme-toggle > .icon-moon, .theme-toggle > .icon-sun { display: none; line-height: 0; }
.theme-toggle > .icon-moon { display: block; }
.theme-toggle__label .icon-sun { display: none; }

/* Account trigger: initial + label + unread count */
.nav-dropdown { padding-bottom: 0; }
.nav-dropdown::after { content: ''; position: absolute; inset-inline: 0; top: 100%; height: 12px; } /* hover bridge */
.nav-dropdown-toggle {
  gap: var(--sp-2);
  padding: 4px var(--sp-3) 4px 4px;
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-full);
  background: var(--color-surface);
  font-family: inherit;
}
[dir="rtl"] .nav-dropdown-toggle { padding: 4px 4px 4px var(--sp-3); }
.nav-dropdown-toggle:hover, .nav-dropdown.open .nav-dropdown-toggle { border-color: var(--color-primary-border); background: var(--color-primary-bg); }
.nav-dropdown-toggle:focus-visible { outline: none; box-shadow: var(--ring-primary); }
.nav-avatar {
  flex-shrink: 0;
  width: 30px; height: 30px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--brand-navy), var(--brand-slate));
  color: #fff; font-size: 0.8rem; font-weight: var(--fw-semibold);
}
.nav-avatar--lg { width: 44px; height: 44px; font-size: 1.05rem; }
.nav-count { min-width: 20px; padding: 1px 6px; border-radius: 999px; background: var(--color-accent); color: #fff; font-size: 0.7rem; font-weight: var(--fw-bold); text-align: center; line-height: 1.5; }

/* Account menu */
.nav-dropdown-menu {
  top: calc(100% + 10px);
  inset-inline-start: auto;
  inset-inline-end: 0;
  min-width: 290px;
  padding: var(--sp-2);
  border-radius: var(--radius-xl);
  box-shadow: 0 24px 48px -16px rgba(15, 45, 75, 0.28), 0 2px 6px rgba(15, 45, 75, 0.06);
  transform: translateY(6px) scale(0.98);
  transform-origin: top;
  transition: opacity 0.18s, transform 0.22s cubic-bezier(.22, .8, .24, 1), visibility 0.18s;
}
.nav-dropdown:focus-within .nav-dropdown-menu { opacity: 1; visibility: visible; transform: none; }
.nav-dropdown.open .nav-dropdown-menu, .nav-dropdown:hover .nav-dropdown-menu { transform: none; }
.nav-me { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-3); margin-bottom: var(--sp-1); border-radius: var(--radius-lg); background: var(--color-background); }
.nav-me__text { display: flex; flex-direction: column; min-width: 0; }
.nav-me__text strong { font-size: var(--fs-sm); color: var(--color-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-me__text span { font-size: var(--fs-xs); color: var(--color-text-light); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: start; }
.nav-group { margin: var(--sp-3) var(--sp-3) var(--sp-1); font-size: var(--fs-2xs); font-weight: var(--fw-semibold); color: var(--color-text-light); }
.nav-dropdown-item { padding: 10px var(--sp-3); gap: var(--sp-3); }
.nav-dropdown-item .nav-count { margin-inline-start: auto; }
.nav-dropdown-item.is-disabled { opacity: 0.6; cursor: default; }
.nav-dropdown-item--out:hover { background: var(--color-error-bg); color: var(--color-error); }
.nav-dropdown-item--out:hover svg { color: var(--color-error); }
.nav-sep { height: 1px; margin: var(--sp-2) var(--sp-2); background: var(--color-border-light); }

.nav-toggle-dot { position: absolute; top: 6px; inset-inline-end: 4px; width: 9px; height: 9px; border-radius: 50%; background: var(--color-accent); box-shadow: 0 0 0 2px var(--color-surface); }
.navbar-toggle { position: relative; border: 0; background: none; }


/* ── Motion: navbar on scroll ── */
.navbar { transition: background-color 0.3s, box-shadow 0.3s, border-color 0.3s, height 0.35s cubic-bezier(.22, .8, .24, 1), transform 0.4s cubic-bezier(.22, .8, .24, 1); }
.navbar .brand-logo { transition: height 0.35s cubic-bezier(.22, .8, .24, 1); }
.navbar.is-compact { height: 70px; }
.navbar.is-compact .navbar-brand .brand-logo { height: 52px; }
.navbar.is-hidden { transform: translateY(-105%); }
.nav-progress {
  position: absolute; inset-inline: 0; bottom: -1px; height: 2px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-primary));
  transform: scaleX(0); transform-origin: left;
  opacity: 0; transition: opacity 0.3s;
  pointer-events: none;
}
[dir="rtl"] .nav-progress { transform-origin: right; background: linear-gradient(270deg, var(--color-accent), var(--color-primary)); }
.navbar.scrolled .nav-progress { opacity: 1; }

/* Desktop link highlight that glides between links */
@media (min-width: 1025px) {
  .nav-links { position: relative; display: flex; align-items: center; gap: var(--sp-1); }
  .nav-ink { position: absolute; top: 0; left: 0; z-index: 0; border-radius: var(--radius-full); background: var(--color-primary-bg); opacity: 0; pointer-events: none; }
  .nav-links.has-ink .nav-ink { transition: transform 0.4s cubic-bezier(.22, .8, .24, 1), width 0.4s cubic-bezier(.22, .8, .24, 1), opacity 0.25s; }
  .nav-links .nav-link { position: relative; z-index: 1; }
  .nav-links.has-ink .nav-link, .nav-links.has-ink .nav-link:hover, .nav-links.has-ink .nav-link.active { background: transparent; }
  .nav-links .nav-link:hover { color: var(--color-primary); }
}
@media (max-width: 1024px) { .nav-ink { display: none; } }

/* Account menu items cascade in */
@media (min-width: 1025px) and (prefers-reduced-motion: no-preference) {
  .nav-dropdown.open .nav-dropdown-menu > *, .nav-dropdown:hover .nav-dropdown-menu > * { animation: chrome-in 0.35s cubic-bezier(.22, .8, .24, 1) both; }
  .nav-dropdown-menu > :nth-child(2) { animation-delay: 0.03s !important; }
  .nav-dropdown-menu > :nth-child(3) { animation-delay: 0.06s !important; }
  .nav-dropdown-menu > :nth-child(4) { animation-delay: 0.09s !important; }
  .nav-dropdown-menu > :nth-child(5) { animation-delay: 0.12s !important; }
  .nav-dropdown-menu > :nth-child(6) { animation-delay: 0.15s !important; }
  .nav-dropdown-menu > :nth-child(7) { animation-delay: 0.18s !important; }
  .nav-dropdown-menu > :nth-child(8) { animation-delay: 0.21s !important; }
  .nav-dropdown-menu > :nth-child(n+9) { animation-delay: 0.24s !important; }
}

/* Theme switch: the new theme spreads from the button (View Transitions) */
@keyframes chrome-spin { from { transform: rotate(-120deg) scale(0.4); opacity: 0; } }

/* ── Phone / tablet: the menu becomes a panel ── */
@media (max-width: 1024px) {
  .navbar-nav {
    position: fixed;
    top: 0; bottom: auto;
    height: 100vh; height: 100dvh;   /* the navbar's blur makes it the containing block */
    width: min(400px, 100%);
    right: 0; left: auto;
    display: flex; flex-direction: column; align-items: stretch; gap: var(--sp-5);
    padding: 0 var(--sp-6) calc(var(--sp-6) + env(safe-area-inset-bottom, 0px));
    background: var(--color-surface);
    box-shadow: -24px 0 48px -12px rgba(15, 45, 75, 0.25);
    overflow-y: auto; overscroll-behavior: contain;
    clip-path: circle(0px at var(--ox, 90%) var(--oy, 40px));
    visibility: hidden;
    transition: clip-path 0.5s cubic-bezier(.65, 0, .35, 1), visibility 0s linear 0.5s;
  }
  [dir="rtl"] .navbar-nav { right: auto; left: 0; box-shadow: 24px 0 48px -12px rgba(15, 45, 75, 0.25); }
  .navbar-nav.active, [dir="rtl"] .navbar-nav.active { right: auto; clip-path: circle(var(--or, 150vmax) at var(--ox, 90%) var(--oy, 40px)); visibility: visible; transition: clip-path 0.6s cubic-bezier(.65, 0, .35, 1), visibility 0s; }
  [dir="ltr"] .navbar-nav.active { right: 0; }
  .nav-overlay { display: block; opacity: 0; visibility: hidden; background: rgba(8, 20, 32, 0.45); backdrop-filter: blur(3px); transition: opacity 0.3s, visibility 0s linear 0.3s; z-index: calc(var(--z-fixed) - 1); }
  .nav-overlay.active { opacity: 1; visibility: visible; transition: opacity 0.3s; }

  .nav-panel-head {
    position: sticky; top: 0; z-index: 2;
    display: flex; align-items: center; justify-content: space-between;
    min-height: var(--navbar-height);
    margin-inline: calc(-1 * var(--sp-6));
    padding-inline: var(--sp-6);
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border-light);
  }
  .nav-panel-logo { height: 52px; }
  .nav-close { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--color-border-light); border-radius: 50%; background: var(--color-background); color: var(--color-text); cursor: pointer; }
  .nav-close svg { width: 20px; height: 20px; }
  .nav-close:focus-visible { outline: none; box-shadow: var(--ring-primary); }

  .nav-links { display: grid; gap: 2px; }
  .nav-link { display: flex; align-items: center; min-height: 52px; padding: 0 var(--sp-4); font-size: 1.05rem; border-radius: var(--radius-lg); color: var(--color-text); }
  .nav-link.active { background: var(--color-primary-bg); color: var(--color-primary); }
  .nav-link.active::before { content: ''; width: 6px; height: 6px; margin-inline-end: var(--sp-3); border-radius: 50%; background: var(--color-accent); }

  /* Account: always expanded inside the panel */
  .nav-dropdown { display: block; }
  .nav-dropdown::after { display: none; }
  .nav-dropdown-toggle { display: none; }
  .nav-dropdown-menu, .nav-dropdown:hover .nav-dropdown-menu {
    position: static; display: block; min-width: 0;
    opacity: 1; visibility: visible; transform: none;
    padding: var(--sp-2); border: 1px solid var(--color-border-light); border-radius: var(--radius-xl);
    background: var(--color-background); box-shadow: none;
  }
  .nav-me { background: var(--color-surface); }
  .nav-dropdown-item { min-height: 46px; font-size: 0.95rem; }

  .nav-auth { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); }
  .nav-auth .btn { min-height: 48px; justify-content: center; margin: 0; font-size: 0.95rem; }
  .nav-auth .btn-ghost { border: 1.5px solid var(--color-border); color: var(--color-text); }

  .nav-tools { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); }
  .nav-tools .lang-toggle, .nav-tools .theme-toggle {
    width: auto; min-height: 48px; margin: 0; padding: 0 var(--sp-3);
    display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
    border-radius: var(--radius-lg); font-size: 0.9rem; font-weight: var(--fw-semibold);
    color: var(--color-text);
  }
  .theme-toggle__label { display: inline; font-family: inherit; }

  .nav-wa {
    display: flex; align-items: center; justify-content: center; gap: var(--sp-2);
    min-height: 52px; margin-top: auto;
    border-radius: var(--radius-full);
    background: var(--color-whatsapp, #25D366); color: #052E16;
    font-weight: var(--fw-semibold); text-decoration: none;
  }
  .nav-wa:hover { color: #052E16; filter: brightness(0.95); }
  .nav-wa svg { width: 20px; height: 20px; }

  /* the open panel draws its own close button */
  .navbar-toggle.active { visibility: hidden; }
}

@media (max-width: 1024px) and (prefers-reduced-motion: no-preference) {
  .navbar-nav.active .nav-links > *,
  .navbar-nav.active > .nav-dropdown,
  .navbar-nav.active > .nav-auth,
  .navbar-nav.active > .nav-tools,
  .navbar-nav.active > .nav-wa { animation: chrome-in 0.45s cubic-bezier(.22, .8, .24, 1) both; }
  .navbar-nav.active .nav-links > :nth-child(2) { animation-delay: 0.04s; }
  .navbar-nav.active .nav-links > :nth-child(3) { animation-delay: 0.08s; }
  .navbar-nav.active .nav-links > :nth-child(4) { animation-delay: 0.12s; }
  .navbar-nav.active .nav-links > :nth-child(5) { animation-delay: 0.16s; }
  .navbar-nav.active > .nav-dropdown, .navbar-nav.active > .nav-auth { animation-delay: 0.2s; }
  .navbar-nav.active > .nav-tools { animation-delay: 0.24s; }
  .navbar-nav.active > .nav-wa { animation-delay: 0.28s; }
}
@keyframes chrome-in { from { opacity: 0; transform: translateY(10px); } }
@media (prefers-reduced-motion: reduce) {
  .navbar-nav, .nav-overlay, .nav-dropdown-menu, .navbar, .navbar .brand-logo { transition: none !important; }
}

@media (max-width: 640px) {
  /* phones keep their bar height; it still hides and returns */
  .navbar.is-compact { height: var(--navbar-height); }
  .navbar-nav { width: 100%; box-shadow: none; }
  .nav-panel-head { min-height: 72px; }
  .nav-panel-logo { height: 46px; }
}

/* ── Footer ── */
.ft { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 0.8fr) minmax(0, 0.8fr) minmax(0, 1.2fr); gap: var(--sp-12); padding-bottom: var(--sp-12); }
.ft-logo { display: inline-block; margin-bottom: var(--sp-5); }
.ft-logo img { display: block; height: 60px; width: auto; filter: invert(1) hue-rotate(180deg) brightness(1.15); }
.ft-brand p { max-width: 42ch; margin: 0; font-size: 0.9rem; line-height: 1.9; color: rgba(255, 255, 255, 0.68); }
.ft-title { margin: 0 0 var(--sp-5); font-size: 0.95rem; font-weight: var(--fw-semibold); color: #fff; letter-spacing: 0; }
.ft-list { display: grid; gap: var(--sp-3); margin: 0; padding: 0; list-style: none; }
.ft-list a { position: relative; color: rgba(255, 255, 255, 0.7); font-size: 0.9rem; text-decoration: none; transition: color 0.2s; }
.ft-list a::after { content: ''; position: absolute; inset-inline-start: 0; bottom: -3px; width: 100%; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform 0.3s cubic-bezier(.22, .8, .24, 1); }
[dir="rtl"] .ft-list a::after { transform-origin: right; }
.ft-list a:hover { color: #fff; }
.ft-list a:hover::after { transform: scaleX(1); }

.ft-wa {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff; text-decoration: none;
  transition: background 0.25s, border-color 0.25s, transform 0.25s;
}
.ft-wa:hover { color: #fff; background: rgba(37, 211, 102, 0.14); border-color: rgba(37, 211, 102, 0.5); transform: translateY(-2px); }
.ft-wa__icon { flex-shrink: 0; width: 42px; height: 42px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: #25D366; color: #fff; }
.ft-wa__icon svg { width: 22px; height: 22px; }
.ft-wa__text { display: flex; flex-direction: column; min-width: 0; }
.ft-wa__text strong { font-size: 0.9rem; font-weight: var(--fw-semibold); }
.ft-wa__text span { font-size: 0.85rem; color: rgba(255, 255, 255, 0.7); font-variant-numeric: tabular-nums; text-align: start; }
.ft-note { margin: var(--sp-3) 0 var(--sp-5); font-size: 0.8rem; color: rgba(255, 255, 255, 0.5); }
.ft-ig { display: inline-flex; align-items: center; gap: var(--sp-2); font-size: 0.85rem; color: rgba(255, 255, 255, 0.7); text-decoration: none; }
.ft-ig svg { width: 18px; height: 18px; }
.ft-ig__handle { color: rgba(255, 255, 255, 0.5); }
.ft-ig:hover, .ft-ig:hover .ft-ig__handle { color: #fff; }

.ft-bottom { display: grid; gap: var(--sp-2); padding-top: var(--sp-6); text-align: start; }
.ft-bottom p { margin: 0; font-size: 0.8rem; color: rgba(255, 255, 255, 0.55); }
.ft-bottom .ft-disclaimer { max-width: 100ch; font-size: 0.75rem; line-height: 1.7; color: rgba(255, 255, 255, 0.4); }


/* Footer bottom row + back to top */
.ft-bottom { grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: var(--sp-6); }
.ft-bottom__text { display: grid; gap: var(--sp-2); }
.ft-top {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  min-height: 40px; padding: 0 var(--sp-4);
  border: 1px solid rgba(255, 255, 255, 0.2); border-radius: var(--radius-full);
  background: transparent; color: rgba(255, 255, 255, 0.8);
  font-family: inherit; font-size: 0.8rem; font-weight: var(--fw-semibold); cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.ft-top svg { width: 15px; height: 15px; transition: transform 0.3s cubic-bezier(.22, .8, .24, 1); }
.ft-top:hover { border-color: #fff; background: rgba(255, 255, 255, 0.08); color: #fff; }
.ft-top:hover svg { transform: translateY(-3px); }
.ft-top:focus-visible { outline: 2px solid var(--brand-gold-light); outline-offset: 2px; }

/* The academy name, huge and faint, set into the bottom edge */
.footer { overflow: hidden; padding-bottom: 0; }
.ft-mark {
  position: relative; z-index: 0;
  margin-top: var(--sp-8); margin-bottom: -0.18em;
  font-size: clamp(3.5rem, 15vw, 15rem); font-weight: 800; line-height: 0.9;
  letter-spacing: -0.04em; text-align: center; white-space: nowrap;
  direction: ltr; user-select: none; pointer-events: none;
}
.ft-mark span {
  display: inline-block;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0.02) 85%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* Entrance once the footer scrolls into view */
@media (prefers-reduced-motion: no-preference) {
  .footer.will-reveal .ft > *, .footer.will-reveal .ft-bottom { opacity: 0; transform: translateY(24px); }
  .footer.will-reveal .ft-mark span { opacity: 0; transform: translateY(40%); }
  .footer.is-in .ft > *, .footer.is-in .ft-bottom, .footer.is-in .ft-mark span { opacity: 1; transform: none; transition: opacity 0.7s, transform 0.9s cubic-bezier(.22, .8, .24, 1); }
  .footer.is-in .ft > :nth-child(2) { transition-delay: 0.08s; }
  .footer.is-in .ft > :nth-child(3) { transition-delay: 0.16s; }
  .footer.is-in .ft > :nth-child(4) { transition-delay: 0.24s; }
  .footer.is-in .ft-bottom { transition-delay: 0.32s; }
  .footer.is-in .ft-mark span { transition-duration: 1s, 1.4s; transition-delay: 0.2s; }
  .footer.is-in .ft-wa__icon { animation: chrome-ping 1.6s 0.8s 2; }
}
@keyframes chrome-ping { 0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.55); } 100% { box-shadow: 0 0 0 14px rgba(37, 211, 102, 0); } }

@media (max-width: 1024px) {
  .ft { grid-template-columns: 1fr 1fr; gap: var(--sp-10) var(--sp-8); }
  .ft-brand, .ft-talk { grid-column: 1 / -1; }
  .ft-talk { max-width: 420px; }
}
@media (max-width: 640px) {
  .footer { padding-top: var(--sp-12); }
  .ft { gap: var(--sp-8) var(--sp-5); padding-bottom: var(--sp-8); }
  .ft-logo img { height: 50px; }
  .ft-talk { max-width: none; }
  .ft-bottom { grid-template-columns: 1fr; }
  .ft-top { justify-self: start; }
}

/* ── Toasts (flash messages) ─────────────────────────────────────
   Drop in under the navbar, a progress bar shows when they'll leave,
   hover/focus pauses it. The login welcome is a larger card. */
.toasts {
  position: fixed; z-index: var(--z-toast);
  top: calc(var(--navbar-height) + var(--sp-4)); left: 50%; transform: translateX(-50%);
  display: grid; gap: var(--sp-3);
  width: min(440px, calc(100% - 2 * var(--container-padding)));
  pointer-events: none;
}
.toast {
  position: relative; overflow: hidden; pointer-events: auto;
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-3) var(--sp-3) var(--sp-4);
  border-radius: var(--radius-xl);
  background: color-mix(in srgb, var(--color-surface) 92%, transparent);
  backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid var(--color-border-light);
  box-shadow: 0 20px 40px -18px rgba(15, 45, 75, 0.35), 0 2px 6px rgba(15, 45, 75, 0.06);
  color: var(--color-text); font-size: var(--fs-sm); font-weight: var(--fw-medium); line-height: 1.5;
  --tc: var(--color-primary);
  transition: transform 0.35s cubic-bezier(.22, .8, .24, 1), opacity 0.35s;
}
[dir="rtl"] .toast { padding: var(--sp-3) var(--sp-4) var(--sp-3) var(--sp-3); }
.toast--success { --tc: var(--color-success); }
.toast--warning { --tc: #D9971E; }
.toast--error { --tc: var(--color-error); }
.toast--info { --tc: var(--color-accent); }
.toast__icon { flex-shrink: 0; width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--tc); color: #fff; }
.toast__icon svg { width: 17px; height: 17px; }
.toast__msg { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.toast__close { flex-shrink: 0; width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 50%; background: transparent; color: var(--color-text-light); cursor: pointer; transition: background 0.2s, color 0.2s; }
.toast__close svg { width: 15px; height: 15px; }
.toast__close:hover { background: var(--color-background-alt); color: var(--color-text); }
.toast__close:focus-visible { outline: none; box-shadow: var(--ring-primary); }
.toast__bar { position: absolute; inset-inline: 0; bottom: 0; height: 3px; background: var(--tc); opacity: 0.85; transform-origin: left; }
[dir="rtl"] .toast__bar { transform-origin: right; }
.toast.is-leaving { opacity: 0; transform: translateY(-14px) scale(0.96); }

/* Welcome card */
.toast--welcome { gap: var(--sp-4); padding: var(--sp-4) var(--sp-4) calc(var(--sp-4) + 3px); --tc: var(--color-accent); }
[dir="rtl"] .toast--welcome { padding: var(--sp-4) var(--sp-4) calc(var(--sp-4) + 3px); }
.toast--welcome .toast__close { align-self: flex-start; }
.toast--welcome .toast__bar { background: linear-gradient(90deg, var(--color-accent), var(--color-primary)); }
.toast-welcome__avatar { position: relative; flex-shrink: 0; width: 52px; height: 52px; border-radius: 50%; padding: 3px;
  background: conic-gradient(from 0deg, var(--brand-gold-light), var(--brand-gold-dark), var(--brand-gold-light)); }
.toast-welcome__avatar span { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; border-radius: 50%;
  background: linear-gradient(145deg, var(--brand-navy), var(--brand-slate)); color: #fff; font-size: 1.2rem; font-weight: var(--fw-bold);
  box-shadow: 0 0 0 2px var(--color-surface); }
.toast-welcome__text { flex: 1; min-width: 0; display: grid; gap: 2px; }
.toast-welcome__greet { font-size: var(--fs-xs); font-weight: var(--fw-semibold); color: var(--color-accent-text); }
.toast-welcome__name { font-size: var(--fs-lg); font-weight: var(--fw-bold); line-height: 1.3; color: var(--color-text); overflow-wrap: anywhere; }
.toast-welcome__link { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; justify-self: start; font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--color-primary); text-decoration: none; }
.toast-welcome__link svg { width: 15px; height: 15px; transition: transform 0.25s cubic-bezier(.22, .8, .24, 1); }
[dir="rtl"] .toast-welcome__link svg { transform: scaleX(-1); }
.toast-welcome__link:hover svg { transform: translateX(3px); }
[dir="rtl"] .toast-welcome__link:hover svg { transform: scaleX(-1) translateX(3px); }
.toast-welcome__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--color-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-accent) 25%, transparent); }

@media (prefers-reduced-motion: no-preference) {
  .toast { animation: toast-in 0.55s cubic-bezier(.22, 1.2, .36, 1) both; animation-delay: calc(var(--i, 0) * 120ms); }
  .toast__tick { stroke-dasharray: 24; stroke-dashoffset: 24; animation: toast-draw 0.45s 0.3s cubic-bezier(.65, 0, .35, 1) forwards; }
  .toast__icon { animation: toast-pop 0.5s 0.15s cubic-bezier(.22, 1.4, .36, 1) both; }
  .toast-welcome__avatar { animation: toast-pop 0.6s 0.1s cubic-bezier(.22, 1.4, .36, 1) both; }
  .toast-welcome__avatar::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--color-accent); opacity: 0; animation: toast-ring 1.4s 0.5s ease-out 2; }
  .toast-welcome__greet, .toast-welcome__name, .toast-welcome__link { animation: toast-rise 0.5s cubic-bezier(.22, .8, .24, 1) both; }
  .toast-welcome__greet { animation-delay: 0.2s; }
  .toast-welcome__name { animation-delay: 0.28s; }
  .toast-welcome__link { animation-delay: 0.38s; }
  .toast-welcome__dot { animation: toast-blink 1.6s ease-in-out infinite; }
}
@keyframes toast-in { from { opacity: 0; transform: translateY(-22px) scale(0.94); } }
@keyframes toast-pop { from { opacity: 0; transform: scale(0.4) rotate(-20deg); } }
@keyframes toast-draw { to { stroke-dashoffset: 0; } }
@keyframes toast-ring { 0% { opacity: 0.8; transform: scale(0.9); } 100% { opacity: 0; transform: scale(1.35); } }
@keyframes toast-rise { from { opacity: 0; transform: translateY(6px); } }
@keyframes toast-blink { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--color-accent) 0%, transparent); } }

@media (max-width: 640px) {
  .toasts { top: calc(var(--navbar-height) + var(--sp-2)); }
  .toast-welcome__avatar { width: 46px; height: 46px; }
}
@media print { .toasts { display: none; } }

/* Footer: Terms / Privacy */
.ft-legal { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-5); margin-top: var(--sp-2) !important; }
.ft-legal a { font-size: 0.8rem; color: rgba(255, 255, 255, 0.7); text-decoration: none; }
.ft-legal a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }

/* ── Rand: the navbar is already 64px, so "compact" only shrinks the brand
   text (Monia's 70px compact height would make Rand's bar grow). ── */
.navbar.is-compact { height: var(--navbar-height); }

/* ── Rand: text brand in the panel header and footer ── */
.nav-panel-brand { display: flex; flex-direction: column; line-height: 1.2; text-decoration: none; }
.nav-panel-brand strong { font-size: 1.15rem; font-weight: 800; color: var(--brand-navy); }
.nav-panel-brand span { font-size: var(--fs-2xs); color: var(--color-text-muted); }
.navbar .navbar-brand span:first-child { transition: font-size 0.35s cubic-bezier(.22, .8, .24, 1); }
.navbar.is-compact .navbar-brand span:first-child { font-size: 1.15rem; }
.ft-logo { text-decoration: none; }
.ft-logo strong { display: block; font-size: 1.6rem; font-weight: 800; color: #fff; letter-spacing: -0.01em; }
.ft-logo span { display: block; margin-top: 2px; font-size: 0.8rem; color: var(--brand-gold-light); }
.ft-cert { margin: var(--sp-4) 0 0; font-size: 0.85rem; color: rgba(255, 255, 255, 0.65); }
.ft-cert a { color: var(--brand-gold-light); font-weight: 700; text-decoration: none; border-bottom: 1px solid rgba(var(--rgb-gold), 0.4); transition: border-color 0.2s; }
.ft-cert a:hover { border-bottom-color: var(--brand-gold-light); }
@media (prefers-reduced-motion: reduce) { .navbar .navbar-brand span:first-child { transition: none; } }

/* ── Skip link (from Monia's accessibility pass): hidden until focused ── */
.skip-link {
  position: fixed; top: var(--sp-3); inset-inline-start: var(--sp-3); z-index: 2000;
  padding: var(--sp-3) var(--sp-5); border-radius: var(--radius-full);
  background: var(--color-primary); color: var(--color-on-dark);
  font-weight: var(--fw-semibold); text-decoration: none;
  box-shadow: var(--shadow-lg);
  transform: translateY(-160%); transition: transform 0.2s;
}
.skip-link:focus, .skip-link:focus-visible { transform: none; color: var(--color-on-dark); outline: 3px solid var(--color-accent); outline-offset: 2px; }
#main-content:focus { outline: none; }
@media (prefers-reduced-motion: reduce) { .skip-link { transition: none; } }
