/* ========================================
   CSS Variables
   ======================================== */
:root {
  --c-bg: #F7F7F2;
  --c-surface: #FFFFFF;
  --c-text: #111827;
  --c-muted: #4B5563;
  --c-border: #D1D5DB;
  --c-primary: #2B3A67;
  --c-secondary: #1F7A8C;
  --c-accent: #F4D35E;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(17, 24, 39, 0.10);
  --maxw: 1120px;
}

/* ========================================
   Reset and Base Styles
   ======================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--c-text);
  background-color: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   Typography
   ======================================== */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--c-primary);
}

h1 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
}

h2 {
  font-size: 2rem;
  margin-top: 2.5rem;
  margin-bottom: 1.25rem;
}

h3 {
  font-size: 1.5rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

p {
  margin-bottom: 1.25rem;
}

a {
  color: var(--c-secondary);
  text-decoration: underline;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--c-primary);
}

a:focus-visible {
  outline: 3px solid var(--c-accent);
  outline-offset: 2px;
}

strong {
  font-weight: 700;
  color: var(--c-primary);
}

ul, ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.5rem;
}

blockquote {
  margin: 2rem 0;
  padding: 1.5rem;
  background-color: var(--c-surface);
  border-left: 4px solid var(--c-accent);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

blockquote p:last-child {
  margin-bottom: 0;
}

/* ========================================
   Layout
   ======================================== */
.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1.5rem;
}

@media (min-width: 768px) {
  .container {
    padding: 0 2rem;
  }
}

/* ========================================
   Header
   ======================================== */
.site-header {
  background-color: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
  padding: 1.5rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}

.site-header .container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 768px) {
  .site-header .container {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

.site-branding .site-name {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--c-primary);
  text-decoration: none;
}

.site-branding .site-name:hover {
  color: var(--c-secondary);
}

.site-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.site-nav a {
  font-weight: 600;
  text-decoration: none;
  color: var(--c-text);
  transition: color 0.2s ease;
}

.site-nav a:hover {
  color: var(--c-secondary);
}

.site-nav a:focus-visible {
  outline: 3px solid var(--c-accent);
  outline-offset: 2px;
}

/* ========================================
   Main Content
   ======================================== */
main {
  padding: 3rem 0;
  min-height: 60vh;
}

.page-header {
  margin-bottom: 2.5rem;
}

.content-section {
  margin-bottom: 3rem;
}

/* ========================================
   Breadcrumbs
   ======================================== */
.breadcrumbs {
  margin-bottom: 2rem;
}

.breadcrumbs ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.breadcrumbs li {
  margin: 0;
}

.breadcrumbs li:not(:last-child)::after {
  content: "/";
  margin-left: 0.5rem;
  color: var(--c-muted);
}

.breadcrumbs a {
  color: var(--c-secondary);
  text-decoration: none;
}

.breadcrumbs a:hover {
  text-decoration: underline;
}

.breadcrumbs [aria-current="page"] {
  color: var(--c-muted);
}

/* ========================================
   Tables
   ======================================== */
.table-wrapper {
  overflow-x: auto;
  margin: 2rem 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

table {
  width: 100%;
  border-collapse: collapse;
  background-color: var(--c-surface);
  font-size: 1rem;
}

caption {
  font-weight: 700;
  text-align: left;
  padding: 1rem;
  background-color: var(--c-primary);
  color: var(--c-surface);
  font-size: 1.125rem;
}

thead {
  background-color: var(--c-primary);
  color: var(--c-surface);
}

@media (min-width: 1024px) {
  thead {
    position: sticky;
    top: 0;
  }
}

th {
  padding: 1rem;
  text-align: left;
  font-weight: 700;
}

td {
  padding: 1rem;
  border-bottom: 1px solid var(--c-border);
}

tbody tr:nth-child(even) {
  background-color: var(--c-bg);
}

tbody tr:hover {
  background-color: #E5E7EB;
}

/* ========================================
   Accordion (details/summary)
   ======================================== */
details {
  margin-bottom: 1.5rem;
  background-color: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
}

summary {
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--c-primary);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: color 0.2s ease;
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  content: "+";
  font-size: 1.5rem;
  color: var(--c-secondary);
  transition: transform 0.2s ease;
}

details[open] summary::after {
  content: "−";
}

summary:hover {
  color: var(--c-secondary);
}

summary:focus-visible {
  outline: 3px solid var(--c-accent);
  outline-offset: 2px;
}

.details-content {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--c-border);
}

.details-content p:last-child {
  margin-bottom: 0;
}

/* ========================================
   Aside / Callout
   ======================================== */
.callout {
  background-color: var(--c-surface);
  border-left: 4px solid var(--c-secondary);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin: 2rem 0;
  box-shadow: var(--shadow);
}

.callout h3 {
  margin-top: 0;
  color: var(--c-secondary);
}

/* ========================================
   Footer
   ======================================== */
.site-footer {
  background-color: var(--c-surface);
  border-top: 1px solid var(--c-border);
  padding: 2rem 0;
  margin-top: 4rem;
  text-align: center;
  color: var(--c-muted);
}

.site-footer p {
  margin: 0;
}

/* ========================================
   Responsive Typography
   ======================================== */
@media (min-width: 768px) {
  body {
    font-size: 1.125rem;
  }
  h1 {
    font-size: 3rem;
  }
  h2 {
    font-size: 2.25rem;
  }
  h3 {
    font-size: 1.75rem;
  }
}

@media (min-width: 1024px) {
  h1 {
    font-size: 3.5rem;
  }
  h2 {
    font-size: 2.5rem;
  }
}

/* ========================================
   Focus Visible (Keyboard Navigation)
   ======================================== */
*:focus-visible {
  outline: 3px solid var(--c-accent);
  outline-offset: 2px;
}

/* ========================================
   Print Styles
   ======================================== */
@media print {
  .site-header,
  .site-footer,
  .breadcrumbs {
    display: none;
  }
  body {
    background-color: white;
    color: black;
  }
  a {
    text-decoration: underline;
    color: black;
  }
}