/**
 * Logged-in pages on sctheme — content card, sidebars, forms on 2627 shell.
 */

body.sc-authenticated-page {
  background-color: var(--sc-auth-page-bg, #0b1017) !important;
  color: #d8dee8;
}

body.sc-authenticated-page::before {
  opacity: 0.18;
}

body.sc-authenticated-page .page-wrapper,
body.sc-authenticated-page .layout-content,
body.sc-authenticated-page main,
body.sc-authenticated-page .region-content {
  background: transparent !important;
}

body.sc-authenticated-page .sc-auth-wrap__main {
  /* Match .sc-landing-header__inner / .sc-auth-nav__inner so Staff and other
     workspace pages share the same left gutter as the site chrome. */
  width: 100%;
  max-width: 1320px;
  margin-inline: auto;
  padding-inline: clamp(1.5rem, 3.25vw, 3rem);
  padding-bottom: clamp(2.5rem, 6vw, 4.5rem);
  box-sizing: border-box;
}

body.sc-authenticated-page .sc-auth-wrap__messages {
  max-width: 1440px;
  margin: 1rem auto 0;
}

body.sc-authenticated-page .sc-auth-wrap__layout {
  max-width: 1440px;
  margin: clamp(1rem, 2.5vw, 1.75rem) auto 0;
  display: grid;
  gap: 1.5rem;
  align-items: start;
}

@media (min-width: 992px) {
  body.sc-authenticated-page .sc-auth-wrap__layout:has(.sc-auth-wrap__sidebar) {
    grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  }

  body.sc-authenticated-page .sc-auth-wrap__layout:has(.sc-auth-wrap__sidebar--first):has(.sc-auth-wrap__sidebar--second) {
    grid-template-columns: minmax(200px, 260px) minmax(0, 1fr) minmax(200px, 260px);
  }
}

body.sc-authenticated-page .sc-auth-wrap__content {
  min-width: 0;
}

/* One card surface — Drupal region/block wrappers inside stay flat. */
body.sc-authenticated-page .sc-auth-wrap__card {
  position: relative;
  background: var(--sc-surface-card-bg);
  border: 1px solid var(--sc-surface-card-border);
  border-radius: var(--sc-radius-md, 6px);
  box-shadow: var(--sc-surface-card-shadow);
  padding: clamp(1.25rem, 2.5vw, 2rem);
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

body.sc-authenticated-page .sc-auth-wrap__card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  border-radius: var(--sc-radius-md, 6px) 0 0 var(--sc-radius-md, 6px);
  background: var(--sc-backend-accent, var(--sc-brand-yellow));
  pointer-events: none;
}

body.sc-authenticated-page .sc-auth-wrap__card .region-content,
body.sc-authenticated-page .sc-auth-wrap__card .region-content > .block {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}

body.sc-authenticated-page .sc-auth-wrap__sidebar .menu,
body.sc-authenticated-page .sc-auth-wrap__sidebar .nav {
  margin: 0;
}

body.sc-authenticated-page .sc-auth-wrap__sidebar .navbar-nav {
  flex-direction: column;
}

body.sc-authenticated-page .sc-auth-wrap__sidebar .block-menu .nav-link,
body.sc-authenticated-page .sc-auth-wrap__sidebar .menu a {
  padding: 0.45rem 0;
  font-weight: 600;
}

body.sc-authenticated-page .sc-auth-wrap__sidebar .block {
  background: var(--sc-surface-card-bg-muted);
  border: 1px solid var(--sc-auth-nested-surface-border, var(--sc-surface-card-border));
  border-radius: var(--sc-radius-lg);
  padding: 1rem 1.125rem;
  margin-bottom: 1rem;
}

body.sc-authenticated-page h1,
body.sc-authenticated-page h2,
body.sc-authenticated-page .page-title,
body.sc-authenticated-page .block-title {
  color: #ffffff;
}

body.sc-authenticated-page h3 {
  color: var(--sc-heading-h3-color);
}

body.sc-authenticated-page h1,
body.sc-authenticated-page h2,
body.sc-authenticated-page h3,
body.sc-authenticated-page h4,
body.sc-authenticated-page .page-title,
body.sc-authenticated-page .block-title {
  font-family: var(--sc-display-font, "Space Grotesk", "Exo 2", Inter, sans-serif);
  letter-spacing: 0;
}

body.sc-authenticated-page h1,
body.sc-authenticated-page .page-title {
  font-size: 2.4rem;
  line-height: 1.08;
}

/* Staff controllers provide their own page heading and product surface. */
body.sc-authenticated-page.path-staff .sc-auth-wrap__card {
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

body.sc-authenticated-page.path-staff .sc-auth-wrap__card::before,
body.sc-authenticated-page.path-staff .region-content > .block-page-title-block {
  display: none;
}

body.sc-authenticated-page:not(.sc-role-hub-page) a:not(.btn):not(.button):not(.sc-auth-nav__link):not(.sc-landing-nav a):not(.nav-link):not(.tab-toggle) {
  color: var(--sc-brand-yellow);
}

body.sc-authenticated-page:not(.sc-role-hub-page) a:not(.btn):not(.button):not(.sc-auth-nav__link):not(.sc-landing-nav a):not(.nav-link):not(.tab-toggle):hover,
body.sc-authenticated-page:not(.sc-role-hub-page) a:not(.btn):not(.button):not(.sc-auth-nav__link):not(.sc-landing-nav a):not(.nav-link):not(.tab-toggle):focus {
  color: var(--sc-brand-orange);
}

/* Product navigation: quiet chrome with a precise active indicator. */
body.sc-authenticated-page .sc-auth-nav {
  background: rgba(15, 21, 29, 0.97) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
  border-bottom: 1px solid var(--sc-auth-border, #2a3542) !important;
  box-shadow: 0 10px 28px -24px rgba(0, 0, 0, 0.9);
}

/* Header + role nav — keep white text (global yellow link rule must not apply). */
body.sc-authenticated-page .sc-auth-nav__link {
  color: #ffffff !important;
}

body.sc-authenticated-page .sc-auth-nav__link:hover,
body.sc-authenticated-page .sc-auth-nav__link:focus {
  color: #ffffff !important;
  background: var(--sc-auth-surface-hover, #1c2632) !important;
  border-color: var(--sc-auth-border-strong, #3a4654) !important;
}

body.sc-authenticated-page .sc-auth-nav__link.is-active {
  color: var(--sc-brand-yellow) !important;
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: inset 0 -2px 0 var(--sc-brand-yellow) !important;
  font-weight: 700;
}

/* Search stays visible without competing with the active work area. */
body.sc-authenticated-page .sc-auth-nav__search-link {
  color: #d8dee8 !important;
  border-color: var(--sc-auth-border, #2a3542) !important;
  background: var(--sc-auth-surface, #121923) !important;
}

body.sc-authenticated-page .sc-auth-nav__search-link:hover,
body.sc-authenticated-page .sc-auth-nav__search-link:focus {
  color: #ffffff !important;
  background: var(--sc-auth-surface-hover, #1c2632) !important;
  border-color: var(--sc-auth-border-strong, #3a4654) !important;
}

body.sc-authenticated-page .sc-auth-nav__link--switch-back,
body.sc-authenticated-page .sc-auth-nav__link--switch-back:hover,
body.sc-authenticated-page .sc-auth-nav__link--switch-back:focus {
  color: var(--sc-bg-deep, #0d0d19) !important;
  background: var(--sc-brand-yellow) !important;
  border-color: var(--sc-brand-yellow) !important;
  box-shadow: none !important;
}

body.sc-authenticated-page .breadcrumb {
  max-width: 1440px;
  margin: 1rem auto 0;
  padding: 0;
  font-size: 0.8125rem;
}

body.sc-authenticated-page.path-staff .breadcrumb {
  display: none;
}

body.sc-authenticated-page .breadcrumb-item,
body.sc-authenticated-page .breadcrumb-item a {
  color: var(--sc-text-muted);
}

body.sc-authenticated-page .breadcrumb-item.active {
  color: #ffffff;
}

body.sc-authenticated-page .menu,
body.sc-authenticated-page .nav,
body.sc-authenticated-page ul.menu {
  list-style: none;
  padding-left: 0;
}

body.sc-authenticated-page .menu a,
body.sc-authenticated-page .nav-link {
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
  display: block;
  padding: 0.35rem 0;
}

body.sc-authenticated-page .menu a:hover,
body.sc-authenticated-page .menu a.is-active,
body.sc-authenticated-page .nav-link:hover,
body.sc-authenticated-page .nav-link.active {
  color: var(--sc-brand-yellow);
}

body.sc-authenticated-page .form-control,
body.sc-authenticated-page .form-select,
body.sc-authenticated-page select,
body.sc-authenticated-page textarea,
body.sc-authenticated-page input[type="text"],
body.sc-authenticated-page input[type="email"],
body.sc-authenticated-page input[type="password"],
body.sc-authenticated-page input[type="number"],
body.sc-authenticated-page input[type="tel"],
body.sc-authenticated-page input[type="url"],
body.sc-authenticated-page input[type="date"],
body.sc-authenticated-page input[type="file"] {
  min-height: 2.75rem;
  padding: 0.65rem 0.75rem;
  background-color: #0d131b !important;
  border: 1px solid var(--sc-auth-border-strong, #3a4654) !important;
  border-radius: var(--sc-radius-md, 6px) !important;
  color: #ffffff !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

body.sc-authenticated-page textarea {
  min-height: 8rem;
  resize: vertical;
}

body.sc-authenticated-page input[type="file"]::file-selector-button,
body.sc-authenticated-page input[type="file"]::-webkit-file-upload-button {
  min-height: 2.1rem;
  margin: -0.4rem 0.65rem -0.4rem -0.5rem;
  padding: 0.4rem 0.65rem;
  color: #ffffff;
  background: var(--sc-auth-surface-raised, #171f2a);
  border: 0;
  border-right: 1px solid var(--sc-auth-border-strong, #3a4654);
  font-weight: 600;
}

/* CKEditor is embedded in account forms and should read as one control. */
body.sc-authenticated-page .ck.ck-toolbar,
body.sc-authenticated-page .ck.ck-editor__top .ck-sticky-panel .ck-sticky-panel__content {
  color: #d8dee8;
  background: var(--sc-auth-surface-raised, #171f2a) !important;
  border-color: var(--sc-auth-border-strong, #3a4654) !important;
}

body.sc-authenticated-page .ck.ck-editor__main > .ck-editor__editable,
body.sc-authenticated-page .ck.ck-editor__main > .ck-editor__editable:not(.ck-focused) {
  min-height: 10rem;
  color: #ffffff;
  background: #0d131b !important;
  border-color: var(--sc-auth-border-strong, #3a4654) !important;
}

body.sc-authenticated-page .ck.ck-button,
body.sc-authenticated-page a.ck.ck-button {
  color: #d8dee8 !important;
}

body.sc-authenticated-page .ck.ck-button:hover,
body.sc-authenticated-page .ck.ck-button:focus,
body.sc-authenticated-page .ck.ck-button.ck-on {
  color: #ffffff !important;
  background: var(--sc-auth-surface-hover, #1c2632) !important;
}

body.sc-authenticated-page .ck.ck-dropdown__panel,
body.sc-authenticated-page .ck.ck-list {
  color: #d8dee8;
  background: var(--sc-auth-surface-raised, #171f2a) !important;
  border-color: var(--sc-auth-border-strong, #3a4654) !important;
}

body.sc-authenticated-page .form-select option,
body.sc-authenticated-page .form-select optgroup {
  background-color: #12182a;
  color: #ffffff;
}

body.sc-authenticated-page .nice-select,
body.sc-authenticated-page .nice-select .list {
  background-color: #12182a !important;
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.18) !important;
}

body.sc-authenticated-page .nice-select .option {
  color: #ffffff !important;
}

body.sc-authenticated-page .nice-select .option:hover,
body.sc-authenticated-page .nice-select .option.focus,
body.sc-authenticated-page .nice-select .option.selected {
  background-color: var(--sc-auth-surface-hover, #1c2632) !important;
  color: #ffffff !important;
}

body.sc-authenticated-page .form-control:focus,
body.sc-authenticated-page .form-select:focus,
body.sc-authenticated-page select:focus,
body.sc-authenticated-page input:focus,
body.sc-authenticated-page textarea:focus {
  outline: none;
  border-color: var(--sc-auth-info, #69b7ff) !important;
  box-shadow: 0 0 0 3px rgba(105, 183, 255, 0.2);
}

body.sc-authenticated-page label,
body.sc-authenticated-page legend,
body.sc-authenticated-page .fieldset-legend {
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 600;
}

body.sc-authenticated-page .description,
body.sc-authenticated-page .form-text,
body.sc-authenticated-page .help-block {
  color: var(--sc-text-muted) !important;
  font-size: 0.8125rem;
  line-height: 1.45;
}

body.sc-authenticated-page .form-item {
  margin-bottom: 1rem;
}

body.sc-authenticated-page fieldset {
  margin: 1.25rem 0;
  padding: 1.25rem;
  border: 1px solid var(--sc-auth-border, #2a3542);
  border-radius: var(--sc-radius-md, 6px);
  background: var(--sc-auth-surface, #121923);
}

body.sc-authenticated-page .form-item--error-message,
body.sc-authenticated-page .invalid-feedback {
  color: var(--sc-auth-danger, #ff6b64) !important;
  font-size: 0.8125rem;
}

body.sc-authenticated-page .form-control.error,
body.sc-authenticated-page .form-select.error,
body.sc-authenticated-page input.error,
body.sc-authenticated-page textarea.error {
  border-color: var(--sc-auth-danger, #ff6b64) !important;
}

body.sc-authenticated-page .btn-primary,
body.sc-authenticated-page .button--primary,
body.sc-authenticated-page input[type="submit"].button {
  min-height: 2.75rem;
  padding: 0.65rem 1rem;
  border-radius: var(--sc-radius-md, 6px) !important;
  background: var(--sc-brand-yellow) !important;
  border: 1px solid var(--sc-brand-yellow) !important;
  color: var(--sc-bg-deep) !important;
  font-weight: 700;
  box-shadow: 0 8px 18px -14px rgba(251, 187, 15, 0.9);
}

body.sc-authenticated-page a.button.dialog-cancel,
body.sc-authenticated-page .dialog-cancel {
  color: #ffffff !important;
  background: transparent !important;
  border: 1px solid rgba(255, 255, 255, 0.55) !important;
  font-weight: 600;
}

body.sc-authenticated-page a.button.dialog-cancel:hover,
body.sc-authenticated-page a.button.dialog-cancel:focus,
body.sc-authenticated-page .dialog-cancel:hover,
body.sc-authenticated-page .dialog-cancel:focus {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.1) !important;
  border-color: #ffffff !important;
}

body.sc-authenticated-page table {
  --bs-table-bg: transparent;
  --bs-table-color: #d8dee8;
  --bs-table-striped-bg: rgba(255, 255, 255, 0.015);
  --bs-table-striped-color: #d8dee8;
  --bs-table-hover-bg: var(--sc-auth-surface-hover, #1c2632);
  --bs-table-hover-color: #ffffff;
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  color: #d8dee8;
  font-size: 0.875rem;
}

body.sc-authenticated-page table th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 0.75rem;
  color: #aab5c4;
  background: #171f2a;
  border-top: 1px solid var(--sc-auth-border, #2a3542);
  border-bottom: 1px solid var(--sc-auth-border-strong, #3a4654);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

body.sc-authenticated-page table td {
  padding: 0.75rem;
  border-bottom: 1px solid var(--sc-auth-border, #2a3542);
}

body.sc-authenticated-page table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.015);
}

body.sc-authenticated-page table tbody tr {
  transition: background-color 0.15s ease;
}

body.sc-authenticated-page table tbody tr:hover {
  background: var(--sc-auth-surface-hover, #1c2632);
}

/* Bootstrap paints table cells white, which hides row-level dark surfaces. */
body.sc-authenticated-page table.table > :not(caption) > * > * {
  color: inherit;
  background-color: transparent !important;
  box-shadow: none;
}

body.sc-authenticated-page table.table > thead > tr > th {
  color: #aab5c4;
  background-color: var(--sc-auth-surface-raised, #171f2a) !important;
}

body.sc-authenticated-page .dropdown-menu,
body.sc-authenticated-page .navbar-nav .dropdown-menu {
  background-color: rgba(18, 24, 42, 0.98) !important;
  border: 1px solid rgba(251, 187, 15, 0.35) !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

body.sc-authenticated-page .dropdown-item,
body.sc-authenticated-page .dropdown-menu a {
  color: #ffffff !important;
}

body.sc-authenticated-page .dropdown-item:hover,
body.sc-authenticated-page .dropdown-item:focus,
body.sc-authenticated-page .dropdown-menu a:hover,
body.sc-authenticated-page .dropdown-menu a:focus {
  background-color: rgba(251, 187, 15, 0.12) !important;
  color: var(--sc-brand-yellow, #fbbb0f) !important;
}

/* Header Register menu — reinforce on logged-in pages (Bootstrap can override). */
body.sc-authenticated-page .sc-landing-nav__dropdown-menu,
body.sc-site-shell .sc-landing-nav__dropdown-menu {
  background: rgba(18, 24, 42, 0.98) !important;
  border: 1px solid rgba(251, 187, 15, 0.35) !important;
}

body.sc-authenticated-page .sc-landing-nav__dropdown-menu a,
body.sc-site-shell .sc-landing-nav__dropdown-menu a {
  color: #ffffff !important;
}

body.sc-authenticated-page .sc-landing-nav__dropdown-label,
body.sc-site-shell .sc-landing-nav__dropdown-label {
  color: var(--sc-brand-yellow, #fbbb0f) !important;
}

/* Drupal dropbuttons outside registration review */
body.sc-authenticated-page .dropbutton-widget {
  background: rgba(13, 13, 25, 0.92) !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
}

body.sc-authenticated-page .dropbutton .dropbutton-action > a,
body.sc-authenticated-page .dropbutton .dropbutton-action > button,
body.sc-authenticated-page .dropbutton .dropbutton-action > input {
  color: #ffffff !important;
  background: transparent !important;
}

/* Account profiles are working surfaces, not full-width presentation cards. */
body.sc-authenticated-page.path-user .sc-auth-wrap__layout {
  max-width: 1120px;
}

body.sc-authenticated-page.path-user h1,
body.sc-authenticated-page.path-user .page-title {
  max-width: 100%;
  margin: 0 0 1rem;
  font-size: clamp(2rem, 4vw, 2.75rem);
  overflow-wrap: anywhere;
}

body.sc-authenticated-page.path-user article.profile {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 1.5rem;
  margin-top: 0.25rem;
}

body.sc-authenticated-page.path-user article.profile > .field,
body.sc-authenticated-page.path-user article.profile > .form-item {
  min-width: 0;
  margin: 0;
  padding: 0.9rem 0;
  border-top: 1px solid var(--sc-auth-border, #2a3542);
}

body.sc-authenticated-page.path-user article.profile > .field--type-text-long,
body.sc-authenticated-page.path-user article.profile > .form-item,
body.sc-authenticated-page.path-user article.profile > .challenge-user-profile-summary,
body.sc-authenticated-page.path-user article.profile > .challenge-account-staff-link-wrap,
body.sc-authenticated-page.path-user article.profile > a {
  grid-column: 1 / -1;
}

body.sc-authenticated-page.path-user article.profile .field__label,
body.sc-authenticated-page.path-user article.profile h4.label {
  margin: 0 0 0.3rem;
  color: var(--sc-text-muted, #aab5c4);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

body.sc-authenticated-page.path-user article.profile .field__item,
body.sc-authenticated-page.path-user article.profile .field__item > :last-child {
  margin-bottom: 0;
}

body.sc-authenticated-page.path-user .challenge-account-staff-link-wrap {
  margin: 0 0 1.25rem;
}

body.sc-authenticated-page .tabs,
body.sc-authenticated-page ul.tabs,
body.sc-authenticated-page .nav-tabs,
body.sc-authenticated-page nav.tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0;
  margin: 0 0 0.85rem;
  padding: 0 0.35rem;
  list-style: none;
  overflow-x: auto;
  border: 1px solid var(--sc-auth-border, #2a3542) !important;
  border-radius: var(--sc-radius-md, 6px);
  background: var(--sc-auth-surface, #121923) !important;
  box-shadow: none !important;
  scrollbar-width: thin;
}

body.sc-authenticated-page .tabs li,
body.sc-authenticated-page .nav-tabs .nav-item {
  margin: 0;
}

body.sc-authenticated-page .tabs li.active,
body.sc-authenticated-page .nav-tabs .nav-item.active,
body.sc-authenticated-page .tabs-wrapper .nav-item.active {
  background: transparent !important;
}

body.sc-authenticated-page .tabs a,
body.sc-authenticated-page .nav-tabs .nav-link,
body.sc-authenticated-page .tab-toggle {
  display: inline-flex;
  align-items: center;
  min-height: 2.15rem;
  padding: 0.35rem 0.7rem;
  border-radius: 0;
  color: rgba(255, 255, 255, 0.65) !important;
  background: transparent !important;
  border: none !important;
  border-bottom: 2px solid transparent !important;
  text-decoration: none;
  font-family: var(--sc-display-font, "Space Grotesk", "Exo 2", Inter, sans-serif);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.2;
  white-space: nowrap;
  transition: color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

body.sc-authenticated-page .tabs a:hover,
body.sc-authenticated-page .nav-tabs .nav-link:hover,
body.sc-authenticated-page .tab-toggle:hover,
body.sc-authenticated-page .tab-toggle:focus {
  color: #ffffff !important;
  background: transparent !important;
  border-bottom-color: rgba(255, 255, 255, 0.15) !important;
  box-shadow: none !important;
}

body.sc-authenticated-page .tabs a.is-active,
body.sc-authenticated-page .tabs a.active,
body.sc-authenticated-page .nav-tabs .nav-link.active,
body.sc-authenticated-page .nav-tabs .nav-link.is-active {
  color: #ffffff !important;
  background: transparent !important;
  border: none !important;
  border-bottom: 2px solid var(--sc-brand-yellow) !important;
  box-shadow: none !important;
  font-weight: 700;
}

/* Outrank the public shell's legacy pill tabs on authenticated routes. */
body.sc-authenticated-page.sc-site-shell.user-logged-in nav.tabs ul.nav.primary li a,
body.sc-authenticated-page.sc-site-shell.user-logged-in .tabs-wrapper .nav-link,
body.sc-authenticated-page.sc-site-shell.user-logged-in .tabs-wrapper .tab-toggle {
  min-height: 2.15rem !important;
  padding: 0.35rem 0.7rem !important;
  color: rgba(255, 255, 255, 0.68) !important;
  background: transparent !important;
  border: 0 !important;
  border-bottom: 2px solid transparent !important;
  border-radius: 0 !important;
  font-size: 0.8125rem !important;
  line-height: 1.2 !important;
}

body.sc-authenticated-page.sc-site-shell.user-logged-in nav.tabs ul.nav.primary li.active a,
body.sc-authenticated-page.sc-site-shell.user-logged-in nav.tabs ul.nav.primary li a.active,
body.sc-authenticated-page.sc-site-shell.user-logged-in nav.tabs ul.nav.primary li a.is-active,
body.sc-authenticated-page.sc-site-shell.user-logged-in .tabs-wrapper .nav-link.active,
body.sc-authenticated-page.sc-site-shell.user-logged-in .tabs-wrapper .nav-link.is-active {
  color: #ffffff !important;
  background: transparent !important;
  border-color: transparent !important;
  border-bottom-color: var(--sc-brand-yellow) !important;
  box-shadow: none !important;
}

@media (min-width: 768px) {
  body.sc-authenticated-page .tabs-wrapper .tab-toggle {
    display: none !important;
  }
}

@media (max-width: 767.98px) {
  body.sc-authenticated-page .tabs-wrapper .nav-item.active {
    background-color: transparent !important;
  }

  body.sc-authenticated-page .tabs-wrapper .nav-item .nav-link.active,
  body.sc-authenticated-page .tabs-wrapper .nav-item .nav-link.is-active {
    background-color: transparent !important;
    box-shadow: inset 0 -2px 0 0 var(--sc-brand-yellow) !important;
  }
}

body.sc-authenticated-page .tabs--secondary,
body.sc-authenticated-page ul.tabs.tabs--secondary {
  margin-top: -0.5rem;
  margin-bottom: 1rem;
}

body.sc-authenticated-page .block-local-tasks-block,
body.sc-authenticated-page #block-sctheme-local-tasks {
  margin-bottom: 0.35rem;
}

body.sc-authenticated-page .messages {
  border-radius: var(--sc-radius-md);
}

body.sc-authenticated-page .group--full > .layout,
body.sc-authenticated-page .group-page {
  color: rgba(255, 255, 255, 0.88);
}

/* Legacy update.css pins admin tabs to the left edge — keep inline on 2627 shell. */
body.sc-authenticated-page.user-logged-in nav.tabs {
  position: static !important;
  left: auto !important;
  top: auto !important;
  z-index: auto !important;
}

body.sc-authenticated-page.user-logged-in nav.tabs ul.nav.primary {
  background: transparent !important;
  border: none !important;
  flex-direction: row !important;
  opacity: 1 !important;
}

/* Drupal Views on internal pages */
body.sc-authenticated-page .view,
body.sc-authenticated-page .views-element-container {
  color: rgba(255, 255, 255, 0.88);
}

body.sc-authenticated-page .view-header,
body.sc-authenticated-page .view-footer {
  margin-bottom: 1rem;
}

body.sc-authenticated-page .views-exposed-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem 1rem;
  margin-bottom: 1.25rem;
  padding: 1rem 1.125rem;
  background: var(--sc-surface-card-bg-muted);
  border: 1px solid var(--sc-auth-nested-surface-border, var(--sc-surface-card-border));
  border-radius: var(--sc-radius-md, 6px);
}

body.sc-authenticated-page .views-exposed-form .form-item {
  margin-bottom: 0;
}

body.sc-authenticated-page .pager {
  margin-top: 1.25rem;
}

body.sc-authenticated-page .pager__items {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

body.sc-authenticated-page .pager__item a,
body.sc-authenticated-page .pager__item span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  min-height: 2.25rem;
  padding: 0.35rem 0.65rem;
  border-radius: var(--sc-radius-md);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(13, 13, 25, 0.55);
  color: rgba(255, 255, 255, 0.88) !important;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

body.sc-authenticated-page .pager__item.is-active span {
  color: #ffffff !important;
  background: transparent;
  border-color: var(--sc-brand-yellow);
  box-shadow: inset 0 -2px 0 0 var(--sc-brand-yellow);
}

body.sc-authenticated-page .pager__item a:hover,
body.sc-authenticated-page .pager__item a:focus {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.25);
}

body.sc-authenticated-page .alert,
body.sc-authenticated-page .messages {
  border-radius: var(--sc-radius-md);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

body.sc-authenticated-page .alert-success,
body.sc-authenticated-page .messages--status {
  background: rgba(2, 138, 108, 0.22);
  color: #ffffff;
}

body.sc-authenticated-page .alert-warning,
body.sc-authenticated-page .messages--warning {
  background: rgba(244, 180, 23, 0.18);
  color: #ffffff;
}

body.sc-authenticated-page .alert-danger,
body.sc-authenticated-page .messages--error {
  background: rgba(180, 40, 40, 0.22);
  color: #ffffff;
}

body.sc-authenticated-page .comment,
body.sc-authenticated-page .comment.js-comment {
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: var(--sc-radius-md);
  background: rgba(13, 13, 25, 0.35);
  margin-bottom: 1rem;
}

body.sc-authenticated-page .field__label,
body.sc-authenticated-page .field-label {
  color: var(--sc-text-muted);
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

body.sc-authenticated-page .field__item,
body.sc-authenticated-page .field-item {
  margin-bottom: 0.75rem;
}

body.sc-authenticated-page .card,
body.sc-authenticated-page .panel,
body.sc-authenticated-page .well {
  background: var(--sc-surface-card-bg-muted) !important;
  border: 1px solid var(--sc-auth-nested-surface-border, var(--sc-surface-card-border)) !important;
  border-radius: var(--sc-radius-lg) !important;
  color: rgba(255, 255, 255, 0.88) !important;
}

body.sc-authenticated-page .card-header,
body.sc-authenticated-page .panel-heading {
  background: transparent !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: #ffffff !important;
}

/* Role hubs keep the public shell but use the same operational surface system. */
body.sc-authenticated-page.sc-public-page .sc-public-wrap__main .region-content > .block .container-remo,
body.sc-authenticated-page.sc-public-page .sc-public-wrap__main .region-content > .block > .content {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  box-sizing: border-box;
}

body.sc-authenticated-page.sc-public-page .sc-public-wrap__main .region-content > .block .container-remo > .row {
  margin-inline: 0;
}

body.sc-authenticated-page.sc-public-page .sc-public-wrap__main h1,
body.sc-authenticated-page.sc-public-page .sc-public-wrap__main .page-title {
  color: #ffffff;
  text-align: left;
  margin-bottom: 1rem;
}

@media (max-width: 767px) {
  body.sc-authenticated-page h1,
  body.sc-authenticated-page .page-title {
    font-size: 2rem;
  }

  body.sc-authenticated-page .sc-auth-wrap__main {
    padding-inline: max(1.75rem, env(safe-area-inset-left, 0px))
      max(1.75rem, env(safe-area-inset-right, 0px));
  }

  body.sc-authenticated-page .sc-auth-wrap__layout {
    grid-template-columns: 1fr;
  }

  body.sc-authenticated-page.path-user h1,
  body.sc-authenticated-page.path-user .page-title {
    font-size: 1.65rem;
  }

  body.sc-authenticated-page table:not(.challenge-registration-review__table):not(.challenge-staff-dashboard__table):not(.challenge-staff-hub__table) {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  body.sc-authenticated-page.path-user article.profile {
    grid-template-columns: 1fr;
  }

  body.sc-authenticated-page.path-user article.profile > * {
    grid-column: 1;
  }
}

/* 07/21 authenticated-product refinement. */
body.sc-authenticated-page .sc-auth-wrap__layout,
body.sc-authenticated-page .breadcrumb,
body.sc-authenticated-page .sc-auth-wrap__messages {
  max-width: 1320px;
}

body.sc-authenticated-page .sc-auth-wrap__card {
  border-color: rgba(116, 170, 227, 0.18);
  border-radius: 10px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045), 0 30px 72px -50px rgba(0, 0, 0, 0.98);
}

body.sc-authenticated-page .sc-auth-wrap__card::before {
  width: 2px;
  border-radius: 10px 0 0 10px;
  background: linear-gradient(180deg, #087de7, var(--sc-peak-green-bright));
}

body.sc-authenticated-page .sc-auth-wrap__sidebar .block {
  background: rgba(10, 20, 32, 0.9);
  border-color: rgba(116, 170, 227, 0.17);
  border-radius: 10px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

body.sc-authenticated-page h1,
body.sc-authenticated-page .page-title {
  color: #f7fbff;
  font-size: clamp(2rem, 4vw, 3.35rem);
  font-weight: 650;
  line-height: 1;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

body.sc-authenticated-page :is(.form-control, .form-select, input, select, textarea) {
  border-radius: 6px;
}

body.sc-authenticated-page :is(table, .table) thead th {
  color: #ddecff;
  background: rgba(8, 125, 231, 0.09);
  border-bottom-color: rgba(101, 170, 255, 0.25);
}

body.sc-authenticated-page :is(.btn-primary, .button--primary, input[type="submit"]) {
  border-radius: 6px;
  background: var(--sc-brand-yellow) !important;
  border-color: #fbd05c !important;
  box-shadow: 0 14px 30px -22px rgba(251, 187, 15, 0.9);
}
