/* ==========================================================================
   TDS Static Site — Modern, Accessible Stylesheet
   ========================================================================== */

/* --- Reset & Base --- */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 100%;                     /* Respect user browser font-size prefs */
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  background: #141416;
  color: #d8dae5;
  line-height: 1.7;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --- Skip-to-content link (accessibility) --- */

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: #eef0ff;
  color: #141416;
  padding: 0.5rem 1rem;
  border-radius: 0 0 0.5rem 0.5rem;
  font-weight: 600;
  z-index: 1000;
  text-decoration: none;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 0;
}

/* --- Layout --- */

main {
  max-width: 52rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* --- Hero --- */

.hero {
  text-align: center;
  padding: 3rem 0 2rem;
}

.hero h1 {
  font-family: "Merriweather", Georgia, "Times New Roman", serif;
  font-size: clamp(1.6rem, 4vw, 2.5rem);
  font-weight: 700;
  color: #eef0ff;
  line-height: 1.25;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.hero-figure {
  margin: 0 auto;
  max-width: 100%;
}

.hero-figure img {
  display: block;
  width: 100%;
  max-width: 720px;
  height: auto;
  margin: 0 auto;
  border-radius: 0.75rem;
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.06);
}

.hero-figure figcaption {
  margin-top: 0.75rem;
  font-size: 0.8rem;
  color: #8b8d9a;
  font-style: italic;
}

/* --- Document Header --- */

.doc-header {
  margin-bottom: 2.5rem;
  padding: 1.5rem 0;
  border-top: 1px solid #2a2a2e;
  border-bottom: 1px solid #2a2a2e;
}

.doc-title {
  font-family: "Merriweather", Georgia, "Times New Roman", serif;
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  font-weight: 700;
  color: #eef0ff;
  line-height: 1.35;
  margin-bottom: 1rem;
}

/* --- Metadata definition list --- */

dl.meta {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.35rem 1rem;
  font-size: 0.95rem;
}

dl.meta dt {
  font-weight: 600;
  color: #a0a3b5;
  white-space: nowrap;
}

dl.meta dt::after {
  content: ":";
}

dl.meta dd {
  color: #d8dae5;
}

dl.meta dd a {
  color: #7cacf8;
  text-decoration: underline;
  text-decoration-color: rgba(124, 172, 248, 0.3);
  text-underline-offset: 0.15em;
  transition: text-decoration-color 0.2s ease;
}

dl.meta dd a:hover,
dl.meta dd a:focus-visible {
  text-decoration-color: #7cacf8;
}

.nowrap {
  white-space: nowrap;
}

/* --- Article & Sections --- */

article {
  padding-bottom: 1rem;
}

section {
  margin-bottom: 2.25rem;
}

h2 {
  font-family: "Merriweather", Georgia, "Times New Roman", serif;
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  font-weight: 700;
  color: #eef0ff;
  margin-bottom: 0.85rem;
  padding-bottom: 0.35rem;
  border-bottom: 2px solid #2f3040;
}

/* --- Body text --- */

p {
  margin-bottom: 0.75rem;
  max-width: 65ch;                     /* Optimal reading line-length */
}

strong {
  font-weight: 700;
  color: #eef0ff;
}

em {
  font-style: italic;
  color: #b0b3c8;
}

abbr[title] {
  text-decoration: underline dotted;
  text-underline-offset: 0.15em;
  cursor: help;
}

/* --- Lists --- */

ul {
  list-style: none;
  padding-left: 1.25rem;
  margin-bottom: 0.85rem;
}

ul > li {
  position: relative;
  padding-left: 1rem;
  margin-bottom: 0.65rem;
  line-height: 1.65;
}

ul > li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #5a7ec2;
}

ul ul {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

ul ul > li::before {
  background: transparent;
  border: 1.5px solid #5a7ec2;
}

/* --- Footer --- */

footer {
  max-width: 52rem;
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
  border-top: 1px solid #2a2a2e;
  text-align: center;
}

.disclaimer {
  font-size: 0.8rem;
  color: #8b8d9a;
  font-style: italic;
  margin-bottom: 0.5rem;
  max-width: none;
}

.copyright {
  font-size: 0.75rem;
  color: #5e6073;
  max-width: none;
}

/* --- Focus styles (accessibility) --- */

:focus-visible {
  outline: 2px solid #7cacf8;
  outline-offset: 3px;
  border-radius: 2px;
}

/* --- High-contrast / reduced-motion preferences --- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0s !important;
    animation-duration: 0s !important;
  }
}

@media (prefers-contrast: high) {
  body {
    background: #000;
    color: #fff;
  }

  h1, .doc-title, h2, strong {
    color: #fff;
  }

  dl.meta dt {
    color: #ccc;
  }

  .disclaimer,
  .hero-figure figcaption {
    color: #bbb;
  }

  .copyright {
    color: #999;
  }

  ul > li::before {
    background: #fff;
  }

  ul ul > li::before {
    border-color: #fff;
  }

  h2 {
    border-bottom-color: #555;
  }
}

/* --- Responsive --- */

@media (max-width: 600px) {
  .hero {
    padding: 2rem 0 1.5rem;
  }

  .hero-figure img {
    border-radius: 0.5rem;
  }

  dl.meta {
    grid-template-columns: 1fr;
    gap: 0.15rem 0;
  }

  dl.meta dt {
    margin-top: 0.4rem;
  }

  .nowrap {
    white-space: normal;
  }
}

/* --- Print --- */

@media print {
  body {
    background: #fff;
    color: #111;
    font-size: 11pt;
    line-height: 1.5;
    padding: 0;
  }

  .skip-link {
    display: none;
  }

  h1, .doc-title, h2, strong {
    color: #000;
  }

  .hero-figure img {
    max-width: 500px;
    box-shadow: none;
    border: 1px solid #ccc;
  }

  a {
    color: #111;
    text-decoration: underline;
  }

  footer {
    border-top: 1px solid #ccc;
  }

  .disclaimer, .copyright {
    color: #555;
  }
}
