* {
  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.16);
  --transition: 0.2s ease;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-text);
  background: linear-gradient(135deg, var(--color-bg) 0%, #fbf9ff 100%);
  background-attachment: fixed;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

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

h2 {
  font-size: 2rem;
  color: var(--color-secondary);
  position: relative;
  padding-bottom: 0.5rem;
}

h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  border-radius: 2px;
}

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

h4 {
  font-size: 1.25rem;
}

h5 {
  font-size: 1.125rem;
}

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

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: 2px solid var(--color-primary);
  outline-offset: 2px;
}

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

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

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

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

::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: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(245, 243, 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.06);
}

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

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

.site-nav ul {
  list-style: none;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.site-nav li {
  display: inline-block;
}

.site-nav a {
  display: block;
  padding: 0.625rem 1.25rem;
  color: var(--color-text);
  font-weight: 500;
  border-radius: var(--radius-lg);
  transition: background-color var(--transition), color var(--transition), box-shadow var(--transition);
}

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

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

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

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

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

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

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

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

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

.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-sm), var(--shadow-md);
}

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

th {
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.875rem;
  letter-spacing: 0.05em;
}

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

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

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

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

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

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

summary {
  padding: 1.25rem 1.5rem;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  background: linear-gradient(135deg, var(--color-surface) 0%, white 100%);
  color: var(--color-text);
  transition: background-color var(--transition), color var(--transition);
  list-style: none;
  position: relative;
}

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

summary::after {
  content: '+';
  position: absolute;
  right: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
  color: var(--color-primary);
  transition: transform var(--transition);
}

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

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

details[open] summary {
  border-bottom: 1px solid var(--color-border);
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  color: white;
}

details[open] summary::after {
  color: white;
}

details div {
  padding: 1.5rem;
  animation: slideDown 0.2s ease;
}

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

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

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

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

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

.site-footer a:hover {
  background: white;
  box-shadow: var(--shadow-sm);
}

@media (min-width: 768px) {
  body {
    font-size: 18px;
  }

  h1 {
    font-size: 3rem;
  }

  h2 {
    font-size: 2.25rem;
  }

  h3 {
    font-size: 1.75rem;
  }

  .site-header .container {
    flex-wrap: nowrap;
  }

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

  .site-nav ul {
    gap: 1rem;
  }

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

  .container {
    padding: 0 2rem;
  }

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

  .card {
    padding: 2.5rem;
  }

  table {
    font-size: 1rem;
  }

  th, td {
    padding: 1.25rem;
  }
}

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

  h2 {
    font-size: 2.5rem;
  }

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

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

  .card {
    padding: 3rem;
  }

  .site-nav ul {
    gap: 1.5rem;
  }

  .site-nav a {
    padding: 0.75rem 1.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    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,
  .breadcrumbs,
  .site-footer {
    display: none;
  }

  body {
    background: white;
  }

  .site-main {
    padding: 0;
  }

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

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

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

  a::after {
    content: " (" attr(href) ")";
    font-size: 0.875rem;
    color: var(--color-text-muted);
  }
}