* {
  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: 0;
}

body {
  font-family: var(--font-main);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

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

h1 {
  font-size: 2.5rem;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  position: relative;
  padding-bottom: 1rem;
}

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

h2 {
  font-size: 2rem;
  position: relative;
  padding-left: 1.5rem;
}

h2::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 6px;
  height: 100%;
  background: var(--color-primary);
  clip-path: polygon(0 0, 100% 0, 100% 80%, 0 100%);
}

h3 {
  font-size: 1.5rem;
  font-family: 'Courier New', 'Courier', monospace;
}

h4 {
  font-size: 1.25rem;
  color: var(--color-primary);
}

h5 {
  font-size: 1.1rem;
}

h6 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

p {
  margin-bottom: 1rem;
}

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;
  position: relative;
}

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

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

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

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

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

blockquote::before {
  content: '"';
  font-size: 4rem;
  position: absolute;
  top: -10px;
  left: 20px;
  color: var(--color-accent);
  font-family: 'Georgia', serif;
  line-height: 1;
}

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

.site-header {
  background: linear-gradient(135deg, var(--color-surface) 0%, var(--color-accent) 100%);
  border-bottom: 3px solid var(--color-border);
  position: relative;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 calc(100% - 20px));
  padding-bottom: 20px;
}

.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 1rem;
  flex-wrap: wrap;
}

.site-header h1 {
  margin: 0;
  font-size: 1.8rem;
  color: var(--color-secondary);
  font-family: 'Courier New', 'Courier', monospace;
}

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

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

.site-nav a {
  padding: 0.6rem 1.2rem;
  background-color: var(--color-bg);
  border: 2px solid var(--color-border);
  color: var(--color-text);
  text-transform: uppercase;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  transition: all 0.2s ease;
  border-bottom: 2px solid var(--color-border);
  clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
}

.site-nav a:hover {
  background-color: var(--color-primary);
  color: var(--color-bg);
  border-color: var(--color-primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(58, 47, 24, 0.15);
}

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

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

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
}

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

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

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

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

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

.card::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  width: 20px;
  height: 20px;
  background: var(--color-primary);
  clip-path: polygon(0 0, 100% 0, 0 100%);
}

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

.card h3 {
  margin-top: 0;
  color: var(--color-secondary);
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 2rem 0;
  background: var(--color-surface);
  border: 2px solid var(--color-border);
  overflow: hidden;
}

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

table th {
  padding: 1rem;
  text-align: left;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  border-right: 2px solid rgba(254, 253, 248, 0.2);
  font-family: 'Courier New', 'Courier', monospace;
}

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

table td {
  padding: 1rem;
  border-bottom: 1px solid var(--color-border);
  border-right: 1px solid var(--color-border);
  transition: background-color 0.2s ease;
}

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

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

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

details {
  background: var(--color-surface);
  border: 2px solid var(--color-border);
  margin-bottom: 1rem;
  position: relative;
  clip-path: polygon(15px 0, 100% 0, 100% 100%, 0 100%, 0 15px);
}

summary {
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  font-weight: 700;
  color: var(--color-secondary);
  list-style: none;
  transition: background-color 0.2s ease, color 0.2s ease;
  position: relative;
  user-select: none;
  font-family: 'Courier New', 'Courier', monospace;
}

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

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

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

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

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

details div {
  padding: 1.5rem;
  border-top: 2px solid var(--color-border);
  animation: slideDown 0.2s ease;
}

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

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

.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 30px;
  background: linear-gradient(135deg, transparent 0%, transparent 48%, var(--color-secondary) 48%, var(--color-secondary) 100%);
}

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

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

.site-footer a:hover {
  color: var(--color-bg);
  border-bottom-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.5rem;
  }

  .site-header .container {
    padding: 2rem 2rem;
  }

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

  .site-nav {
    gap: 1rem;
  }

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

  .container {
    padding: 0 2rem;
  }

  .card {
    padding: 2.5rem;
  }

  .site-footer {
    padding: 4rem 2rem 3rem;
  }

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

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

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

  .site-nav a {
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
  }

  .site-main {
    padding: 5rem 2rem;
  }

  .card {
    padding: 3rem;
  }

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

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

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

  details div {
    animation: none;
  }

  .card:hover {
    transform: none;
  }

  .site-nav a:hover {
    transform: none;
  }
}

@media print {
  .site-nav,
  .site-footer,
  .breadcrumbs {
    display: none;
  }

  .site-header {
    border-bottom: 2px solid var(--color-text);
    clip-path: none;
    background: none;
  }

  .site-main {
    padding: 1rem 0;
    max-width: 100%;
  }

  .card {
    border: 1px solid var(--color-text);
    box-shadow: none;
    page-break-inside: avoid;
    clip-path: none;
  }

  .card::before {
    display: none;
  }

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

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

  table {
    page-break-inside: avoid;
  }

  details {
    clip-path: none;
  }

  details[open] summary {
    page-break-after: avoid;
  }
}