/* ========================================================================== */
/* SHARED CSS: Root variables, themes, accessibility modifiers, and resets    */
/* (Place this file in your shared folder and link in both Public & Admin)    */
/* ========================================================================== */

:root {
  --primaryHue: 220;
  --primaryColor: hsl(var(--primaryHue), 85%, 34%);
  --primaryHover: hsl(var(--primaryHue), 85%, 26%);
  --primarySurface: hsl(var(--primaryHue), 60%, 97%);
  --primaryAccent: hsl(var(--primaryHue), 70%, 91%);

  --textColor: #1a222e;
  --textColorMuted: #4a5568;
  --bgColor: #f4f7fa;
  --surfaceBg: #ffffff;

  --borderColor: #7f91af;
  --focusRing: #005fcc;
  --overlay:rgba(255, 255, 255, 0.09);
  --overlayHover:rgba(255, 255, 255, 0.14);
  --shadowSoft: 0 10px 30px -5px rgba(0, 40, 90, 0.08);
  --shadowHover: 0 16px 35px -5px rgba(0, 40, 90, 0.14);
  --radiusCard: 18px;

  --fontFamily:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif;
  --lineHeightBase: 1.6;
  --fluidWidth: 92%;
  --borderRadius: 1.5rem;
}

html[data-theme="dark"] {
  --textColor: #e2e8f0;
  --textColorMuted: #cbd5e1;
  --bgColor: #0f172a;
  --surfaceBg: #1e293b;
  --primarySurface: #182234;
  --primaryAccent: #2d3d54;
  --primaryColor: #38bdf8;
  --primaryHover: #7dd3fc;
  --shadowSoft: 0 10px 30px -5px rgba(0, 0, 0, 0.4);
}

html[data-contrast="high"] {
  --bgColor: #000000 !important;
  --surfaceBg: #000000 !important;
  --textColor: #ffff00 !important;
  --textColorMuted: #ffffff !important;
  --primaryColor: #ffff00 !important;
  --primaryHover: #e6e600 !important;
  --primarySurface: #1a1a00 !important;
  --borderColor: #ffff00 !important;
  --shadowSoft: none !important;
}

html[data-fontsize="large"] {
  font-size: 120% !important;
}

html[data-spacing="wide"] {
  line-height: 2.1 !important;
  letter-spacing: 0.07em !important;
  word-spacing: 0.14em !important;
}

/* Shared High Contrast Override Rules */
html[data-contrast="high"] .a11yBar,
html[data-contrast="high"] .siteFooter {
  background-color: #000000 !important;
  border-bottom: 2px solid #ffff00 !important;
  color: #ffff00 !important;
}

html[data-contrast="high"] .btnSecondary,
html[data-contrast="high"] .infinityTag {
  background: #ffff00 !important;
  color: #000000 !important;
  font-weight: 800 !important;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--fontFamily);
  line-height: var(--lineHeightBase);
  color: var(--textColor);
  background-color: var(--bgColor);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition:
    background-color 0.2s ease,
    color 0.2s ease;
}

:focus-visible {
  outline: 3px solid var(--focusRing);
  outline-offset: 3px;
}

.contentContainer {
  width: var(--fluidWidth);
  margin: 2.5rem auto;
  flex: 1;
}

h1 {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  color: var(--primaryColor);
  line-height: 1.2;
}

h2 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
  color: var(--textColor);
}

p {
  margin-bottom: 1.25rem;
}

.leadText {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--textColorMuted);
}

.sectionSubtext {
  color: var(--textColorMuted);
  margin-bottom: 1.5rem;
}

.skipLink {
  position: absolute;
  top: -999px;
  left: 2.5%;
  background: var(--primaryColor);
  color: #ffffff;
  padding: 0.75rem 1.25rem;
  z-index: 9999;
  font-weight: bold;
  text-decoration: none;
  border-radius: 0 0 8px 8px;
}

.skipLink:focus {
  top: 0;
}

.srOnly {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}