:root {
  --color-primary: #2B4C7E;
  --color-secondary: #3E6B5B;
  --color-accent: #C86B2A;
  --color-background: #F6F3EE;
  --color-surface: #FFFFFF;
  --color-text: #14181F;
  --color-text-muted: #4B5563;
  --color-border: #D6D0C6;
  --radius: 2px;
  --space: 1rem;
  --maxw: 1200px;
  --transition-speed: 0.2s;
}

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

html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
}

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

a {
  color: var(--color-primary);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  transition: color var(--transition-speed) ease, text-decoration-color var(--transition-speed) ease;
}

a:hover {
  color: var(--color-accent);
  text-decoration-color: var(--color-accent);
}

a:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
  border-radius: var(--radius);
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
  color: var(--color-text);
}

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;
}

h4 {
  font-size: 1.25rem;
  margin-top: 1.5rem;
}

h5 {
  font-size: 1.125rem;
  margin-top: 1.25rem;
}

h6 {
  font-size: 1rem;
  margin-top: 1rem;
}

p {
  margin-bottom: 1.25rem;
}

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

li {
  margin-bottom: 0.5rem;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--color-primary);
  color: var(--color-surface);
  padding: 0.5rem 1rem;
  text-decoration: none;
  z-index: 100;
}

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

body {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100vh;
}

header {
  background-color: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: 1.5rem var(--space);
}

header > div {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

header .site-name {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-text);
}

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

nav a {
  text-decoration: none;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: color var(--transition-speed) ease;
}

nav a:hover {
  color: var(--color-accent);
}

nav a:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
}

main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 2rem var(--space);
  width: 100%;
}

article, section {
  margin-bottom: 3rem;
}

section:last-child {
  margin-bottom: 0;
}

nav[aria-label="Breadcrumb"] {
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
}

nav[aria-label="Breadcrumb"] ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

nav[aria-label="Breadcrumb"] li {
  margin: 0;
}

nav[aria-label="Breadcrumb"] li:not(:last-child)::after {
  content: ">";
  margin-left: 0.5rem;
  color: var(--color-text-muted);
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 2rem;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  font-size: 0.9375rem;
}

caption {
  font-weight: 700;
  text-align: left;
  padding: 1rem;
  background-color: var(--color-surface);
  border-bottom: 2px solid var(--color-primary);
  letter-spacing: -0.01em;
  font-size: 1.125rem;
}

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

th {
  text-align: left;
  padding: 0.875rem 1rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

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

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

tbody tr:hover {
  background-color: #E8E4DC;
  transition: background-color var(--transition-speed) ease;
}

.table-wrapper {
  overflow-x: auto;
  margin-bottom: 2rem;
}

details {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 1rem;
}

summary {
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  letter-spacing: -0.01em;
  transition: color var(--transition-speed) ease;
}

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

summary::before {
  content: "▸";
  color: var(--color-primary);
  font-size: 1.25rem;
  transition: transform var(--transition-speed) ease;
  flex-shrink: 0;
}

details[open] summary::before {
  transform: rotate(90deg);
}

summary:hover {
  color: var(--color-primary);
}

summary:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
  border-radius: var(--radius);
}

details[open] summary {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--color-border);
}

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

blockquote {
  margin: 2rem 0;
  padding: 1.5rem;
  padding-left: 1.75rem;
  background-color: #F9F8F6;
  border-left: 4px solid var(--color-accent);
  font-style: italic;
  color: var(--color-text);
}

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

aside {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-secondary);
  padding: 1.5rem;
  margin: 2rem 0;
  border-radius: var(--radius);
}

aside h2, aside h3, aside h4 {
  margin-top: 0;
}

footer {
  background-color: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: 2rem var(--space);
  margin-top: 4rem;
}

footer > div {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

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

footer p {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

@media (min-width: 768px) {
  h1 {
    font-size: 3rem;
  }

  h2 {
    font-size: 2.25rem;
  }

  h3 {
    font-size: 1.75rem;
  }

  header > div {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  main {
    padding: 3rem var(--space);
  }

  footer > div {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

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

  table {
    font-size: 1rem;
  }
}

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

@media print {
  body {
    background-color: white;
    color: black;
  }

  header, footer, nav, aside {
    background-color: transparent;
    border: none;
  }

  a {
    text-decoration: underline;
    color: black;
  }

  a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 0.875rem;
    font-style: italic;
  }

  details[open] summary::before {
    content: "";
  }

  details summary::before {
    content: "";
  }

  thead {
    background-color: #f0f0f0;
    color: black;
  }

  tbody tr:nth-child(even) {
    background-color: #f9f9f9;
  }

  blockquote {
    background-color: #f5f5f5;
  }

  main {
    max-width: 100%;
  }
}