/* Page-wide team identity layer.

   Appearance owns luminance and accessible base colors. Team identity then
   tints the environment. Analytical red/green and workflow-state colors remain
   untouched so identity never changes the meaning of evidence. */

body.team-context-theme {
  --team-accent-b-effective: var(--team-accent-b, var(--team-accent));
  --team-page-field: color-mix(in srgb, var(--bg) 91%, var(--team-primary) 9%);
  --team-page-field-deep: color-mix(in srgb, var(--bg) 86%, var(--team-accent-b-effective) 14%);
  --team-surface: color-mix(in srgb, var(--card) 95%, var(--team-primary) 5%);
  --team-surface-alt: color-mix(in srgb, var(--card) 92%, var(--team-accent) 8%);
  --team-divider: color-mix(in srgb, var(--line) 72%, var(--team-primary) 28%);
  --team-divider-accent: color-mix(in srgb, var(--line) 58%, var(--team-accent-b-effective) 42%);
  --team-nav-surface: color-mix(in srgb, var(--navy) 72%, var(--team-primary) 28%);
  --team-nav-accent: color-mix(in srgb, var(--team-nav-surface) 78%, var(--team-accent-b-effective) 22%);
  --team-identity-ink: color-mix(in srgb, var(--ink) 76%, var(--team-primary) 24%);
  background:
    radial-gradient(circle at 12% 0%, color-mix(in srgb, var(--team-accent) 8%, transparent) 0 24%, transparent 48%),
    linear-gradient(155deg, var(--team-page-field), var(--team-page-field-deep));
  background-attachment: fixed;
}

.team-context-theme .topbar.global-header {
  --shell-nav-surface: var(--team-nav-surface);
  background:
    linear-gradient(100deg, var(--team-nav-surface), var(--team-nav-accent));
  border-bottom-color: var(--team-divider-accent);
  box-shadow:
    inset 0 -3px 0 color-mix(in srgb, var(--team-accent) 52%, transparent),
    0 4px 18px rgba(8,20,42,.16);
}

/* The canonical football logo has a white canvas baked into the SVG. Treat
   that canvas as part of a deliberate circular badge instead of exposing its
   rectangular bounds in the nav. */
.team-context-theme .shell-brand {
  width: 118px;
  height: 118px;
  border: 3px solid color-mix(in srgb, #fff 58%, var(--team-accent-b-effective) 42%);
  border-radius: 50%;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 5px 18px rgba(5,16,35,.24), 0 0 0 3px color-mix(in srgb, var(--team-nav-surface) 58%, transparent);
}

.team-context-theme .shell-brand::before {
  content: none;
}

.team-context-theme .shell-brand img {
  width: 124px;
  height: auto;
  max-height: none;
  object-fit: contain;
  object-position: center;
  transform: translateX(-16px);
  filter: none;
}

.team-context-theme .context-shell {
  border-bottom-color: var(--team-divider);
  background:
    linear-gradient(90deg,
      color-mix(in srgb, var(--team-surface) 94%, var(--team-primary) 6%),
      color-mix(in srgb, var(--team-surface) 94%, var(--team-accent-b-effective) 6%));
}

.team-context-theme .context-state-drawer,
.team-context-theme .context-drawer-panel,
.team-context-theme .context-field select {
  border-color: var(--team-divider);
}

.team-context-theme .context-drawer-panel {
  background: color-mix(in srgb, var(--team-page-field) 64%, var(--team-surface) 36%);
}

.team-context-theme .page {
  position: relative;
}

.team-context-theme .team-context-hero {
  border: 1px solid var(--team-divider);
  border-left: 6px solid var(--team-primary);
  background:
    linear-gradient(108deg,
      color-mix(in srgb, var(--team-primary) 13%, transparent),
      transparent 46%),
    linear-gradient(145deg,
      var(--team-surface),
      color-mix(in srgb, var(--team-surface) 88%, var(--team-accent-b-effective) 12%));
  box-shadow: 0 9px 28px color-mix(in srgb, var(--team-primary) 8%, transparent);
}

.team-context-theme .team-context-hero::after {
  width: min(42%, 430px);
  background:
    linear-gradient(132deg,
      transparent 8%,
      color-mix(in srgb, var(--team-accent-b-effective) 13%, transparent) 54%,
      color-mix(in srgb, var(--team-primary) 9%, transparent));
}

.team-context-theme .team-context-hero .eyebrow,
.team-context-theme .section-title .eyebrow,
.team-context-theme .dashboard-section-head .eyebrow,
.team-context-theme .dashboard-context-card .eyebrow {
  color: var(--team-identity-ink);
}

/* Identity/environment surfaces. Analytical positive/negative zones are
   deliberately excluded from these broad surface rules. */
.team-context-theme .card,
.team-context-theme .analytical-surface,
.team-context-theme .source-chip,
.team-context-theme .roster-player-card,
.team-context-theme .personnel-nfl-player,
.team-context-theme .league-context-panel,
.team-context-theme .scenario-manage-link {
  background: var(--team-surface);
  border-color: var(--team-divider);
}

.team-context-theme .dashboard-context-card:nth-child(even),
.team-context-theme .next-matchup-card,
.team-context-theme .source-status-grid span {
  background: var(--team-surface-alt);
}

.team-context-theme .matchup-column-head,
.team-context-theme .personnel-position-filter a,
.team-context-theme .filters a:not(.active) {
  background: color-mix(in srgb, var(--team-surface) 90%, var(--team-primary) 10%);
  border-color: var(--team-divider);
}

.team-context-theme .matchup-row,
.team-context-theme .metric-profile-zone,
.team-context-theme .roster-position-group h3,
.team-context-theme table td,
.team-context-theme table th {
  border-color: var(--team-divider);
}

.team-context-theme .personnel-position-filter a.active,
.team-context-theme .filters a.active,
.team-context-theme .context-apply {
  background: var(--team-primary);
  border-color: color-mix(in srgb, var(--team-primary) 75%, var(--team-accent-b-effective) 25%);
  color: #fff;
}

.team-context-theme footer {
  color: color-mix(in srgb, var(--muted) 78%, var(--team-primary) 22%);
}

/* The existing Player Strip evidence grammar owns semantic red/green.
   These explicit guards make the precedence legible in the cascade. */
.team-context-theme .positive-zone,
.team-context-theme .positive-metric,
.team-context-theme .metric-profile-bar.positive,
.team-context-theme .full-metric-row.metric-positive .metric-impact-bipolar > span {
  --team-identity-surface: initial;
}

.team-context-theme .negative-zone,
.team-context-theme .negative-metric,
.team-context-theme .metric-profile-bar.negative,
.team-context-theme .full-metric-row.metric-negative .metric-impact-bipolar > span {
  --team-identity-surface: initial;
}

/* Roster groups remain independently collapsible so long position rooms can be
   scanned without losing their position labels, counts, or player identity. */
.team-context-theme .roster-position-group > summary.roster-position-summary {
  position: relative;
  min-height: 38px;
  padding-right: 34px;
  list-style: none;
  cursor: pointer;
  user-select: none;
}

.team-context-theme .roster-position-group > summary.roster-position-summary::-webkit-details-marker {
  display: none;
}

.team-context-theme .roster-position-summary::after {
  content: "▾";
  position: absolute;
  right: 10px;
  top: 50%;
  margin: 0;
  color: var(--muted);
  font-size: .78rem;
  transform: translateY(-50%);
  transition: transform .14s ease;
}

.team-context-theme .roster-position-group:not([open]) > .roster-position-summary::after {
  transform: translateY(-50%) rotate(-90deg);
}

.team-context-theme .roster-position-mini-portraits {
  display: none;
  align-items: center;
  gap: 3px;
  min-width: 0;
  margin: 0 auto 0 12px;
}

.team-context-theme .roster-position-group:not([open]) > .roster-position-summary .roster-position-mini-portraits {
  display: flex;
}

.team-context-theme .roster-position-mini-portrait,
.team-context-theme .roster-position-mini-more {
  width: 29px;
  height: 29px;
  flex: none;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--team-divider) 76%, #fff 24%);
  border-radius: 50%;
  background: color-mix(in srgb, var(--team-surface) 78%, var(--team-primary) 22%);
  color: var(--team-identity-ink);
  font-size: .61rem;
  font-weight: 850;
}

.team-context-theme .roster-position-mini-portrait img {
  width: 37px;
  height: 37px;
  max-width: none;
  object-fit: contain;
  object-position: center top;
  transform: translateY(-3px);
}

.team-context-theme .roster-position-mini-more {
  width: auto;
  min-width: 29px;
  padding: 0 6px;
}

/* ESPN portrait canvases are not all cropped identically. Shift the common
   source canvas upward so the visible face line, rather than the raw image
   bounds, is aligned across strips. */
.team-context-theme .player-analytical-strip .analytical-portrait {
  display: grid;
  place-items: start center;
}

.team-context-theme .player-analytical-strip .analytical-portrait img {
  width: 100%;
  height: 112%;
  object-fit: contain;
  object-position: center top;
  transform: translateY(-10%);
  transform-origin: center top;
}

@media (max-width: 760px) {
  body.team-context-theme { background-attachment: scroll; }
  .team-context-theme .team-context-hero::after { width: 55%; }
  .team-context-theme .shell-brand {
    width: 96px;
    min-width: 96px;
    height: 96px;
  }
  .team-context-theme .shell-brand img {
    width: 104px;
    transform: translateX(-13px);
  }
  .team-context-theme .roster-position-mini-portraits { gap: 2px; }
  .team-context-theme .roster-position-mini-portrait:nth-child(n+6) { display: none; }
}


/* Draft 3 tessellation foundation */
body.team-context-theme {
  --team-page-field: color-mix(in srgb, var(--bg) 90%, var(--team-primary) 10%);
  --team-page-field-deep: color-mix(in srgb, var(--bg) 86%, var(--team-accent-b-effective) 14%);
  background: var(--team-page-field);
  background-image: linear-gradient(180deg, var(--team-page-field), var(--team-page-field-deep));
}

.team-context-theme .topbar.global-header,
.team-context-theme .site-footer {
  background-color: color-mix(in srgb, var(--team-primary) 78%, #0b1220 22%);
  background-image:
    linear-gradient(90deg, rgba(8,14,25,.18), rgba(8,14,25,.06) 52%, rgba(8,14,25,.24)),
    var(--team-tessellation);
  background-size: cover;
  background-position: center;
}

.team-context-theme .topbar.global-header {
  border-bottom-color: color-mix(in srgb, var(--team-accent-a) 68%, #c8ced8 32%);
  box-shadow: 0 4px 18px rgba(8,20,42,.18);
}

.team-context-theme .site-footer {
  color: rgba(255,255,255,.86);
  border-top-color: color-mix(in srgb, var(--team-accent-a) 60%, #aeb6c2 40%);
}
.team-context-theme .site-footer a { color: #fff; }

.team-context-theme .team-context-hero {
  position: relative;
  isolation: isolate;
  min-height: 184px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(18px, 4vw, 48px);
  overflow: hidden;
  padding: 26px clamp(22px, 4vw, 52px);
  border: 1px solid color-mix(in srgb, var(--team-divider) 74%, #8a93a0 26%);
  border-bottom: 4px solid var(--team-accent-a);
  border-radius: 10px 10px 0 0;
  background-color: color-mix(in srgb, var(--team-primary) 72%, #111827 28%);
  background-image:
    linear-gradient(90deg, rgba(5,10,18,.44) 0%, rgba(5,10,18,.26) 52%, rgba(5,10,18,.12) 100%),
    var(--team-tessellation);
  background-size: cover;
  background-position: center;
  color: #fff;
  box-shadow: none;
}
.team-context-theme .team-context-hero::after { content: none; }
.team-context-theme .team-context-hero > div:first-child {
  position: relative;
  z-index: 2;
  min-width: 0;
  max-width: min(760px, 68%);
}
.team-context-theme .team-context-hero h1,
.team-context-theme .team-context-hero h2,
.team-context-theme .team-context-hero .eyebrow { color: #fff; }
.team-context-theme .team-context-hero p,
.team-context-theme .team-context-hero .muted {
  color: rgba(255,255,255,.84);
}

.team-hero-identity {
  position: relative;
  z-index: 2;
  flex: none;
  display: grid;
  justify-items: center;
  gap: 8px;
}
.team-context-theme .team-context-hero .team-identity-frame {
  width: 144px;
  height: 144px;
  flex: 0 0 144px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.42);
  border-bottom: 10px solid var(--team-accent-a);
  border-radius: 12px;
  background:
    linear-gradient(180deg,
      color-mix(in srgb, var(--team-primary) 88%, #0b1220 12%) 0 76%,
      var(--team-accent-a) 76% 88%,
      var(--team-accent-b) 88% 100%);
  box-shadow: 0 12px 26px rgba(0,0,0,.24), inset 0 0 0 5px rgba(255,255,255,.04);
}
.team-context-theme .team-context-hero .team-identity-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}
.team-context-theme .team-context-hero .team-identity-code {
  font-family: var(--identity-font);
  font-size: 2.15rem;
  font-weight: 900;
  letter-spacing: .08em;
  color: var(--team-accent-b);
  text-shadow: 0 2px 9px rgba(0,0,0,.42);
}
.team-hero-motto {
  max-width: 190px;
  overflow: hidden;
  color: rgba(255,255,255,.92);
  font-size: .78rem;
  font-style: italic;
  font-weight: 780;
  letter-spacing: .035em;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 760px) {
  .team-context-theme .team-context-hero {
    min-height: 154px;
    padding: 20px 18px;
  }
  .team-context-theme .team-context-hero > div:first-child { max-width: calc(100% - 98px); }
  .team-context-theme .team-context-hero .team-identity-frame {
    width: 86px;
    height: 86px;
    flex-basis: 86px;
    border-bottom-width: 7px;
  }
  .team-context-theme .team-context-hero .team-identity-code { font-size: 1.35rem; }
  .team-hero-motto { display: none; }
}


/* Draft 3 NFL hero information hierarchy. */
.team-context-theme .team-context-hero .team-context-hero-copy {
  position: relative;
  z-index: 2;
  min-width: 0;
  max-width: min(900px, 74%);
}
.team-context-hero-kicker {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: .42rem;
  margin: 0 0 10px;
  color: rgba(255,255,255,.86);
  font-size: .9rem;
  line-height: 1.42;
}
.team-context-hero-kicker strong {
  color: #fff;
  font-size: 1rem;
  font-weight: 850;
  letter-spacing: .01em;
}
.team-context-hero-kicker span {
  font-weight: 400;
}
.team-context-theme .team-context-hero .team-context-hero-copy h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(2.55rem, 4.6vw, 4.65rem);
  line-height: .98;
  letter-spacing: -.035em;
}
.team-context-theme .team-context-hero .team-context-hero-motto {
  margin: 14px 0 0;
  color: rgba(255,255,255,.94);
  font-size: 1.08rem;
  font-style: italic;
  font-weight: 520;
  line-height: 1.25;
  text-shadow: 0 1px 4px rgba(0,0,0,.26);
}
.team-context-theme .team-context-hero .team-hero-identity {
  gap: 0;
}
@media (max-width: 760px) {
  .team-context-theme .team-context-hero .team-context-hero-copy {
    max-width: calc(100% - 98px);
  }
  .team-context-hero-kicker {
    display: block;
    margin-bottom: 8px;
    font-size: .76rem;
  }
  .team-context-hero-kicker strong {
    display: block;
    margin-bottom: 2px;
    font-size: .84rem;
  }
  .team-context-theme .team-context-hero .team-context-hero-copy h1 {
    font-size: clamp(2rem, 9vw, 3rem);
  }
  .team-context-theme .team-context-hero .team-context-hero-motto {
    margin-top: 9px;
    font-size: .9rem;
  }
}


/* Draft 3 full team-field propagation and tessellated portrait stage. */
body.team-context-theme {
  --team-page-field: color-mix(in srgb, var(--bg) 72%, var(--team-primary) 28%);
  --team-page-field-deep: color-mix(in srgb, var(--bg) 70%, var(--team-accent-b-effective) 30%);
  --team-surface: color-mix(in srgb, var(--card) 84%, var(--team-primary) 16%);
  --team-surface-alt: color-mix(in srgb, var(--card) 78%, var(--team-accent-a) 22%);
  --team-divider: color-mix(in srgb, var(--line) 48%, var(--team-primary) 52%);
  --team-divider-accent: color-mix(in srgb, var(--line) 34%, var(--team-accent-a) 66%);
  background-color: var(--team-page-field);
  background-image: none;
}
.team-context-theme .context-shell,
.team-context-theme .context-selector,
.team-context-theme .context-state-drawer,
.team-context-theme .context-drawer-panel {
  background-color: color-mix(in srgb, var(--team-page-field) 64%, var(--team-surface) 36%);
  background-image: none;
  border-color: var(--team-divider);
}
.team-context-theme .topbar.global-header,
.team-context-theme .site-footer {
  background-color: color-mix(in srgb, var(--team-primary) 78%, #0b1220 22%);
  background-image: var(--team-tessellation);
  background-size: cover;
  background-position: center;
}
.team-context-theme .team-context-hero {
  background-color: color-mix(in srgb, var(--team-primary) 72%, #111827 28%);
  background-image: var(--team-tessellation);
  background-size: cover;
  background-position: center;
}
.team-context-theme .team-context-hero .team-context-hero-copy {
  align-self: flex-start;
  padding-top: 2px;
}
.team-context-theme .team-context-hero .team-context-hero-copy h1 {
  margin-top: 0;
}
.team-context-theme .team-context-hero .team-context-hero-motto {
  margin-top: 9px;
  font-size: clamp(1.25rem, 1.75vw, 1.55rem);
  font-weight: 560;
}
.team-context-theme .card,
.team-context-theme .analytical-surface,
.team-context-theme .nfl-context-info-strip,
.team-context-theme .roster-directory-controls {
  background-color: var(--team-surface);
  background-image: none;
  border-color: var(--team-divider);
}
.team-context-theme .nfl-context-source-chip,
.team-context-theme .personnel-position-filter a,
.team-context-theme .filters a,
.team-context-theme .roster-scope-option,
.team-context-theme .roster-status-filter select,
.team-context-theme .context-field select {
  background-color: color-mix(in srgb, var(--team-surface) 78%, var(--team-accent-b-effective) 22%);
  background-image: none;
  border-color: var(--team-divider);
}
.team-context-theme .personnel-position-filter a.active,
.team-context-theme .filters a.active,
.team-context-theme .roster-scope-option.is-current {
  background-color: var(--team-primary);
  background-image: none;
  border-color: var(--team-accent-a);
  color: var(--team-accent-b-effective);
}
.team-context-theme .team-context-hero .team-identity-frame {
  position: relative;
  background: var(--team-primary);
  border-bottom-color: var(--team-accent-a);
  box-shadow:
    inset 0 -10px 0 var(--team-accent-b-effective),
    0 12px 26px rgba(0,0,0,.24),
    inset 0 0 0 5px rgba(255,255,255,.04);
}
.team-context-theme .player-analytical-strip .analytical-portrait {
  display: grid;
  place-items: end center;
  overflow: hidden;
  background-color: color-mix(in srgb, var(--team-primary) 82%, #0b1220 18%);
  background-image: var(--team-tessellation) !important;
  background-size: 70% auto !important;
  background-repeat: repeat !important;
  background-position: center !important;
}
.team-context-theme .player-analytical-strip .analytical-portrait img {
  width: 94%;
  height: 94%;
  align-self: end;
  object-fit: contain;
  object-position: center bottom;
  transform: none;
  transform-origin: center bottom;
}


/* Draft 3 team-owned identity amplification. */
body.team-context-theme {
  --team-page-field: color-mix(in srgb, var(--team-primary) 76%, #111827 24%);
  --team-page-field-deep: color-mix(in srgb, var(--team-primary) 64%, var(--team-accent-a) 36%);
  --team-surface: color-mix(in srgb, var(--card) 66%, var(--team-primary) 34%);
  --team-surface-alt: color-mix(in srgb, var(--team-surface) 76%, var(--team-accent-b-effective) 24%);
  --team-divider: color-mix(in srgb, var(--team-primary) 68%, var(--team-accent-b-effective) 32%);
  --team-divider-accent: color-mix(in srgb, var(--team-accent-a) 72%, var(--team-primary) 28%);
  background-color: var(--team-page-field) !important;
  background-image: none !important;
}

.team-context-theme .context-shell,
.team-context-theme .context-selector,
.team-context-theme .context-state-drawer,
.team-context-theme .context-drawer-panel {
  background-color: color-mix(in srgb, var(--team-surface) 58%, var(--team-primary) 42%) !important;
  background-image: none !important;
  border-color: var(--team-divider) !important;
}

.team-context-theme .team-context-hero {
  background-color: color-mix(in srgb, var(--team-primary) 84%, #0b1220 16%) !important;
  background-image: var(--team-tessellation) !important;
  background-size: cover !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  border-color: var(--team-divider) !important;
  border-bottom-color: var(--team-accent-a) !important;
}

.team-context-theme .nfl-context-info-strip,
.team-context-theme .card,
.team-context-theme .analytical-surface,
.team-context-theme .roster-directory-controls {
  background-color: var(--team-surface) !important;
  background-image: none !important;
  border-color: var(--team-divider) !important;
}

.team-context-theme .context-field select,
.team-context-theme .nfl-context-source-chip,
.team-context-theme .personnel-position-filter a,
.team-context-theme .filters a,
.team-context-theme .roster-scope-option,
.team-context-theme .roster-status-filter select {
  background-color: var(--team-surface-alt) !important;
  background-image: none !important;
  border-color: var(--team-divider) !important;
}

/* The pending target owns the Apply Context button. Current-page theme rules
   must never mask the selected team's primary color. */
.team-context-theme .context-apply.is-context-preview {
  background-color: var(--context-preview-primary) !important;
  background-image: none !important;
  border-color: var(--context-preview-accent-a) !important;
  color: var(--context-preview-accent-b) !important;
  box-shadow: none !important;
}
.team-context-theme .context-apply.is-context-preview::after {
  background: var(--context-preview-accent-a) !important;
}

/* Use the same tessellation scale as the page while the portrait treatment is
   being validated; do not introduce a separate micro-density yet. */
.team-context-theme .player-analytical-strip .analytical-portrait {
  background-image: var(--team-tessellation) !important;
  background-size: 1440px 240px !important;
  background-repeat: repeat !important;
  background-position: center !important;
}


/* Draft 3 hero/surface cascade correction. */
.team-context-theme .team-context-hero.analytical-surface {
  background-color: color-mix(in srgb, var(--team-primary) 84%, #0b1220 16%) !important;
  background-image: var(--team-tessellation) !important;
  background-size: cover !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
}


/* Draft 3 request-local fantasy hero identity. */
.team-context-theme .team-context-hero .team-hero-identity .team-identity-frame {
  background: var(--identity-primary, var(--team-primary));
  border-bottom-color: var(--identity-accent-a, var(--team-accent-a));
  box-shadow:
    inset 0 -10px 0 var(--identity-accent-b, var(--team-accent-b-effective)),
    0 12px 26px rgba(0,0,0,.24),
    inset 0 0 0 5px rgba(255,255,255,.04);
}
.team-context-theme .team-context-hero .team-hero-identity .team-identity-code {
  color: var(--identity-accent-b, var(--team-accent-b-effective));
}


/* Draft 3 unauthenticated Season Lab shell. */
.auth-page-shell {
  --auth-navy: #0b2343;
  --auth-blue: #245d98;
  --auth-blue-soft: #86a9c8;
  --auth-red: #c53b3f;
  --auth-ice: #eef5f9;
  min-height: 100vh;
  background:
    linear-gradient(150deg, rgba(36,93,152,.18) 0 12%, transparent 12% 24%, rgba(134,169,200,.08) 24% 36%, transparent 36% 48%, rgba(197,59,63,.08) 48% 60%, transparent 60% 100%),
    #0b1421;
  color: #132238;
}

.auth-page-shell .topbar.global-header {
  min-height: 154px;
  padding: 0;
  overflow: visible;
  background-color: var(--auth-navy);
  background-image:
    linear-gradient(30deg, rgba(255,255,255,.055) 12%, transparent 12.5%, transparent 87%, rgba(255,255,255,.055) 87.5%),
    linear-gradient(150deg, rgba(36,93,152,.34) 12%, transparent 12.5%, transparent 87%, rgba(197,59,63,.16) 87.5%);
  background-size: 34px 58px;
  border-bottom: 1px solid rgba(134,169,200,.28);
  box-shadow: 0 12px 34px rgba(0,0,0,.22);
}

.auth-page-shell .shell-brand {
  top: 10px;
  width: 154px;
  height: 154px;
  padding: 24px 13px;
  background: #fff;
  border: 1px solid rgba(11,35,67,.28);
  box-shadow:
    0 12px 28px rgba(0,0,0,.25),
    0 0 0 5px rgba(255,255,255,.16),
    inset 0 -5px 0 rgba(197,59,63,.9),
    inset 0 0 0 2px rgba(36,93,152,.42);
}

.auth-page-shell .shell-brand img {
  filter: none;
}

.auth-page-shell .page {
  width: 100%;
  max-width: 1180px;
  min-height: calc(100vh - 230px);
  margin: 0 auto;
  padding: 48px 20px 64px;
}

.auth-page-shell .auth-shell {
  min-height: 54vh;
  padding: 28px 0;
}

.auth-page-shell .auth-card {
  position: relative;
  width: min(480px, 100%);
  padding: 32px 34px 34px;
  overflow: hidden;
  border: 1px solid rgba(134,169,200,.72);
  border-radius: 18px;
  background: rgba(248,251,253,.97);
  color: #132238;
  box-shadow:
    0 24px 60px rgba(0,0,0,.34),
    inset 0 1px 0 rgba(255,255,255,.9);
}

.auth-page-shell .auth-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 6px;
  background: linear-gradient(90deg, var(--auth-blue) 0 46%, var(--auth-ice) 46% 54%, var(--auth-red) 54% 100%);
}

.auth-page-shell .wide-auth .auth-card {
  width: min(650px, 100%);
}

.auth-page-shell .auth-card .eyebrow {
  margin-top: 4px;
  color: var(--auth-blue);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .16em;
  opacity: 1;
}

.auth-page-shell .auth-card h1 {
  margin: 7px 0 9px;
  color: #0b2343;
  font-size: clamp(34px, 4vw, 42px);
  line-height: 1.05;
  letter-spacing: -.025em;
}

.auth-page-shell .auth-card .muted {
  margin: 0 0 22px;
  color: #5b6980;
  font-size: 14px;
  line-height: 1.55;
}

.auth-page-shell .stack-form {
  gap: 15px;
}

.auth-page-shell .stack-form label,
.auth-page-shell .wide-field {
  gap: 7px;
  color: #17253b;
  font-size: 12px;
  font-weight: 850;
}

.auth-page-shell .stack-form input,
.auth-page-shell .stack-form select,
.auth-page-shell .wide-field input,
.auth-page-shell .wide-field select,
.auth-page-shell .number-box {
  min-height: 48px;
  border: 1px solid #b8c7d6;
  border-radius: 9px;
  background: #fff;
  color: #132238;
  box-shadow: inset 0 1px 2px rgba(11,35,67,.04);
}

.auth-page-shell .stack-form input:focus,
.auth-page-shell .stack-form select:focus,
.auth-page-shell .wide-field input:focus,
.auth-page-shell .wide-field select:focus,
.auth-page-shell .number-box:focus {
  outline: 3px solid rgba(36,93,152,.18);
  border-color: var(--auth-blue);
}

.auth-page-shell .primary-button {
  position: relative;
  min-height: 50px;
  margin-top: 3px;
  overflow: hidden;
  border: 1px solid #07182f;
  border-radius: 9px;
  background: var(--auth-navy);
  color: #fff;
  font-weight: 850;
  box-shadow: 0 7px 18px rgba(11,35,67,.18);
}

.auth-page-shell .primary-button::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 4px;
  background: var(--auth-red);
}

.auth-page-shell .primary-button:hover {
  background: #12335d;
}

.auth-page-shell .site-footer {
  max-width: none;
  margin: 0;
  padding: 18px 24px 26px;
  border-top: 1px solid rgba(134,169,200,.18);
  color: rgba(238,245,249,.6);
  text-align: center;
}

@media (max-width: 760px) {
  .auth-page-shell .topbar.global-header {
    min-height: 112px;
    align-items: center;
  }
  .auth-page-shell .shell-brand {
    position: absolute;
    top: 8px;
    left: 50%;
    width: 118px;
    min-width: 118px;
    height: 118px;
    margin: 0;
    padding: 20px 10px;
    transform: translateX(-50%);
  }
  .auth-page-shell .page {
    padding: 38px 14px 46px;
  }
  .auth-page-shell .auth-card {
    padding: 28px 22px 26px;
    border-radius: 15px;
  }
}
