:root {
  --prediction-bg: #05070d;
  --prediction-panel: #0b1230;
  --prediction-panel-2: #10183e;
  --prediction-line: rgba(214, 217, 226, 0.72);
  --prediction-muted: #b9c4ee;
  --prediction-blue: #2d7cff;
  --prediction-red: #ff3b45;
  --prediction-gold: #f3d365;
  --prediction-green: #48d38a;
}

body.prediction-page,
body.model-lab-page,
body.admin-prediction-page {
  background:
    radial-gradient(circle at 10% 0%, rgba(45, 124, 255, 0.24), transparent 28rem),
    radial-gradient(circle at 92% 18%, rgba(255, 59, 69, 0.17), transparent 32rem),
    linear-gradient(135deg, #05070d 0%, #080d19 48%, #130817 100%);
}

.prediction-shell,
.model-lab-shell,
.admin-prediction-shell {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 72px;
}

body.prediction-page .prediction-shell {
  width: min(1580px, calc(100% - 28px));
}

.prediction-hero,
.prediction-panel,
.prediction-card,
.model-lab-banner,
.admin-prediction-panel {
  border: 1px solid var(--prediction-line);
  background:
    linear-gradient(135deg, rgba(11, 35, 94, 0.96), rgba(24, 17, 58, 0.94)),
    var(--prediction-panel);
  box-shadow: 0 20px 58px rgba(0, 0, 0, 0.35);
}

.prediction-hero,
.model-lab-banner {
  border-radius: 16px;
  padding: clamp(24px, 5vw, 54px);
  margin-bottom: 18px;
}

.prediction-hero h1,
.prediction-gradient-title,
.model-lab-banner h1 {
  margin: 0;
  font-size: clamp(2.4rem, 7vw, 5.8rem);
  line-height: 0.9;
  letter-spacing: 0;
  background: linear-gradient(90deg, #2d7cff 0%, #bfc6ff 48%, #ff3b45 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.prediction-hero p,
.prediction-note,
.prediction-meta,
.model-lab-banner p {
  color: var(--prediction-muted);
}

.prediction-actions,
.prediction-tabs,
.admin-prediction-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.prediction-actions {
  margin-top: 24px;
}

.prediction-button,
.prediction-tabs a,
.prediction-tabs button,
.admin-prediction-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid var(--prediction-line);
  border-radius: 10px;
  padding: 0 16px;
  color: #fff;
  background: rgba(10, 18, 50, 0.84);
  font-weight: 900;
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.prediction-button:hover,
.prediction-tabs a:hover,
.prediction-tabs button:hover,
.prediction-tabs a.active,
.prediction-tabs button.active,
.admin-prediction-actions button:hover {
  transform: translateY(-1px);
  border-color: #fff;
  background: linear-gradient(135deg, rgba(45, 124, 255, 0.5), rgba(255, 59, 69, 0.26));
}

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

.prediction-card {
  border-radius: 12px;
  padding: 18px;
  min-height: 136px;
}

.prediction-card span,
.prediction-table th,
.prediction-kicker {
  color: var(--prediction-muted);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.prediction-card strong {
  display: block;
  margin: 8px 0;
  font-size: clamp(1.8rem, 4vw, 3.4rem);
  line-height: 0.94;
}

.prediction-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(300px, 0.62fr);
  gap: 16px;
  align-items: start;
}

body.prediction-page .prediction-layout {
  grid-template-columns: 1fr;
}

.prediction-panel {
  border-radius: 14px;
  padding: 18px;
}

body.prediction-page .prediction-map-panel {
  padding: clamp(16px, 2vw, 28px);
}

body.prediction-page .prediction-map-panel h2 {
  margin-bottom: 18px;
}

body.prediction-page .prediction-map-panel .prediction-map {
  width: 100%;
}

.prediction-panel h2 {
  margin: 0 0 14px;
  font-size: clamp(1.8rem, 4vw, 3.6rem);
  line-height: 0.96;
}

.prediction-map {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 8px;
  max-height: 620px;
  overflow: auto;
  padding-right: 4px;
}

.prediction-map-tile {
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 8px;
  min-height: 78px;
  padding: 8px;
  color: #fff;
  background: #1c2747;
  text-align: left;
  cursor: pointer;
  transition: transform 160ms ease, filter 160ms ease, border-color 160ms ease;
}

.prediction-map-tile:hover,
.prediction-map-tile.is-selected {
  transform: translateY(-2px);
  border-color: #fff;
  filter: brightness(1.12);
}

.prediction-map-tile b,
.prediction-map-tile small {
  display: block;
}

.prediction-map-tile b {
  font-size: 1rem;
}

.prediction-map-tile small {
  color: rgba(255,255,255,0.82);
  margin-top: 5px;
}

.rating-safe-d,
.rating-safe-democratic { background: #2c54bc; }
.rating-likely-d,
.rating-likely-democratic { background: #4f73d1; }
.rating-lean-d,
.rating-lean-democratic { background: #7694e2; color: #061025; }
.rating-tilt-d,
.rating-tilt-democratic { background: #a0b6ef; color: #061025; }
.rating-toss-up,
.rating-tossup { background: #cbcacd; color: #061025; }
.rating-tilt-r,
.rating-tilt-republican { background: #eba3a2; color: #061025; }
.rating-lean-r,
.rating-lean-republican { background: #dd7a78; color: #061025; }
.rating-likely-r,
.rating-likely-republican { background: #cb5452; }
.rating-safe-r,
.rating-safe-republican { background: #b5312f; }
.rating-safe-i,
.rating-likely-i,
.rating-lean-i,
.rating-tilt-i { background: linear-gradient(135deg, #2ec6a3, #1a7969); }

.prediction-table-wrap {
  overflow: auto;
  border: 1px solid var(--prediction-line);
  border-radius: 12px;
}

.prediction-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 840px;
  background: rgba(3, 9, 27, 0.78);
}

.prediction-table th,
.prediction-table td {
  padding: 13px 12px;
  border-bottom: 1px solid rgba(214, 217, 226, 0.34);
  text-align: left;
}

.prediction-table tr {
  cursor: pointer;
}

.prediction-table tbody tr:hover,
.prediction-table tbody tr.is-selected {
  background: rgba(45, 124, 255, 0.18);
}

.prediction-party-d { color: var(--prediction-blue); }
.prediction-party-r { color: var(--prediction-red); }
.prediction-party-i { color: var(--prediction-green); }

.prediction-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid rgba(255,255,255,0.38);
  border-radius: 999px;
  padding: 0 10px;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.prediction-detail {
  position: sticky;
  top: 96px;
}

.prediction-detail-card {
  border: 1px solid var(--prediction-line);
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(12, 31, 82, 0.96), rgba(30, 18, 61, 0.98));
}

.prediction-detail-head {
  padding: 18px;
  background: linear-gradient(135deg, rgba(45, 124, 255, 0.35), rgba(255, 59, 69, 0.22));
}

.prediction-detail-head h3 {
  margin: 6px 0 0;
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  line-height: 0.98;
}

.prediction-detail-body {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.prediction-mini-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.prediction-mini-grid div,
.prediction-admin-note {
  border: 1px solid rgba(214, 217, 226, 0.42);
  border-radius: 10px;
  padding: 10px;
  background: rgba(2, 9, 30, 0.55);
}

.model-lab-warning {
  border-color: #f3d365;
  background: rgba(243, 211, 101, 0.1);
  color: #ffe9a3;
}

.admin-prediction-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 16px;
  align-items: start;
}

.admin-prediction-panel {
  border-radius: 14px;
  padding: 18px;
}

.admin-prediction-form {
  display: grid;
  gap: 10px;
}

.admin-prediction-form label {
  display: grid;
  gap: 5px;
  color: var(--prediction-muted);
  font-weight: 900;
  font-size: 0.8rem;
  text-transform: uppercase;
}

.admin-prediction-form input,
.admin-prediction-form select,
.admin-prediction-form textarea {
  width: 100%;
  border: 1px solid var(--prediction-line);
  border-radius: 9px;
  padding: 10px;
  background: #050b1c;
  color: #fff;
  font: inherit;
}

.admin-prediction-form textarea {
  min-height: 96px;
  resize: vertical;
}

.admin-prediction-preview {
  margin-top: 16px;
}

.admin-wide-map {
  max-height: 70vh;
}

.admin-inline-label {
  display: inline-grid;
  gap: 4px;
  color: var(--prediction-muted);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-inline-label select,
.admin-bulk-actions select {
  min-height: 42px;
  border: 1px solid var(--prediction-line);
  border-radius: 10px;
  padding: 0 12px;
  background: #050b1c;
  color: #fff;
  font: inherit;
}

.admin-bulk-actions {
  margin-top: 12px;
}

.prediction-page .prediction-hero {
  padding: clamp(22px, 4vw, 38px);
}

.prediction-page .prediction-hero h1 {
  font-size: clamp(2.6rem, 7vw, 5rem);
  line-height: 0.94;
}

.prediction-topline {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

body.prediction-page:not([data-prediction-key]) .prediction-topline {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.prediction-command-board,
.prediction-chart-panel {
  border: 1px solid var(--prediction-line);
  border-radius: 16px;
  background:
    linear-gradient(120deg, rgba(7, 31, 85, 0.96), rgba(26, 15, 43, 0.96)),
    var(--prediction-panel);
  box-shadow: 0 20px 58px rgba(0, 0, 0, 0.35);
}

.prediction-command-board {
  display: grid;
  grid-template-columns: minmax(180px, 0.34fr) minmax(260px, 1fr) minmax(180px, 0.34fr);
  gap: 18px;
  align-items: end;
  padding: clamp(18px, 3vw, 28px);
}

.prediction-command-left,
.prediction-command-right,
.prediction-command-center {
  display: grid;
  gap: 8px;
}

.prediction-command-right {
  text-align: right;
}

.prediction-command-left span,
.prediction-command-right span,
.prediction-command-center small {
  color: var(--prediction-muted);
  font-weight: 900;
}

.prediction-command-left span,
.prediction-command-right span {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.prediction-command-left strong,
.prediction-command-right strong {
  font-size: clamp(3.2rem, 8vw, 6.8rem);
  line-height: 0.78;
}

.prediction-command-center {
  text-align: center;
}

.prediction-command-center > b {
  color: #fff;
  font-size: clamp(1.4rem, 3vw, 2.4rem);
  line-height: 1;
}

.prediction-seatbar {
  display: flex;
  position: relative;
  min-height: 30px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

.prediction-seatbar-segment {
  min-width: 0;
}

.prediction-seatbar-d { background: linear-gradient(90deg, #1565ff, #2b8ee8); }
.prediction-seatbar-r { background: linear-gradient(90deg, #ef4048, #9c1218); }
.prediction-seatbar-i { background: linear-gradient(90deg, #28c9a5, #18826f); }
.prediction-seatbar-toss {
  background:
    repeating-linear-gradient(135deg, rgba(255,255,255,0.23) 0 8px, rgba(255,255,255,0.04) 8px 16px),
    rgba(255, 255, 255, 0.16);
}

.prediction-seatbar-marker {
  position: absolute;
  inset-block: -4px;
  width: 2px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(4, 9, 24, 0.6);
}

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

.prediction-chart-panel {
  display: grid;
  grid-template-columns: minmax(220px, 0.45fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  padding: 18px;
}

.prediction-chart-panel h2 {
  font-size: clamp(2rem, 4vw, 4rem);
}

.prediction-rating-list {
  display: grid;
  gap: 8px;
}

.prediction-rating-row {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) 44px;
  gap: 10px;
  align-items: center;
}

.prediction-rating-track {
  height: 16px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.36);
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
}

.prediction-rating-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.prediction-rating-row > b {
  color: #fff;
  text-align: right;
}

.prediction-map {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  max-height: 720px;
  gap: 10px;
}

.prediction-map.prediction-shape-map {
  position: relative;
  display: block;
  min-height: 560px;
  max-height: none;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--prediction-line);
  border-radius: 14px;
  background:
    radial-gradient(circle at 25% 18%, rgba(56, 105, 205, 0.24), transparent 32%),
    linear-gradient(135deg, rgba(4, 16, 40, 0.98), rgba(27, 16, 45, 0.96));
}

.prediction-map.prediction-county-map {
  min-height: 360px;
}

.prediction-shape-svg {
  display: block;
  width: 100%;
  min-height: 560px;
  height: auto;
}

body.prediction-page .prediction-map.prediction-shape-map {
  min-height: clamp(640px, 72vh, 880px);
}

body.prediction-page .prediction-shape-svg {
  min-height: clamp(640px, 72vh, 880px);
  height: clamp(640px, 72vh, 880px);
}

.prediction-county-map .prediction-shape-svg {
  min-height: 360px;
}

.prediction-shape-feature {
  stroke: rgba(255, 255, 255, 0.38);
  stroke-width: 0.85;
  vector-effect: non-scaling-stroke;
  transition: filter 140ms ease, opacity 140ms ease, stroke 140ms ease;
}

.prediction-shape-feature.has-race {
  cursor: pointer;
}

.prediction-shape-feature.is-muted {
  cursor: default;
  opacity: 0.46;
}

.prediction-shape-feature.has-race:hover,
.prediction-shape-feature.is-selected {
  stroke: #ffffff;
  stroke-width: 2.8;
  filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.72)) brightness(1.12) saturate(1.08);
}

.prediction-rating-legend {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  gap: 6px;
  margin-top: 10px;
  padding: 8px;
  border: 1px solid rgba(198, 210, 255, 0.32);
  border-radius: 12px;
  background: rgba(2, 8, 25, 0.5);
}

.prediction-rating-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(238, 243, 255, 0.86);
  font-size: 0.72rem;
  font-weight: 900;
  white-space: nowrap;
}

.prediction-rating-legend i {
  width: 18px;
  height: 10px;
  border: 1px solid rgba(255, 255, 255, 0.46);
  border-radius: 999px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.16);
}

.prediction-shape-scale {
  position: absolute;
  z-index: 3;
  right: 14px;
  bottom: 12px;
  display: grid;
  grid-template-columns: auto 70px auto 70px auto;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 999px;
  background: rgba(4, 9, 24, 0.76);
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
  pointer-events: none;
}

body.prediction-page .prediction-shape-scale {
  right: auto;
  left: 16px;
  bottom: 16px;
  grid-template-columns: auto minmax(76px, 96px) auto minmax(76px, 96px) auto;
  border-radius: 12px;
}

.prediction-shape-scale i {
  display: block;
  height: 8px;
  border-radius: 999px;
}

.prediction-shape-scale .is-d {
  background: linear-gradient(90deg, #1030b2, #f3ead4);
}

.prediction-shape-scale .is-r {
  background: linear-gradient(90deg, #f3ead4, #bd2027);
}

.prediction-map-tooltip {
  position: absolute;
  z-index: 20;
  width: min(280px, calc(100% - 18px));
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 9px;
  background: rgba(4, 8, 22, 0.96);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.36);
  color: #fff;
  pointer-events: none;
}

.prediction-map-tooltip strong,
.prediction-map-tooltip small {
  display: block;
}

.prediction-map-tooltip strong {
  margin-bottom: 8px;
  font-size: 1rem;
}

.prediction-map-tooltip small {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 800;
}

.prediction-map-tooltip-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 4px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  font-weight: 900;
}

.prediction-map-tooltip-row .is-d {
  color: #7fb7ff;
}

.prediction-map-tooltip-row .is-r {
  color: #ff8d96;
}

.admin-two-up {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.admin-map-instructions {
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid var(--prediction-line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
}

.admin-map-edit-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.85fr);
  gap: 12px;
  margin-top: 12px;
}

.prediction-map-editor {
  padding: 12px;
  border: 1px solid var(--prediction-line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
}

.prediction-map-editor h3,
.prediction-map-editor p {
  margin-top: 0;
}

.admin-map-editor-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 10px 0;
}

.admin-map-editor-fields label {
  margin: 0;
}

.admin-wide-map {
  min-height: 600px;
}

.admin-county-editor-map {
  min-height: 380px;
}

.prediction-race-tile {
  min-height: 132px;
  border-color: rgba(255, 255, 255, 0.62);
  background-blend-mode: normal;
}

.prediction-race-tile strong {
  display: block;
  margin-top: 8px;
  font-size: 1.12rem;
  line-height: 1.02;
}

.prediction-tile-code {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid rgba(255,255,255,0.7);
  border-radius: 999px;
  padding: 0 9px;
  color: #fff;
  background: rgba(0,0,0,0.18);
  font-weight: 900;
}

.prediction-tile-line {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,0.35);
}

.prediction-tile-line em {
  color: rgba(255,255,255,0.84);
  font-style: normal;
  font-weight: 900;
}

.prediction-detail-head p {
  margin: 8px 0 0;
  color: rgba(255,255,255,0.86);
  font-weight: 900;
}

.prediction-candidate-list {
  display: grid;
  overflow: hidden;
  border: 1px solid rgba(214, 217, 226, 0.42);
  border-radius: 12px;
  background: rgba(2, 9, 30, 0.55);
}

.prediction-candidate-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 11px;
  border-bottom: 1px solid rgba(214, 217, 226, 0.25);
}

.prediction-candidate-row:last-child {
  border-bottom: 0;
}

.prediction-candidate-row.is-projected {
  background: linear-gradient(90deg, rgba(72, 211, 138, 0.18), transparent);
}

.prediction-candidate-party {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255,255,255,0.62);
  border-radius: 999px;
  color: #fff;
  background: rgba(255,255,255,0.08);
  font-size: 0.82rem;
  font-weight: 900;
}

.prediction-candidate-row strong,
.prediction-candidate-row small {
  grid-column: 2;
}

.prediction-candidate-row small {
  color: var(--prediction-muted);
  font-weight: 800;
}

@media (max-width: 920px) {
  .prediction-topline,
  .prediction-layout,
  .admin-prediction-grid {
    grid-template-columns: 1fr;
  }

  .prediction-command-board,
  .prediction-chart-panel,
  .prediction-stat-grid {
    grid-template-columns: 1fr;
  }

  .prediction-command-right,
  .prediction-command-center {
    text-align: left;
  }

  .prediction-detail {
    position: static;
  }

  .admin-two-up,
  .admin-map-edit-grid,
  .admin-map-editor-fields {
    grid-template-columns: 1fr;
  }

  .prediction-map.prediction-shape-map,
  .prediction-shape-svg {
    min-height: 420px;
  }

  .prediction-map.prediction-county-map,
  .prediction-county-map .prediction-shape-svg {
    min-height: 300px;
  }

  .prediction-shape-scale {
    left: 10px;
    right: 10px;
    grid-template-columns: auto 1fr auto 1fr auto;
    font-size: 0.62rem;
  }
}

/* Prediction pages now use the election-night map shell: large map-first layout,
   with details shown only after a race is selected. */
body.prediction-page .prediction-map-panel {
  width: min(1560px, calc(100vw - 32px));
  margin: 22px auto 0;
  padding: clamp(16px, 1.9vw, 28px);
}

body.prediction-page .prediction-board {
  width: min(1160px, 100%);
  margin: 0 auto 14px;
  padding: 0;
}

body.prediction-page .prediction-board .election-chamber-counts {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 18px;
  align-items: end;
  margin-bottom: 8px;
}

body.prediction-page .prediction-board .election-chamber-counts strong {
  font: 950 clamp(2.3rem, 5vw, 4.7rem)/0.9 "Telegraf", "Inter", "Segoe UI", sans-serif;
  letter-spacing: 0;
}

body.prediction-page .prediction-board .election-chamber-counts strong:last-child {
  text-align: right;
}

body.prediction-page .prediction-board .election-chamber-counts span {
  align-self: center;
  color: #cfd6ff;
  font: 950 clamp(0.78rem, 1.4vw, 0.98rem)/1.15 "Telegraf", "Inter", "Segoe UI", sans-serif;
  letter-spacing: 0.06em;
  text-align: center;
  text-transform: uppercase;
}

body.prediction-page .prediction-board.is-governor-board .election-chamber-counts {
  width: min(720px, 100%);
  margin: 0 auto;
}

body.prediction-page .prediction-board .chamber-bar-dem,
body.prediction-page .prediction-board .chamber-bar-rep,
body.prediction-page .prediction-board .chamber-bar-uncalled {
  display: block;
  height: 100%;
  min-width: 0;
  transition: width 0.24s ease;
}

body.prediction-page .prediction-board .chamber-bar-dem {
  background: linear-gradient(90deg, #1030b2, #2d7cff);
}

body.prediction-page .prediction-board .chamber-bar-rep {
  background: linear-gradient(90deg, #ff3b45, #9d111a);
}

body.prediction-page .prediction-board .chamber-bar-uncalled {
  background:
    repeating-linear-gradient(135deg, rgba(255,255,255,0.24) 0 8px, rgba(255,255,255,0.06) 8px 16px),
    rgba(226,232,255,0.18);
}

body.prediction-page .prediction-board .chamber-majority-line {
  position: absolute;
  top: -4px;
  bottom: -4px;
  width: 2px;
  background: #fff;
  box-shadow: 0 0 14px rgba(255,255,255,0.78);
  transform: translateX(-1px);
}

body.prediction-page .prediction-rating-timeline {
  margin: 0 auto 16px;
  padding: 14px;
  border: 1px solid var(--prediction-line);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(10, 28, 76, 0.82), rgba(32, 17, 52, 0.78)),
    rgba(6, 12, 32, 0.84);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.24);
}

body.prediction-page .prediction-rating-timeline-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
}

body.prediction-page .prediction-rating-timeline-header span {
  color: var(--prediction-muted);
  font-size: 0.76rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body.prediction-page .prediction-rating-timeline-header strong {
  color: #fff;
  font-weight: 950;
}

body.prediction-page .prediction-rating-slider-wrap input[type="range"] {
  width: 100%;
  accent-color: #c6d2ff;
  cursor: pointer;
}

body.prediction-page .prediction-rating-ticks {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  margin-top: 8px;
}

body.prediction-page .prediction-rating-tick {
  display: grid;
  grid-template-rows: 12px auto;
  justify-items: center;
  gap: 4px;
  min-width: 0;
  border: 0;
  padding: 0;
  color: #cfd6ff;
  background: transparent;
  font: 850 0.68rem/1.1 "Telegraf", "Inter", "Segoe UI", sans-serif;
  cursor: pointer;
}

body.prediction-page .prediction-rating-tick i {
  width: 9px;
  height: 9px;
  border: 1px solid rgba(255,255,255,0.72);
  border-radius: 999px;
  background: rgba(255,255,255,0.15);
  transition: transform 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

body.prediction-page .prediction-rating-tick span {
  max-width: 92px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.prediction-page .prediction-rating-tick:hover i,
body.prediction-page .prediction-rating-tick.is-active i {
  background: #ff4f63;
  box-shadow: 0 0 14px rgba(255, 79, 99, 0.58);
  transform: scale(1.16);
}

body.prediction-page .prediction-map-shell {
  position: relative;
  min-height: clamp(680px, 78vh, 940px);
}

body.prediction-page .prediction-map.election-map-canvas.prediction-shape-map {
  position: relative;
  display: block;
  width: 100%;
  min-height: clamp(680px, 78vh, 940px);
  max-height: none;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--prediction-line);
  border-radius: 14px;
  background:
    radial-gradient(circle at 38% 22%, rgba(45,124,255,0.18), transparent 36%),
    linear-gradient(135deg, rgba(7,31,85,0.95), rgba(18,13,43,0.97));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04), 0 24px 54px rgba(0,0,0,0.32);
}

body.prediction-page .prediction-map.election-map-canvas.prediction-county-map {
  min-height: clamp(680px, 78vh, 940px);
}

body.prediction-page .prediction-map.election-map-canvas.prediction-shape-map::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(45,124,255,0.08), transparent 36%, rgba(255,59,69,0.08)),
    radial-gradient(circle at 50% 45%, rgba(255,255,255,0.05), transparent 44%);
  z-index: 0;
}

body.prediction-page .prediction-shape-svg {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: clamp(680px, 78vh, 940px);
  min-height: clamp(680px, 78vh, 940px);
}

body.prediction-page .prediction-shape-feature {
  cursor: pointer;
  vector-effect: non-scaling-stroke;
  transition: filter 0.16s ease, opacity 0.16s ease, stroke-width 0.16s ease;
}

body.prediction-page .prediction-shape-feature.has-race:hover,
body.prediction-page .prediction-shape-feature.has-race:focus,
body.prediction-page .prediction-shape-feature.is-selected {
  filter: brightness(1.18) saturate(1.1) drop-shadow(0 0 12px rgba(255,255,255,0.24));
  stroke: #fff;
  stroke-width: 2.1;
}

body.prediction-page .prediction-map-controls {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 12;
}

body.prediction-page .prediction-shape-scale {
  z-index: 4;
}

body.prediction-page .prediction-detail.election-focus-overlay {
  position: absolute;
  top: auto;
  right: 18px;
  bottom: 18px;
  width: min(520px, 46%, calc(100% - 36px));
  max-width: min(520px, 48%);
  min-width: min(320px, calc(100% - 36px));
}

body.prediction-page .prediction-detail[hidden] {
  display: none !important;
}

body.prediction-page .prediction-focus-note {
  display: grid;
  gap: 7px;
  padding: 12px 16px;
  border-top: 1px solid rgba(198,210,255,0.28);
}

body.prediction-page .prediction-focus-note p {
  margin: 0;
  color: #eef2ff;
  font-weight: 800;
  line-height: 1.35;
}

body.prediction-page .selected-race-foot {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px 16px;
  border-top: 1px solid rgba(198,210,255,0.28);
  color: #cfd6ff;
  font-weight: 950;
}

@media (max-width: 920px) {
  body.prediction-page .prediction-map-panel {
    width: min(100%, calc(100vw - 16px));
    padding: 12px;
  }

  body.prediction-page .prediction-map-shell,
  body.prediction-page .prediction-map.election-map-canvas.prediction-shape-map,
  body.prediction-page .prediction-shape-svg {
    min-height: 560px;
    height: 560px;
  }

  body.prediction-page .prediction-detail.election-focus-overlay {
    left: 10px;
    right: 10px;
    bottom: 10px;
    width: auto;
    max-width: none;
    min-width: 0;
    max-height: 58vh;
  }

  body.prediction-page .prediction-board .election-chamber-counts {
    grid-template-columns: 1fr;
    gap: 4px;
    text-align: left;
  }

  body.prediction-page .prediction-board .election-chamber-counts strong:last-child {
    text-align: left;
  }

  body.prediction-page .prediction-board .election-chamber-counts span {
    text-align: left;
  }

  body.prediction-page .prediction-rating-timeline-header {
    align-items: flex-start;
    flex-direction: column;
  }

  body.prediction-page .prediction-rating-ticks {
    overflow-x: auto;
    justify-content: flex-start;
    padding-bottom: 4px;
  }

  body.prediction-page .prediction-rating-tick {
    min-width: 86px;
  }
}

body.prediction-page .prediction-detail.election-focus-overlay {
  width: min(640px, 52%, calc(100% - 36px));
  max-width: 640px;
}

body.prediction-page .selected-race-table th,
body.prediction-page .selected-race-table td {
  vertical-align: top;
}

body.prediction-page .selected-race-table th:nth-child(2),
body.prediction-page .selected-race-table th:nth-child(3),
body.prediction-page .selected-race-table td:nth-child(2),
body.prediction-page .selected-race-table td:nth-child(3) {
  width: 110px;
  text-align: right;
  white-space: nowrap;
}

.prediction-diagnostic-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.prediction-diagnostic-grid div,
.admin-reference-grid div {
  border: 1px solid rgba(198,210,255,0.34);
  border-radius: 10px;
  padding: 10px;
  background: rgba(3, 9, 27, 0.56);
}

.prediction-diagnostic-grid span,
.admin-reference-grid span {
  display: block;
  color: var(--prediction-muted);
  font-size: 0.68rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.prediction-diagnostic-grid strong,
.admin-reference-grid strong {
  display: block;
  margin-top: 4px;
  color: #fff;
  font-size: 0.95rem;
  line-height: 1.05;
}

.prediction-detail-county-map {
  overflow: hidden;
  min-height: 260px;
  border: 1px solid rgba(198,210,255,0.32);
  border-radius: 12px;
  background: rgba(2, 8, 25, 0.62);
}

.prediction-detail-county-map .prediction-map {
  max-height: none;
  overflow: hidden;
}

.prediction-detail-county-map .prediction-shape-svg {
  height: 260px;
  min-height: 260px;
}

body.admin-prediction-page .admin-prediction-shell {
  width: min(1680px, calc(100% - 32px));
}

body.admin-prediction-page .admin-prediction-grid {
  grid-template-columns: minmax(0, 1fr) minmax(390px, 430px);
  gap: 18px;
}

body.admin-prediction-page .admin-prediction-grid > aside.admin-prediction-panel {
  position: sticky;
  top: 86px;
  max-height: calc(100vh - 108px);
  overflow: auto;
}

.admin-editor-section {
  border: 1px solid rgba(198,210,255,0.46);
  border-radius: 14px;
  padding: 14px;
  background:
    linear-gradient(135deg, rgba(10, 30, 80, 0.82), rgba(21, 15, 50, 0.78)),
    rgba(3, 9, 27, 0.8);
}

.admin-editor-section + .admin-editor-section {
  margin-top: 12px;
}

.admin-editor-section-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  margin-bottom: 12px;
}

.admin-editor-section-head p {
  max-width: 720px;
  margin: 0;
  color: var(--prediction-muted);
  font-weight: 800;
  line-height: 1.3;
}

.admin-topline-editor {
  display: grid;
  gap: 12px;
}

.admin-topline-copy {
  display: grid;
  gap: 4px;
  color: var(--prediction-muted);
}

.admin-topline-copy strong {
  color: #fff;
  font-size: 1.15rem;
}

.admin-map-editor-fields.admin-topline-fields {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.admin-reference-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.admin-candidate-editor {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(198,210,255,0.28);
}

.admin-candidate-editor-head {
  display: grid;
  gap: 3px;
}

.admin-candidate-editor-head strong {
  color: #fff;
  font-size: 0.98rem;
}

.admin-candidate-editor-head span {
  color: var(--prediction-muted);
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1.25;
}

.admin-candidate-list {
  display: grid;
  gap: 8px;
}

.admin-candidate-row {
  display: grid;
  grid-template-columns: 64px minmax(160px, 1fr) 82px minmax(110px, 0.7fr) auto auto;
  gap: 8px;
  align-items: end;
  padding: 8px;
  border: 1px solid rgba(198,210,255,0.3);
  border-radius: 12px;
  background: rgba(3, 9, 27, 0.5);
}

.admin-candidate-row label {
  display: grid;
  gap: 4px;
  color: var(--prediction-muted);
  font-size: 0.68rem;
  font-weight: 950;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.admin-candidate-row input,
.admin-candidate-row select {
  width: 100%;
  min-width: 0;
}

.admin-candidate-check {
  align-self: center;
  display: inline-flex !important;
  grid-auto-flow: column;
  gap: 6px !important;
  align-items: center;
  text-transform: none !important;
  letter-spacing: 0 !important;
}

.admin-candidate-check input {
  width: auto;
}

.admin-candidate-row [data-remove-candidate] {
  min-height: 34px;
  padding: 0 10px;
  border-color: rgba(255,59,69,0.5);
  color: #ffd6dc;
}

#admin-model-reference small {
  display: block;
  margin-top: 10px;
  color: var(--prediction-muted);
  line-height: 1.35;
}

body.admin-prediction-page .admin-wide-map {
  min-height: 680px;
}

body.admin-prediction-page .admin-wide-map.prediction-shape-map,
body.admin-prediction-page .admin-wide-map.prediction-county-map {
  position: relative;
  display: block;
  min-height: 680px;
  max-height: none;
  overflow: hidden;
  padding: 0;
}

body.admin-prediction-page .admin-wide-map.prediction-shape-map .prediction-shape-svg,
body.admin-prediction-page .admin-wide-map.prediction-county-map .prediction-shape-svg {
  height: 680px;
  min-height: 680px;
}

body.admin-prediction-page .admin-county-editor-map {
  min-height: 430px;
}

body.admin-prediction-page .prediction-map-editor {
  background: rgba(2, 8, 25, 0.58);
}

@media (max-width: 1100px) {
  body.admin-prediction-page .admin-prediction-grid,
  .admin-map-edit-grid,
  .admin-map-editor-fields.admin-topline-fields {
    grid-template-columns: 1fr;
  }

  body.admin-prediction-page .admin-prediction-grid > aside.admin-prediction-panel {
    position: static;
    max-height: none;
  }

  body.prediction-page .prediction-detail.election-focus-overlay {
    width: auto;
    max-width: none;
  }

  .admin-candidate-row {
    grid-template-columns: 1fr 1fr;
  }
}

body.prediction-page .prediction-command-board.prediction-command-board-compact {
  grid-template-columns: minmax(130px, 0.28fr) minmax(260px, 1fr) minmax(130px, 0.28fr);
  padding: clamp(12px, 1.7vw, 18px);
  border-radius: 14px;
}

body.prediction-page .prediction-command-board-compact .prediction-command-left strong,
body.prediction-page .prediction-command-board-compact .prediction-command-right strong {
  font-size: clamp(2.35rem, 5vw, 4.8rem);
}

body.prediction-page .prediction-command-board-compact .prediction-command-center > b {
  font-size: clamp(1.25rem, 2.4vw, 2rem);
}

body.prediction-page .prediction-command-board-compact .prediction-seatbar {
  min-height: 24px;
}

.prediction-summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.prediction-summary-strip.prediction-summary-strip-compact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid rgba(198, 210, 255, 0.38);
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(10, 27, 70, 0.78), rgba(30, 15, 47, 0.68)),
    rgba(4, 9, 24, 0.72);
}

.prediction-summary-strip.prediction-summary-strip-compact span {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  min-height: 0;
  padding: 6px 8px;
  border: 1px solid rgba(198, 210, 255, 0.24);
  border-radius: 999px;
  color: var(--prediction-muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.prediction-summary-strip.prediction-summary-strip-compact b {
  color: #fff;
}

.prediction-summary-chip {
  display: grid;
  gap: 4px;
  min-height: 82px;
  padding: 12px;
  border: 1px solid rgba(198, 210, 255, 0.45);
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(14, 35, 92, 0.82), rgba(28, 17, 52, 0.78)),
    rgba(4, 9, 24, 0.82);
}

.prediction-summary-chip span {
  color: var(--prediction-muted);
  font-size: 0.68rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.prediction-summary-chip b {
  color: #fff;
  font-size: clamp(1rem, 1.7vw, 1.34rem);
  line-height: 1.05;
}

.prediction-summary-chip small {
  color: var(--prediction-muted);
  font-weight: 850;
}

.prediction-chart-panel.prediction-chart-panel-compact {
  grid-template-columns: minmax(160px, 0.28fr) minmax(0, 1fr);
  align-items: center;
  padding: 14px;
  border-radius: 14px;
}

.prediction-chart-panel-compact .prediction-rating-heading h2 {
  margin: 2px 0 0;
  font-size: clamp(1.45rem, 3vw, 2.45rem);
  line-height: 0.98;
}

.prediction-chart-panel-compact .prediction-rating-list {
  gap: 6px;
}

.prediction-chart-panel-compact .prediction-rating-row {
  grid-template-columns: 94px minmax(0, 1fr) 38px;
  gap: 8px;
}

.prediction-chart-panel-compact .prediction-rating-track {
  height: 12px;
}

.prediction-context-feature {
  vector-effect: non-scaling-stroke;
  transition: opacity 0.16s ease, filter 0.16s ease, stroke-width 0.16s ease;
}

.prediction-context-feature.is-dimmed-context {
  opacity: 0.18;
  stroke: rgba(226, 232, 255, 0.34);
  stroke-width: 0.42;
}

.prediction-context-feature.is-selected-context {
  opacity: 0.28;
  stroke: rgba(255, 255, 255, 0.68);
  stroke-width: 1.2;
}

.prediction-context-feature.has-race {
  cursor: pointer;
}

.prediction-context-feature.has-race:hover,
.prediction-context-feature.has-race:focus {
  opacity: 0.54;
  filter: brightness(1.22);
  stroke: #fff;
  stroke-width: 1.4;
}

.prediction-map-focused-layer .prediction-shape-feature {
  stroke: rgba(226, 232, 255, 0.7);
  stroke-width: 0.62;
}

.prediction-map-focused-layer .prediction-shape-feature:hover,
.prediction-map-focused-layer .prediction-shape-feature:focus,
.prediction-map-focused-layer .prediction-shape-feature.is-selected {
  stroke: #fff;
  stroke-width: 1.6;
  filter: brightness(1.18) saturate(1.1) drop-shadow(0 0 14px rgba(255, 255, 255, 0.24));
}

.admin-ratings-shell {
  width: min(1480px, calc(100% - 32px));
  margin: 0 auto;
}

.admin-ratings-toolbar,
.admin-rating-summary,
.admin-rating-legend-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 14px 0;
  padding: 12px;
  border: 1px solid rgba(198, 210, 255, 0.34);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(10, 27, 70, 0.82), rgba(30, 15, 47, 0.72)),
    rgba(4, 9, 24, 0.74);
}

.admin-rating-tabs,
.admin-rating-modes,
.admin-rating-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.admin-rating-actions {
  margin-left: auto;
}

.admin-rating-tab,
.admin-rating-mode,
.admin-rating-actions button,
.admin-rating-legend-panel button {
  min-height: 38px;
  border: 1px solid rgba(198, 210, 255, 0.52);
  border-radius: 999px;
  padding: 0 14px;
  background: rgba(4, 9, 24, 0.82);
  color: #fff;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.admin-rating-mode {
  display: grid;
  gap: 2px;
  min-width: 124px;
  min-height: 48px;
  justify-items: center;
  line-height: 1.05;
}

.admin-rating-mode span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.admin-rating-mode small {
  color: rgba(238, 243, 255, 0.72);
  font-size: 0.62rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-rating-tab:hover,
.admin-rating-mode:hover,
.admin-rating-actions button:hover,
.admin-rating-legend-panel button:hover {
  transform: translateY(-1px);
  border-color: #fff;
}

.admin-rating-tab.active,
.admin-rating-mode.active {
  border-color: #fff;
  background: linear-gradient(135deg, rgba(40, 112, 255, 0.92), rgba(255, 64, 97, 0.42));
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.44),
    0 0 0 5px rgba(198, 210, 255, 0.18),
    0 18px 42px rgba(36, 87, 190, 0.24);
  transform: translateY(-1px);
}

.admin-rating-mode.active span::before {
  content: "ON";
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 17px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #061025;
  font-size: 0.56rem;
  font-weight: 950;
  letter-spacing: 0.04em;
}

.admin-rating-mode.mode-d.active {
  background: linear-gradient(135deg, #a0b6ef, #2c54bc);
  color: #fff;
}

.admin-rating-mode.mode-r.active {
  background: linear-gradient(135deg, #eba3a2, #b5312f);
  color: #fff;
}

.admin-rating-mode.mode-tossup.active {
  background: linear-gradient(135deg, #cbcacd, #f4f1ea);
  color: #061025;
}

.admin-rating-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.44;
  transform: none;
}

.admin-rating-summary span {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  padding: 7px 10px;
  border: 1px solid rgba(198, 210, 255, 0.25);
  border-radius: 999px;
  color: var(--prediction-muted);
  font-size: 0.84rem;
  font-weight: 850;
}

.admin-rating-summary b {
  color: #fff;
}

.admin-save-status {
  min-height: 1.2em;
}

.admin-save-status.is-error {
  color: #ff8792;
}

.admin-rating-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  gap: 14px;
  align-items: stretch;
}

.admin-rating-map.prediction-map.prediction-shape-map {
  min-height: clamp(580px, 72vh, 860px);
}

.admin-rating-map .prediction-shape-svg {
  min-height: clamp(580px, 72vh, 860px);
  height: clamp(580px, 72vh, 860px);
}

.admin-rating-side {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 240px;
  padding: 16px;
  border: 1px solid rgba(198, 210, 255, 0.38);
  border-radius: 14px;
  background:
    linear-gradient(145deg, rgba(12, 31, 78, 0.88), rgba(31, 17, 54, 0.78)),
    rgba(4, 9, 24, 0.78);
}

.admin-rating-side:has(.rating-pill) {
  border-color: rgba(255, 255, 255, 0.62);
  box-shadow: 0 0 0 1px rgba(198, 210, 255, 0.14), 0 18px 44px rgba(0, 0, 0, 0.24);
}

.admin-rating-side h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(1.35rem, 2.4vw, 2.2rem);
  line-height: 1;
}

.admin-selected-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.admin-selected-meta span,
.admin-selected-candidates div {
  border: 1px solid rgba(198, 210, 255, 0.22);
  border-radius: 10px;
  background: rgba(4, 9, 24, 0.46);
}

.admin-selected-meta span {
  padding: 5px 8px;
  color: var(--prediction-muted);
  font-size: 0.74rem;
  font-weight: 900;
}

.admin-selected-candidates {
  display: grid;
  gap: 8px;
}

.admin-selected-candidates div {
  display: grid;
  gap: 3px;
  padding: 9px;
}

.admin-selected-candidates b {
  color: #fff;
}

.admin-selected-candidates small {
  color: var(--prediction-muted);
  font-weight: 800;
}

.admin-rating-legend-panel {
  justify-content: space-between;
}

.admin-rating-legend-panel p {
  flex: 1 1 460px;
  margin: 0;
  color: var(--prediction-muted);
}

.admin-topline-editor-compact {
  gap: 10px;
}

.admin-topline-editor-compact .admin-topline-copy {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: baseline;
}

.admin-topline-editor-compact .admin-topline-copy strong {
  font-size: 1rem;
}

.admin-topline-groups {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.7fr) minmax(0, 1fr);
  gap: 10px;
}

.admin-topline-groups fieldset {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
  margin: 0;
  padding: 10px;
  border: 1px solid rgba(198, 210, 255, 0.34);
  border-radius: 12px;
  background: rgba(2, 8, 25, 0.42);
}

.admin-topline-groups fieldset:first-child {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-topline-groups legend {
  padding: 0 6px;
  color: var(--prediction-muted);
  font-size: 0.68rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-topline-groups label {
  display: grid;
  gap: 4px;
  margin: 0;
  color: var(--prediction-muted);
  font-size: 0.74rem;
  font-weight: 900;
}

.admin-topline-groups input {
  width: 100%;
}

body.admin-prediction-page .admin-editor-section-head {
  align-items: center;
}

body.admin-prediction-page .admin-editor-section-head p {
  max-width: 520px;
  font-size: 0.9rem;
}

@media (max-width: 920px) {
  .prediction-summary-strip,
  .prediction-chart-panel.prediction-chart-panel-compact,
  .admin-rating-workspace,
  .admin-topline-groups,
  .admin-topline-groups fieldset,
  .admin-topline-groups fieldset:first-child {
    grid-template-columns: 1fr;
  }

  .admin-rating-actions {
    margin-left: 0;
  }
}
