:root {
  --color-primary: #2F2A86;
  --color-secondary: #0F8A7A;
  --color-accent: #FF6A3D;
  --color-background: #FFF7E8;
  --color-surface: #FFFFFF;
  --color-text: #14121A;
  --color-text-muted: #4B4656;
  --color-border: #1E1B26;
  --radius: 0;
  --shadow: 6px 6px 0 var(--color-border);
  --space: 1rem;
  --maxw: 1200px;
  --font-system: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

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

html {
  scroll-behavior: smooth;
  font-size: 100%;
}

body {
  font-family: var(--font-system);
  background-color: var(--color-background);
  color: var(--color-text);
  line-height: 1.6;
  font-size: 1rem;
}

h1, h2, h3, h4, h5, h6 {
  line-height: 1.2;
  font-weight: 900;
  margin-bottom: 1rem;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  border: 5px solid var(--color-border);
  padding: 1rem;
  background: var(--color-primary);
  color: var(--color-surface);
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
}

h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  border-left: 8px solid var(--color-accent);
  padding-left: 1rem;
  margin-top: 2.5rem;
  margin-bottom: 1.5rem;
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--color-primary);
  margin-top: 2rem;
  margin-bottom: 1rem;
}

h4 {
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

p {
  margin-bottom: 1rem;
}

a {
  color: var(--color-primary);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  transition: all 0.2s ease;
}

a:hover {
  color: var(--color-accent);
  text-decoration-thickness: 3px;
  background-color: rgba(255, 106, 61, 0.1);
}

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

header {
  background: var(--color-surface);
  border-bottom: 5px solid var(--color-border);
  padding: 1.5rem var(--space);
  margin-bottom: 2rem;
  box-shadow: 0 6px 0 var(--color-border);
}

header .site-name {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 900;
  color: var(--color-primary);
  text-decoration: none;
  display: inline-block;
  margin-bottom: 1rem;
  border: 4px solid var(--color-primary);
  padding: 0.5rem 1rem;
  background: var(--color-accent);
  color: var(--color-surface);
  box-shadow: 4px 4px 0 var(--color-border);
}

header .site-name:hover {
  background: var(--color-primary);
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--color-border);
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

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

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

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

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--space);
}

main {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
}

article {
  background: var(--color-surface);
  border: 4px solid var(--color-border);
  padding: 2rem;
  box-shadow: var(--shadow);
}

section {
  margin-bottom: 3rem;
}

aside {
  background: var(--color-accent);
  color: var(--color-surface);
  border: 4px solid var(--color-border);
  padding: 1.5rem;
  margin: 2rem 0;
  box-shadow: var(--shadow);
  font-weight: 600;
}

aside h3, aside h4 {
  color: var(--color-surface);
  border-left: 4px solid var(--color-surface);
  padding-left: 0.75rem;
}

blockquote {
  background: var(--color-background);
  border-left: 8px solid var(--color-secondary);
  padding: 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  font-size: 1.125rem;
  border-top: 3px solid var(--color-border);
  border-bottom: 3px solid var(--color-border);
  border-right: 3px solid var(--color-border);
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.1);
}

blockquote::before {
  content: '"';
  font-size: 3rem;
  color: var(--color-secondary);
  line-height: 0;
  display: block;
  margin-bottom: 0.5rem;
}

.breadcrumbs {
  background: var(--color-surface);
  border: 3px solid var(--color-border);
  padding: 0.75rem 1rem;
  margin-bottom: 2rem;
  font-size: 0.875rem;
  box-shadow: 3px 3px 0 var(--color-border);
}

.breadcrumbs nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.breadcrumbs a {
  text-decoration: none;
  font-weight: 600;
}

.breadcrumbs a::after {
  content: ' >';
  margin-left: 0.5rem;
  color: var(--color-text-muted);
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 4px solid var(--color-border);
  margin: 2rem 0;
  background: var(--color-surface);
  box-shadow: var(--shadow);
  font-size: 0.9375rem;
}

.table-wrapper {
  overflow-x: auto;
  margin: 2rem 0;
}

caption {
  font-weight: 900;
  font-size: 1.125rem;
  text-align: left;
  padding: 1rem;
  background: var(--color-primary);
  color: var(--color-surface);
  border: 4px solid var(--color-border);
  border-bottom: none;
}

thead {
  background: var(--color-secondary);
  color: var(--color-surface);
}

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

th:last-child {
  border-right: none;
}

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

td:last-child {
  border-right: none;
}

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

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

tbody tr:hover {
  background: rgba(255, 106, 61, 0.15);
}

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

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

summary {
  padding: 1.25rem;
  font-weight: 900;
  font-size: 1.125rem;
  cursor: pointer;
  list-style: none;
  background: var(--color-background);
  transition: all 0.3s ease;
  position: relative;
  padding-left: 3rem;
}

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

summary::before {
  content: '+';
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.75rem;
  font-weight: 900;
  color: var(--color-accent);
  transition: transform 0.3s ease;
}

details[open] summary::before {
  content: '−';
  transform: translateY(-50%) rotate(180deg);
}

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

summary:hover::before {
  color: var(--color-surface);
}

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

details[open] summary {
  border-bottom: 3px solid var(--color-border);
  background: var(--color-secondary);
  color: var(--color-surface);
}

details[open] summary::before {
  color: var(--color-surface);
}

details .details-content {
  padding: 1.5rem;
}

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

ol li, ul li {
  margin-bottom: 0.75rem;
  padding-left: 0.5rem;
}

ol {
  list-style: none;
  counter-reset: item;
}

ol li {
  counter-increment: item;
  position: relative;
}

ol li::before {
  content: counter(item);
  position: absolute;
  left: -2rem;
  top: 0;
  background: var(--color-accent);
  color: var(--color-surface);
  font-weight: 900;
  width: 1.75rem;
  height: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid var(--color-border);
  box-shadow: 2px 2px 0 var(--color-border);
}

ul li {
  position: relative;
}

ul li::marker {
  color: var(--color-accent);
  font-size: 1.5rem;
}

footer {
  background: var(--color-border);
  color: var(--color-surface);
  border-top: 5px solid var(--color-text);
  padding: 2rem var(--space);
  margin-top: 4rem;
  text-align: center;
  font-weight: 600;
}

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

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

button, .button {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: var(--color-accent);
  color: var(--color-surface);
  border: 4px solid var(--color-border);
  font-weight: 900;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 4px 4px 0 var(--color-border);
  font-family: var(--font-system);
}

button:hover, .button:hover {
  background: var(--color-primary);
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--color-border);
}

button:active, .button:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--color-border);
}

button:focus-visible, .button:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 4px;
}

@media (min-width: 768px) {
  :root {
    --space: 1.5rem;
  }

  header {
    padding: 2rem var(--space);
  }

  nav {
    gap: 1.5rem;
  }

  main {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  article {
    padding: 2.5rem;
  }

  .table-wrapper {
    overflow-x: visible;
  }
}

@media (min-width: 1024px) {
  :root {
    --space: 2rem;
  }

  main.with-sidebar {
    grid-template-columns: 1fr 300px;
  }

  main.with-sidebar aside {
    position: sticky;
    top: 2rem;
    align-self: start;
  }

  article {
    padding: 3rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  html {
    scroll-behavior: auto;
  }

  summary::before {
    transition: none;
  }
}

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

  header, footer, nav, aside {
    display: none;
  }

  article {
    border: none;
    box-shadow: none;
    padding: 0;
  }

  a {
    text-decoration: underline;
    color: black;
  }

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

  table {
    border: 2px solid black;
    box-shadow: none;
  }

  details {
    border: 2px solid black;
    box-shadow: none;
  }

  details summary {
    background: white;
  }

  details[open] .details-content {
    display: block;
  }

  h1, h2, h3 {
    page-break-after: avoid;
  }

  table, figure, img {
    page-break-inside: avoid;
  }
}

*:focus {
  outline: none;
}

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

img {
  max-width: 100%;
  height: auto;
  display: block;
  border: 4px solid var(--color-border);
  box-shadow: var(--shadow);
}

figure {
  margin: 2rem 0;
}

figcaption {
  padding: 0.75rem;
  background: var(--color-background);
  border: 3px solid var(--color-border);
  border-top: none;
  font-size: 0.875rem;
  font-style: italic;
}

code {
  background: var(--color-background);
  padding: 0.25rem 0.5rem;
  border: 2px solid var(--color-border);
  font-family: "Courier New", Courier, monospace;
  font-size: 0.875em;
}

pre {
  background: var(--color-background);
  border: 4px solid var(--color-border);
  padding: 1.5rem;
  overflow-x: auto;
  margin: 2rem 0;
  box-shadow: var(--shadow);
}

pre code {
  border: none;
  padding: 0;
  background: transparent;
}

hr {
  border: none;
  border-top: 4px solid var(--color-border);
  margin: 3rem 0;
  box-shadow: 0 4px 0 var(--color-border);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}