:root {
  --rx-primary: #2F2A7A;
  --rx-secondary: #0E7C86;
  --rx-accent: #FF4D2E;
  --rx-bg: #FFF7E8;
  --rx-surface: #FFFFFF;
  --rx-text: #14121A;
  --rx-muted: #4B4657;
  --rx-border: #1E1B28;
  --rx-radius: 14px;
  --rx-shadow: 6px 6px 0 var(--rx-border);
  --rx-max: 72rem;
}

* {
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: var(--rx-text);
  background-color: var(--rx-bg);
  margin: 0;
  padding: 0;
}

.container {
  max-width: var(--rx-max);
  margin: 0 auto;
  padding: 0 1rem;
}

header {
  background-color: var(--rx-surface);
  border: 3px solid var(--rx-border);
  border-radius: var(--rx-radius);
  box-shadow: var(--rx-shadow);
  margin: 1rem;
  padding: 1.5rem;
}

header h1 {
  margin: 0 0 1rem 0;
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 900;
  color: var(--rx-primary);
  text-transform: uppercase;
  letter-spacing: -0.02em;
}

header nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

header nav a {
  color: var(--rx-secondary);
  text-decoration: none;
  font-weight: 700;
  padding: 0.5rem 1rem;
  border: 2px solid var(--rx-border);
  border-radius: var(--rx-radius);
  background-color: var(--rx-surface);
  transition: all 0.2s ease;
}

header nav a:hover {
  background-color: var(--rx-accent);
  color: var(--rx-surface);
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 var(--rx-border);
}

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

nav[aria-label="Breadcrumb"] {
  margin-bottom: 1rem;
}

nav[aria-label="Breadcrumb"] ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

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

nav[aria-label="Breadcrumb"] a {
  color: var(--rx-secondary);
  text-decoration: underline;
}

main {
  max-width: var(--rx-max);
  margin: 0 auto;
  padding: 0 1rem 2rem;
  display: grid;
  gap: 2rem;
}

article, section {
  background-color: var(--rx-surface);
  border: 3px solid var(--rx-border);
  border-radius: var(--rx-radius);
  box-shadow: var(--rx-shadow);
  padding: 2rem;
}

h2 {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-weight: 800;
  color: var(--rx-primary);
  margin: 0 0 1rem 0;
  text-transform: uppercase;
  letter-spacing: -0.01em;
}

h3 {
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  font-weight: 700;
  color: var(--rx-secondary);
  margin: 1.5rem 0 0.75rem 0;
}

p {
  margin: 0 0 1rem 0;
  font-size: 1rem;
  line-height: 1.7;
}

a {
  color: var(--rx-secondary);
  text-decoration: underline;
  font-weight: 600;
  transition: color 0.2s ease;
}

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

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

a[rel="external"]::after {
  content: ' ↗';
  font-size: 0.8em;
  color: var(--rx-muted);
}

blockquote {
  border-left: 4px solid var(--rx-accent);
  background-color: var(--rx-bg);
  margin: 1.5rem 0;
  padding: 1rem 1.5rem;
  font-style: italic;
  border-radius: 0 var(--rx-radius) var(--rx-radius) 0;
}

aside {
  background-color: var(--rx-bg);
  border: 2px solid var(--rx-secondary);
  border-radius: var(--rx-radius);
  padding: 1rem;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 3px solid var(--rx-border);
  border-radius: var(--rx-radius);
  overflow: hidden;
  margin: 1.5rem 0;
  box-shadow: var(--rx-shadow);
}

caption {
  font-weight: 700;
  color: var(--rx-primary);
  text-align: left;
  padding: 1rem;
  background-color: var(--rx-bg);
  border-bottom: 2px solid var(--rx-border);
}

th {
  background-color: var(--rx-primary);
  color: var(--rx-surface);
  font-weight: 700;
  text-align: left;
  padding: 1rem;
  border-bottom: 2px solid var(--rx-border);
}

th:not(:last-child) {
  border-right: 2px solid var(--rx-border);
}

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

td:not(:last-child) {
  border-right: 1px solid var(--rx-border);
}

tr:nth-child(even) td {
  background-color: var(--rx-bg);
}

details {
  background-color: var(--rx-surface);
  border: 3px solid var(--rx-border);
  border-radius: var(--rx-radius);
  box-shadow: var(--rx-shadow);
  margin: 1rem 0;
}

summary {
  background-color: var(--rx-primary);
  color: var(--rx-surface);
  font-weight: 700;
  padding: 1rem 1.5rem;
  cursor: pointer;
  border-radius: calc(var(--rx-radius) - 3px) calc(var(--rx-radius) - 3px) 0 0;
  transition: background-color 0.2s ease;
  list-style: none;
  position: relative;
}

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

summary::before {
  content: '+';
  position: absolute;
  right: 1.5rem;
  font-size: 1.2em;
  font-weight: 900;
  transition: transform 0.2s ease;
}

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

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

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

details div {
  padding: 1.5rem;
}

footer {
  background-color: var(--rx-border);
  color: var(--rx-surface);
  text-align: center;
  padding: 2rem;
  margin-top: 3rem;
  font-weight: 600;
}

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

@media (max-width: 767px) {
  table {
    font-size: 0.9rem;
    overflow-x: auto;
    display: block;
    white-space: nowrap;
  }
  
  th, td {
    padding: 0.75rem;
  }
  
  header {
    margin: 0.5rem;
    padding: 1rem;
  }
  
  article, section {
    padding: 1.5rem;
  }
}

@media (min-width: 768px) {
  main {
    grid-template-columns: 1fr;
  }
  
  th {
    position: sticky;
    top: 0;
    z-index: 10;
  }
}

@media (min-width: 1024px) {
  body {
    font-size: 1.1rem;
  }
  
  header nav ul {
    justify-content: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  header nav a:hover {
    transform: none;
  }
  
  summary::before {
    transition: none;
  }
  
  details[open] summary::before {
    transform: none;
    content: '−';
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --rx-bg: #1A1625;
    --rx-surface: #2A2438;
    --rx-text: #F5F3FF;
    --rx-muted: #B8B4C8;
  }
}