/**
 * SeizeControl × FND Connect product shell
 * ----------------------------------------
 * Top horizontal nav (no left rail) — mirrors fndconnect.org.uk structure.
 * Loaded AFTER app-theme.css so it wins layout conflicts.
 */

/* ── Shell: single column, FND page canvas ───────────────── */
body.app-authenticated {
  font-family: var(--font-app);
  background: var(--fnd-page);
  color: var(--fnd-text);
  /* Align sticky offsets with the larger FND-matched header logo bar */
  --header-height: 80px;
}

/* Prefer reduced motion: never animate chrome (dock, sheet, sticky). */
@media (prefers-reduced-motion: reduce) {
  body.app-authenticated .sc-product-bar,
  body.app-authenticated .fnd-parent-bar,
  body.app-authenticated .care-mobile-dock,
  body.app-authenticated .sc-capture-sheet,
  body.app-authenticated .sc-capture-sheet * {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}

body.app-authenticated .sc-app-shell.care-shell,
body.app-authenticated .care-shell.sc-app-shell {
  display: flex !important;
  flex-direction: column !important;
  grid-template-columns: none !important;
  min-height: 100vh;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0 !important;
  gap: 0 !important;
  background: var(--fnd-page) !important;
  /* Avoid overflow-x:clip/hidden on the shell — some engines treat that as a
     scroll containment boundary and sticky headers “jitter” 1px while scrolling
     (unsafe visual vibration for seizure-prone users). */
  overflow: visible !important;
}

/* Hide legacy rail if any markup residual */
body.app-authenticated .care-rail {
  display: none !important;
}

/* ── Product top bar (FND-style white sticky nav) ───────────
   Only ONE sticky layer at the viewport top. Dual sticky
   (parent at 0 + product at --parent-bar-height) left a
   transparent gap where content scrolled “through” the header.
   Parent/ecosystem bar scrolls away; product nav sticks flush.
   No backdrop-filter: blur on sticky chrome (scroll flicker /
   vibration is harmful for seizure-prone users). */
.sc-product-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--fnd-white);
  border-bottom: 1px solid var(--fnd-border);
  box-shadow: 0 1px 0 rgba(0, 43, 95, 0.06), 0 8px 24px rgba(0, 43, 95, 0.06);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* Authenticated: never dual-sticky. Parent is document flow only. */
body.app-authenticated .fnd-parent-bar,
body.app-authenticated .fnd-safety-strip {
  position: relative !important;
  top: auto !important;
  z-index: 60;
}

body.app-authenticated .sc-app-shell .sc-product-bar {
  top: 0;
  /* Stable sticky layer without GPU blur thrash */
  transform: none;
  will-change: auto;
}

.sc-product-bar__inner {
  max-width: var(--fnd-max);
  margin: 0 auto;
  /* Match FND Connect .nav-row (80px) so the header logo has the same footprint */
  min-height: 80px;
  padding: 0.5rem var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.sc-product-brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  text-decoration: none;
}

/* Match FND Connect header logo: .brand img { width: 210px; max-height: 76px } */
.sc-product-brand img {
  display: block;
  width: 210px;
  max-width: min(100%, 210px);
  height: auto;
  max-height: 76px;
  object-fit: contain;
}

.sc-product-nav {
  display: none;
  flex: 1 1 auto;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15rem;
  min-width: 0;
}

@media (min-width: 992px) {
  .sc-product-nav {
    display: flex;
  }
}

.sc-product-nav__link {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  min-height: 40px;
  padding: 0.4rem 0.7rem;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: #152238;
  font-family: inherit;
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  border-radius: 0;
}

.sc-product-nav__link:hover,
.sc-product-nav__link.is-active,
.sc-product-more.is-active > .sc-product-more__trigger {
  color: #002b5f;
  border-bottom-color: #c9005a;
}

.sc-product-actions {
  display: none;
  align-items: center;
  gap: 0.45rem;
  margin-left: auto;
  flex: 0 0 auto;
}

@media (min-width: 992px) {
  .sc-product-actions {
    display: flex;
  }
}

.sc-product-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 38px;
  padding: 0.4rem 0.95rem;
  border-radius: var(--radius-md);
  background: var(--fnd-magenta);
  color: #fff !important;
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  text-decoration: none !important;
  box-shadow: var(--shadow-sm);
}

.sc-product-cta:hover {
  background: var(--fnd-magenta-hover);
  color: #fff !important;
}

.sc-product-cta--secondary {
  background: #fff;
  color: #002b5f !important;
  border: 2px solid #002b5f;
  box-shadow: none;
}

.sc-product-cta--secondary:hover {
  background: rgba(0, 43, 95, 0.05);
  color: #002b5f !important;
}

.sc-product-account,
.sc-product-signout {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  min-height: 36px;
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none !important;
  color: #002b5f !important;
}

.sc-product-account {
  border: 1px solid rgba(0, 43, 95, 0.14);
  background: rgba(0, 43, 95, 0.04);
}

.sc-product-account:hover,
.sc-product-account.is-active {
  border-color: rgba(201, 0, 90, 0.35);
  background: rgba(201, 0, 90, 0.08);
  color: #c9005a !important;
}

.sc-product-signout {
  color: #6a3a48 !important;
}

.sc-product-signout:hover {
  background: rgba(180, 35, 24, 0.06);
}

.sc-product-burger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin-left: auto;
  border: 1px solid rgba(0, 43, 95, 0.14);
  border-radius: var(--radius-sm);
  background: #fff;
  color: #002b5f;
  font-size: 1.35rem;
}

@media (min-width: 992px) {
  .sc-product-burger {
    display: none !important;
  }
}

/* ── Desktop megamenu (Menu) ─────────────────────────────── */
.sc-product-more {
  position: relative;
}

.sc-product-more__chevron {
  width: 13px;
  height: 13px;
  opacity: 0.7;
  transition: transform 160ms ease;
}

.sc-product-more.is-open .sc-product-more__chevron {
  transform: rotate(180deg);
}

/* Full-width megamenu under the product bar — use the available desktop space */
.sc-product-more__panel {
  display: none;
  position: fixed;
  top: auto;
  left: 50%;
  z-index: 120;
  width: min(72rem, calc(100vw - 1.5rem));
  max-width: calc(100vw - 1.5rem);
  max-height: min(78vh, 40rem);
  overflow: auto;
  padding: 1rem 1.15rem 1.15rem;
  border: 1px solid rgba(0, 43, 95, 0.1);
  border-top: 3px solid #c9005a;
  border-radius: 0 0 16px 16px;
  background: #fff;
  box-shadow: 0 22px 48px rgba(0, 43, 95, 0.16);
  transform: translateX(-50%);
}

.sc-product-more.is-open .sc-product-more__panel {
  display: block;
}

.sc-product-more__featured {
  margin-bottom: 1rem;
  padding-bottom: 0.95rem;
  border-bottom: 1px solid rgba(0, 43, 95, 0.08);
}

.sc-product-more__featured-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
}

.sc-product-more__feature {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  min-height: 4.25rem;
  padding: 0.7rem 0.75rem;
  border: 1px solid rgba(0, 43, 95, 0.1);
  border-radius: 12px;
  background: linear-gradient(165deg, #f7fafc 0%, #fff 70%);
  color: #152238 !important;
  text-decoration: none !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.sc-product-more__feature i {
  flex-shrink: 0;
  margin-top: 0.1rem;
  color: #c9005a;
  font-size: 1.2rem;
}

.sc-product-more__feature strong {
  display: block;
  color: #002b5f;
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.25;
}

.sc-product-more__feature em {
  display: block;
  margin-top: 0.15rem;
  color: #5f6f84;
  font-size: 0.75rem;
  font-style: normal;
  font-weight: 600;
  line-height: 1.3;
}

.sc-product-more__feature:hover,
.sc-product-more__feature.is-active {
  border-color: rgba(201, 0, 90, 0.28);
  background: #fff8fb;
  box-shadow: 0 6px 16px rgba(0, 43, 95, 0.08);
}

.sc-product-more__columns {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem 1.1rem;
}

.sc-product-more__label {
  display: block;
  margin-bottom: 0.4rem;
  padding: 0 0.2rem;
  color: #6a7b90;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.sc-product-more__link {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.45rem;
  border-radius: 8px;
  color: #152238 !important;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none !important;
}

.sc-product-more__link i {
  color: #c9005a;
  font-size: 1.05rem;
}

.sc-product-more__link:hover,
.sc-product-more__link.is-active {
  background: rgba(0, 43, 95, 0.05);
  color: #002b5f !important;
}

.sc-product-more__dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #c9005a;
  margin-left: auto;
}

@media (max-width: 1100px) {
  .sc-product-more__featured-grid,
  .sc-product-more__columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ── Page title strip ────────────────────────────────────── */
.sc-page-head {
  background: var(--fnd-white);
  border-bottom: 1px solid var(--fnd-border);
}

.sc-page-head__inner {
  max-width: var(--fnd-max);
  margin: 0 auto;
  padding: var(--space-4);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem 1.25rem;
}

.sc-page-head__kicker {
  display: block;
  margin-bottom: 0.2rem;
  color: #c9005a;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.sc-page-head__title {
  margin: 0;
  color: #002b5f;
  font-size: clamp(1.35rem, 2.2vw, 1.75rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.sc-page-head__summary {
  margin: var(--space-1) 0 0;
  max-width: 40rem;
  color: #5f6f84;
  font-size: 0.95rem;
  line-height: 1.45;
}

.sc-page-head__meta {
  display: grid;
  gap: 0.1rem;
  text-align: right;
}

.sc-page-head__date-label {
  color: #6a7b90;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.sc-page-head__date {
  color: #002b5f;
  font-size: 0.95rem;
  font-weight: 800;
}

/* ── Main content ────────────────────────────────────────── */
body.app-authenticated .sc-app-main.care-content,
body.app-authenticated main.care-content {
  flex: 1 1 auto;
  width: 100%;
  max-width: var(--fnd-max);
  margin: 0 auto;
  padding: var(--space-5) var(--space-4) 5.5rem !important;
  background: transparent !important;
  box-sizing: border-box;
}

/* Desktop: fill the shell width instead of a narrow mobile column */
@media (min-width: 992px) {
  body.app-authenticated .sc-app-main.care-content,
  body.app-authenticated main.care-content {
    max-width: min(100%, var(--fnd-max));
    padding: 1.35rem clamp(1.25rem, 2.5vw, 2rem) 2.5rem !important;
  }

  body.app-authenticated .sc-page-head__inner {
    max-width: var(--fnd-max);
    width: 100%;
  }
}

@media (min-width: 1280px) {
  body.app-authenticated .sc-app-main.care-content,
  body.app-authenticated main.care-content {
    max-width: min(100%, 1320px);
  }

  body.app-authenticated .sc-page-head__inner,
  body.app-authenticated .sc-product-bar__inner,
  body.app-authenticated .sc-app-footer__inner {
    max-width: min(100%, 1320px);
  }
}

/* Soften bootstrap cards inside app toward FND panels */
body.app-authenticated .surface-card,
body.app-authenticated .care-panel,
body.app-authenticated .ov-card,
body.app-authenticated .card {
  border: 1px solid var(--fnd-border) !important;
  border-radius: var(--radius-md) !important;
  box-shadow: var(--shadow-xs) !important;
}

/* The compatibility bundle contains route-specific capsule/card overrides.
   The unified shell owns ordinary action and surface geometry across routes. */
body.app-authenticated .sc-app-shell .sc-app-main .surface-card,
body.app-authenticated .sc-app-shell .sc-app-main .care-panel,
body.app-authenticated .sc-app-shell .sc-app-main .ov-card,
body.app-authenticated .sc-app-shell .sc-app-main .card {
  border: 1px solid var(--fnd-border) !important;
  border-radius: var(--radius-md) !important;
  box-shadow: var(--shadow-xs) !important;
}

body.app-authenticated .sc-app-shell .sc-app-main .btn {
  border-radius: var(--radius-sm) !important;
  box-shadow: none !important;
}

body.app-authenticated .btn-primary {
  background: #c9005a !important;
  border-color: #c9005a !important;
  border-radius: var(--radius-sm) !important;
  font-weight: 700 !important;
}

body.app-authenticated .btn-outline-primary {
  color: #002b5f !important;
  border: 2px solid #002b5f !important;
  border-radius: var(--radius-sm) !important;
  font-weight: 700 !important;
}

body.app-authenticated h1,
body.app-authenticated h2,
body.app-authenticated .page-title,
body.app-authenticated .workspace-hero-title {
  color: #002b5f !important;
  font-family: var(--font-app) !important;
}

/* Hide old care-header if residual */
body.app-authenticated .care-header:not(.sc-page-head) {
  /* only if orphaned */
}

/* ── Footer ──────────────────────────────────────────────── */
.sc-app-footer {
  border-top: 1px solid rgba(0, 43, 95, 0.1);
  background: #fff;
  margin-top: auto;
}

.sc-app-footer__inner {
  max-width: var(--fnd-max);
  margin: 0 auto;
  padding: 1rem 1rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  align-items: center;
  justify-content: space-between;
}

.sc-app-footer__copy {
  display: grid;
  gap: 0.15rem;
  color: #5f6f84;
  font-size: 0.82rem;
}

.sc-app-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}

.sc-app-footer__links a {
  color: #002b5f;
  font-size: 0.84rem;
  font-weight: 700;
  text-decoration: none;
}

.sc-app-footer__links a:hover {
  color: #c9005a;
}

/* ── Mobile megamenu drawer (bottom sheet) ───────────────── */
.sc-mobile-drawer.sc-mobile-drawer--mega {
  height: min(88vh, 40rem);
  border-radius: 18px 18px 0 0;
}

.sc-mobile-drawer.sc-mobile-drawer--mega .offcanvas-body {
  padding-bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.sc-mobile-drawer .offcanvas-header {
  border-bottom: 1px solid rgba(0, 43, 95, 0.08);
  padding-bottom: 0.85rem;
}

.sc-mobile-drawer__eyebrow {
  display: block;
  color: #c9005a;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.sc-mobile-drawer__featured {
  margin-bottom: 1rem;
}

.sc-mobile-drawer__featured-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
}

.sc-mobile-drawer__feature {
  display: grid;
  gap: 0.2rem;
  min-height: 5.25rem;
  padding: 0.75rem 0.8rem;
  border: 1px solid rgba(0, 43, 95, 0.1);
  border-radius: 14px;
  background: linear-gradient(165deg, #f7fafc 0%, #fff 72%);
  color: #152238 !important;
  text-decoration: none !important;
  box-shadow: 0 4px 14px rgba(0, 43, 95, 0.05);
}

.sc-mobile-drawer__feature i {
  color: #c9005a;
  font-size: 1.25rem;
}

.sc-mobile-drawer__feature strong {
  color: #002b5f;
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.25;
}

.sc-mobile-drawer__feature span {
  color: #5f6f84;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.3;
}

.sc-mobile-drawer__feature.is-active,
.sc-mobile-drawer__feature:active {
  border-color: rgba(201, 0, 90, 0.3);
  background: #fff8fb;
}

.sc-mobile-drawer__nav,
.sc-mobile-drawer__group {
  display: grid;
  gap: 0.2rem;
  margin-bottom: 1rem;
}

.sc-mobile-drawer__label {
  margin: 0.5rem 0 0.35rem;
  color: #6a7b90;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.sc-mobile-drawer__link {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.75rem 0.8rem;
  border-radius: 10px;
  color: #152238 !important;
  font-weight: 700;
  text-decoration: none !important;
}

.sc-mobile-drawer__link i {
  color: #c9005a;
  font-size: 1.05rem;
}

.sc-mobile-drawer__link.is-active,
.sc-mobile-drawer__link:hover {
  background: rgba(0, 43, 95, 0.06);
}

.sc-mobile-drawer__user {
  margin-top: 0.5rem;
  padding: 0.9rem;
  border-radius: 12px;
  background: #f2f7fc;
  display: grid;
  gap: 0.25rem;
}

.sc-mobile-drawer__user strong {
  color: #002b5f;
}

.sc-mobile-drawer__user span {
  color: #5f6f84;
  font-size: 0.85rem;
}

.sc-mobile-drawer__user a {
  margin-top: 0.35rem;
  font-weight: 700;
  color: #8a3a4a;
}

/* ── Mobile dock — keep for thumb reach, FND colours ─────── */
body.app-authenticated .care-mobile-dock,
body.app-authenticated .sc-mobile-dock {
  background: #fff !important;
  border-top: 1px solid rgba(0, 43, 95, 0.12) !important;
  box-shadow: 0 -8px 24px rgba(0, 43, 95, 0.08) !important;
}

body.app-authenticated .care-mobile-dock-link {
  color: #5f6f84 !important;
  font-weight: 700 !important;
}

body.app-authenticated .care-mobile-dock-link.is-active {
  color: #c9005a !important;
}

body.app-authenticated .care-mobile-dock-log {
  background: #c9005a !important;
  color: #fff !important;
  border-radius: var(--radius-md) !important;
}

/* Workspace hero on home — less “dashboard SaaS” */
body.app-authenticated .workspace-hero {
  border: 1px solid rgba(0, 43, 95, 0.08) !important;
  border-radius: var(--radius-md) !important;
  background: var(--fnd-white) !important;
  box-shadow: var(--shadow-xs) !important;
}

/* Desktop: same single sticky product bar (no dual-stack offset gap) */
@media (min-width: 992px) {
  body.app-authenticated .fnd-parent-bar,
  body.app-authenticated .fnd-safety-strip {
    position: relative !important;
    top: auto !important;
    z-index: 60;
  }
  body.app-authenticated .sc-product-bar {
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
}

/* ── Shared FND ecosystem chrome ─────────────────────────── */
.fnd-safety-strip {
  position: relative;
  z-index: 80;
  color: rgba(255, 255, 255, 0.94);
  background: var(--fnd-deep-navy);
  border-bottom: 2px solid rgba(201, 0, 90, 0.65);
}

.fnd-safety-strip__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  width: min(100% - 2rem, var(--fnd-max));
  min-height: var(--safety-strip-height);
  margin-inline: auto;
  font-size: var(--text-sm);
  line-height: 1.35;
}

.fnd-safety-strip a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  flex: 0 0 auto;
  padding-inline: var(--space-1);
  color: var(--fnd-white);
  font-weight: var(--weight-bold);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

body.app-body .fnd-safety-strip .fnd-safety-strip__inner a {
  color: var(--fnd-white) !important;
}

.fnd-parent-bar {
  position: sticky;
  top: 0;
  z-index: 70;
  color: var(--fnd-white);
  background: var(--fnd-navy);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: none;
}

.fnd-parent-bar__inner {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  width: min(100% - 2rem, var(--fnd-max));
  min-height: var(--parent-bar-height);
  margin-inline: auto;
  padding: 0;
}

.fnd-parent-bar__brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--fnd-white);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  text-decoration: none;
}

.fnd-parent-bar__brand:hover,
.fnd-parent-bar__brand:focus-visible {
  color: var(--fnd-white);
}

.fnd-parent-bar__mark {
  display: inline-grid;
  place-items: center;
  flex: 0 0 24px;
  box-sizing: border-box;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--fnd-white);
  color: var(--fnd-magenta) !important;
  font-size: 1.15rem;
  font-weight: var(--weight-extrabold);
  line-height: 1;
}

body.app-body.shell-public .fnd-parent-bar .fnd-parent-bar__brand .fnd-parent-bar__mark,
body.app-body.shell-focused .fnd-parent-bar .fnd-parent-bar__brand .fnd-parent-bar__mark,
body.app-body.shell-app .fnd-parent-bar .fnd-parent-bar__brand .fnd-parent-bar__mark {
  color: var(--fnd-magenta) !important;
}

.fnd-parent-bar__context {
  display: inline-flex;
  align-items: baseline;
  gap: var(--space-2);
  min-width: 0;
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: var(--text-sm);
}

.fnd-parent-bar__eyebrow {
  color: rgba(255, 255, 255, 0.64);
  font-size: 0.65rem;
  font-weight: var(--weight-bold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.fnd-parent-bar__context strong {
  color: var(--fnd-white);
  font-weight: var(--weight-bold);
}

.fnd-parent-bar__links {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-left: auto;
}

.fnd-parent-bar__links a {
  color: rgba(255, 255, 255, 0.88);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  text-decoration: none;
}

.fnd-parent-bar__links a:hover,
.fnd-parent-bar__links a:focus-visible {
  color: var(--fnd-white);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

body.app-body .fnd-parent-bar .fnd-parent-bar__brand,
body.app-body .fnd-parent-bar .fnd-parent-bar__name,
body.app-body .fnd-parent-bar .fnd-parent-bar__context strong,
body.app-body .fnd-parent-bar .fnd-parent-bar__links a {
  color: var(--fnd-white) !important;
}

/* ── Public product header ───────────────────────────────── */
body.app-public .public-shell {
  position: relative;
  z-index: 40;
  background: var(--fnd-white);
  border-bottom: 1px solid var(--fnd-border);
  box-shadow: var(--shadow-xs);
}

body.app-public .public-shell-inner {
  width: min(100% - 2rem, var(--fnd-max));
  max-width: none;
  margin-inline: auto;
  padding: 0;
}

body.app-public .public-nav {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  min-height: 76px;
}

body.app-public .public-brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
}

/* Match FND Connect header logo sizing (210×76) */
body.app-public .public-brand-wordmark {
  display: block;
  width: 210px !important;
  max-width: min(100%, 210px) !important;
  height: auto !important;
  max-height: 76px !important;
  object-fit: contain;
}

body.app-public .public-shell .navbar-collapse {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
}

body.app-public .public-nav-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-2);
  width: 100%;
}

body.app-public .public-nav-link:not(.btn) {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: var(--space-2) var(--space-3);
  border: 0;
  border-bottom: 3px solid transparent;
  color: var(--fnd-ink);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  text-decoration: none;
  white-space: nowrap;
}

body.app-public .public-nav-link:not(.btn):hover,
body.app-public .public-nav-link:not(.btn).is-active {
  color: var(--fnd-navy);
  border-bottom-color: var(--fnd-magenta);
}

body.app-public .public-nav-actions .btn {
  min-height: 42px;
  border-radius: var(--radius-sm) !important;
  box-shadow: none;
}

body.app-body.app-public .public-shell .public-nav-actions .btn {
  border-radius: var(--radius-sm) !important;
  box-shadow: none !important;
}

body.app-public .public-nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  margin-left: auto;
  border: 1px solid var(--fnd-border-strong) !important;
  border-radius: var(--radius-sm);
  color: var(--fnd-navy);
  background: var(--fnd-white);
}

/* ── Focused setup/check-in shell ────────────────────────── */
.shell-focused .sc-focused-shell__context {
  margin-left: auto;
  color: var(--fnd-muted);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
}

.shell-focused .sc-focused-shell__signout {
  margin-left: var(--space-2);
}

.shell-focused .sc-focused-main {
  width: min(100%, 840px) !important;
  padding-top: var(--space-8) !important;
}

.sc-focused-footer .sc-app-footer__inner {
  max-width: 840px;
}

@media (max-width: 991.98px) {
  .fnd-safety-strip__inner {
    align-items: flex-start;
    box-sizing: border-box;
    min-height: 54px;
    padding-block: var(--space-2);
    font-size: var(--text-xs);
  }

  .fnd-parent-bar__inner {
    width: min(100% - 1.5rem, var(--fnd-max));
    min-height: 42px;
    gap: var(--space-3);
    flex-wrap: nowrap;
  }

  body.app-authenticated .sc-app-shell .sc-product-bar {
    /* Flush to viewport — parent bar is not sticky (avoids scroll-through gap). */
    top: 0;
  }

  .fnd-parent-bar__context {
    margin-left: auto;
    white-space: nowrap;
  }

  .fnd-parent-bar__eyebrow,
  .fnd-parent-bar__links {
    display: none;
  }

  .sc-product-bar__inner {
    min-height: 72px;
    padding-inline: var(--space-3);
  }

  /* Match FND Connect mobile brand (width: 176px) */
  .sc-product-brand img {
    width: 176px;
    max-width: min(100%, 176px);
    height: auto;
    max-height: 64px;
  }

  .shell-focused .sc-product-bar__inner {
    flex-wrap: nowrap;
  }

  .shell-focused .sc-focused-shell__context {
    display: none;
  }

  .shell-focused .sc-focused-main {
    padding-top: var(--space-5) !important;
  }

  .sc-page-head__inner {
    min-height: 66px;
    padding: var(--space-3) var(--space-4);
  }

  .sc-page-head__meta {
    display: none;
  }

  body.app-public .public-shell-inner {
    width: 100%;
    padding-inline: var(--space-4);
  }

  body.app-public .public-nav {
    position: relative;
    flex-wrap: wrap;
    box-sizing: border-box;
    min-height: 70px;
    gap: var(--space-3);
    padding-block: var(--space-2);
  }

  body.app-public .public-brand-wordmark {
    width: 176px !important;
    max-width: min(100%, 176px) !important;
    height: auto !important;
    max-height: 64px !important;
  }

  body.app-public .public-nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  body.app-public .public-shell .navbar-collapse,
  body.app-public .public-shell .navbar-collapse:not(.show) {
    /* The compatibility bundle has a desktop `display:flex !important`
       declaration beginning at 768px; this shell owns the 992px breakpoint. */
    display: none !important;
    flex: 1 0 100%;
  }

  body.app-public .public-shell .navbar-collapse.show,
  body.app-public .public-shell .navbar-collapse.collapsing {
    display: block !important;
  }

  body.app-public .public-nav-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    padding: var(--space-2) 0 var(--space-4);
    border-top: 1px solid var(--fnd-border);
  }

  body.app-public .public-nav-link:not(.btn) {
    justify-content: space-between;
    width: 100%;
    min-height: 46px;
    padding-inline: var(--space-2);
    border-bottom: 1px solid var(--fnd-border);
  }

  body.app-public .public-nav-link:not(.btn).is-active {
    border-left: 3px solid var(--fnd-magenta);
    border-bottom-color: var(--fnd-border);
    background: var(--fnd-blue-pale);
  }

  body.app-public .public-nav-actions .btn {
    width: 100%;
    margin-top: var(--space-3);
  }
}

@media (max-width: 420px) {
  .fnd-safety-strip__inner,
  .fnd-parent-bar__inner {
    width: min(100% - 1rem, var(--fnd-max));
  }

  .fnd-parent-bar__name {
    font-size: var(--text-xs);
  }

  .fnd-parent-bar__context {
    font-size: var(--text-xs);
  }

  body.app-public .public-brand-wordmark {
    width: 160px !important;
    max-width: min(100%, 160px) !important;
    height: auto !important;
    max-height: 58px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sc-product-more__chevron,
  body.app-public .navbar-collapse {
    transition: none !important;
  }
}
