/* Shared styles for the branded application shell. */
.brand-site {
  --ink: #0f1b3d;
  --muted: #566274;
  --line: #dce5e7;
  --blue: #087b56;
  --green: #087b56;
  --soft: #f5faf8;
  --mint: #e8fbf5;
  --navy: #0f1b3d;
  --side-nav-width: 232px;
  --side-nav-surface: #f8fcfa;
  --side-nav-border: #d8e5df;
  --side-nav-text: #405268;
  --side-nav-hover: #eaf4ee;
  --side-nav-current: #d8f2e4;
  --side-nav-current-text: #075a41;
  color: var(--ink);
  background: #fafcfb;
}
.brand-site :is(.finder-fields, .service-search, .ticket-form) { --field-border: #658479; }
.brand-site :is(h1, h2, h3) {
  font-family: "Nunito Sans", "Avenir Next", Avenir, system-ui, sans-serif;
}
.brand-skip { position: fixed; z-index: 150; top: -5rem; left: 1rem; padding: 12px 18px; background: white; }
.brand-skip:focus { top: 8px; }
.brand-site main { scroll-margin-top: 80px; }
.brand-site h1 { letter-spacing: -.035em; line-height: 1.12; overflow-wrap: anywhere; }
.brand-site :focus-visible { outline: 3px solid #12496d; outline-offset: 3px; }
.brand-site .topbar {
  background: white;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  gap: clamp(12px, 1.6vw, 24px);
}
.brand-site .nav {
  display: flex;
  flex: 0 0 auto;
  gap: clamp(12px, 1.5vw, 24px);
}
.brand-site .nav a, .brand-site .topbar-auth-link { align-content: center; min-height: 44px; }
.brand-site .nav a[aria-current], .brand-site .topbar-auth-link[aria-current] { color: #086449; }
.brand-site .notification-count { background: var(--green); }
.brand-site .avatar { background: #086449; }
.brand-site .topbar-user-pill { flex: 0 1 auto; min-width: 38px; max-width: 16em; }
.brand-site .topbar-user-pill .avatar { flex: 0 0 38px; }
.brand-site .topbar-user-pill > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand-site .topbar .ghost { color: var(--green); border-color: #98bcae; }
.brand-site .topbar-signout-form { margin: 0; }
.brand-site .mobile-menu-toggle { background: white; color: var(--ink); border-color: var(--line); }
.brand-site .mobile-menu-section a:not(.primary):is(:hover, :focus-visible) {
  background: var(--side-nav-hover); color: var(--side-nav-current-text);
}
.brand-site .mobile-menu-section a:not(.primary)[aria-current] {
  background: var(--side-nav-current); color: var(--side-nav-current-text);
}
.brand-site .btn { border-radius: 11px; min-height: 44px; }
.brand-site .btn.primary { background: var(--green); border-color: var(--green); color: white; }
.brand-site .btn.primary:hover { background: #066346; }
.brand-site .card { border-radius: 18px; }
.brand-site :where(input, select, textarea) { accent-color: var(--green); }
.brand-site .main { min-width: 0; }
@media (prefers-reduced-motion: reduce) {
  .brand-site *, .brand-site *::before, .brand-site *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

.brand-site .mobile-menu-panel { background: var(--side-nav-surface); }
.brand-site .mobile-menu-panel:not(.is-open) { box-shadow: none; }
.brand-site .mobile-drawer-close { width: 44px; height: 44px; flex: 0 0 44px; }
.brand-site .mobile-menu-section a:focus-visible { outline: 3px solid #12496d; outline-offset: -3px; }
.mobile-menu-section .mobile-menu-signin { justify-content: center; border: 1px solid currentColor; }

@media (min-width: 900px) and (max-width: 1100px) {
  .brand-site .topbar { gap: 12px; padding-inline: 16px; font-size: .875rem; }
  .brand-site .topbar .nav, .brand-site .topbar-user-pill { gap: 8px; }
}

@media (max-width: 899px) {
  .brand-site .topbar { min-height: 64px; padding: 10px 16px; }
  .brand-site .topbar .brand { width: auto; min-width: 0; margin-right: auto; }
  .brand-site .topbar :is(.nav, .topbar-auth-link, .topbar-user-pill, .topbar-signout-form) { display: none !important; }
  .brand-site .mobile-menu-toggle { display: inline-flex; flex: 0 0 auto; }
  .brand-site .app-shell { grid-template-columns: minmax(0, 1fr); }
  /* Keep a focused sidebar visible until the viewport handler moves focus. */
  .brand-site .app-shell > .learner-sidebar:not(:focus-within) { display: none; }
}


/* In-page dashboard jumps must clear the sticky site header. */
.brand-site .pd-panel[tabindex] { scroll-margin-top: 84px; }

.brand-site :is(.learner-sidebar, .course-nav, .studio-sidebar) {
  padding: 32px 16px;
  border-inline-end: 1px solid var(--side-nav-border);
  background: var(--side-nav-surface);
  color: var(--ink);
}

.brand-site :is(.learner-sidebar .side-link, .course-nav .lesson-link, .studio-sidebar nav a, .lesson-course-back) {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  min-height: 44px;
  margin-bottom: 3px;
  padding: 8px 12px;
  border-radius: 9px;
  color: var(--side-nav-text);
  font-size: .94rem;
  font-weight: 600;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.brand-site :is(.learner-sidebar .side-link, .course-nav a, .course-nav summary, .studio-sidebar nav a, .lesson-outline-link):is(:hover, :focus-visible) {
  background: var(--side-nav-hover);
  color: var(--side-nav-current-text);
}

.brand-site :is(.learner-sidebar .side-link, .course-nav .lesson-link, .studio-sidebar nav a, .lesson-outline-link):is([aria-current], .active) {
  background: var(--side-nav-current);
  color: var(--side-nav-current-text);
  font-weight: 750;
}

.brand-site .course-nav .lesson-link.planned { background: transparent; color: var(--muted); }
.brand-site .course-nav .lesson-link.planned small { color: #775315; }
.brand-site .course-nav .course-nav-card { background: white; border-color: var(--side-nav-border); color: var(--ink); }
.brand-site .course-nav-card a { color: var(--green); }
.brand-site .course-nav summary { min-height: 44px; align-content: center; border-radius: 9px; color: var(--side-nav-text); }
.brand-site .course-nav .course-section-nav > summary { font-weight: 750; }
.brand-site .course-nav .topic-nav { margin-inline-start: 8px; }
.brand-site .course-nav .topic-nav .lesson-link { font-size: .875rem; }
.brand-site .lesson-outline { border-color: var(--side-nav-border); }
.brand-site .lesson-outline-mobile { background: var(--side-nav-surface); border-color: var(--side-nav-border); }
.brand-site .lesson-outline-mobile summary { min-height: 44px; align-content: center; }

@media (max-width: 899px) {
  .brand-site :is(.course-layout.lesson-focus, .studio-shell) { grid-template-columns: minmax(0, 1fr); }
  .brand-site :is(.course-nav, .studio-sidebar) {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 108;
    width: min(360px, 88vw);
    height: 100dvh;
    padding: 18px 16px 28px;
    overflow-y: auto;
    transform: translateX(-105%);
    transition: transform .22s ease;
    border-inline-end: 0;
  }
  .brand-site :is(.course-nav, .studio-sidebar).is-open { transform: translateX(0); }
  .brand-site :is(.course-nav, .studio-sidebar):not(.is-open) { box-shadow: none; }
  .brand-site :is(.lesson-focus, .studio-shell) :is(.mobile-context-bar, .mobile-drawer-header).mobile-only { display: flex !important; }
  .brand-site :is(.course-nav, .studio-sidebar) .mobile-drawer-header { color: var(--ink); border-color: var(--side-nav-border); }
  .brand-site :is(.course-nav, .studio-sidebar) .mobile-drawer-close { background: white; border-color: var(--brand-control-border); color: var(--ink); }
  .brand-site .lesson-focus .mobile-context-bar .btn { flex: 1 1 0; width: auto; }
}
