:root {
  --color-primary: #2E6BFF;
  --color-secondary: #7A5CFF;
  --color-accent: #FFB020;
  --color-background: #0B0F14;
  --color-surface: #121A24;
  --color-text: #EAF0FF;
  --color-text-muted: #A9B4CC;
  --color-border: #223044;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0,0,0,0.35);
  --maxw: 1120px;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--color-background);
  color: var(--color-text);
  line-height: 1.7;
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  grid-template-columns: 100%;
}

header {
  background-color: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

header .header-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
}

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

header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
}

header nav a {
  color: var(--color-text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease, text-decoration-thickness 0.2s ease;
  text-underline-offset: 4px;
}

header nav a:hover {
  color: var(--color-primary);
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

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

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

h1 {
  font-size: 1.875rem;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  color: var(--color-text);
  font-weight: 700;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 1.5rem;
  line-height: 1.3;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  color: var(--color-text);
  font-weight: 700;
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1.25rem;
  line-height: 1.4;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: var(--color-text);
  font-weight: 600;
}

p {
  margin-bottom: 1rem;
  color: var(--color-text);
}

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

a:hover {
  color: var(--color-secondary);
  text-decoration-thickness: 2px;
}

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

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

li {
  margin-bottom: 0.5rem;
  color: var(--color-text);
}

.breadcrumbs {
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
}

.breadcrumbs nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

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

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

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

section {
  margin-bottom: 3rem;
}

blockquote {
  background-color: var(--color-surface);
  border-left: 4px solid var(--color-primary);
  padding: 1.5rem;
  margin: 2rem 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  font-style: italic;
  color: var(--color-text);
}

aside {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  padding: 1.5rem;
  margin: 2rem 0;
  border-radius: var(--radius);
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

aside h3 {
  margin-top: 0;
  color: var(--color-accent);
}

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

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

thead {
  background-color: rgba(46, 107, 255, 0.15);
}

th {
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  color: var(--color-text);
  border-bottom: 2px solid var(--color-border);
}

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

tbody tr:nth-child(even) {
  background-color: rgba(18, 26, 36, 0.5);
}

tbody tr:hover {
  background-color: rgba(46, 107, 255, 0.08);
  transition: background-color 0.2s ease;
}

details {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 1rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

summary {
  font-weight: 600;
  cursor: pointer;
  color: var(--color-text);
  padding: 0.5rem;
  margin: -0.5rem;
  border-radius: calc(var(--radius) - 2px);
  transition: background-color 0.2s ease, color 0.2s ease;
  list-style: none;
  display: flex;
  align-items: center;
}

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

summary::before {
  content: "▶";
  display: inline-block;
  margin-right: 0.75rem;
  transition: transform 0.3s ease;
  color: var(--color-primary);
  font-size: 0.875rem;
}

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

summary:hover {
  background-color: rgba(46, 107, 255, 0.1);
  color: var(--color-primary);
}

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

details[open] {
  padding-bottom: 1.5rem;
}

details p {
  margin-top: 1rem;
  padding-left: 1.625rem;
}

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

footer .footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: center;
  text-align: center;
}

footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
}

footer nav a {
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: 0.9375rem;
  transition: color 0.2s ease;
}

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

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

@media (min-width: 768px) {
  html {
    font-size: 17px;
  }

  header .header-inner {
    flex-direction: row;
    justify-content: space-between;
    padding: 1.5rem 2rem;
  }

  header .site-name {
    font-size: 1.75rem;
  }

  main {
    padding: 3rem 2rem;
  }

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

  h2 {
    font-size: 1.875rem;
    margin-top: 3rem;
  }

  h3 {
    font-size: 1.5rem;
  }

  table {
    display: table;
  }

  thead {
    position: sticky;
    top: 0;
    z-index: 10;
  }

  th {
    position: sticky;
    top: 0;
    background-color: rgba(46, 107, 255, 0.15);
  }

  footer .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

@media (min-width: 1024px) {
  html {
    font-size: 18px;
  }

  header .site-name {
    font-size: 2rem;
  }

  main {
    padding: 4rem 2rem;
  }

  h1 {
    font-size: 3rem;
  }

  h2 {
    font-size: 2.25rem;
  }

  h3 {
    font-size: 1.75rem;
  }

  section {
    margin-bottom: 4rem;
  }
}

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

  html {
    scroll-behavior: auto;
  }

  summary::before {
    transition: none;
  }
}

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

  header {
    position: static;
    box-shadow: none;
    border-bottom: 2px solid black;
  }

  footer {
    border-top: 2px solid black;
  }

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

  details {
    border: 1px solid black;
  }

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

  table {
    box-shadow: none;
    border: 1px solid black;
  }

  thead {
    background-color: #f0f0f0;
  }

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

  nav, .breadcrumbs {
    display: none;
  }
}