* {
  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);
  background-image: 
    linear-gradient(45deg, transparent 48%, var(--color-accent) 48%, var(--color-accent) 52%, transparent 52%),
    linear-gradient(-45deg, transparent 48%, var(--color-accent) 48%, var(--color-accent) 52%, transparent 52%);
  background-size: 80px 80px;
  background-position: 0 0, 40px 0;
  background-attachment: fixed;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1 {
  font-size: 2.5rem;
  line-height: 1.2;
  font-weight: 700;
  color: var(--color-secondary);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: -0.5px;
  position: relative;
}

h1::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: var(--color-primary);
  margin-top: 0.5rem;
  clip-path: polygon(0 0, 90% 0, 100% 100%, 10% 100%);
}

h2 {
  font-size: 2rem;
  line-height: 1.3;
  font-weight: 700;
  color: var(--color-secondary);
  margin-bottom: 0.875rem;
  margin-top: 2rem;
  text-transform: uppercase;
  letter-spacing: -0.3px;
}

h3 {
  font-size: 1.5rem;
  line-height: 1.4;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0.75rem;
  margin-top: 1.5rem;
}

h4 {
  font-size: 1.25rem;
  line-height: 1.4;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0.625rem;
  margin-top: 1.25rem;
}

h5 {
  font-size: 1.125rem;
  line-height: 1.5;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0.5rem;
  margin-top: 1rem;
}

h6 {
  font-size: 1rem;
  line-height: 1.5;
  font-weight: 600;
  color: var(--color-text-muted);
  margin-bottom: 0.5rem;
  margin-top: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

p {
  margin-bottom: 1rem;
}

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

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

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

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

em {
  font-style: italic;
}

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

blockquote p:last-child {
  margin-bottom: 0;
}

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

.site-header {
  background: var(--color-surface);
  border-bottom: 3px solid var(--color-border);
  position: relative;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 calc(100% - 8px));
  box-shadow: 0 4px 12px rgba(58, 47, 24, 0.08);
}

.site-header::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 200px;
  height: 100%;
  background: linear-gradient(135deg, transparent 40%, var(--color-accent) 40%, var(--color-accent) 60%, transparent 60%);
  opacity: 0.3;
  pointer-events: none;
}

.site-header .container {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 2rem;
  padding: 1.25rem;
}

.site-header h1 {
  margin: 0;
  font-size: 1.75rem;
}

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

.site-nav {
  justify-self: end;
}

.site-nav ul {
  list-style: none;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.site-nav li {
  margin: 0;
}

.site-nav a {
  display: block;
  padding: 0.625rem 1.25rem;
  background: var(--color-bg);
  color: var(--color-text);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.875rem;
  letter-spacing: 0.5px;
  border: 2px solid var(--color-border);
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}

.site-nav a:hover {
  background: var(--color-primary);
  color: var(--color-bg);
  border-color: var(--color-primary);
  box-shadow: 3px 3px 0 var(--color-secondary);
}

.site-main {
  flex: 1;
  padding: 2.5rem 0;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
  background: var(--color-bg);
  position: relative;
}

.breadcrumbs {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
  color: var(--color-text-muted);
  font-family: 'Courier New', monospace;
  padding: 0.5rem 0.75rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 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: 700;
}

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

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

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

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

.card h2:first-child,
.card h3:first-child {
  margin-top: 0;
}

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

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

thead th {
  padding: 0.875rem 1rem;
  text-align: left;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.875rem;
  border-bottom: 3px solid var(--color-primary);
  position: relative;
}

thead th::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-primary) 50%, transparent 50%);
  background-size: 8px 100%;
}

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

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

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

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

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

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

details {
  margin: 1.5rem 0;
  border: 2px solid var(--color-border);
  background: var(--color-surface);
  clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
}

summary {
  padding: 1rem 1.25rem;
  cursor: pointer;
  font-weight: 700;
  color: var(--color-secondary);
  background: var(--color-accent);
  transition: background-color 0.2s ease, color 0.2s ease;
  user-select: none;
  position: relative;
  text-transform: uppercase;
  font-size: 0.9375rem;
  letter-spacing: 0.5px;
}

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

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

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

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

details[open] summary {
  border-bottom: 2px solid var(--color-border);
}

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

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

.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: repeating-linear-gradient(
    90deg,
    var(--color-primary) 0px,
    var(--color-primary) 20px,
    transparent 20px,
    transparent 40px
  );
}

.site-footer a {
  color: var(--color-accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.site-footer a:hover {
  color: var(--color-bg);
  text-decoration-thickness: 2px;
}

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

@media (min-width: 768px) {
  body {
    font-size: 17px;
  }

  h1 {
    font-size: 3rem;
  }

  h2 {
    font-size: 2.25rem;
  }

  h3 {
    font-size: 1.75rem;
  }

  .site-header .container {
    padding: 1.5rem 1.25rem;
  }

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

  .site-nav ul {
    gap: 0.75rem;
  }

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

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

  .card {
    padding: 2rem;
  }

  table {
    font-size: 1rem;
  }

  thead th {
    padding: 1rem 1.25rem;
  }

  tbody td {
    padding: 0.875rem 1.25rem;
  }
}

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

  h2 {
    font-size: 2.5rem;
  }

  .site-header .container {
    grid-template-columns: auto 1fr;
    gap: 3rem;
  }

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

  .site-nav ul {
    gap: 1rem;
  }

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

  .container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

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

  summary::before {
    transition: none;
  }
}

@media print {
  body {
    background: white;
    background-image: none;
  }

  .site-header {
    border-bottom: 2px solid black;
    box-shadow: none;
    clip-path: none;
  }

  .site-nav {
    display: none;
  }

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

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

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

  .card::before,
  .card::after {
    display: none;
  }

  a {
    text-decoration: underline;
  }

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

  table {
    border: 1px solid black;
  }

  thead {
    background: #e0e0e0;
    color: black;
  }

  tbody tr {
    page-break-inside: avoid;
  }

  details {
    border: 1px solid black;
    clip-path: none;
  }

  details summary {
    background: #f0f0f0;
  }

  details[open] summary::before {
    transform: none;
  }
}