* {
  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: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --max-width: 1100px;
  --radius: 16px;
  --radius-sm: 8px;
  --radius-lg: 24px;
  --shadow-sm: inset 0 1px 3px rgba(91, 33, 182, 0.08);
  --shadow-md: 0 4px 12px rgba(124, 58, 237, 0.12);
  --shadow-lg: 0 8px 24px rgba(124, 58, 237, 0.18);
  --transition: 0.2s ease;
}

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

body {
  font-family: var(--font-main);
  background: linear-gradient(135deg, var(--color-bg) 0%, var(--color-surface) 100%);
  background-attachment: fixed;
  color: var(--color-text);
  line-height: 1.7;
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.75em;
  color: var(--color-secondary);
}

h1 {
  font-size: 2.5rem;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1rem;
}

h2 {
  font-size: 2rem;
  color: var(--color-primary);
}

h3 {
  font-size: 1.5rem;
}

h4 {
  font-size: 1.25rem;
}

h5 {
  font-size: 1.125rem;
}

h6 {
  font-size: 1rem;
}

p {
  margin-bottom: 1.25rem;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition), background-color var(--transition);
  border-radius: var(--radius-sm);
  position: relative;
}

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

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

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

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

blockquote {
  margin: 2rem 0;
  padding: 1.5rem 1.5rem 1.5rem 2rem;
  background: linear-gradient(135deg, var(--color-surface) 0%, var(--color-accent) 100%);
  border-left: 5px solid var(--color-primary);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  font-style: italic;
  color: var(--color-text);
  position: relative;
}

blockquote::before {
  content: '"';
  font-size: 4rem;
  position: absolute;
  top: -10px;
  left: 10px;
  color: var(--color-primary);
  opacity: 0.2;
  font-family: Georgia, serif;
}

::selection {
  background: var(--color-primary);
  color: white;
}

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

.site-header {
  background: linear-gradient(180deg, rgba(245, 243, 255, 0.95) 0%, rgba(254, 254, 255, 0.9) 100%);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
  padding: 1.5rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.08);
}

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

.site-header h1 {
  margin: 0;
  font-size: 1.75rem;
}

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

.site-nav a {
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius);
  background: var(--color-surface);
  color: var(--color-text);
  font-weight: 500;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
}

.site-nav a:hover {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  color: white;
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

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

.breadcrumbs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  align-items: center;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  padding: 0.75rem 1.25rem;
  background: var(--color-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.breadcrumbs a {
  color: var(--color-text-muted);
  padding: 0.25rem 0.5rem;
}

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

.breadcrumbs::before {
  content: '→';
  margin: 0 0.25rem;
  color: var(--color-border);
}

.breadcrumbs > *:not(:last-child)::after {
  content: '/';
  margin-left: 0.5rem;
  color: var(--color-border);
}

.card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, var(--color-surface) 100%);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-md);
  transition: all var(--transition);
}

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

.card h2,
.card h3 {
  margin-top: 0;
}

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

table thead {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  color: white;
}

table th {
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
}

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

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

table tbody tr:nth-child(even) {
  background: rgba(221, 214, 254, 0.2);
}

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

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

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

summary {
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  font-weight: 600;
  color: var(--color-secondary);
  background: linear-gradient(135deg, var(--color-surface) 0%, var(--color-accent) 100%);
  transition: all var(--transition);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

summary::after {
  content: '+';
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--color-primary);
  transition: transform var(--transition);
}

details[open] summary::after {
  transform: rotate(45deg);
}

summary:hover {
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-primary) 100%);
  color: white;
}

summary:hover::after {
  color: white;
}

details > *:not(summary) {
  padding: 1.5rem;
  border-top: 1px solid var(--color-border);
  animation: slideDown var(--transition);
}

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

.site-footer {
  background: linear-gradient(180deg, var(--color-surface) 0%, var(--color-accent) 100%);
  border-top: 1px solid var(--color-border);
  padding: 3rem 0 2rem;
  margin-top: 4rem;
  box-shadow: inset 0 4px 12px rgba(124, 58, 237, 0.08);
}

.site-footer .container {
  display: grid;
  gap: 2rem;
  text-align: center;
}

.site-footer p {
  margin-bottom: 0.5rem;
  color: var(--color-text-muted);
}

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

.site-footer a:hover {
  background: var(--color-primary);
  color: white;
}

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

  h2 {
    font-size: 2.25rem;
  }

  h3 {
    font-size: 1.75rem;
  }

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

  .site-nav {
    gap: 1rem;
  }

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

  .card {
    padding: 2.5rem;
  }

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

  .container {
    padding: 0 2rem;
  }
}

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

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

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

  .card {
    padding: 3rem;
  }

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

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

@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 {
  .site-header,
  .site-nav,
  .site-footer,
  .breadcrumbs {
    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 {
    text-decoration: underline;
    color: black;
  }

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

  table {
    box-shadow: none;
  }
}