/* Alpha release responsive dashboards - modern dark-theme refinements. */
:root {
  --surface: #151c24;
  --surface-2: #1a222c;
  --surface-3: #202a35;
  --border: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 255, 255, 0.16);
  --alpha-gap: clamp(14px, 2vw, 24px);
  --alpha-sticky-offset: 76px;
}

html {
  color-scheme: dark;
}

html.cff-private-pending body {
  visibility: hidden;
}

body {
  background:
    linear-gradient(180deg, rgba(18, 24, 32, 0.96), rgba(13, 17, 22, 1) 420px),
    var(--bg);
}

h1,
h2,
h3 {
  letter-spacing: -0.025em;
}

h2 {
  font-size: clamp(1.35rem, 2.6vw, 2rem);
  line-height: 1.1;
}

.topbar {
  min-height: 70px;
  padding-inline: clamp(16px, 4vw, 48px);
  border-bottom-color: var(--border);
  background: rgba(10, 14, 19, 0.9);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.brand__logo {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  box-shadow: 0 8px 22px rgba(91, 211, 143, 0.16);
}

.brand__title {
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.brand__subtitle {
  display: none;
}

.nav__link,
.button,
.icon-button,
.league-tab,
input,
select,
textarea {
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.nav__link {
  border: 1px solid transparent;
}

.nav__link:hover,
.nav__link.is-active {
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.055);
}

.button {
  min-height: 42px;
  border-color: rgba(240, 184, 74, 0.42);
  border-radius: 8px;
  padding: 10px 16px;
}

.button:hover {
  border-color: rgba(240, 184, 74, 0.72);
  background: rgba(240, 184, 74, 0.11);
}

.button--ghost {
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.035);
}

.button--ghost:hover {
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.07);
}

.button--primary {
  background: linear-gradient(135deg, #f0bd53, #62d79a);
  box-shadow: 0 10px 26px rgba(91, 211, 143, 0.16);
}

.button--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 32px rgba(91, 211, 143, 0.22);
}

.hero {
  min-height: 500px;
  padding: clamp(58px, 9vw, 104px) clamp(18px, 5vw, 56px) 52px;
}

.hero--subtle {
  min-height: 260px;
  padding-block: 52px 38px;
}

.hero__content {
  width: min(1120px, 100%);
}

.hero h1 {
  max-width: 760px;
  font-size: clamp(2.55rem, 7vw, 5.4rem);
  line-height: 0.96;
}

.hero--subtle h1 {
  font-size: clamp(2.35rem, 5vw, 4rem);
}

.subtitle {
  max-width: 720px;
  line-height: 1.65;
}

.layout,
.layout--wide {
  gap: var(--alpha-gap);
  padding: clamp(16px, 3vw, 32px);
}

.card,
.summary__card,
.modal__dialog {
  border-color: var(--border);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(25, 33, 43, 0.98), rgba(18, 24, 32, 0.98));
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.25);
}

.card {
  padding: clamp(17px, 2.5vw, 24px);
}

.card--accent {
  border-color: rgba(240, 184, 74, 0.24);
  background:
    linear-gradient(145deg, rgba(240, 184, 74, 0.07), rgba(91, 211, 143, 0.045)),
    linear-gradient(180deg, rgba(25, 33, 43, 0.98), rgba(18, 24, 32, 0.98));
}

.card__header {
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.card__header h2,
.card h2 {
  margin-bottom: 0;
}

.list {
  border-color: var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
}

.row {
  min-width: 0;
  padding-block: 13px;
  border-bottom-color: rgba(255, 255, 255, 0.065);
}

.row > div:first-child {
  min-width: 0;
}

.row strong,
.row .muted,
.badge {
  overflow-wrap: anywhere;
}

.pill {
  border: 1px solid rgba(108, 139, 255, 0.2);
  background: rgba(108, 139, 255, 0.12);
}

.pill--muted {
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.045);
}

.field input,
.field select,
.field textarea,
.search input,
.search select,
.scoreboard-select,
.league-tab-select,
.lineup-select {
  min-height: 46px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

input::placeholder,
textarea::placeholder {
  color: #818b96;
  opacity: 1;
}

select option {
  background: var(--surface-2);
  color: var(--text);
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(91, 211, 143, 0.62);
  box-shadow: 0 0 0 3px rgba(91, 211, 143, 0.11);
  outline: none;
}

.search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 190px) auto;
  gap: 10px;
}

.league-tabs {
  position: sticky;
  top: 0;
  z-index: 20;
  grid-column: 1 / -1;
  display: flex;
  gap: 7px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(17, 23, 30, 0.92);
  backdrop-filter: blur(16px);
  scrollbar-width: thin;
}

.league-tab {
  border-radius: 6px;
}

.league-tab:hover,
.league-tab.is-active {
  background: rgba(240, 184, 74, 0.12);
}

.league-tab-select-wrap {
  display: none;
  margin-bottom: 14px;
}

.league-tab-select {
  width: 100%;
}

.league-dashboard,
.draft-dashboard {
  align-items: start;
  gap: var(--alpha-gap);
}

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

.league-dashboard > .card--accent,
.league-dashboard > #commissioner-settings,
.league-dashboard > #commissioner-locked {
  grid-column: 1 / -1;
}

.draft-dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
}

.draft-primary {
  grid-column: 1;
}

.draft-secondary,
.draft-side {
  grid-column: 2;
}

.draft-roster-card {
  grid-row: span 2;
}

.card__header .mobile-card-toggle,
.alpha-status-dock {
  display: none;
}

.catalog-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.catalog-stat {
  min-width: 0;
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: linear-gradient(180deg, var(--surface-3), var(--surface-2));
}

.catalog-stat strong,
.catalog-stat span {
  display: block;
}

.catalog-stat strong {
  margin-bottom: 3px;
  color: var(--text);
  font-size: 1.25rem;
}

.player-results-footer,
.scoreboard-freshness {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.data-freshness {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  border: 1px solid rgba(22, 163, 74, 0.2);
  border-radius: 999px;
  background: rgba(22, 163, 74, 0.1);
}

.data-freshness::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2dd47d;
}

.data-freshness.is-stale {
  border-color: rgba(217, 119, 6, 0.24);
  background: rgba(217, 119, 6, 0.12);
}

.data-freshness.is-stale::before {
  background: #f59e0b;
}

.scoreboard-card {
  overflow: hidden;
}

.scoreboard-controls {
  gap: 12px;
}

.scoreboard-week-nav,
.scoreboard-slide-nav {
  gap: 8px;
}

.scoreboard-button,
#score-rotation-toggle {
  border-color: var(--border);
  background: var(--surface-2);
  color: var(--text);
}

.scoreboard-list {
  border: 0;
  padding: 0;
  background: transparent;
}

.scoreboard-game {
  border-color: var(--border);
  border-radius: 8px;
  background: linear-gradient(180deg, var(--surface-3), var(--surface-2));
}

.home-main {
  background: #0d1116;
}

.home-section {
  padding: clamp(32px, 6vw, 76px) clamp(18px, 5vw, 56px);
}

.home-section--stats {
  padding-top: clamp(22px, 4vw, 34px);
  padding-bottom: clamp(22px, 4vw, 34px);
  background: #121820;
  border-block: 1px solid var(--border);
}

.home-section--preview {
  background: #10161d;
  border-block: 1px solid var(--border);
}

.home-section--workspace {
  background: #121820;
}

.home-section__inner {
  width: min(1120px, 100%);
  margin: 0 auto;
}

.section-heading {
  max-width: 760px;
  margin-bottom: clamp(20px, 4vw, 34px);
}

.section-heading h2 {
  margin: 10px 0 12px;
}

.section-heading .muted {
  line-height: 1.65;
}

.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--border);
}

.stat-strip > div {
  min-width: 0;
  padding: clamp(16px, 2.5vw, 22px);
  background: #151c24;
}

.stat-strip strong,
.stat-strip span {
  display: block;
}

.stat-strip strong {
  margin-bottom: 8px;
  font-size: 1rem;
  color: var(--text);
}

.stat-strip span {
  color: var(--muted);
  line-height: 1.5;
}

.feature-grid,
.preview-grid,
.home-workspace {
  display: grid;
  gap: var(--alpha-gap);
}

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

.feature-tile,
.preview-panel,
.step-item {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(26, 34, 44, 0.98), rgba(18, 24, 32, 0.98));
}

.feature-tile {
  padding: 20px;
}

.feature-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 18px;
  border: 1px solid rgba(240, 184, 74, 0.32);
  border-radius: 8px;
  background: rgba(240, 184, 74, 0.1);
  color: #f5c566;
  font-size: 0.82rem;
  font-weight: 800;
}

.feature-tile h3,
.preview-panel h3 {
  margin: 0 0 8px;
}

.feature-tile p,
.preview-panel p,
.step-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

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

.preview-panel {
  padding: 14px;
}

.preview-panel h3,
.preview-panel p {
  padding-inline: 2px;
}

.preview-panel h3 {
  margin-top: 16px;
}

.product-shot {
  overflow: hidden;
  min-height: 230px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(32, 42, 53, 0.96), rgba(16, 22, 29, 0.98));
}

.product-shot--hero {
  min-height: auto;
  padding: 0;
}

.product-shot--hero .summary__row {
  padding: 12px 16px;
}

.product-shot--hero .full {
  width: calc(100% - 32px);
  margin: 14px 16px 16px;
}

.product-shot__top {
  display: flex;
  gap: 6px;
  padding: 13px 14px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.035);
}

.product-shot__top span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.28);
}

.mock-row,
.mock-grid,
.mock-table,
.mock-draft-board,
.mock-matchup {
  margin: 14px;
}

.mock-row {
  height: 56px;
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(91, 211, 143, 0.28), rgba(240, 184, 74, 0.2));
}

.mock-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.mock-grid span,
.mock-table span,
.mock-draft-board span {
  display: block;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.075);
}

.mock-grid span {
  height: 48px;
}

.mock-table,
.mock-draft-board {
  display: grid;
  gap: 8px;
}

.mock-table span {
  height: 34px;
}

.mock-draft-board {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mock-draft-board span {
  height: 48px;
}

.mock-matchup {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  min-height: 84px;
  padding: 18px;
  border: 1px solid rgba(91, 211, 143, 0.18);
  border-radius: 8px;
  background: rgba(91, 211, 143, 0.07);
  text-align: center;
}

.mock-matchup strong {
  font-size: 1.55rem;
}

.mock-matchup span {
  color: var(--muted);
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1fr);
  gap: clamp(24px, 5vw, 56px);
  align-items: start;
}

.steps-list {
  display: grid;
  gap: 12px;
}

.step-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 14px;
  padding: 16px;
}

.step-item span {
  grid-row: 1 / span 2;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(91, 211, 143, 0.13);
  color: #7be0a8;
  font-weight: 800;
}

.step-item strong {
  align-self: end;
}

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

.home-workspace > .scoreboard-card {
  grid-row: span 2;
}

.footer--rich {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 28px clamp(18px, 5vw, 56px);
  border-top: 1px solid var(--border);
  background: #0d1116;
  text-align: left;
}

.footer__brand,
.footer__links {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.footer__brand {
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
}

.footer__brand span,
.footer__links a {
  color: var(--muted);
}

.footer__links a {
  text-decoration: none;
  font-weight: 700;
}

.footer__links a:hover {
  color: var(--text);
}

.scoreboard-game__team {
  color: var(--text);
}

@media (max-width: 900px) {
  .league-dashboard,
  .draft-dashboard {
    grid-template-columns: 1fr;
  }

  .league-dashboard > *,
  .draft-primary,
  .draft-secondary,
  .draft-side {
    grid-column: 1;
  }

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

@media (max-width: 760px) {
  :root {
    --alpha-sticky-offset: 60px;
  }

  .topbar {
    min-height: 64px;
    padding: 10px 14px;
  }

  .brand__logo {
    width: 40px;
    height: 40px;
  }

  .hero,
  .hero--subtle {
    min-height: auto;
    padding: 42px 16px 30px;
  }

  .hero h1,
  .hero--subtle h1 {
    font-size: clamp(2.25rem, 11vw, 3.4rem);
  }

  .subtitle {
    font-size: 1rem;
  }

  .layout,
  .layout--wide,
  .auth-layout {
    width: 100%;
    padding: 14px;
  }

  .card {
    padding: 17px;
    border-radius: 8px;
  }

  .card__header {
    gap: 10px;
  }

  .league-tabs {
    display: none;
  }

  .league-tab-select-wrap {
    position: sticky;
    top: 0;
    z-index: 21;
    display: block;
    padding-block: 8px;
    background: rgba(13, 17, 22, 0.94);
    backdrop-filter: blur(14px);
  }

  .row {
    align-items: flex-start;
    gap: 10px;
  }

  .row > .actions,
  .row > button,
  .row > a.button {
    width: 100%;
  }

  .row .actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .row .actions .button {
    width: 100%;
  }

  [data-mobile-collapsible] .mobile-card-toggle {
    display: inline-flex;
  }

  [data-mobile-collapsible].is-collapsed > :not(.card__header) {
    display: none !important;
  }

  .alpha-status-dock {
    position: sticky;
    bottom: 10px;
    z-index: 30;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 4px 12px;
    margin: 0 12px 12px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(21, 28, 36, 0.95);
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.34);
    backdrop-filter: blur(14px);
  }

  .alpha-status-dock__manager {
    font-weight: 700;
  }

  .alpha-status-dock__clock {
    grid-row: 1 / span 2;
    grid-column: 2;
    align-self: center;
    font-size: 1.15rem;
    font-weight: 800;
  }

  .search {
    grid-template-columns: 1fr;
  }

  .search .button,
  .search select,
  .search input {
    width: 100%;
  }

  .scoreboard-controls,
  .scoreboard-week-nav,
  .scoreboard-slide-nav {
    width: 100%;
  }

  .scoreboard-week-nav {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr) 46px;
  }

  .scoreboard-slide-nav {
    display: grid;
    grid-template-columns: 1fr 1.25fr 1fr;
  }

  .scoreboard-week-nav .button,
  .scoreboard-slide-nav .button,
  .scoreboard-select {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 440px) {
  .catalog-meta,
  .row .actions {
    grid-template-columns: 1fr;
  }

  .scoreboard-slide-nav {
    grid-template-columns: 1fr;
  }

  .scoreboard-slide-nav .button {
    min-height: 44px;
  }
}

@media (max-width: 980px) {
  .stat-strip,
  .feature-grid,
  .preview-grid,
  .home-workspace {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .split-section {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .home-hero .hero__summary {
    display: none;
  }

  .home-section {
    padding-inline: 14px;
  }

  .stat-strip,
  .feature-grid,
  .preview-grid,
  .home-workspace {
    grid-template-columns: 1fr;
  }

  .footer--rich {
    align-items: flex-start;
    flex-direction: column;
  }
}
