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

:root {
  --color-primary: #7c3aed;
  --color-secondary: #5b21b6;
  --color-accent: #ddd6fe;
  --color-bg: #fefeff;
  --color-surface: #f5f3ff;
  --color-text: #2e1065;
  --color-text-muted: #7c6f9b;
  --color-border: #d8d0e8;
  --font-main: 'Verdana', 'Geneva', 'Tahoma', sans-serif;
  --max-width: 1100px;
  --radius: 8px;
  --shadow-sm: inset 0 1px 2px rgba(91, 33, 182, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(124, 58, 237, 0.1), 0 2px 4px -1px rgba(124, 58, 237, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(124, 58, 237, 0.15), 0 4px 6px -2px rgba(124, 58, 237, 0.05);
  --gradient-primary: linear-gradient(135deg, #7c3aed 0%, #5b21b6 100%);
  --gradient-surface: linear-gradient(180deg, #f5f3ff 0%, #fefeff 100%);
  --gradient-accent: linear-gradient(135deg, #ddd6fe 0%, #e9d5ff 100%);
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-main);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-bg);
  background-image: radial-gradient(circle at 20% 50%, rgba(221, 214, 254, 0.3) 0%, transparent 50%),
                    radial-gradient(circle at 80% 80%, rgba(124, 58, 237, 0.08) 0%, transparent 50%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

h2 {
  font-size: 2rem;
  color: var(--color-secondary);
  border-bottom: 3px solid var(--color-accent);
  padding-bottom: 0.5rem;
  margin-top: 2rem;
}

h3 {
  font-size: 1.5rem;
  color: var(--color-primary);
  margin-top: 1.5rem;
}

h4 {
  font-size: 1.25rem;
  color: var(--color-secondary);
  margin-top: 1.25rem;
}

h5 {
  font-size: 1.125rem;
  color: var(--color-text);
  margin-top: 1rem;
}

h6 {
  font-size: 1rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 1rem;
}

p {
  margin-bottom: 1.25rem;
  max-width: 70ch;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
  font-weight: 600;
}

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

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

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

em {
  font-style: italic;
  color: var(--color-text-muted);
}

blockquote {
  margin: 2rem 0;
  padding: 1.5rem 2rem;
  background: var(--gradient-surface);
  border-left: 5px solid var(--color-primary);
  border-radius: 0 var(--radius) var(--radius) 0;
  box-shadow: var(--shadow-sm);
  font-size: 1.125rem;
  font-style: italic;
  color: var(--color-text-muted);
  position: relative;
}

blockquote::before {
  content: '"';
  font-size: 4rem;
  color: var(--color-accent);
  position: absolute;
  top: -0.5rem;
  left: 0.5rem;
  line-height: 1;
  font-family: Georgia, serif;
}

::selection {
  background: var(--color-accent);
  color: var(--color-secondary);
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
}

.site-header {
  background: var(--gradient-primary);
  color: white;
  padding: 2rem 0;
  box-shadow: var(--shadow-lg);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--color-secondary);
}

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

.site-header h1 {
  font-size: 1.75rem;
  margin: 0;
  color: white;
  background: none;
  -webkit-text-fill-color: white;
  letter-spacing: 0.05em;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.site-nav {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.site-nav a {
  color: white;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-bottom: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.site-nav a:hover {
  background: rgba(255, 255, 255, 0.25);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transform: translateY(-1px);
  color: white;
}

.site-nav a:focus-visible {
  outline: 2px solid white;
  outline-offset: 2px;
}

.breadcrumbs {
  padding: 1rem 0;
  font-size: 0.875rem;
  color: var(--color-text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}

.breadcrumbs a {
  color: var(--color-text-muted);
  font-weight: 500;
  border-bottom: 1px solid transparent;
}

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

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

.site-main {
  flex: 1;
  padding: 3rem 0;
}

.site-footer {
  background: var(--gradient-surface);
  padding: 3rem 0 2rem;
  margin-top: 4rem;
  border-top: 3px solid var(--color-accent);
  box-shadow: var(--shadow-sm);
}

.site-footer .container {
  display: grid;
  gap: 2rem;
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.site-footer a {
  color: var(--color-primary);
  font-weight: 500;
}

.card {
  background: white;
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 2rem;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-md);
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
  background-image: var(--gradient-surface);
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
  border-color: var(--color-accent);
}

.card h2 {
  margin-top: 0;
}

.card h3 {
  margin-top: 0;
}

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

table thead {
  background: var(--gradient-primary);
  color: white;
}

table th {
  padding: 1rem;
  text-align: left;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.875rem;
  letter-spacing: 0.05em;
  border-bottom: 2px solid var(--color-secondary);
}

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

table tbody tr {
  transition: background-color 0.2s ease;
}

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

table tbody tr:hover {
  background: var(--color-accent);
}

table tbody tr:last-child td {
  border-bottom: none;
}

details {
  margin: 1.5rem 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: white;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow 0.2s ease;
}

details[open] {
  box-shadow: var(--shadow-md);
}

summary {
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  font-weight: 700;
  color: var(--color-secondary);
  background: var(--gradient-surface);
  border-bottom: 1px solid transparent;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

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

summary::before {
  content: '▸';
  font-size: 1.25rem;
  transition: transform 0.2s ease;
  color: var(--color-primary);
}

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

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

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

details[open] summary {
  border-bottom-color: var(--color-border);
}

details > *:not(summary) {
  padding: 1.5rem;
  animation: slideDown 0.2s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

ul, ol {
  margin: 1rem 0 1.5rem 2rem;
}

ul li, ol li {
  margin-bottom: 0.5rem;
  padding-left: 0.5rem;
}

ul li::marker {
  color: var(--color-primary);
}

ol li::marker {
  color: var(--color-secondary);
  font-weight: 700;
}

code {
  background: var(--color-surface);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-size: 0.9em;
  color: var(--color-secondary);
  border: 1px solid var(--color-border);
}

pre {
  background: var(--color-surface);
  padding: 1.5rem;
  border-radius: var(--radius);
  overflow-x: auto;
  margin: 1.5rem 0;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}

pre code {
  background: none;
  padding: 0;
  border: none;
}

hr {
  border: none;
  height: 3px;
  background: var(--gradient-accent);
  margin: 3rem 0;
  border-radius: 2px;
}

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

  h2 {
    font-size: 2.5rem;
  }

  h3 {
    font-size: 1.75rem;
  }

  .site-header .container {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

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

  .site-nav {
    gap: 1rem;
  }

  .site-footer .container {
    grid-template-columns: repeat(2, 1fr);
  }

  .container {
    padding: 0 2rem;
  }
}

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

  h2 {
    font-size: 3rem;
  }

  .site-main {
    padding: 4rem 0;
  }

  .site-footer .container {
    grid-template-columns: repeat(3, 1fr);
  }

  .card {
    padding: 2.5rem;
  }

  table th, table td {
    padding: 1.25rem;
  }
}

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

  details > *:not(summary) {
    animation: none;
  }

  summary::before {
    transition: none;
  }

  .card:hover {
    transform: none;
  }

  .site-nav a:hover {
    transform: none;
  }
}

@media print {
  .site-header,
  .site-nav,
  .breadcrumbs,
  .site-footer {
    display: none;
  }

  body {
    background: white;
    color: black;
  }

  .site-main {
    max-width: 100%;
    padding: 0;
  }

  .card {
    box-shadow: none;
    border: 1px solid #ccc;
    page-break-inside: avoid;
  }

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

  h1, h2, h3, h4, h5, h6 {
    page-break-after: avoid;
    color: black;
    background: none;
    -webkit-text-fill-color: black;
  }

  table {
    box-shadow: none;
  }
}