/* Shared dark-theme corrections. Team palettes remain school-specific. */
:root[data-theme="dark"] {
  --paper: #111313;
  --ink: #f4f0e7;
  --muted: #b9b4aa;
  --line: rgba(244,240,231,.18);
  --panel: #1d1f1f;
  --shadow: rgba(0,0,0,.58);
}

:root[data-theme="dark"] .site-header {
  background: color-mix(in srgb,var(--paper) 92%,transparent);
}

:root[data-theme="dark"] .detail-hero {
  background: radial-gradient(circle at 75% 35%,rgba(255,255,255,.035),transparent 38%),var(--paper);
}

:root[data-theme="dark"] .artifact-controls button {
  background: color-mix(in srgb,var(--paper) 92%,transparent);
}

:root[data-theme="dark"] .dock {
  background: rgba(17,19,19,.9);
}

/* This section is intentionally an inverse editorial panel in both themes. */
:root[data-theme="dark"] .legacy {
  background: #0b0c0c;
  color: #f4f0e7;
  border-top: 1px solid rgba(244,240,231,.12);
  border-bottom: 1px solid rgba(244,240,231,.12);
}

:root[data-theme="dark"] .legacy .eyebrow {
  color: #b9b4aa;
}

/* The image-backed landing hero keeps one high-contrast treatment in both themes. */
:root[data-theme="dark"] .atlas-campaign-home {
  background: #081d33;
  color: #fffaf1;
}

:root[data-theme="dark"] .atlas-campaign-copy {
  background: transparent;
  color: inherit;
}

:root[data-theme="dark"] .atlas-campaign-kicker {
  color: #a8c8e7;
}

:root[data-theme="dark"] .atlas-campaign-kicker span {
  color: #ef756b;
}

:root[data-theme="dark"] .atlas-campaign-lede {
  color: #f5f6f7;
}

:root[data-theme="dark"] .atlas-campaign-visual {
  background: var(--panel);
}

:root[data-theme="dark"] .atlas-campaign-visual img {
  filter: brightness(.72) saturate(.88) contrast(1.04);
}

:root[data-theme="dark"] .atlas-campaign-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg,rgba(17,19,19,.3),transparent 30%);
}

/* Keep every collection/home surface inside the same dark visual system. */
:root[data-theme="dark"] .division-browser,
:root[data-theme="dark"] .division-browser-heading,
:root[data-theme="dark"] .collection-tools,
:root[data-theme="dark"] .request-program,
:root[data-theme="dark"] .collection-grid {
  background-color: var(--paper);
  color: var(--ink);
}

:root[data-theme="dark"] .division-tab {
  background: #171a1a;
  color: var(--ink);
}

:root[data-theme="dark"] .division-tab:hover {
  background: #202424;
}

:root[data-theme="dark"] .division-tab.active {
  background: #243652;
  color: #fffaf1;
  box-shadow: inset 0 -3px 0 #d98a57;
}

:root[data-theme="dark"] .division-tab.active span,
:root[data-theme="dark"] .division-tab.active em {
  color: #d9e2ef;
}

:root[data-theme="dark"] .chip.active,
:root[data-theme="dark"] .atlas-campaign-buttons a:first-child,
:root[data-theme="dark"] .request-program .primary-action {
  background: #f4f0e7;
  border-color: #f4f0e7;
  color: #111313;
}

:root[data-theme="dark"] .search-box input::placeholder {
  color: #8e8a82;
}

:root[data-theme="dark"] .eyebrow {
  color: #c9c5bd;
  font-size: 11px;
}

/* Team colors stay as accents; all card copy remains readable in dark mode. */
:root[data-theme="dark"] .artifact-card,
:root[data-theme="dark"] .artifact-card[data-school="lsu"],
:root[data-theme="dark"] .artifact-card[data-school="mississippi-state"],
:root[data-theme="dark"] .artifact-card[data-school="oregon-state"] {
  color: #fffaf1;
  background:
    radial-gradient(circle at 70% 24%,rgba(255,255,255,.07),transparent 36%),
    linear-gradient(145deg,color-mix(in srgb,var(--school) 20%,#111313),#111313 74%);
  border-top-color: var(--school);
}

:root[data-theme="dark"] .artifact-card .card-index,
:root[data-theme="dark"] .artifact-card .card-copy > span {
  color: #c9c5bd;
}

:root[data-theme="dark"] .artifact-card .card-index {
  font-size: 11px;
}

:root[data-theme="dark"] .artifact-card .card-copy h2 {
  color: #fffaf1;
}

:root[data-theme="dark"] .artifact-card .card-copy p,
:root[data-theme="dark"] .artifact-card .card-copy b,
:root[data-theme="dark"] .artifact-card[data-school="oregon-state"] .card-copy p,
:root[data-theme="dark"] .artifact-card[data-school="oregon-state"] .card-copy b {
  color: #e8e2d8;
  font-size: 10px;
  line-height: 1.45;
}

:root[data-theme="dark"] .artifact-card .card-copy > span {
  font-size: 13px;
  line-height: 1.45;
}

:root[data-theme="dark"] .artifact-card .round-arrow {
  border-color: rgba(255,250,241,.45);
  color: #fffaf1;
}

:root[data-theme="dark"] .artifact-card:hover .round-arrow {
  background: #fffaf1;
  color: #111313;
}

:root[data-theme="dark"] .model-ready-badge {
  background: rgba(8,10,10,.82);
  border-color: rgba(255,250,241,.42);
  color: #fffaf1;
  font-size: 9px;
}

:root[data-theme="dark"] :is(a,button,input,select,textarea):focus-visible {
  outline: 2px solid #f4f0e7;
  outline-offset: 3px;
}

:root[data-theme="dark"] .atlas-offer-card {
  background: color-mix(in srgb,var(--panel) 94%,black);
}

@media (prefers-reduced-motion:no-preference) {
  body,.site-header,.dock,.legacy,.atlas-campaign-home,.atlas-campaign-copy,.atlas-campaign-visual,.artifact-controls button,.division-tab,.artifact-card {
    transition: background-color .22s ease,color .22s ease,border-color .22s ease;
  }
}
