* {
  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: 0 2px 8px rgba(124, 58, 237, 0.08);
  --shadow-md: 0 4px 16px rgba(124, 58, 237, 0.12);
  --shadow-lg: 0 8px 32px rgba(124, 58, 237, 0.16);
  --shadow-inner: inset 0 2px 4px rgba(91, 33, 182, 0.1);
  --gradient-primary: linear-gradient(135deg, #7c3aed 0%, #5b21b6 100%);
  --gradient-soft: linear-gradient(180deg, rgba(221, 214, 254, 0.3) 0%, rgba(245, 243, 255, 0.5) 100%);
  --gradient-overlay: linear-gradient(180deg, rgba(254, 254, 255, 0) 0%, rgba(245, 243, 255, 0.8) 100%);
}

html {
  scroll-behavior: smooth;
}

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

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

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

h2 {
  font-size: 2rem;
  color: var(--color-secondary);
  margin-top: 2rem;
}

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

h4 {
  font-size: 1.25rem;
  margin-top: 1.25rem;
}

h5 {
  font-size: 1.125rem;
  margin-top: 1rem;
}

h6 {
  font-size: 1rem;
  margin-top: 1rem;
  font-weight: 600;
}

p {
  margin-bottom: 1.25rem;
}

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;
}

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

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

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

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

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

blockquote p:last-child {
  margin-bottom: 0;
}

::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(--color-surface);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
  background: rgba(245, 243, 255, 0.95);
}

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

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

.site-nav {
  width: 100%;
}

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

.site-nav a {
  display: block;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-lg);
  background: var(--color-bg);
  border: 2px solid var(--color-border);
  color: var(--color-text);
  font-weight: 500;
  transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
  box-shadow: var(--shadow-inner);
}

.site-nav a:hover {
  background: var(--gradient-primary);
  border-color: var(--color-primary);
  color: white;
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

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

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

.breadcrumbs a {
  color: var(--color-primary);
  border: none;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  transition: background-color 0.2s ease, color 0.2s ease;
}

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

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

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

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity 0.2s ease;
}

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

.card:hover::before {
  opacity: 1;
}

.card h2:first-child,
.card h3:first-child {
  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-md);
  border: 1px solid var(--color-border);
}

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

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

table td {
  padding: 1rem 1.25rem;
  border-top: 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: rgba(221, 214, 254, 0.15);
}

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

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

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

summary {
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  font-weight: 600;
  color: var(--color-primary);
  background: var(--gradient-soft);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background-color 0.2s ease, color 0.2s ease;
  user-select: none;
}

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

summary::after {
  content: '▼';
  font-size: 0.875rem;
  transition: transform 0.2s ease;
  color: var(--color-primary);
}

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

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

details div {
  padding: 1.5rem;
  background: var(--color-bg);
  box-shadow: var(--shadow-inner);
  animation: slideDown 0.2s ease;
}

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

.site-footer {
  background: var(--gradient-primary);
  color: white;
  padding: 3rem 0 2rem;
  margin-top: 4rem;
  box-shadow: 0 -4px 16px rgba(124, 58, 237, 0.2);
}

.site-footer a {
  color: var(--color-accent);
  border-bottom-color: transparent;
}

.site-footer a:hover {
  color: white;
  border-bottom-color: white;
}

.site-footer p {
  margin-bottom: 0.5rem;
}

button,
input[type="submit"],
input[type="button"] {
  font-family: var(--font-main);
  font-size: 1rem;
  padding: 0.875rem 2rem;
  background: var(--gradient-primary);
  color: white;
  border: none;
  border-radius: var(--radius-lg);
  cursor: pointer;
  font-weight: 600;
  box-shadow: var(--shadow-md);
  transition: box-shadow 0.2s ease, transform 0.2s ease, background-color 0.2s ease;
}

button:hover,
input[type="submit"]:hover,
input[type="button"]:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

button:focus-visible,
input[type="submit"]:focus-visible,
input[type="button"]:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 4px;
}

button:active,
input[type="submit"]:active,
input[type="button"]:active {
  transform: translateY(0);
}

input[type="text"],
input[type="email"],
input[type="search"],
input[type="tel"],
input[type="url"],
textarea,
select {
  font-family: var(--font-main);
  font-size: 1rem;
  padding: 0.875rem 1.25rem;
  border: 2px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-bg);
  color: var(--color-text);
  width: 100%;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-shadow: var(--shadow-inner);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.1);
}

textarea {
  resize: vertical;
  min-height: 120px;
}

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

  h1 {
    font-size: 3.5rem;
  }

  h2 {
    font-size: 2.5rem;
  }

  h3 {
    font-size: 1.875rem;
  }

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

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

  .site-nav {
    width: auto;
  }

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

  .container {
    padding: 0 2rem;
  }

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

  .card {
    padding: 2.5rem;
  }

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

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

  h2 {
    font-size: 3rem;
  }

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

  .site-main {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .card {
    padding: 3rem;
  }

  blockquote {
    padding: 2rem 2.5rem;
  }
}

@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;
  }

  html {
    scroll-behavior: auto;
  }
}

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

  .site-header,
  .site-nav,
  .site-footer,
  .breadcrumbs,
  button {
    display: none !important;
  }

  .site-main {
    padding: 0;
  }

  .container {
    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;
  }

  table {
    page-break-inside: avoid;
  }
}