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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  font-size: 1rem;
  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%),
    linear-gradient(45deg, var(--color-surface) 25%, transparent 25%),
    linear-gradient(315deg, var(--color-surface) 25%, transparent 25%);
  background-size: 80px 80px;
  background-position: 40px 0, 40px 0, 0 0, 0 0;
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

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

h1 {
  font-size: 2.5rem;
  clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 0 100%);
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  color: var(--color-bg);
  padding: 1.5rem 2rem;
  margin-bottom: 2rem;
}

h2 {
  font-size: 2rem;
  position: relative;
  padding-bottom: 0.5rem;
}

h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 4px;
  background: var(--color-primary);
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 100%, 0 100%);
}

h3 {
  font-size: 1.5rem;
  font-family: 'Courier New', monospace;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

h4 {
  font-size: 1.25rem;
}

h5 {
  font-size: 1.125rem;
}

h6 {
  font-size: 1rem;
}

p {
  margin-bottom: 1rem;
}

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

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

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

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

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

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

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

blockquote::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, transparent 0%, rgba(168, 136, 74, 0.05) 100%);
  pointer-events: none;
}

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

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

.site-header {
  background: var(--color-surface);
  border-bottom: 3px solid var(--color-border);
  position: relative;
}

.site-header::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 100%;
  height: 10px;
  background: linear-gradient(135deg, var(--color-accent) 25%, transparent 25%, transparent 50%, var(--color-accent) 50%, var(--color-accent) 75%, transparent 75%, transparent);
  background-size: 20px 20px;
}

.site-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 1rem;
  max-width: var(--max-width);
  margin: 0 auto;
  flex-wrap: wrap;
  gap: 1rem;
}

.site-nav .logo {
  font-size: 1.5rem;
  font-weight: bold;
  font-family: 'Courier New', monospace;
  color: var(--color-secondary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: linear-gradient(45deg, var(--color-primary), var(--color-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

.site-nav a {
  font-family: 'Courier New', monospace;
  text-transform: uppercase;
  font-size: 0.875rem;
  letter-spacing: 0.05em;
  padding: 0.5rem 1rem;
  position: relative;
}

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

.site-nav a::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  background: var(--color-accent);
  z-index: -1;
  transition: width 0.2s ease;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 0 100%);
}

.site-nav a:hover::before {
  width: 100%;
}

.site-main {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 1rem;
}

.site-footer {
  background: var(--color-secondary);
  color: var(--color-accent);
  padding: 3rem 1rem 2rem;
  margin-top: 4rem;
  position: relative;
}

.site-footer::before {
  content: '';
  position: absolute;
  top: -30px;
  left: 0;
  width: 100%;
  height: 30px;
  background: var(--color-secondary);
  clip-path: polygon(0 100%, 0 30px, 50px 0, 100px 30px, 150px 0, 200px 30px, 250px 0, 300px 30px, 350px 0, 400px 30px, 450px 0, 500px 30px, 550px 0, 600px 30px, 650px 0, 700px 30px, 750px 0, 800px 30px, 850px 0, 900px 30px, 950px 0, 1000px 30px, 1050px 0, 1100px 30px, 1150px 0, 1200px 30px, 1250px 0, 1300px 30px, 1350px 0, 1400px 30px, 100% 0, 100% 100%);
}

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

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

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

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

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

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

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

.breadcrumbs span:last-child {
  color: var(--color-text);
  font-weight: bold;
}

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

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

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

.card:hover::before {
  opacity: 1;
}

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: var(--color-secondary);
  color: var(--color-accent);
  font-family: 'Courier New', monospace;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.875rem;
}

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

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

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

table tbody tr:nth-child(even) {
  background: rgba(168, 136, 74, 0.05);
}

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

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

summary {
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  font-weight: bold;
  font-family: 'Courier New', monospace;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--color-surface);
  transition: background-color 0.2s ease, color 0.2s ease;
  user-select: none;
  position: relative;
}

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

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

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

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

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

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

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

button {
  font-family: var(--font-main);
  font-size: 1rem;
  padding: 0.75rem 2rem;
  background: var(--color-primary);
  color: var(--color-bg);
  border: none;
  cursor: pointer;
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
  font-weight: bold;
  font-family: 'Courier New', monospace;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
}

button:hover {
  background: var(--color-secondary);
  box-shadow: 4px 4px 0 var(--color-accent);
}

input,
textarea,
select {
  font-family: var(--font-main);
  font-size: 1rem;
  padding: 0.75rem 1rem;
  border: 2px solid var(--color-border);
  background: var(--color-bg);
  color: var(--color-text);
  width: 100%;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 4px 4px 0 var(--color-accent);
}

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

  h2 {
    font-size: 2.25rem;
  }

  h3 {
    font-size: 1.75rem;
  }

  .site-nav {
    padding: 2rem 2rem;
  }

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

  .card {
    padding: 2.5rem;
  }

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

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

  .site-main {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .card {
    padding: 3rem;
  }

  blockquote {
    padding: 2rem 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;
  }
}

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

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

  body {
    background: white;
    color: black;
  }

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

  a::after {
    content: " (" attr(href) ")";
  }

  h1 {
    color: black;
    background: none;
    clip-path: none;
  }
}