:root {
  --color-bg: #FBFAF7;
  --color-surface: #FFFFFF;
  --color-text: #1A1F2B;
  --color-muted: #5A6475;
  --color-border: #D9D4C8;
  --color-primary: #2E5EAA;
  --color-secondary: #8A4FFF;
  --color-accent: #FF6B6B;
  --radius: 0.25rem;
  --shadow: 0 1px 3px rgba(26, 31, 43, 0.1);
  --space: 1rem;
  --maxw: 72rem;
}

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

html {
  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: 1rem;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
}

h1, h2, h3, h4, h5, h6 {
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.2;
  margin-bottom: 1rem;
  font-weight: 600;
}

h1 {
  font-size: 2rem;
  margin-top: 0;
}

h2 {
  font-size: 1.5rem;
  margin-top: 2rem;
}

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

@media (min-width: 768px) {
  h1 {
    font-size: 2.5rem;
  }
  h2 {
    font-size: 1.75rem;
  }
  h3 {
    font-size: 1.375rem;
  }
}

@media (min-width: 1024px) {
  h1 {
    font-size: 3rem;
  }
  h2 {
    font-size: 2rem;
  }
  h3 {
    font-size: 1.5rem;
  }
}

p, ul, ol, table, blockquote, details {
  margin-bottom: 1rem;
}

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

li {
  margin-bottom: 0.5rem;
}

a {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 0.2em;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--color-secondary);
}

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

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

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

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--space);
}

header {
  background-color: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: 1rem 0;
  box-shadow: var(--shadow);
}

header .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.site-title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-primary);
}

nav {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

nav a {
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

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

.breadcrumbs {
  background-color: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: 0.75rem 0;
  font-size: 0.875rem;
}

.breadcrumbs a {
  color: var(--color-primary);
}

.breadcrumbs span {
  color: var(--color-muted);
}

main {
  padding: 2rem 0;
}

article {
  background-color: var(--color-surface);
  padding: 2rem var(--space);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

@media (min-width: 768px) {
  article {
    padding: 3rem 2rem;
  }
}

section {
  margin-bottom: 2rem;
}

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

aside h2 {
  margin-top: 0;
  font-size: 1.125rem;
}

blockquote {
  background-color: var(--color-bg);
  border-left: 4px solid var(--color-primary);
  padding: 1rem 1.5rem;
  font-style: italic;
  color: var(--color-muted);
  margin: 2rem 0;
  border-radius: var(--radius);
}

blockquote p {
  margin-bottom: 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 1.5rem 0;
}

caption {
  font-weight: 600;
  text-align: left;
  padding: 0.75rem;
  background-color: var(--color-bg);
  border-bottom: 2px solid var(--color-border);
}

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

th {
  text-align: left;
  padding: 0.75rem;
  font-weight: 600;
}

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

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

tbody tr:hover {
  background-color: rgba(46, 94, 170, 0.05);
}

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

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

details:hover {
  background-color: var(--color-bg);
}

details[open] {
  background-color: var(--color-bg);
}

summary {
  font-weight: 600;
  cursor: pointer;
  color: var(--color-primary);
  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;
  line-height: 1;
  transition: transform 0.2s ease;
}

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

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

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

details div {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--color-border);
}

footer {
  background-color: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: 2rem 0;
  margin-top: 3rem;
  text-align: center;
  color: var(--color-muted);
  font-size: 0.875rem;
}

footer p {
  margin-bottom: 0;
}

@media (max-width: 767px) {
  table {
    font-size: 0.875rem;
  }
  th, td {
    padding: 0.5rem;
  }
}