* {
  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: 'Trebuchet MS', 'Lucida Sans', 'Lucida Grande', sans-serif;
  --max-width: 1100px;
  --radius: 0;
}

body {
  font-family: var(--font-main);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  font-size: 16px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

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(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  clip-path: polygon(0 0, 100% 0, 90% 100%, 0% 100%);
}

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

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

h3 {
  font-size: 1.5rem;
  color: var(--color-secondary);
}

h4 {
  font-size: 1.25rem;
}

h5 {
  font-size: 1.1rem;
}

h6 {
  font-size: 1rem;
}

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: 700;
  color: var(--color-secondary);
}

em {
  font-style: italic;
}

blockquote {
  margin: 2rem 0;
  padding: 1.5rem 2rem;
  background-color: var(--color-surface);
  border-left: 6px solid var(--color-primary);
  position: relative;
  font-style: italic;
  color: var(--color-text-muted);
}

blockquote::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 40px 40px 0;
  border-color: transparent var(--color-accent) transparent transparent;
}

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

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

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

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
  position: relative;
  z-index: 1;
}

.site-nav a {
  padding: 0.75rem 1.5rem;
  background-color: var(--color-bg);
  border: 2px solid var(--color-border);
  text-transform: uppercase;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 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::after {
  display: none;
}

.site-nav a:hover {
  background-color: var(--color-primary);
  border-color: var(--color-secondary);
  color: var(--color-bg);
}

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

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

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 2rem;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

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

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

.breadcrumbs::before {
  content: '';
  display: inline-block;
  width: 20px;
  height: 20px;
  background-color: var(--color-primary);
  clip-path: polygon(0 50%, 100% 0, 100% 100%);
  margin-right: 0.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 30px, 100% 0, 100% 100%, 0 100%);
}

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

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

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

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

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

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

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

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

table th,
table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

table th {
  background-color: var(--color-secondary);
  color: var(--color-accent);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  position: relative;
}

table th::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 100%;
  height: 5px;
  background: repeating-linear-gradient(
    90deg,
    var(--color-primary) 0px,
    var(--color-primary) 10px,
    transparent 10px,
    transparent 20px
  );
}

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

table tr:hover {
  background-color: var(--color-accent);
  transition: background-color 0.2s ease;
}

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

details {
  margin: 1.5rem 0;
  border: 2px solid var(--color-border);
  background-color: var(--color-surface);
  position: relative;
}

details::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 5px;
  height: 100%;
  background-color: var(--color-primary);
  transition: width 0.2s ease;
}

details[open]::before {
  width: 10px;
  background: linear-gradient(180deg, var(--color-primary) 0%, var(--color-secondary) 100%);
}

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

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

summary::after {
  content: '';
  position: absolute;
  right: 1.5rem;
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
  width: 10px;
  height: 10px;
  border-right: 3px solid var(--color-primary);
  border-bottom: 3px solid var(--color-primary);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

details[open] summary::after {
  transform: translateY(-50%) rotate(225deg);
  border-color: var(--color-secondary);
}

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

details > *:not(summary) {
  padding: 1.5rem;
  animation: slideDown 0.2s ease;
}

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

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

  h1 {
    font-size: 3.5rem;
  }

  h2 {
    font-size: 2.5rem;
  }

  h3 {
    font-size: 1.75rem;
  }

  .site-header {
    padding: 3rem 2rem;
    padding-bottom: calc(3rem + 40px);
    margin-bottom: 40px;
  }

  .site-nav {
    gap: 1rem;
  }

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

  .container {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 2rem;
  }

  .container > * {
    grid-column: 1 / -1;
  }

  .card {
    padding: 2.5rem;
  }

  blockquote {
    margin: 3rem 0;
    padding: 2rem 3rem;
  }
}

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

  .site-header {
    padding: 4rem 2rem;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 50px), 0 100%);
    padding-bottom: calc(4rem + 50px);
    margin-bottom: 50px;
  }

  .site-nav {
    gap: 1.5rem;
  }

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

  .container {
    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;
  }
}

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

  .site-main {
    padding: 0;
  }

  .container {
    max-width: 100%;
    display: block;
  }

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

  a {
    text-decoration: underline;
  }

  a::after {
    display: none;
  }

  details {
    border: 1px solid var(--color-border);
  }

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