/* Section navigation replaces the introductory banner on every screen size. */
.section-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}
.section-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  min-width: 0;
}
.section-tab {
  padding: 10px 22px;
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--sub);
  font-size: 14px;
  font-weight: 650;
}
.section-tab:hover {
  color: var(--accent);
  background: var(--bg);
}
.section-tab.active {
  background: #c91e2b;
  color: #fff;
}
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
  white-space: nowrap;
  font-size: 13px;
}
.theme-sun,
:root[data-theme='dark'] .theme-moon {
  display: none;
}
:root[data-theme='dark'] .theme-sun {
  display: block;
}
/* Keep one selected game and its request state while switching sections. */
body:not([data-view='desk']) .game-center,
body:not([data-view='research']) .game-intel,
body[data-view='desk'] .main-column,
body[data-view='desk'] .side-column > :not(.context-card),
body[data-view='markets'] .side-column,
body[data-view='research'] .main-column,
body[data-view='research'] .context-card,
body[data-view='tickets'] .slate-wrap,
body[data-view='tickets'] .workspace-heading,
body[data-view='tickets'] .demo-banner {
  display: none;
}
body[data-view='markets'] .controls,
body[data-view='markets'] .candidates-section {
  display: block;
}
/* Keep ticket preferences ahead of the game board only in Parlay plays. */
body:not([data-view='markets']) #sectionPanel > .controls {
  display: none;
}
#sectionPanel > .controls {
  margin-bottom: 26px;
}
body .layout {
  grid-template-columns: minmax(0, 1fr);
}
body[data-view='research'] .side-column {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
}
body[data-view='desk'] .context-card {
  max-width: 760px;
}
#sectionPanel:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 6px;
}
@media (max-width: 1000px) {
  body[data-view='research'] .side-column {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 650px) {
  .section-toolbar {
    gap: 8px;
    margin-bottom: 18px;
  }
  .section-tabs {
    flex: 1;
    gap: 2px;
    padding: 4px;
  }
  .section-tab {
    flex: 1;
    min-width: 0;
    padding: 10px 6px;
    font-size: 12px;
  }
  .theme-toggle {
    width: 44px;
    padding: 10px;
    flex-shrink: 0;
  }
  .theme-toggle > span {
    display: none;
  }
}

/* Preserve ArrowEdge branding and recorded field colors in dark appearance. */
:root[data-theme='dark'] {
  color-scheme: dark;
  --bg: #1b1717;
  --paper: #272020;
  --raised: #342828;
  --line: #483737;
  --ink: #fff8ee;
  --sub: #c6b6aa;
  --accent: #ffd13f;
}
:root[data-theme='dark']
  :is(
    .masthead,
    .mobile-nav,
    .panel,
    .game-tile,
    .ticket,
    .tracked-ticket,
    .dialog,
    .game-center,
    .intel-card,
    .intel-disclosure,
    .play-item,
    .matchup-card,
    .matchup-details
  ) {
  background: var(--paper);
  border-color: var(--line);
  color: var(--ink);
  box-shadow: none;
}
/* Legacy research components use explicit light colors; inherit readable text. */
:root[data-theme='dark'] :is(.panel, .game-center, .game-intel, .dialog, .game-tile) :where(*) {
  color: inherit;
  border-color: var(--line);
}
:root[data-theme='dark']
  :is(.panel, .game-center, .game-intel, .dialog, .game-tile)
  :is(
    p,
    small,
    label,
    .subtle,
    .eyebrow,
    .market-detail,
    .row-status,
    .ticket-caution,
    .tracked-book,
    .tracked-clock,
    .leg-tracking-status,
    .tracked-footnote,
    .tracker-disclaimer,
    .field-status,
    .field-legend,
    .gc-footer,
    .gc-latest-play > span,
    .play-clock,
    .play-copy > span,
    .intel-label,
    .intel-meta,
    .coach-snapshot,
    .coach-mix > span,
    .prediction-prop > div > span,
    .style-splits span,
    .style-comparison > span,
    .matchup-metric > span,
    .front-person-stats,
    .evidence-glance > div > span,
    .evidence-context > div > span,
    .evidence-chart-heading > span,
    .evidence-footer > span
  ) {
  color: var(--sub);
}
:root[data-theme='dark']
  :is(.panel, .game-center, .game-intel, .dialog, .game-tile)
  :is(
    h2,
    h3,
    h4,
    strong,
    b,
    .market-player,
    .market-price,
    .matchup-metric strong,
    .style-splits strong,
    .play-copy > strong,
    .evidence-context strong
  ) {
  color: var(--ink);
}
:root[data-theme='dark']
  :is(
    .search,
    .quota,
    .preset,
    .row-action,
    .range-label,
    .count,
    .empty-state,
    .tracker-empty,
    .note,
    .track-draft-legs,
    .evidence-metric,
    .evidence-glance,
    .evidence-context,
    .evidence-disclosure,
    .field.missing,
    .field-card.missing,
    .chart-section,
    .qb-metric-grid,
    .qb-quick,
    .matchup-table thead,
    .matchup-quick-head,
    .matchup-notice,
    .matchup-empty,
    .gc-situation,
    .style-splits,
    .intel-source-game,
    .tracked-placement,
    .matchup-live-label,
    .matchup-step,
    .front-person-heading > span,
    .meeting-defender,
    .factor-legend span,
    .weather-assessment,
    .close,
    .avatar
  ) {
  background: var(--raised);
  border-color: var(--line);
  color: var(--sub);
}
:root[data-theme='dark'] :is(input:not([type='checkbox']), select, textarea) {
  background: var(--paper);
  border-color: var(--line);
  color: var(--ink);
}
:root[data-theme='dark'] .search input {
  background: transparent;
}
:root[data-theme='dark'] ::placeholder {
  color: #bca99e;
  opacity: 1;
}
:root[data-theme='dark']
  :is(
    .text-button,
    .gc-toggle,
    .intel-disclosure > summary,
    .evidence-disclosure > summary,
    .matchup-details > summary,
    .intel-details details summary,
    .evidence-link,
    .dialog a,
    .game-intel a,
    .gc-footer a,
    .source-link
  ) {
  color: var(--accent);
}
:root[data-theme='dark']
  :is(
    .button.quiet,
    .button.light,
    .row-action,
    .play-column > .button,
    .matchup-game-links a,
    .evidence-link,
    .preset
  ) {
  background: var(--raised);
  color: var(--ink);
  border-color: var(--line);
}
:root[data-theme='dark']
  :is(
    .button.quiet:hover,
    .button.light:hover,
    .row-action:hover,
    .preset:hover,
    .play-item:hover,
    .game-tile:hover
  ) {
  background: #382726;
}
:root[data-theme='dark']
  :is(
    .game-tile.active,
    .preset.active,
    .mobile-nav-link.active,
    .chip.connected,
    .ticket-score,
    .tracked-placement.placed,
    .status-message.info,
    .gc-status,
    .gc-team-badge,
    .play-item.selected
  ) {
  background: #3d2422;
  color: #ffc4ae;
  border-color: #975346;
}
:root[data-theme='dark'] .game-tile.active {
  box-shadow: 0 0 0 1px #e57562;
}
:root[data-theme='dark'] .game-tile.active:after {
  color: var(--accent);
}
:root[data-theme='dark'] :is(.history-result, .team-emblem) {
  background: var(--raised);
  border-color: var(--line);
  color: var(--sub);
}
:root[data-theme='dark'] .history-result.cleared {
  background: #3d2422;
  border-color: #975346;
  color: #ffc4ae;
}
:root[data-theme='dark'] .history-result:hover {
  background: #49302a;
}
:root[data-theme='dark'] .history-result i {
  background: #8b7468;
}
:root[data-theme='dark'] .history-result.cleared i {
  background: #ffd13f;
}
:root[data-theme='dark'] :is(.team-emblem.buf, .team-emblem.det, .team-emblem.dal) {
  background: #26364b;
  color: #bfdbff;
}
:root[data-theme='dark'] .team-emblem.phi {
  background: #3d2422;
  color: #ffc4ae;
}
:root[data-theme='dark']
  :is(
    .winner-prices strong,
    .coach-mix > strong,
    .game-center-team > b,
    .play-item.scoring .play-copy > strong
  ) {
  color: var(--accent);
}
:root[data-theme='dark']
  :is(
    .network-banner,
    .update-banner,
    .button.warning,
    .market-row.held,
    .tracked-injury,
    .tracker-message,
    .status-message:not(.info),
    .evidence-warning,
    .evidence-alert,
    .injury-item,
    .weather-assessment.warning,
    .matchup-badge.limited
  ) {
  background: #3b2e1f;
  border-color: #876a3c;
  color: #ffe0a5;
}
:root[data-theme='dark']
  :is(.tracked-injury, .evidence-alert, .injury-item)
  :is(b, strong, span, p) {
  color: #ffe0a5;
}
:root[data-theme='dark'] .button.primary,
:root[data-theme='dark'] .section-tab.active {
  background: #c91e2b;
  border-color: #c91e2b;
  color: #fff;
}
:root[data-theme='dark'] .button.primary :where(*) {
  color: inherit;
}
:root[data-theme='dark'] .button.primary:hover {
  background: #b51923;
}
:root[data-theme='dark'] .chip.muted {
  background: var(--raised);
  color: var(--sub);
}
:root[data-theme='dark']
  :is(
    .mobile-nav-link,
    .header-location,
    .team-fullname,
    .game-kickoff,
    .game-status,
    .slate-count,
    .feed-line,
    footer
  ) {
  color: var(--sub);
}
:root[data-theme='dark']
  :is(
    .market-row,
    .tabs,
    .ticket-leg,
    .ticket-bottom,
    .tracked-leg,
    .tracked-money,
    .evidence-disclosure,
    .comparison-game,
    .meeting-game,
    .matchup-table td,
    .matchup-table th,
    .gc-latest-play,
    .play-column,
    .prediction-prop,
    .team-intel-detail,
    .style-comparison
  ) {
  border-color: var(--line);
}
:root[data-theme='dark']
  :is(.tracked-leg progress, .tracked-leg progress::-webkit-progress-bar, .coach-mix-bar) {
  background: var(--raised);
}
:root[data-theme='dark'] .tracking-state.positive {
  color: #9ae4b2;
}
:root[data-theme='dark'] .tracking-state.caution {
  color: #ffe0a5;
}
:root[data-theme='dark'] .chart-axis {
  stroke: #a18b80;
}
:root[data-theme='dark'] .chart-bar {
  fill: #80675d;
}
:root[data-theme='dark'] .chart-bar.hit {
  fill: #eb6957;
}
:root[data-theme='dark'] .chart-line {
  stroke: #ffd13f;
}
:root[data-theme='dark'] .chart-label {
  fill: var(--sub);
}
:root[data-theme='dark'] .dialog::backdrop {
  background: #000a;
}
:root[data-theme='dark'] .skip {
  background: #c91e2b;
  color: #fff;
}
:root[data-theme='dark'] .auto-control .subtle {
  background: var(--raised);
  color: var(--sub);
}
:root[data-theme='dark'] footer strong {
  color: var(--ink);
}
:root[data-theme='dark'] :is(button, a, input, select, textarea):focus-visible {
  outline-color: #ffd13f;
}

/* Daily picks and public records share the saved appearance tokens. */
body:not([data-view='daily']) .daily-panel,
body:not([data-view='research']) .bettor-research,
body[data-view='daily'] :is(.slate-wrap, .workspace-heading, .layout) {
  display: none;
}
.daily-panel,
.bettor-research {
  margin-bottom: 26px;
}
.daily-heading,
.bettor-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}
.daily-heading {
  flex-wrap: wrap;
}
.daily-heading h2,
.bettor-heading h2 {
  font-size: clamp(27px, 3vw, 38px);
  letter-spacing: -1.2px;
  margin: 6px 0 10px;
}
.daily-heading p,
.bettor-heading p {
  color: var(--sub);
  line-height: 1.6;
}
.daily-actions {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  min-width: 0;
}
.daily-control {
  display: grid;
  gap: 5px;
  min-width: 0;
}
.daily-panel .daily-control-label {
  color: #4f421c;
  font-size: 14px;
  font-weight: 650;
}
.daily-actions select {
  width: 100%;
  max-width: 230px;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--paper);
  color: var(--ink);
}
:root .daily-panel .daily-actions select:focus-visible {
  outline: 2px solid #a51b28;
  outline-offset: 2px;
}
.daily-actions .button {
  min-height: 44px;
}
.daily-coverage {
  color: var(--sub);
  font-size: 12px;
  margin: 0 0 12px;
  line-height: 1.7;
}
.daily-ticket,
.daily-empty,
.bettor-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
}
.daily-ticket {
  overflow: hidden;
}
.daily-ticket-heading {
  display: flex;
  justify-content: space-between;
  gap: 22px;
  padding: 28px;
  border-bottom: 1px solid var(--line);
}
.daily-ticket-heading h3 {
  margin: 8px 0;
  font-size: 27px;
  letter-spacing: -0.8px;
}
.daily-ticket-heading p {
  color: var(--sub);
  font-size: 13px;
}
.daily-price {
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.daily-price strong {
  color: var(--accent);
  font-size: 34px;
  letter-spacing: -1px;
}
.daily-price span {
  color: var(--sub);
  font-size: 11px;
}
.daily-legs {
  padding: 0 28px;
}
.daily-leg {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  gap: 18px;
  padding: 25px 0;
}
.daily-leg + .daily-leg {
  border-top: 1px solid var(--line);
}
.daily-leg-number {
  border: 1px solid var(--line);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  color: var(--accent);
  font-weight: 700;
  font-size: 13px;
}
.daily-leg strong {
  font-size: 17px;
}
.daily-leg p {
  margin: 7px 0;
  line-height: 1.6;
}
.daily-leg > div > span,
.daily-support span {
  color: var(--sub);
  font-size: 12px;
}
.daily-support {
  display: flex;
  flex-direction: column;
  text-align: right;
  gap: 5px;
}
.daily-support b {
  font-size: 22px;
}
.daily-support small {
  font-size: 12px;
  font-weight: 400;
  color: var(--sub);
}
.daily-leg details {
  grid-column: 2 / -1;
}
.daily-leg details p,
.daily-method p,
.bettor-card details p {
  color: var(--sub);
  font-size: 13px;
  line-height: 1.8;
}
.daily-leg summary,
.daily-method summary,
.bettor-card summary {
  color: var(--accent);
  font-size: 12px;
  cursor: pointer;
  min-height: 30px;
}
.daily-leg a,
.bettor-card a {
  color: var(--accent);
  font-size: 12px;
}
.daily-ticket-footer {
  padding: 24px 28px;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 24px;
  align-items: center;
}
.daily-ticket-footer p {
  color: var(--sub);
  font-size: 12px;
  line-height: 1.8;
  flex: 1;
}
.daily-ticket-footer button {
  flex-shrink: 0;
}
.daily-empty {
  padding: 50px 24px;
  text-align: center;
}
.daily-mark {
  color: var(--accent);
  font-size: 38px;
}
.daily-empty h3 {
  margin: 14px 0 10px;
  font-size: 22px;
  letter-spacing: -0.5px;
}
.daily-empty p {
  max-width: 520px;
  margin: auto;
  color: var(--sub);
  line-height: 1.8;
  font-size: 14px;
}
.daily-method {
  margin-top: 20px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
}
.research-stamp {
  font-size: 11px;
  color: var(--sub);
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 9px 13px;
  white-space: nowrap;
}
.bettor-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.bettor-card {
  padding: 24px;
}
.bettor-tag {
  color: var(--sub);
  font-size: 11px;
}
.bettor-card h3 {
  margin: 12px 0 22px;
  font-size: 18px;
  letter-spacing: -0.3px;
}
.bettor-rate {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 18px;
}
.bettor-rate strong {
  color: var(--accent);
  font-size: 37px;
  letter-spacing: -1.4px;
}
.bettor-rate small {
  font-size: 16px;
}
.bettor-rate span {
  color: var(--sub);
  font-size: 11px;
  line-height: 1.8;
}
.bettor-card p {
  color: var(--sub);
  font-size: 12px;
  line-height: 1.8;
  margin: 12px 0;
}
.bettor-card .bettor-period {
  color: var(--ink);
  font-weight: 600;
}
.bettor-card details {
  border-top: 1px solid var(--line);
  padding-top: 13px;
  margin: 14px 0;
}
.bettor-method {
  color: var(--sub);
  font-size: 12px;
  line-height: 1.9;
  max-width: 980px;
  margin-top: 20px;
}
@media (max-width: 1000px) {
  .bettor-grid {
    grid-template-columns: 1fr;
  }
  .bettor-card {
    max-width: none;
  }
}
@media (max-width: 650px) {
  .section-tab {
    font-size: 11px;
    padding: 10px 3px;
  }
  .daily-heading,
  .bettor-heading {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }
  .daily-actions {
    justify-content: flex-start;
    width: 100%;
  }
  .daily-actions label {
    flex: 1;
    min-width: 0;
  }
  .daily-actions .daily-date-control {
    flex-basis: 100%;
  }
  .daily-actions select {
    width: 100%;
    max-width: none;
    font-size: 16px;
  }
  .daily-actions .button {
    font-size: 12px;
    padding: 10px 12px;
  }
  .daily-ticket-heading {
    padding: 22px 18px;
    flex-direction: column;
    gap: 16px;
  }
  .daily-price {
    text-align: left;
  }
  .daily-price strong {
    font-size: 28px;
  }
  .daily-legs {
    padding: 0 18px;
  }
  .daily-leg {
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 13px;
  }
  .daily-leg-number {
    width: 26px;
    height: 26px;
  }
  .daily-support {
    grid-column: 2;
    text-align: left;
    flex-direction: row;
    align-items: baseline;
    gap: 10px;
  }
  .daily-leg details {
    grid-column: 2;
  }
  .daily-ticket-footer {
    padding: 22px 18px;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }
  .research-stamp {
    display: none;
  }
}

@media (min-width: 651px) and (max-width: 1100px) {
  .section-tab {
    padding: 10px 11px;
  }
  .section-toolbar {
    gap: 10px;
  }
}
:root[data-theme='dark'] .auto-control {
  color: var(--sub);
}

/* Research scores disclose the exact evidence for this ticket and each leg. */
.ticket-evidence {
  margin: 16px 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  padding: 14px;
}
.daily-ticket > .ticket-evidence {
  margin: 0 28px 24px;
}
.ticket-evidence > summary {
  cursor: pointer;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  min-height: 30px;
  line-height: 1.6;
}
.ticket-evidence-method,
.ticket-evidence-context,
.ticket-evidence-unavailable {
  color: var(--sub);
  font-size: 12px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
.ticket-evidence-leg {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.ticket-evidence-leg-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.ticket-leg-score {
  min-height: 44px;
  flex-shrink: 0;
}
button.daily-support {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px;
  min-height: 44px;
}
@media (max-width: 560px) {
  .daily-ticket > .ticket-evidence {
    margin: 0 16px 20px;
  }
  .ticket-evidence-leg-heading {
    align-items: flex-start;
    flex-wrap: wrap;
  }
}
