:root {
  --color-bg: #0B0D12;
  --color-surface: #121726;
  --color-text: #E9ECF5;
  --color-muted: #A8B0C3;
  --color-border: #2A3350;
  --color-primary: #7B3FE4;
  --color-secondary: #1FB7A6;
  --color-accent: #FFB454;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  --maxw: 1120px;
  --font-stack: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

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

html {
  font-size: 16px;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-stack);
  background-color: var(--color-bg);
  color: var(--color-text);
  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);
  position: sticky;
  top: 0;
  z-index: 100;
}

header > div {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

header h1 {
  font-size: clamp(1.25rem, 4vw, 1.75rem);
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.01em;
}

nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: center;
}

nav a {
  color: var(--color-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9375rem;
  position: relative;
  padding-bottom: 0.125rem;
  transition: color 0.25s ease;
  background-image: linear-gradient(var(--color-accent), var(--color-accent));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 2px;
  transition: background-size 0.25s ease, color 0.25s ease;
}

nav a:hover {
  color: var(--color-text);
  background-size: 100% 2px;
}

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

nav[aria-label="Breadcrumb"] {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1rem 1.25rem 0;
}

nav[aria-label="Breadcrumb"] ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.875rem;
}

nav[aria-label="Breadcrumb"] li:not(:last-child)::after {
  content: "→";
  margin-left: 0.5rem;
  color: var(--color-muted);
}

nav[aria-label="Breadcrumb"] a {
  color: var(--color-secondary);
  text-decoration: none;
  background-image: linear-gradient(var(--color-secondary), var(--color-secondary));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 1px;
  transition: background-size 0.25s ease;
}

nav[aria-label="Breadcrumb"] a:hover {
  background-size: 100% 1px;
}

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

h1 {
  font-size: clamp(1.875rem, 5vw, 3rem);
  line-height: 1.15;
  margin-bottom: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--color-text);
}

h2 {
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  line-height: 1.25;
  margin-top: 3rem;
  margin-bottom: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--color-text);
}

h3 {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  line-height: 1.3;
  margin-top: 2rem;
  margin-bottom: 1rem;
  font-weight: 600;
  color: var(--color-text);
}

p {
  margin-bottom: 1rem;
  max-width: 72ch;
  color: var(--color-text);
}

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

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

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

section, article {
  margin-bottom: 3rem;
}

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

aside h2, aside h3 {
  margin-top: 0;
}

blockquote {
  background: linear-gradient(135deg, rgba(123, 63, 228, 0.15), rgba(31, 183, 166, 0.1));
  border-left: 5px solid var(--color-primary);
  padding: 1.5rem 1.75rem;
  margin: 2rem 0;
  border-radius: var(--radius);
  font-style: italic;
  font-size: 1.125rem;
  color: var(--color-text);
  position: relative;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

blockquote::before {
  content: """;
  position: absolute;
  top: 0.5rem;
  left: 0.75rem;
  font-size: 3rem;
  color: var(--color-primary);
  opacity: 0.3;
  line-height: 1;
}

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

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

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

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

thead {
  background-color: var(--color-primary);
  color: var(--color-text);
}

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

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

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

tbody tr:nth-child(odd) {
  background-color: rgba(255, 255, 255, 0.02);
}

tbody tr:nth-child(even) {
  background-color: rgba(255, 255, 255, 0.04);
}

tbody tr:hover {
  background-color: rgba(123, 63, 228, 0.15);
  transform: translateX(2px);
}

@media (min-width: 1024px) {
  thead {
    position: sticky;
    top: 0;
    z-index: 10;
  }
}

@media (max-width: 767px) {
  table {
    font-size: 0.875rem;
  }
  
  th, td {
    padding: 0.75rem 0.5rem;
  }
}

details {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: box-shadow 0.25s ease;
}

details:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

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

summary {
  font-weight: 600;
  font-size: 1.0625rem;
  cursor: pointer;
  padding: 0.5rem 0;
  color: var(--color-text);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: color 0.25s ease;
}

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

summary::before {
  content: "▶";
  display: inline-block;
  color: var(--color-accent);
  font-size: 0.875rem;
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

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

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

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

details > *:not(summary) {
  padding-top: 1rem;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.4s ease, opacity 0.3s ease, padding-top 0.3s ease;
}

details[open] > *:not(summary) {
  max-height: 2000px;
  opacity: 1;
}

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

footer > div {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

footer nav ul {
  justify-content: center;
  gap: 2rem;
}

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

.card {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.55);
}

@media (min-width: 768px) {
  main {
    padding: 3rem 2rem;
  }
  
  header > div {
    padding: 1.25rem 2rem;
  }
  
  nav[aria-label="Breadcrumb"] {
    padding: 1.25rem 2rem 0;
  }
  
  footer {
    padding: 2.5rem 2rem;
  }
  
  footer > div {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
  
  footer p {
    text-align: left;
  }
  
  footer nav ul {
    justify-content: flex-end;
  }
}

@media (min-width: 1024px) {
  main {
    padding: 4rem 2rem;
  }
  
  section, article {
    margin-bottom: 4rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  details > *:not(summary) {
    transition: none;
  }
  
  details[open] > *:not(summary) {
    max-height: none;
  }
  
  summary::before {
    transition: none;
  }
}

@media print {
  body {
    background: white;
    color: black;
  }
  
  header, footer, nav[aria-label="Breadcrumb"] {
    display: none;
  }
  
  main {
    max-width: 100%;
    padding: 0;
  }
  
  a {
    text-decoration: underline;
    color: black;
  }
  
  a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 0.875rem;
  }
  
  details {
    border: 1px solid #ccc;
  }
  
  details > *:not(summary) {
    max-height: none;
    opacity: 1;
    overflow: visible;
  }
  
  table {
    box-shadow: none;
    border: 1px solid #000;
  }
  
  thead {
    background: #eee;
    color: #000;
  }
  
  tbody tr {
    page-break-inside: avoid;
  }
}