/* OXFORD_FORUM_DESIGN_SYSTEM_V2 — shared, deliberately conservative theme.
   Provides a coherent color language without replacing feature-specific styling.
   Navy: external environment | White: reading/working surfaces
   Gold: brand emphasis | Teal: interaction | Green: true status only.
*/
:root {
  --forum-navy: var(--ef-oxford-blue, #002147);
  --forum-paper: #ffffff;
  --forum-text-navy: var(--ef-oxford-blue, #002147);
  --forum-gold: var(--ef-oxford-yellow-ochre, #E2C044);
  --forum-action-teal: var(--ef-oxford-viridian, #15616D);
  --forum-action-teal-hover: var(--ef-action-hover, #104B55);
  --forum-teal-wash: var(--ef-forum-teal-soft, #E9F8F8);
  --forum-line: var(--ef-forum-border, #D8E3EE);
  --forum-status-green: #16734d;
  /* Honor the existing per-page semantic variable where it is used. */
  --teal: var(--forum-action-teal);
}

/* The central canvas stays navy. Immersive Face and the cinematic gateway
   deliberately retain their own backgrounds and transition states. */
html:not(:has(#faceApp)),
body:not(:has(#faceApp)):not(.fg-v2-layout):not(:has(main.page-shell)) {
  background-color: var(--forum-navy) !important;
}
html:has(#faceApp), body:has(#faceApp) {
  background-color: var(--bg, var(--forum-navy)) !important;
}

/* Reading and working surfaces should continue to be white. Avoid reshaping
   the mobile app, where the shell already occupies the whole viewport. */
main.app-shell { background-color: var(--forum-paper) !important; }

/* Small, consistent gold signature: never gold body copy on white. */
main.app-shell > :is(.hero-title, .reflect-title)::after {
  content: "";
  display: block;
  width: 42px;
  height: 3px;
  margin: 10px auto 0;
  border-radius: 999px;
  background: var(--forum-gold);
}
main.app-shell > :is(.forum-header, .top-header) {
  border-bottom-color: var(--forum-gold);
}
main.app-shell a[aria-current="page"] {
  text-decoration-color: var(--forum-gold);
  text-underline-offset: 4px;
}

/* ARISTOS audio controls are actions, not statuses. Keep its end-debate state
   unchanged and preserve the separate navy full-screen Moments treatment. */
body:not(.debate-is-active) #aristos-audio-toggle:not(.is-ending),
body.debate-is-active #aristos-audio-toggle:not(.is-ending) {
  background-color: var(--forum-action-teal) !important;
  border-color: var(--forum-action-teal-hover) !important;
  color: #ffffff !important;
}
body:not(.debate-is-active) #aristos-audio-toggle:not(.is-ending):hover,
body.debate-is-active #aristos-audio-toggle:not(.is-ending):hover {
  background-color: var(--forum-action-teal-hover) !important;
}

/* Functional focus rings: teal is legible on white, unlike gold text on white. */
:where(main.app-shell, main.account-shell, main.diag)
:is(a[href], button, input, textarea, select):focus-visible {
  outline: 3px solid var(--forum-action-teal);
  outline-offset: 3px;
}

/* The two internal utility screens were not included in Navy V1. Their
   controls should remain usable without adding new component markup. */
body:has(main.diag) main.diag {
  color: var(--forum-text-navy);
  background-color: #ffffff;
  border: 1px solid var(--forum-line);
  border-radius: 18px;
  box-shadow: 0 18px 45px rgba(0, 8, 29, .2);
}

@media (max-width: 599px) {
  /* Maintain full-width mobile content; navy should not create side gutters. */
  main.app-shell { box-shadow: none; }
}

@media (prefers-reduced-motion: reduce) {
  /* Intentionally no animation added by the design system. */
}
