:root {
  color-scheme: light;
  --ink: #152033;
  --muted: #64748b;
  --brand: #0f766e;
  --brand-dark: #115e59;
  --ice: #e8f7fb;
  --snow: #f8fafc;
  --card: #ffffff;
  --line: #dbeafe;
  --gold: #fbbf24;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: linear-gradient(180deg, #effaff 0%, #ffffff 42%, #f8fafc 100%);
  color: var(--ink);
}

body:not(.auth-page) {
  min-width: 320px;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

.hero {
  padding: 24px clamp(20px, 5vw, 72px) 72px;
  background:
    radial-gradient(circle at 82% 12%, rgba(20, 184, 166, 0.2), transparent 28%),
    linear-gradient(135deg, #f8fdff 0%, #e6f8fb 100%);
}

.topbar,
.hero__grid,
.section {
  max-width: 1180px;
  margin: 0 auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 72px;
}

.topbar--secondary {
  justify-content: flex-end;
  margin-bottom: 36px;
}

.topbar--secondary:not(:has(.topbar__links > :not([hidden]))) {
  display: none;
}

.brand,
.topbar__links,
.hero__actions,
.form-actions,
.filters,
.filters__group {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand__stone {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 65%, #334155 0 22%, #f43f5e 23% 42%, #e2e8f0 43% 100%);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.2);
}

.topbar__links {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  color: var(--muted);
  font-weight: 700;
}

.topbar__links > a:not(.button) {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 9px 12px;
  border: 1px solid transparent;
  border-radius: 999px;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.topbar__links > a:not(.button):hover,
.topbar__links > a:not(.button)[aria-current="page"] {
  border-color: #ccfbf1;
  background: rgba(240, 253, 250, 0.9);
  color: var(--brand-dark);
}

.topbar__links > a:not(.button):hover {
  transform: translateY(-1px);
}

.topbar__links--secondary {
  width: 100%;
}

.topbar__auth {
  align-items: center;
  min-height: 40px;
  padding: 10px 16px;
  color: #ffffff;
}

.server-clock {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border: 1px solid #ccfbf1;
  border-radius: 999px;
  background: rgba(240, 253, 250, 0.9);
  color: var(--brand-dark);
  font-size: 0.86rem;
  font-weight: 900;
  white-space: nowrap;
}

.server-clock span {
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.server-clock[data-status="offline"] {
  border-color: #fecdd3;
  background: #fff1f2;
  color: #be123c;
}


.hero__grid,
.section--split {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.7fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: center;
}

.market-read {
  align-items: start;
}

.hero__copy h1,
.section h2 {
  margin: 0;
  letter-spacing: -0.055em;
  line-height: 0.95;
}

.hero__copy h1 {
  max-width: 760px;
  font-size: clamp(3rem, 8vw, 6.7rem);
}

.hero__copy p:not(.eyebrow),
.section p:not(.eyebrow),
.help-text {
  color: var(--muted);
  line-height: 1.7;
}

.hero__copy p:not(.eyebrow) {
  max-width: 650px;
  font-size: 1.12rem;
}

.eyebrow,
.panel-label {
  color: var(--brand);
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero__actions,
.form-actions,
.filters {
  gap: 12px;
  flex-wrap: wrap;
}

.button,
.filter-chip {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 800;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button {
  display: inline-flex;
  justify-content: center;
  padding: 13px 20px;
}

.button:hover,
.filter-chip:hover {
  transform: translateY(-1px);
}

.button--primary {
  background: var(--brand);
  color: white;
  box-shadow: 0 12px 28px rgba(15, 118, 110, 0.24);
}

.button--primary:hover {
  background: var(--brand-dark);
}

.button--danger {
  background: #b91c1c;
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(185, 28, 28, 0.2);
}

.button--danger:hover {
  background: #991b1b;
}

.button--ghost,
.filter-chip {
  background: #ffffff;
  color: var(--ink);
  border: 1px solid #cbd5e1;
}

.hero__panel,
.card,
.match-card {
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 28px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.1);
}

.hero__panel {
  padding: 28px;
}

.metric {
  display: grid;
  gap: 4px;
  padding: 20px 0;
  border-top: 1px solid #e2e8f0;
}

.metric strong {
  font-size: 2.7rem;
  letter-spacing: -0.06em;
}

.metric span,
.match-card__meta,
.status,
.sentiment-row span {
  color: var(--muted);
}

.section {
  padding: 72px clamp(20px, 5vw, 72px);
}

.section__header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.section h2 {
  font-size: clamp(2.2rem, 5vw, 4rem);
}

.card,
.match-card {
  padding: 24px;
}

.import-card {
  display: grid;
  gap: 12px;
}

.import-card label,
.score-label,
.pick-form legend {
  font-weight: 800;
}

textarea,
select,
input[type="date"],
input[type="number"],
input[type="search"] {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 18px;
  padding: 14px 16px;
  background: var(--snow);
  color: var(--ink);
}

textarea {
  resize: vertical;
}

.filter-chip {
  padding: 10px 14px;
}

.filters__group {
  gap: 12px;
  flex-wrap: wrap;
}

.league-filter {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.league-filter select,
.league-filter input {
  min-width: 180px;
  border-radius: 999px;
  padding: 10px 36px 10px 14px;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
}

.filter-chip.is-active {
  background: var(--ink);
  color: white;
  border-color: var(--ink);
}

.schedule-preview,
.schedule-validation {
  display: grid;
  gap: 14px;
}

.schedule-preview {
  margin-top: 8px;
  padding-top: 16px;
  border-top: 1px solid #e2e8f0;
}

.schedule-preview h3,
.schedule-validation h4 {
  margin: 0;
}

.schedule-preview-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

.schedule-preview-table th,
.schedule-preview-table td {
  padding: 12px 10px;
  border-top: 1px solid #e2e8f0;
  text-align: left;
  vertical-align: top;
}

.schedule-preview-table thead th {
  border-top: 0;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.schedule-validation ul {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.6;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
  transform: none;
}

.match-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.match-card {
  display: grid;
  gap: 18px;
}

.match-card h3 {
  margin: 0;
  font-size: 1.5rem;
  letter-spacing: -0.03em;
}

.odds-bar {
  overflow: hidden;
  height: 10px;
  border-radius: 999px;
  background: #dbeafe;
}

.odds-bar span,
.sentiment-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), #22c55e);
}

.odds-bar span {
  width: 50%;
}

.pick-form,
.pick-form fieldset {
  display: grid;
  gap: 14px;
}

.pick-form fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

.radio-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 14px;
  border: 1px solid #dbeafe;
  border-radius: 18px;
  background: #f8fbff;
  cursor: pointer;
}

.score-label {
  display: grid;
  gap: 8px;
}

input[type="range"] {
  accent-color: var(--brand);
}

.status {
  min-height: 1.4em;
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
}

.sentiment-list {
  display: grid;
  gap: 16px;
  max-height: 760px;
  overflow: auto;
  padding-right: 4px;
}

.sentiment-row {
  display: grid;
  gap: 10px;
}

.sentiment-row div:first-child {
  display: grid;
  gap: 3px;
}

.sentiment-meter {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 32px;
  border: 1px dashed #94a3b8;
  border-radius: 24px;
  text-align: center;
}

@media (max-width: 780px) {
  .topbar,
  .section__header {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar__links {
    justify-content: flex-start;
  }

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

  .topbar {
    margin-bottom: 44px;
  }
}

.account-chip {
  margin-top: 18px;
  padding: 12px 14px;
  border: 1px solid #ccfbf1;
  border-radius: 18px;
  background: #f0fdfa;
  color: var(--brand-dark);
  font-weight: 800;
}

.auth-card,
.auth-form,
.signed-in-panel {
  display: grid;
  gap: 16px;
}

.auth-form label {
  display: grid;
  gap: 8px;
  font-weight: 800;
}

.auth-inline-action {
  display: flex;
  justify-content: flex-end;
  margin-top: -8px;
}

.button-link {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--brand-dark);
  cursor: pointer;
  font-weight: 900;
  text-decoration: underline;
}

.password-reset-request {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #ccfbf1;
  border-radius: 18px;
  background: #f0fdfa;
}

.password-reset-request .help-text {
  margin: 0;
}

input[type="date"],
input[type="email"],
input[type="password"],
input[type="text"],
input[type="time"],
input[type="datetime-local"] {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 18px;
  padding: 14px 16px;
  background: var(--snow);
  color: var(--ink);
}

.hero--compact {
  padding-bottom: 24px;
}

.auth-page .topbar {
  margin-bottom: 0;
}

.auth-section {
  min-height: calc(100vh - 112px);
}

.auth-section h1 {
  margin: 0;
  font-size: clamp(2.6rem, 6vw, 5.2rem);
  letter-spacing: -0.055em;
  line-height: 0.95;
}

.finalization-card,
.finalization-list,
.finalize-row,
.moderation-card,
.moderation-list,
.moderation-row,
.deadline-card,
.deadline-list,
.deadline-row,
.deadline-bulk-form {
  display: grid;
  gap: 16px;
}

.match-card--locked {
  opacity: 0.78;
}

.match-card--cancelled {
  border-color: #fecaca;
}

.match-card--locked .odds-bar span {
  background: linear-gradient(90deg, #94a3b8, #64748b);
}

.pick-form :disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

.moderation-row {
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  align-items: end;
  padding: 18px 0;
  border-top: 1px solid #e2e8f0;
}

.moderation-row:first-child {
  border-top: 0;
  padding-top: 0;
}

.moderation-row__header {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.moderation-row__header > div,
.moderation-row label {
  display: grid;
  gap: 6px;
}

.moderation-actions,
.moderation-row .status {
  grid-column: 1 / -1;
}

.lifecycle-badge {
  display: inline-flex;
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  background: #dcfce7;
  color: #166534;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.lifecycle-badge--cancelled {
  background: #fee2e2;
  color: #991b1b;
}

.lifecycle-badge--hidden {
  background: #e2e8f0;
  color: #334155;
}

.finalize-row {
  grid-template-columns: minmax(180px, 1fr) repeat(2, minmax(110px, 0.45fr)) auto;
  align-items: end;
  padding: 16px 0;
  border-top: 1px solid #e2e8f0;
}

.finalize-row:first-child {
  border-top: 0;
  padding-top: 0;
}

.deadline-row {
  grid-template-columns: minmax(180px, 1fr) minmax(190px, 0.65fr) auto;
  align-items: end;
  padding: 16px 0;
  border-top: 1px solid #e2e8f0;
}

.deadline-bulk-form {
  padding-bottom: 16px;
  border-bottom: 1px solid #e2e8f0;
}

.deadline-bulk-form label {
  display: grid;
  gap: 8px;
  font-weight: 800;
}

.finalize-row > div,
.finalize-row label,
.deadline-row > div,
.deadline-row label {
  display: grid;
  gap: 6px;
}

.finalize-row span,
.finalize-row label,
.moderation-row span,
.moderation-row label,
.deadline-row span,
.deadline-row label {
  color: var(--muted);
}

.finalize-row input[type="number"] {
  min-width: 0;
}

.finalize-row .status,
.deadline-row .status {
  grid-column: 1 / -1;
  margin: 0;
}


.match-workspace-card,
.matches-admin-list,
.match-admin-item {
  display: grid;
  gap: 16px;
}

.match-workspace-card__header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.match-admin-item {
  padding: 18px;
  border: 1px solid #e2e8f0;
  border-radius: 24px;
  background: #f8fafc;
}

.match-admin-item__header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.match-admin-item__header h4,
.match-admin-item__header p {
  margin: 0;
}

.match-admin-item__header p,
.match-admin-control__heading span,
.match-admin-control--notice span {
  color: var(--muted);
}

.match-admin-control {
  padding: 16px 0 0;
  border-top: 1px solid #e2e8f0;
}

.match-admin-control__heading {
  display: grid;
  gap: 6px;
  grid-column: 1 / -1;
}

.match-admin-control--notice {
  grid-template-columns: 1fr;
}

@media (max-width: 760px) {
  .finalize-row,
  .moderation-row,
  .deadline-row {
    grid-template-columns: 1fr;
  }
}


.admin-find-section {
  position: sticky;
  top: 0;
  z-index: 20;
  padding-top: 14px;
  padding-bottom: 14px;
  backdrop-filter: blur(16px);
}

.admin-find-bar {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-color: rgba(15, 118, 110, 0.24);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.1);
}

.admin-find-bar__header,
.admin-find-grid,
.admin-status-filters,
.admin-status-filters label {
  display: flex;
  align-items: center;
}

.admin-find-bar__header {
  justify-content: space-between;
  gap: 12px;
}

.admin-find-bar__header h2 {
  margin: 0;
  font-size: clamp(1.15rem, 2vw, 1.55rem);
  letter-spacing: -0.04em;
}

.admin-find-bar__header .eyebrow {
  margin: 0 0 4px;
  font-size: 0.72rem;
}

.admin-find-field {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-find-field input,
.admin-find-field select {
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
}

.admin-find-grid {
  flex-wrap: wrap;
  gap: 12px 18px;
}

.admin-find-grid .admin-find-field {
  min-width: min(240px, 100%);
}

.admin-status-filters {
  flex: 1 1 420px;
  flex-wrap: wrap;
  gap: 8px;
  min-width: min(100%, 320px);
  margin: 0;
  padding: 0;
  border: 0;
}

.admin-status-filters legend {
  width: 100%;
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-status-filters label {
  gap: 6px;
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: var(--snow);
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 800;
}

.admin-status-filters input {
  accent-color: var(--brand);
}

.admin-result-count {
  margin: 0 0 12px;
  font-weight: 800;
}

.admin-active-filter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(15, 118, 110, 0.24);
  border-radius: 18px;
  background: rgba(240, 253, 250, 0.92);
  color: var(--ink);
}

.admin-active-filter[hidden] {
  display: none;
}

.admin-active-filter strong {
  display: block;
  margin-bottom: 3px;
  color: var(--brand-dark);
}

.admin-active-filter p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

@media (max-width: 760px) {
  .admin-active-filter {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 760px) {
  .admin-find-section {
    top: 0;
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .admin-find-bar__header {
    align-items: stretch;
    flex-direction: column;
  }
}

.admin-summary-section {
  padding-top: 48px;
}

.admin-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 18px;
}

.admin-summary-card {
  display: grid;
  gap: 10px;
  min-height: 164px;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.admin-summary-card:hover {
  border-color: rgba(15, 118, 110, 0.42);
  box-shadow: 0 28px 76px rgba(15, 118, 110, 0.14);
  transform: translateY(-2px);
}

.admin-summary-card span {
  color: var(--brand);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.admin-summary-card strong {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  letter-spacing: -0.06em;
  line-height: 0.95;
}

.admin-summary-card small {
  color: var(--muted);
  font-weight: 800;
  line-height: 1.45;
}

.admin-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: end;
  padding-top: 0;
  padding-bottom: 48px;
}

.admin-shell h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(2.6rem, 6vw, 5.5rem);
  letter-spacing: -0.055em;
  line-height: 0.95;
}

.admin-shell p:not(.eyebrow) {
  max-width: 680px;
  color: var(--muted);
  line-height: 1.7;
}

.admin-shell .account-chip {
  align-self: end;
  min-width: min(320px, 100%);
}

@media (max-width: 780px) {
  .admin-shell {
    grid-template-columns: 1fr;
  }
}

.user-role-card,
.user-role-card__header,
.role-checkboxes {
  display: grid;
  gap: 16px;
}

.user-role-card__header {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.user-role-card__header h3 {
  margin: 0;
}

.user-role-controls,
.user-role-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
}

.user-role-control {
  display: grid;
  gap: 6px;
  min-width: min(240px, 100%);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.user-role-control input,
.user-role-control select {
  border-radius: 14px;
  padding: 10px 12px;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
}

.user-role-control input,
.user-role-control select:not([multiple]) {
  border-radius: 999px;
}

.user-role-controls .help-text {
  flex: 1 1 100%;
  margin: -4px 0 0;
}

.user-role-pagination {
  justify-content: space-between;
}

.user-role-pagination .status {
  margin: 0;
  font-weight: 800;
}

.table-scroll {
  overflow-x: auto;
}

.user-role-table,
.audit-log-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

.audit-log-table {
  min-width: 1040px;
}

.user-role-table th,
.user-role-table td,
.audit-log-table th,
.audit-log-table td {
  padding: 16px 14px;
  border-top: 1px solid #e2e8f0;
  text-align: left;
  vertical-align: top;
}

.user-role-table thead th,
.audit-log-table thead th {
  border-top: 0;
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.user-role-table td:first-child {
  min-width: 180px;
}

.role-checkboxes {
  gap: 12px;
}

.role-checkboxes label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-right: 12px;
  padding: 8px 10px;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  background: #f8fbff;
  color: var(--ink);
  font-weight: 800;
}

.role-checkboxes input {
  accent-color: var(--brand);
}

.role-checkboxes label.is-disabled {
  cursor: not-allowed;
  opacity: 0.72;
}

.role-actions {
  align-items: center;
}

.role-guard-badge {
  display: inline-flex;
  margin-left: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #fef3c7;
  color: #92400e;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}


.audit-log-card {
  display: grid;
  gap: 16px;
}

.audit-log-table td:nth-child(2) {
  display: grid;
  gap: 4px;
}

.audit-log-table td:nth-child(2) span {
  color: var(--muted);
  font-size: 0.9rem;
}

.audit-log-table pre {
  max-width: 520px;
  max-height: 220px;
  margin: 0;
  overflow: auto;
  border-radius: 16px;
  padding: 12px;
  background: #0f172a;
  color: #e2e8f0;
  font-size: 0.82rem;
  line-height: 1.45;
  white-space: pre-wrap;
}

@media (max-width: 780px) {
  .user-role-card__header {
    grid-template-columns: 1fr;
  }
}

.match-card__history-link {
  width: fit-content;
}

.detail-hero {
  padding: 24px clamp(20px, 5vw, 72px) 56px;
  background:
    radial-gradient(circle at 16% 20%, rgba(251, 191, 36, 0.22), transparent 24%),
    linear-gradient(135deg, #f8fdff 0%, #e6f8fb 100%);
}

.detail-hero .topbar {
  margin-bottom: 48px;
}

.detail-hero .topbar--secondary {
  margin-bottom: 36px;
}

.detail-hero__copy {
  max-width: 1180px;
  margin: 0 auto;
}

.detail-hero__copy h1 {
  max-width: 900px;
  margin: 0;
  font-size: clamp(2.8rem, 7vw, 5.6rem);
  line-height: 0.95;
  letter-spacing: -0.055em;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 24px;
  align-items: start;
}

.detail-main,
.detail-card,
.related-events,
.comments-box {
  display: grid;
  gap: 18px;
}

.detail-card__header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
}

.detail-card h2,
.related-sidebar h2 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.5rem);
}

.range-filters {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 8px;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  background: var(--snow);
}

.range-filters legend {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.range-filters label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.range-filters input {
  accent-color: var(--brand);
}

.prediction-history {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.prediction-history__chart {
  display: block;
  width: 100%;
  min-height: 280px;
  overflow: visible;
}

.prediction-history__grid-line {
  stroke: #dbeafe;
  stroke-width: 1;
}

.prediction-history__axis-line,
.prediction-history__tick-line {
  stroke: #94a3b8;
  stroke-width: 1.5;
}

.prediction-history__axis-label,
.prediction-history__axis-title {
  fill: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.prediction-history__axis-title {
  fill: var(--ink);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.prediction-history__line {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 4;
}

.prediction-history__line--team-a,
.prediction-history__dot--team-a {
  stroke: var(--brand);
}

.prediction-history__line--team-b,
.prediction-history__dot--team-b {
  stroke: #2563eb;
}

.prediction-history__dot {
  fill: var(--snow);
  stroke-width: 3;
}

.prediction-history__legend,
.related-event span,
.related-event small,
.comments-box {
  color: var(--muted);
}

.prediction-history__legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  font-weight: 700;
}

.prediction-history__legend-key {
  display: inline-block;
  width: 26px;
  height: 4px;
  border-radius: 999px;
}

.prediction-history__legend-key--team-a {
  background: var(--brand);
}

.prediction-history__legend-key--team-b {
  background: #2563eb;
}

.comments-box {
  font-weight: 800;
}

.related-sidebar {
  position: sticky;
  top: 24px;
}

.related-event {
  display: grid;
  gap: 5px;
  padding: 16px;
  border: 1px solid #dbeafe;
  border-radius: 18px;
  background: #f8fbff;
  transition: border-color 160ms ease, transform 160ms ease, background 160ms ease;
}

.related-event:hover {
  border-color: #99f6e4;
  background: #f0fdfa;
  transform: translateY(-1px);
}

.related-event small {
  color: var(--brand-dark);
  font-weight: 800;
}


.account-layout {
  display: grid;
  gap: 24px;
  max-width: 820px;
}

.account-form,
.account-password-fields {
  display: grid;
  gap: 16px;
}

.account-form label {
  display: grid;
  gap: 8px;
  font-weight: 800;
}

.account-password-fields {
  padding-top: 18px;
  border-top: 1px solid #e2e8f0;
}

.account-password-fields h3,
.account-password-fields p {
  margin: 0;
}

.muted-copy {
  color: var(--muted);
  font-weight: 700;
  line-height: 1.5;
}

@media (max-width: 900px) {
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .detail-card__header {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .range-filters {
    flex-wrap: wrap;
    border-radius: 24px;
  }

  .related-sidebar {
    position: static;
  }
}

.match-admin-context {
  padding-top: 48px;
  padding-bottom: 24px;
}

.match-admin-card,
.match-admin-card__actions {
  display: grid;
  gap: 18px;
}

.match-admin-card {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.match-admin-card h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.5rem);
}

.match-admin-card p:not(.eyebrow) {
  margin-bottom: 0;
}

.match-admin-card__actions {
  grid-template-columns: repeat(2, minmax(150px, auto));
}

@media (max-width: 860px) {
  .match-admin-card,
  .match-admin-card__actions {
    grid-template-columns: 1fr;
  }
}

.audit-log-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  align-items: end;
  padding: 14px;
  border: 1px solid #dbeafe;
  border-radius: 18px;
  background: #f8fbff;
}

.audit-log-filter {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.audit-log-filter input,
.audit-log-filter select {
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
}

.audit-log-table td:nth-child(6) {
  display: grid;
  gap: 10px;
}

.audit-log-metadata-preview {
  display: block;
  max-width: 520px;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.84rem;
  line-height: 1.45;
}

.audit-log-metadata-toggle {
  justify-self: start;
  padding: 7px 10px;
  font-size: 0.78rem;
}

.profile-layout {
  display: grid;
  grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.profile-summary-section {
  display: grid;
  grid-column: 1 / -1;
  gap: 18px;
}

.profile-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.profile-summary-card {
  display: grid;
  gap: 10px;
  min-height: 148px;
}

.profile-summary-card span {
  color: var(--brand);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.profile-summary-card strong {
  font-size: clamp(1.8rem, 4vw, 3rem);
  letter-spacing: -0.05em;
  line-height: 0.95;
}

.profile-summary-card small {
  color: var(--muted);
  font-weight: 800;
  line-height: 1.45;
}

.profile-card,
.profile-identity {
  display: grid;
  gap: 16px;
}

.profile-picks-card {
  grid-column: 1 / -1;
}

.profile-card h2,
.profile-picks-card h2 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.5rem);
}

.profile-card__header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
}

.profile-identity {
  margin: 0;
}

.profile-identity div {
  display: grid;
  gap: 4px;
  padding: 14px 0;
  border-top: 1px solid #e2e8f0;
}

.profile-identity dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.profile-identity dd {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 800;
}

.profile-actions {
  align-items: center;
}

.profile-picks-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
}

.profile-picks-table th,
.profile-picks-table td {
  padding: 16px 14px;
  border-top: 1px solid #e2e8f0;
  text-align: left;
  vertical-align: top;
}

.profile-picks-table thead th {
  border-top: 0;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.profile-picks-table a {
  color: var(--brand-dark);
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.profile-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.profile-pagination span {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 900;
}

@media (max-width: 900px) {
  .profile-layout {
    grid-template-columns: 1fr;
  }

  .profile-card__header {
    display: grid;
  }
}

.leaderboard-layout {
  display: grid;
  gap: 24px;
  align-items: start;
}

.leaderboard-summary-section {
  display: grid;
  gap: 18px;
}

.leaderboard-summary-card strong {
  overflow-wrap: anywhere;
}

.leaderboard-card {
  overflow: hidden;
}


.leaderboard-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 14px;
  margin: 4px 0 20px;
}

.leaderboard-filters label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.leaderboard-filters select {
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
}

.leaderboard-podium {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.leaderboard-podium-card {
  display: grid;
  gap: 10px;
  min-height: 180px;
  background:
    radial-gradient(circle at 82% 18%, rgba(251, 191, 36, 0.2), transparent 30%),
    rgba(255, 255, 255, 0.92);
}

.leaderboard-podium-card h3 {
  margin: 0;
  font-size: 1.2rem;
}

.leaderboard-podium-card strong {
  font-size: clamp(2rem, 5vw, 3.4rem);
  letter-spacing: -0.06em;
  line-height: 0.9;
}

.leaderboard-podium-card small,
.leaderboard-rank {
  color: var(--muted);
  font-weight: 900;
}

.leaderboard-rank {
  color: var(--brand);
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.leaderboard-table {
  min-width: 900px;
}

.leaderboard-table td:first-child,
.leaderboard-table td:nth-child(3) {
  color: var(--brand-dark);
  font-weight: 900;
}

@media (max-width: 760px) {
  .leaderboard-filters {
    grid-template-columns: 1fr;
  }

  .leaderboard-podium {
    grid-template-columns: 1fr;
  }
}

.password-reset-request[hidden] {
  display: none;
}

.bulk-final-form {
  display: grid;
  gap: 1rem;
  margin: 1rem 0;
  padding: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 1rem;
  background: rgba(15, 23, 42, 0.35);
}

.bulk-final-table input {
  max-width: 6rem;
}

.bulk-final-form[hidden] {
  display: none;
}

.tutorial-layout {
  display: grid;
  gap: 24px;
  align-items: start;
}

.tutorial-card h2,
.tutorial-cta-section h2 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.5rem);
}

.tutorial-card h3 {
  margin: 0;
  font-size: 1.15rem;
}

.tutorial-card p {
  margin: 0;
}

.tutorial-flow {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: tutorial-step;
}

.tutorial-flow li {
  position: relative;
  display: grid;
  gap: 10px;
  padding: 22px;
  border: 1px solid #dbeafe;
  border-radius: 22px;
  background: #f8fbff;
  counter-increment: tutorial-step;
}

.tutorial-flow li::before {
  content: counter(tutorial-step);
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 999px;
  background: var(--brand);
  color: #ffffff;
  font-weight: 900;
}

.tutorial-flow a,
.tutorial-card a:not(.button) {
  width: fit-content;
  color: var(--brand-dark);
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.tutorial-inline-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.tutorial-cta-section {
  display: grid;
  gap: 18px;
}

.tutorial-cta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 16px;
}

.tutorial-cta-card {
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.tutorial-cta-card:hover {
  border-color: rgba(15, 118, 110, 0.42);
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.14);
  transform: translateY(-2px);
}
