.challenge-hub-page {
  width: 100%;
  max-width: none;
  margin: 0 auto;
  padding: 24px 0 44px;
  color: #112537;
}

.challenge-hub-page * {
  box-sizing: border-box;
}

.challenge-hero {
  padding: 28px;
  border-radius: 30px;
  background:
    radial-gradient(circle at top left, rgba(255,255,255,.18), transparent 34%),
    linear-gradient(135deg, #0c3149 0%, #194d65 45%, #3a775f 100%);
  color: #f7fbff;
  box-shadow: 0 28px 52px rgba(10, 34, 51, .14);
}

.challenge-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.12);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.challenge-hero h1 {
  margin: 14px 0 10px;
  font-size: clamp(32px, 5vw, 50px);
  line-height: .98;
  font-family: Georgia, "Times New Roman", serif;
}

.challenge-hero p {
  margin: 0;
  max-width: 68ch;
  line-height: 1.65;
}

.challenge-hero__body {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-top: 10px;
}

.challenge-hero__pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-content: flex-start;
}

.challenge-hero__pills span,
.challenge-mode-card__pills span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.14);
  font-size: 13px;
  font-weight: 700;
}

.challenge-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.challenge-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 16px;
  border-radius: 15px;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(255,255,255,.08);
  color: inherit;
  text-decoration: none;
  font-weight: 800;
  cursor: pointer;
}

.challenge-btn--primary {
  border-color: transparent;
  background: #f3cf63;
  color: #163244;
}

.challenge-notice,
.challenge-empty {
  margin-top: 22px;
  padding: 16px 18px;
  border-radius: 20px;
  background: #f6fafc;
  border: 1px solid rgba(17, 37, 55, .08);
  line-height: 1.6;
}

.challenge-notice {
  background: #fff9eb;
  border-color: rgba(191, 146, 36, .25);
  color: #714f00;
}

.challenge-hub-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr);
  gap: 20px;
  margin-top: 22px;
}

.challenge-hub-grid--summary {
  grid-template-columns: minmax(0, 1fr) minmax(280px, .8fr);
}

.challenge-panel {
  padding: 22px;
  border-radius: 28px;
  background: linear-gradient(180deg, #f8fbfd 0%, #eef4f7 100%);
  border: 1px solid rgba(17, 37, 55, .08);
  box-shadow: 0 18px 36px rgba(17, 37, 55, .08);
}

.challenge-panel__head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.challenge-panel__head h2 {
  margin: 0 0 8px;
  font-size: 28px;
  line-height: 1.04;
  color: #133246;
}

.challenge-panel__head p {
  margin: 0;
  color: #547085;
  line-height: 1.58;
}

.challenge-mode-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.challenge-mode-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 210px;
  padding: 18px;
  border-radius: 24px;
  border: 1px solid rgba(17, 37, 55, .08);
  background: #ffffff;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.challenge-mode-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 26px rgba(17, 37, 55, .10);
}

.challenge-mode-card.is-active {
  border-color: rgba(20, 84, 110, .42);
  box-shadow: 0 18px 30px rgba(20, 84, 110, .14);
}

.challenge-mode-card.is-disabled {
  opacity: .62;
}

.challenge-mode-card__status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #ebf5f8;
  color: #1d5d73;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .07em;
}

.challenge-mode-card__status.is-prepared {
  background: #fff4e8;
  color: #a25d00;
}

.challenge-mode-card h3 {
  margin: 0;
  font-size: 22px;
  color: #143449;
}

.challenge-mode-card p {
  margin: 0;
  color: #4d687d;
  line-height: 1.58;
}

.challenge-mode-card__pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.challenge-mode-card__pills span {
  color: #173548;
  background: #edf6fa;
  border-color: rgba(17, 37, 55, .06);
}

.challenge-form {
  display: grid;
  gap: 16px;
}

.challenge-field {
  display: grid;
  gap: 8px;
}

.challenge-field span {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #5a768b;
}

.challenge-field select,
.challenge-field__value {
  min-height: 48px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(17, 37, 55, .12);
  background: #fff;
  color: #163042;
  font-size: 15px;
}

.challenge-activity-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.challenge-activity-filters label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(17, 37, 55, .12);
  color: #183549;
}

.challenge-launch-meta,
.challenge-module-list {
  color: #516d81;
  line-height: 1.6;
}

.challenge-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.challenge-stat {
  padding: 16px;
  border-radius: 22px;
  background: #fff;
  border: 1px solid rgba(17, 37, 55, .08);
}

.challenge-stat span {
  display: block;
  color: #6b8396;
  font-size: 13px;
  font-weight: 700;
}

.challenge-stat b {
  display: block;
  margin-top: 8px;
  font-size: 28px;
  color: #173548;
}

.challenge-module-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px dashed rgba(17, 37, 55, .10);
}

.challenge-module-item:last-child {
  border-bottom: 0;
}

.challenge-resume-card {
  padding: 18px;
  border-radius: 22px;
  background: #fff;
  border: 1px solid rgba(17, 37, 55, .10);
}

.challenge-resume-card h3 {
  margin: 0 0 8px;
  font-size: 22px;
  color: #133246;
}

.challenge-resume-card p {
  margin: 0 0 14px;
  color: #4f697d;
  line-height: 1.55;
}

@media (max-width: 980px) {
  .challenge-hub-grid,
  .challenge-hub-grid--summary {
    grid-template-columns: 1fr;
  }

  .challenge-hero__body,
  .challenge-panel__head {
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .challenge-hub-page {
    padding-left: 14px;
    padding-right: 14px;
  }

  .challenge-hero,
  .challenge-panel {
    padding: 20px;
    border-radius: 24px;
  }

  .challenge-stat-grid {
    grid-template-columns: 1fr;
  }
}

/* Compact hub layout */
.challenge-hub-page {
  width: 100%;
  max-width: none;
  min-height: 100dvh;
  padding: 12px 0 22px;
}

.challenge-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  border-radius: 18px;
  background: #123246;
  box-shadow: 0 10px 24px rgba(17, 37, 55, .10);
}

.challenge-hero__body {
  margin-top: 0;
  align-items: center;
}

.challenge-hero__eyebrow {
  min-height: 22px;
  padding: 0;
  background: transparent;
  letter-spacing: 0;
  text-transform: none;
  opacity: .78;
}

.challenge-hero h1 {
  margin: 2px 0;
  font-family: inherit;
  font-size: 30px;
  line-height: 1;
}

.challenge-hero p {
  max-width: none;
  font-size: 14px;
  line-height: 1.35;
  opacity: .9;
}

.challenge-hero__actions {
  margin-top: 0;
  gap: 8px;
  justify-content: flex-end;
}

.challenge-btn {
  min-height: 38px;
  padding: 0 12px;
  border-radius: 11px;
  font-size: 14px;
}

.challenge-btn--wide {
  width: 100%;
}

.challenge-btn--secondary {
  background: #ffffff;
  color: #163244;
  border-color: rgba(17, 37, 55, .14);
}

.challenge-notice,
.challenge-empty {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 14px;
}

.challenge-hub-grid {
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
  gap: 12px;
  justify-content: center;
  margin-top: 12px;
  overflow: visible;
}

.challenge-hub-grid--summary {
  grid-template-columns: minmax(0, 1fr) minmax(300px, .6fr);
}

.challenge-panel {
  padding: 12px;
  border-radius: 16px;
  box-shadow: 0 8px 20px rgba(17, 37, 55, .06);
  overflow: visible;
}

.challenge-panel__head {
  margin-bottom: 10px;
}

.challenge-panel__head h2 {
  margin-bottom: 3px;
  font-size: 19px;
  line-height: 1.1;
}

.challenge-panel__head p {
  font-size: 13px;
  line-height: 1.35;
}

.challenge-mode-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-content: start;
  gap: 10px;
  overflow: visible;
}

.challenge-mode-card {
  position: relative;
  height: 108px;
  min-height: 108px;
  gap: 6px;
  padding: 10px;
  border-radius: 13px;
  text-align: left;
  overflow: visible;
}

.challenge-mode-card:hover,
.challenge-mode-card:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(17, 37, 55, .12);
}

.challenge-mode-card:focus-visible {
  outline: 3px solid rgba(243, 207, 99, .95);
  outline-offset: 2px;
}

.challenge-mode-card.is-active {
  border-color: #0f5f7a;
  box-shadow: inset 0 0 0 2px rgba(15, 95, 122, .22), 0 10px 18px rgba(15, 95, 122, .12);
}

.challenge-mode-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.challenge-mode-card__icon {
  font-size: 20px;
  line-height: 1;
}

.challenge-mode-card__title {
  display: block;
  min-height: 34px;
  color: #143449;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.12;
}

.challenge-mode-card__status {
  min-height: 20px;
  padding: 0 7px;
  border-radius: 8px;
  font-size: 10px;
  letter-spacing: 0;
}

.challenge-mode-card__badge {
  display: inline-flex;
  align-self: flex-start;
  min-height: 20px;
  align-items: center;
  padding: 0 7px;
  border-radius: 8px;
  background: #edf6fa;
  color: #28536b;
  font-size: 11px;
  font-weight: 800;
}

.challenge-mode-card__desc {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.challenge-mode-card p,
.challenge-mode-card__pills {
  display: none;
}

.challenge-live-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 6px 10px;
  align-items: center;
  margin-top: 10px;
  padding: 9px;
  border-radius: 14px;
  border: 1px dashed rgba(15, 95, 122, .28);
  background: rgba(255, 255, 255, .72);
}

.challenge-live-row[hidden] {
  display: none;
}

.challenge-live-row__label {
  min-width: 86px;
  color: #28536b;
  font-size: 12px;
  font-weight: 900;
}

.challenge-live-row__body {
  min-width: 0;
}

.challenge-live-row__body strong {
  display: block;
  color: #143449;
  font-size: 17px;
  font-weight: 950;
  line-height: 1.15;
}

.challenge-live-row p {
  margin: 4px 0 0;
  color: #516d81;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
}

.challenge-live-row__action {
  white-space: nowrap;
}

.challenge-mode-tooltip {
  position: fixed;
  z-index: 10000;
  max-width: min(320px, calc(100vw - 24px));
  padding: 8px 10px;
  border-radius: 10px;
  background: #102637;
  color: #f8fbfd;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  box-shadow: 0 14px 30px rgba(17, 37, 55, .24);
  opacity: 0;
  pointer-events: none;
  transform: translateY(3px);
  transition: opacity .12s ease, transform .12s ease;
}

.challenge-mode-tooltip.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.challenge-mode-mobile-description {
  display: none;
}

.challenge-launch-panel {
  align-self: start;
}

.challenge-quick-launch {
  display: grid;
  gap: 8px;
}

.challenge-form {
  gap: 10px;
  margin-top: 10px;
}

.challenge-options-panel[hidden] {
  display: none;
}

.challenge-field {
  gap: 4px;
}

.challenge-field span {
  font-size: 11px;
  letter-spacing: 0;
}

.challenge-field select,
.challenge-field input,
.challenge-field__value {
  min-height: 38px;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 14px;
}

.challenge-activity-filters {
  gap: 6px;
}

.challenge-activity-filters label {
  min-height: 30px;
  padding: 0 9px;
  border-radius: 9px;
  font-size: 13px;
}

.challenge-launch-meta {
  font-size: 13px;
  line-height: 1.35;
}

.challenge-pool-summary summary {
  cursor: pointer;
  color: #133246;
  font-size: 18px;
  font-weight: 900;
}

.challenge-pool-summary .challenge-stat-grid {
  margin-top: 10px;
}

.challenge-stat-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.challenge-stat {
  padding: 10px;
  border-radius: 12px;
}

.challenge-stat span {
  font-size: 11px;
}

.challenge-stat b {
  margin-top: 3px;
  font-size: 20px;
}

.challenge-module-item {
  padding: 8px 0;
  font-size: 13px;
}

.challenge-resume-panel {
  margin-top: 12px;
}

@media (min-width: 981px) and (max-width: 1180px) {
  .challenge-hub-grid {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  }

  .challenge-mode-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .challenge-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .challenge-hero__actions {
    justify-content: flex-start;
  }

  .challenge-mode-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .challenge-mode-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .challenge-mode-card {
    height: 104px;
    min-height: 104px;
  }

  .challenge-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 420px) {
  .challenge-mode-grid,
  .challenge-stat-grid {
    grid-template-columns: 1fr;
  }
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

.challenge-hub-page,
.challenge-hub-page *,
.challenge-hero,
.challenge-hub-grid,
.challenge-panel,
.challenge-modes-panel,
.challenge-launch-panel,
.challenge-mode-grid,
.challenge-live-row,
.challenge-mode-card,
.challenge-form,
.challenge-options-panel,
.challenge-field,
.challenge-field select,
.challenge-field input,
.challenge-field__value,
.challenge-activity-filters {
  box-sizing: border-box;
  max-width: 100%;
  min-width: 0;
}

.challenge-hub-page {
  width: 100%;
  overflow-x: clip;
}

@supports not (overflow: clip) {
  .challenge-hub-page {
    overflow-x: hidden;
  }
}

@media (max-width: 820px) {
  .menu-top.mobile-only,
  .breadcrumb-bar,
  .breadcrumb-left,
  .breadcrumb-right {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .menu-top.mobile-only {
    justify-content: flex-start;
    overflow-x: hidden;
  }

  .challenge-hub-page {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 12px 12px 28px;
  }

  .challenge-hero {
    width: 100%;
    max-width: 100%;
    margin: 12px 0;
    padding: 16px;
    border-radius: 22px;
  }

  .challenge-hero__body {
    display: block;
    margin-top: 0;
  }

  .challenge-hero h1 {
    font-size: clamp(28px, 8vw, 42px);
    line-height: 1.05;
  }

  .challenge-hero p {
    font-size: 15px;
    line-height: 1.35;
  }

  .challenge-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
  }

  .challenge-hero__actions .challenge-btn {
    flex: 1 1 140px;
    min-width: 140px;
  }

  .challenge-hub-grid,
  .challenge-hub-grid--summary {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
    max-width: 100%;
    margin-top: 14px;
    justify-content: stretch;
  }

  .challenge-launch-panel {
    order: 1;
    position: static;
    width: 100%;
    max-width: 100%;
    align-self: stretch;
  }

  .challenge-modes-panel {
    order: 2;
    width: 100%;
    max-width: 100%;
  }

  .challenge-panel {
    width: 100%;
    max-width: 100%;
    padding: 16px;
    border-radius: 22px;
  }

  .challenge-panel__head {
    display: block;
    margin-bottom: 10px;
  }

  .challenge-panel__head h2 {
    font-size: 22px;
  }

  .challenge-panel__head p {
    font-size: 14px;
    line-height: 1.35;
  }

  .challenge-modes-panel .challenge-panel__head p {
    display: none;
  }

  .challenge-mode-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    width: 100%;
    max-width: 100%;
  }

  .challenge-mode-card {
    width: 100%;
    height: auto;
    min-height: 104px;
    padding: 12px;
    overflow: visible;
  }

  .challenge-mode-card__title {
    min-height: 0;
    color: #143449;
    font-size: 16px;
    line-height: 1.15;
  }

  .challenge-mode-card__badge,
  .challenge-mode-card__status {
    max-width: 100%;
    white-space: nowrap;
  }

  .challenge-live-row {
    grid-template-columns: 1fr;
    gap: 8px;
    width: 100%;
  }

  .challenge-live-row__label {
    grid-row: auto;
    min-width: 0;
  }

  .challenge-live-row__action {
    width: 100%;
  }

  .challenge-quick-launch,
  .challenge-form,
  .challenge-options-panel,
  #challengeAdvancedOptions {
    width: 100%;
    max-width: 100%;
  }

  .challenge-launch-panel .challenge-btn,
  .challenge-launch-panel select,
  .challenge-launch-panel input,
  .challenge-launch-panel .challenge-field__value {
    width: 100%;
    max-width: 100%;
  }

  .challenge-activity-filters {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    width: 100%;
  }

  .challenge-mode-tooltip {
    display: none;
  }

  .challenge-mode-mobile-description {
    display: block;
    width: 100%;
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(16, 38, 55, .08);
    color: #1c4058;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.35;
  }

  .challenge-mode-mobile-description[hidden] {
    display: none;
  }
}

@media (max-width: 420px) {
  .challenge-hub-page {
    padding-left: 10px;
    padding-right: 10px;
  }

  .challenge-mode-grid {
    grid-template-columns: 1fr;
  }

  .challenge-hero__actions .challenge-btn {
    flex-basis: 100%;
  }
}
