/* n.b. As I have no idea what I'm doing with web dev, it's mostly AI-generated CSS awkwardly reformatted by VS Code. */

/**
 * Accessible Design System
 * 
 * A clean, modern, and fully accessible theme
 * - Soft washed sky blue background
 * - High-contrast text and accents
 * - WCAG AA/AAA compliant
 * - Colorblind-safe
 */

:root {
  /* Background */
  --bg-primary: #E8F2F8;
  /* Soft washed sky blue */
  --bg-surface: #FFFFFF;
  /* White for cards, modals */

  /* Text */
  --text-primary: #222222;
  /* Deep charcoal (softer than black) */
  --text-secondary: #555555;
  /* Secondary text */
  --text-on-dark: #FFFFFF;
  /* White text on dark backgrounds */

  /* Accent Colors - High contrast on --bg-primary */
  --accent-blue: #0056B3;
  /* Deep ocean blue - primary brand */
  --accent-green: #2E7D32;
  /* Forest green - success, eco */
  --accent-red: #C62828;
  /* Crimson red - alerts, actions */
  --accent-yellow: #FF8F00;
  /* Amber gold - highlights, energy */

  /* UI States */
  --border: #CCCCCC;
  --divider: #DDDDDD;
  --focus-ring: #0056B3;
  /* Focus indicator */

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;

  /* Typography */
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  --font-size: 16px;
  --line-height: 1.6;
}

/* Base Reset & Typography */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: var(--space-md);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-family);
  font-size: var(--font-size);
  line-height: var(--line-height);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: var(--space-md) 0 var(--space-sm);
  color: var(--text-primary);
  font-weight: 600;
}

p {
  margin: 0 0 var(--space-md);
}

/* Links */
a {
  color: var(--accent-blue);
  text-decoration: underline;
  text-underline-offset: 2px;
}

a:hover,
a:focus {
  opacity: 0.85;
}

a:visited {
  color: #4C0080;
  /* Accessible purple */
}


/* Focus Visibility */
:focus {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

/* Utility Classes */
.text-center {
  text-align: center;
}

.mt-sm {
  margin-top: var(--space-sm);
}

.mt-md {
  margin-top: var(--space-md);
}

.mb-sm {
  margin-bottom: var(--space-sm);
}

.mb-md {
  margin-bottom: var(--space-md);
}

/* High Contrast Mode (Optional) */
@media (prefers-contrast: high) {
  :root {
    --bg-primary: #FFFFFF;
    --text-primary: #000000;
    --border: #000000;
    --focus-ring: #000000;
  }
}

/* Reduce motion preference */
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}

/* Responsive Typography */
@media (max-width: 768px) {
  body {
    font-size: 15px;
    line-height: 1.5;
    padding: var(--space-sm);
  }

  h1 {
    font-size: 1.75rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  h3 {
    font-size: 1.25rem;
  }
}

/* Print-Friendly */
@media print {
  body {
    background: white;
    color: black;
    font-size: 12pt;
  }

  a::after {
    content: " (" attr(href) ")";
    font-size: 80%;
    color: #555;
  }

  .no-print {
    display: none;
  }
}

/* Nested list bullets using --text-primary for consistency */
ul {
  margin: 0 0 1rem;
  padding-left: 1.5rem;
  list-style: none;
}

ul li {
  position: relative;
}

ul li::before {
  content: "•";
  color: var(--text-primary);
  /* Uses #222222 — matches body text */
  font-weight: bold;
  position: absolute;
  left: -1rem;
  top: 0;
  font-size: 1.3em;
  line-height: 1;
}


/* Upscaled icon to left of page headings */
h1:before {
  content: url('favicon.ico');
  display: inline-block;
  height: 1em;
  width: 1em;
  margin-right: 0.5em;
  vertical-align: middle;
  /* Crisp pixel art scaling of icon */
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: -o-crisp-edges;
}