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

:root {
  --color-primary: #a8884a;
  --color-secondary: #6e5a2e;
  --color-accent: #f0e0b8;
  --color-bg: #fefdf8;
  --color-surface: #faf6ec;
  --color-text: #3a2f18;
  --color-text-muted: #8a7d62;
  --color-border: #ddd4be;
  --font-main: 'Verdana', 'Geneva', 'Tahoma', sans-serif;
  --max-width: 1100px;
  --radius: 0px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
  background-image: 
    linear-gradient(135deg, var(--color-surface) 25%, transparent 25%),
    linear-gradient(225deg, var(--color-surface) 25%, transparent 25%);
  background-size: 60px 60px;
  background-position: 0 0, 30px 30px;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: bold;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--color-secondary);
  font-family: 'Courier New', 'Courier', monospace;
  letter-spacing: -0.02em;
}

h1 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  position: relative;
  padding-bottom: 1rem;
}

h1::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, var(--color-primary) 0%, transparent 100%);
  clip-path: polygon(0 0, 100% 0, 95% 100%, 0% 100%);
}

h2 {
  font-size: 2rem;
  margin-top: 2rem;
  padding-left: 1rem;
  border-left: 4px solid var(--color-primary);
}

h3 {
  font-size: 1.5rem;
  margin-top: 1.5rem;
}

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

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

h6 {
  font-size: 1rem;
  margin-top: 1rem;
  color: var(--color-text-muted);
}

p {
  margin-bottom: 1rem;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  position: relative;
  transition: color 0.2s ease;
}

a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-secondary);
  transition: width 0.2s ease;
}

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

a:hover::after {
  width: 100%;
}

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

strong {
  font-weight: bold;
  color: var(--color-secondary);
}

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

blockquote {
  margin: 2rem 0;
  padding: 1.5rem;
  background-color: var(--color-surface);
  border-left: 6px solid var(--color-primary);
  position: relative;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%);
}

blockquote p {
  margin-bottom: 0;
  font-style: italic;
}

blockquote::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 40px;
  height: 40px;
  background-color: var(--color-accent);
  clip-path: polygon(100% 0, 100% 100%, 0 0);
}

::selection {
  background-color: var(--color-primary);
  color: var(--color-bg);
}

.site-header {
  background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-primary) 100%);
  color: var(--color-bg);
  padding: 2rem 1rem;
  position: relative;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 40px), 0 100%);
  margin-bottom: 3rem;
}

.site-header::after {
  content: '';
  position: absolute;
  bottom: -40px;
  left: 0;
  right: 0;
  height: 40px;
  background: linear-gradient(135deg, transparent 50%, var(--color-accent) 50%);
  pointer-events: none;
}

.site-header .container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.site-header h1 {
  color: var(--color-bg);
  margin: 0;
  padding: 0;
  font-size: 2.2rem;
  font-family: 'Courier New', 'Courier', monospace;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.site-header h1::after {
  display: none;
}

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

.site-nav a {
  color: var(--color-bg);
  padding: 0.5rem 1rem;
  background-color: rgba(255, 255, 255, 0.1);
  transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
  clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
  font-family: 'Courier New', 'Courier', monospace;
}

.site-nav a::after {
  display: none;
}

.site-nav a:hover {
  background-color: var(--color-bg);
  color: var(--color-secondary);
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.2);
}

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

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

.site-main {
  min-height: 60vh;
  margin-bottom: 4rem;
}

.breadcrumbs {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 2rem;
  padding: 0.75rem 1rem;
  background-color: var(--color-surface);
  font-size: 0.9rem;
  font-family: 'Courier New', 'Courier', monospace;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 50%, calc(100% - 12px) 100%, 0 100%);
}

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

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

.breadcrumbs::before {
  content: '→';
  color: var(--color-primary);
  font-weight: bold;
}

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

.breadcrumbs span::before {
  content: '/';
  margin: 0 0.5rem;
  color: var(--color-border);
}

.breadcrumbs span:first-child::before {
  display: none;
}

.card {
  background-color: var(--color-surface);
  padding: 1.5rem;
  margin-bottom: 2rem;
  border: 2px solid var(--color-border);
  position: relative;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
  clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 0 100%);
}

.card::before {
  content: '';
  position: absolute;
  top: -2px;
  right: -2px;
  width: 22px;
  height: 22px;
  background-color: var(--color-primary);
  clip-path: polygon(100% 0, 100% 100%, 0 0);
  transition: background-color 0.2s ease;
}

.card:hover {
  border-color: var(--color-primary);
  box-shadow: 8px 8px 0 var(--color-accent);
}

.card:hover::before {
  background-color: var(--color-secondary);
}

.card h3 {
  margin-top: 0;
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 2rem 0;
  background-color: var(--color-surface);
  border: 2px solid var(--color-border);
  font-family: 'Courier New', 'Courier', monospace;
  font-size: 0.9rem;
}

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

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

table th::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--color-accent);
}

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

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

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

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

details {
  margin: 1.5rem 0;
  background-color: var(--color-surface);
  border: 2px solid var(--color-border);
  transition: border-color 0.2s ease;
}

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

summary {
  padding: 1rem 1.5rem;
  cursor: pointer;
  font-weight: bold;
  background-color: var(--color-surface);
  transition: background-color 0.2s ease, color 0.2s ease;
  list-style: none;
  position: relative;
  font-family: 'Courier New', 'Courier', monospace;
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 0 100%);
}

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

summary::before {
  content: '▸';
  display: inline-block;
  margin-right: 0.5rem;
  transition: transform 0.2s ease;
  color: var(--color-primary);
  font-size: 1.2rem;
}

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

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

summary:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

details[open] summary {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  color: var(--color-bg);
  margin-bottom: 1rem;
}

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

details > *:not(summary) {
  padding: 0 1.5rem 1.5rem;
}

.site-footer {
  background-color: var(--color-secondary);
  color: var(--color-accent);
  padding: 3rem 1rem 2rem;
  margin-top: 4rem;
  position: relative;
  clip-path: polygon(0 40px, 100% 0, 100% 100%, 0 100%);
}

.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 50%;
  height: 40px;
  background: linear-gradient(135deg, var(--color-accent) 50%, transparent 50%);
  pointer-events: none;
}

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

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

.site-footer a:hover {
  color: var(--color-bg);
}

.site-footer a::after {
  background-color: var(--color-bg);
}

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

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

  h2 {
    font-size: 2.25rem;
  }

  h3 {
    font-size: 1.75rem;
  }

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

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

  .site-nav {
    gap: 1rem;
  }

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

  .card {
    padding: 2rem;
  }

  table {
    font-size: 1rem;
  }
}

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

  .site-header {
    padding: 3rem 1rem;
  }

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

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

  .breadcrumbs {
    font-size: 1rem;
  }
}

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

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

  .site-header {
    clip-path: none;
    background: white;
    color: black;
    border-bottom: 2px solid black;
  }

  .site-nav {
    display: none;
  }

  .site-footer {
    clip-path: none;
    background: white;
    color: black;
    border-top: 2px solid black;
  }

  .breadcrumbs {
    display: none;
  }

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

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

  a::after {
    display: none;
  }

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

  table {
    page-break-inside: avoid;
  }

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