:root {
    color-scheme: dark !important;
}

html,
body {
    background: #080b11 !important;
    color: #e5e7eb !important;
}

/* The public site has one permanent presentation mode: dark. */
.white-primary-outcome,
.campaign-tier-charts-print-mode,
.campaign-sensitivity-print-mode,
body.intra-white-matrices {
    color-scheme: dark !important;
}

/* The evaluation summary in the application was document-first and light.
   These overrides make the public static version consistently dark. */
.summary-app,
.summary-app .topbar,
.summary-layout,
.summary-sidebar,
.summary-main,
.summary-panel-title,
.summary-control,
.summary-winners,
.summary-winner-card,
.summary-card,
.summary-table-wrap,
.summary-chart-card,
.summary-empty,
.summary-app table,
.summary-app thead,
.summary-app tbody,
.summary-app tr,
.summary-app th,
.summary-app td {
    background: #0b0f17 !important;
    color: #e5e7eb !important;
    border-color: rgba(148, 163, 184, 0.22) !important;
    box-shadow: none !important;
}

.summary-app .summary-main,
.summary-app .summary-sidebar,
.summary-app .summary-winner-card,
.summary-app .summary-card,
.summary-app .summary-chart-card,
.summary-app .summary-table-wrap {
    background: #111827 !important;
}

.summary-app .muted,
.summary-app .summary-hint,
.summary-app .summary-subtitle,
.summary-app .summary-meta,
.summary-app .summary-winner-meta,
.summary-app .summary-winner-metric-label {
    color: #94a3b8 !important;
}

.summary-app .btn,
.summary-app input,
.summary-app select,
.summary-app button {
    background: #111827 !important;
    color: #e5e7eb !important;
    border-color: rgba(148, 163, 184, 0.35) !important;
}

.summary-app .btn:hover,
.summary-app button:hover {
    background: #1e293b !important;
    color: #ffffff !important;
}

.summary-app th {
    background: #172033 !important;
}

.summary-app tbody tr:nth-child(even) td {
    background: rgba(255, 255, 255, 0.018) !important;
}

/* Static hosting cannot execute a suite. The button is removed from HTML,
   but this also protects older cached markup. */
#btnRunDefaultSuite,
#toggleWhitePrimaryOutcome,
#toggleScoreSubheadings,
#campaignToggleWhiteDocument,
#campaignToggleSubheadings,
#toggleWhiteTierChartBackground,
#intraExperimentWhiteMatrix {
    display: none !important;
}

/* Persistent escape hatch back to the Follow That Car landing page. */
.ftc-back-to-main {
  position: fixed;
  left: 1.25rem;
  bottom: 1.25rem;
  z-index: 10000;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 3.15rem;
  padding: 0.68rem 1rem 0.68rem 0.7rem;
  color: #f6fbfc;
  background: linear-gradient(135deg, rgba(18, 25, 30, 0.97), rgba(7, 11, 14, 0.97));
  border: 1px solid rgba(101, 217, 223, 0.52);
  border-radius: 999px;
  box-shadow:
    0 14px 38px rgba(0, 0, 0, 0.48),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  font-size: 0.9rem;
  font-weight: 750;
  letter-spacing: 0.01em;
  line-height: 1;
  text-decoration: none;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

.ftc-back-to-main:hover {
  color: #ffffff;
  border-color: #65d9df;
  background: linear-gradient(135deg, rgba(23, 33, 39, 0.99), rgba(8, 14, 18, 0.99));
  transform: translateY(-3px);
  box-shadow:
    0 18px 46px rgba(0, 0, 0, 0.56),
    0 0 26px rgba(101, 217, 223, 0.14);
}

.ftc-back-to-main:focus-visible {
  outline: 3px solid rgba(101, 217, 223, 0.55);
  outline-offset: 3px;
}

.ftc-back-to-main__icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 1.8rem;
  height: 1.8rem;
  color: #061014;
  background: #65d9df;
  border-radius: 50%;
  font-size: 1.08rem;
  font-weight: 900;
  line-height: 1;
}

.ftc-back-to-main__label {
  white-space: nowrap;
}

@media (max-width: 600px) {
  .ftc-back-to-main {
    left: 0.75rem;
    bottom: 0.75rem;
    min-width: 3.15rem;
    padding: 0.67rem;
  }

  .ftc-back-to-main__label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ftc-back-to-main {
    transition: none;
  }
}

