/* AnalysisSwim unified workspace frame v=2026-11-16.2
   One final geometry contract for My Profile, My Swimming,
   My Subscriptions and Personal Best Tracker. */

:root {
  --as-frame-max: 1180px;
  --as-frame-sidebar: 270px;
  --as-frame-gap: 24px;
  --as-frame-page-x: 16px;
  --as-frame-page-top: 32px;
  --as-frame-page-bottom: 56px;
  --as-frame-hero-x: 28px;
  --as-frame-hero-y: 25px;
  --as-frame-radius: 16px;
  --as-frame-border: #b7dcf5;
  --as-frame-blue: #0789df;
  --as-frame-ink: #142941;
  --as-frame-muted: #4f6782;
}

/* Account page canvas and shared horizontal frame. */
:is(.member-profile-page, .ap-page, #subscriptionsPage.subscriptions-page) {
  box-sizing: border-box !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: calc(100vh - 64px) !important;
  margin: 0 !important;
  padding: var(--as-frame-page-top) var(--as-frame-page-x) var(--as-frame-page-bottom) !important;
}

:is(.member-profile-page, .ap-page, #subscriptionsPage.subscriptions-page)
  > .as-account-shell {
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: var(--as-frame-max) !important;
  min-width: 0 !important;
  margin: 0 auto !important;
  padding: 0 !important;
}

/* The hero is identical on every account-facing workspace. */
:is(.member-profile-page, .ap-page, #subscriptionsPage.subscriptions-page)
  .as-account-shell > .as-account-hero,
body.management-page #asTeamWorkspace.has-pb-tracker-page-hero #asTeamPageHero {
  position: relative !important;
  isolation: isolate !important;
  box-sizing: border-box !important;
  display: flex !important;
  align-items: center !important;
  width: 100% !important;
  min-height: 154px !important;
  margin: 0 0 24px !important;
  padding: var(--as-frame-hero-y) var(--as-frame-hero-x) !important;
  overflow: hidden !important;
  border: 1px solid var(--as-frame-border) !important;
  border-top: 3px solid var(--as-frame-blue) !important;
  border-radius: var(--as-frame-radius) !important;
  background: linear-gradient(112deg, #fff 0%, #f8fcff 62%, #e2f3ff 100%) !important;
  box-shadow: 0 14px 34px rgba(20, 56, 88, 0.08) !important;
}

/* The PB Tracker hero has three direct children instead of one inner wrapper.
   Keep those children in the same vertical order used by every account hero. */
body.management-page
  #asTeamWorkspace.has-pb-tracker-page-hero
  #asTeamPageHero {
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: center !important;
}

:is(.member-profile-page, .ap-page, #subscriptionsPage.subscriptions-page)
  .as-account-shell > .as-account-hero::before,
:is(.member-profile-page, .ap-page, #subscriptionsPage.subscriptions-page)
  .as-account-shell > .as-account-hero::after,
body.management-page #asTeamWorkspace.has-pb-tracker-page-hero #asTeamPageHero::before,
body.management-page #asTeamWorkspace.has-pb-tracker-page-hero #asTeamPageHero::after {
  content: none !important;
  display: none !important;
}

:is(.member-profile-page, .ap-page, #subscriptionsPage.subscriptions-page)
  .as-account-shell > .as-account-hero > div,
body.management-page #asTeamWorkspace.has-pb-tracker-page-hero #asTeamPageHero > * {
  position: relative !important;
  z-index: 1 !important;
}

:is(.member-profile-eyebrow, .ap-eyebrow, .subscriptions-kicker),
body.management-page #asTeamWorkspace.has-pb-tracker-page-hero
  #asTeamPageHero .as-team-page-hero__eyebrow {
  margin: 0 0 6px !important;
  color: #006fb8 !important;
  font-family: Arial, Helvetica, sans-serif !important;
  font-size: 11px !important;
  font-style: normal !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
  letter-spacing: 0.18em !important;
  text-transform: uppercase !important;
}

:is(.member-profile-page, .ap-page, #subscriptionsPage.subscriptions-page)
  .as-account-shell > .as-account-hero h1,
body.management-page #asTeamWorkspace.has-pb-tracker-page-hero #asTeamPageHero h1 {
  margin: 0 !important;
  color: var(--as-frame-ink) !important;
  font-family: "Philosopher", Georgia, serif !important;
  font-size: clamp(38px, 4.2vw, 54px) !important;
  font-style: italic !important;
  font-weight: 700 !important;
  line-height: 0.98 !important;
  letter-spacing: -0.025em !important;
}

:is(.member-profile-lead, .subscriptions-lead),
.ap-page .ap-page-hero > div > p:last-child,
body.management-page #asTeamWorkspace.has-pb-tracker-page-hero
  #asTeamPageHero .as-team-page-hero__lead {
  max-width: 820px !important;
  margin: 10px 0 0 !important;
  color: var(--as-frame-muted) !important;
  font-family: Arial, Helvetica, sans-serif !important;
  font-size: 15px !important;
  font-style: normal !important;
  font-weight: 400 !important;
  line-height: 1.55 !important;
}

/* Sidebar and content use one numerical grid everywhere. */
:is(.member-profile-page, .ap-page, #subscriptionsPage.subscriptions-page)
  .as-account-layout {
  box-sizing: border-box !important;
  display: grid !important;
  grid-template-columns: var(--as-frame-sidebar) minmax(0, 1fr) !important;
  align-items: start !important;
  gap: var(--as-frame-gap) !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

:is(.member-profile-page, .ap-page, #subscriptionsPage.subscriptions-page)
  .as-account-layout > .as-account-sidebar {
  box-sizing: border-box !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  margin: 0 !important;
}

:is(.member-profile-page, .ap-page, #subscriptionsPage.subscriptions-page)
  .as-account-layout > .as-account-content {
  box-sizing: border-box !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  margin: 0 !important;
}

/* Personal Best Tracker uses the same account navigation and grid. */
body.management-page #asTeamWorkspace.has-pb-tracker-page-hero {
  box-sizing: border-box !important;
  display: grid !important;
  grid-template-columns: var(--as-frame-sidebar) minmax(0, 1fr) !important;
  grid-auto-flow: row !important;
  align-items: start !important;
  gap: 0 var(--as-frame-gap) !important;
  width: calc(100% - (2 * var(--as-frame-page-x))) !important;
  max-width: var(--as-frame-max) !important;
  min-width: 0 !important;
  margin: 0 auto !important;
  padding: var(--as-frame-page-top) 0 var(--as-frame-page-bottom) !important;
}

body.management-page #asTeamWorkspace.has-pb-tracker-page-hero
  > :is(#asTeamMenuToggle, #asTeamSidebarBackdrop, #asTeamSidebar) {
  display: none !important;
}

body.management-page #asTeamWorkspace.has-pb-tracker-page-hero
  > #asTeamContent {
  display: contents !important;
}

body.management-page #asTeamWorkspace.has-pb-tracker-page-hero
  #asTeamContent > .as-workspace-switcher-mount {
  display: none !important;
}

body.management-page #asTeamWorkspace.has-pb-tracker-page-hero
  #asTeamPageHero {
  grid-column: 1 / -1 !important;
  grid-row: 1 !important;
}

body.management-page #asTeamWorkspace.has-pb-tracker-page-hero
  > .as-account-sidebar {
  grid-column: 1 !important;
  grid-row: 2 !important;
  box-sizing: border-box !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  margin: 0 !important;
}

body.management-page #asTeamWorkspace.has-pb-tracker-page-hero
  #personalBestApp {
  grid-column: 2 !important;
  grid-row: 2 !important;
  box-sizing: border-box !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

body.management-page #asTeamWorkspace.has-pb-tracker-page-hero
  #personalBestApp .pb-shell {
  box-sizing: border-box !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

@media (max-width: 1100px) {
  :root {
    --as-frame-sidebar: 230px;
    --as-frame-gap: 20px;
  }
}

@media (max-width: 900px) {
  :is(.member-profile-page, .ap-page, #subscriptionsPage.subscriptions-page)
    .as-account-layout {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  :is(.member-profile-page, .ap-page, #subscriptionsPage.subscriptions-page)
    .as-account-layout > :is(.as-account-sidebar, .as-account-content) {
    grid-column: 1 !important;
    width: 100% !important;
  }

  body.management-page #asTeamWorkspace.has-pb-tracker-page-hero {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 20px 0 !important;
  }

  body.management-page #asTeamWorkspace.has-pb-tracker-page-hero
    #asTeamPageHero {
    grid-column: 1 !important;
    grid-row: 1 !important;
    margin-bottom: 0 !important;
  }

  body.management-page #asTeamWorkspace.has-pb-tracker-page-hero
    > .as-account-sidebar {
    grid-column: 1 !important;
    grid-row: 2 !important;
  }

  body.management-page #asTeamWorkspace.has-pb-tracker-page-hero
    #personalBestApp {
    grid-column: 1 !important;
    grid-row: 3 !important;
  }
}

@media (max-width: 640px) {
  :root {
    --as-frame-page-x: 8px;
    --as-frame-page-top: 16px;
    --as-frame-page-bottom: 54px;
    --as-frame-hero-x: 17px;
    --as-frame-hero-y: 20px;
  }

  :is(.member-profile-page, .ap-page, #subscriptionsPage.subscriptions-page)
    .as-account-shell > .as-account-hero,
  body.management-page #asTeamWorkspace.has-pb-tracker-page-hero #asTeamPageHero {
    min-height: 0 !important;
    margin-bottom: 16px !important;
  }

  :is(.member-profile-page, .ap-page, #subscriptionsPage.subscriptions-page)
    .as-account-shell > .as-account-hero h1,
  body.management-page #asTeamWorkspace.has-pb-tracker-page-hero #asTeamPageHero h1 {
    font-size: clamp(38px, 11vw, 46px) !important;
    line-height: 1 !important;
  }

  :is(.member-profile-lead, .subscriptions-lead),
  .ap-page .ap-page-hero > div > p:last-child,
  body.management-page #asTeamWorkspace.has-pb-tracker-page-hero
    #asTeamPageHero .as-team-page-hero__lead {
    font-size: 16px !important;
    line-height: 1.45 !important;
  }
}
