* {
  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: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --max-width: 1100px;
  --radius: 12px;
}

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 {
  line-height: 1.2;
  font-weight: 700;
  color: var(--color-secondary);
  margin-bottom: 1rem;
}

h1 {
  font-size: 2.5rem;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
}

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

h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 4px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  clip-path: polygon(0 0, 95% 0, 100% 100%, 5% 100%);
}

h3 {
  font-size: 1.5rem;
}

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;
  transition: color 0.2s ease, background-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;
  color: var(--color-text);
}

blockquote {
  margin: 1.5rem 0;
  padding: 1.5rem;
  background: var(--color-surface);
  border-left: 6px solid var(--color-primary);
  font-style: italic;
  color: var(--color-text-muted);
  clip-path: polygon(0 0, 100% 0, 98% 100%, 0 100%);
  box-shadow: 2px 2px 8px rgba(106, 90, 46, 0.08);
}

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

.site-header {
  background: linear-gradient(135deg, var(--color-surface) 0%, var(--color-accent) 100%);
  box-shadow: 0 4px 12px rgba(106, 90, 46, 0.1);
  position: relative;
  clip-path: polygon(0 0, 100% 0, 100% 92%, 0 100%);
  padding-bottom: 2rem;
}

.site-header::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 8px;
  background: var(--color-primary);
  clip-path: polygon(0 0, 100% 0, 99% 100%, 1% 100%);
}

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

.site-nav .logo {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

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

.site-nav a {
  padding: 0.5rem 1rem;
  display: block;
  position: relative;
}

.site-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--color-primary);
  transition: width 0.2s ease, left 0.2s ease;
}

.site-nav a:hover::after {
  width: 100%;
  left: 0;
}

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

.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;
  color: var(--color-text-muted);
  flex-wrap: wrap;
}

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

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

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

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  background: var(--color-surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(106, 90, 46, 0.08);
}

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

table th {
  padding: 1rem;
  text-align: left;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
}

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-color: rgba(240, 224, 184, 0.2);
}

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

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

details {
  margin: 1.5rem 0;
  background: var(--color-surface);
  border: 2px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(106, 90, 46, 0.08);
  clip-path: polygon(0 0, 100% 0, 99% 100%, 1% 100%);
}

summary {
  padding: 1.25rem;
  cursor: pointer;
  font-weight: 700;
  color: var(--color-secondary);
  background: linear-gradient(90deg, var(--color-surface) 0%, var(--color-accent) 100%);
  transition: background-color 0.2s ease, color 0.2s ease;
  list-style: none;
  position: relative;
  user-select: none;
}

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

summary::before {
  content: '▶';
  position: absolute;
  right: 1.25rem;
  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-primary);
}

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

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

.card {
  background: var(--color-surface);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: 0 4px 16px rgba(106, 90, 46, 0.1);
  margin-bottom: 2rem;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  border: 1px solid var(--color-border);
  position: relative;
}

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

.card:hover {
  box-shadow: 0 8px 24px rgba(106, 90, 46, 0.15);
  transform: translateY(-2px);
}

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

.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: var(--color-primary);
  clip-path: polygon(1% 0, 99% 0, 100% 100%, 0 100%);
}

.site-footer a {
  color: var(--color-accent);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}

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

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

button, input[type="submit"], input[type="button"] {
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  color: var(--color-bg);
  border: none;
  padding: 0.75rem 2rem;
  font-family: var(--font-main);
  font-size: 1rem;
  font-weight: 700;
  border-radius: var(--radius);
  cursor: pointer;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  box-shadow: 0 2px 8px rgba(106, 90, 46, 0.2);
  clip-path: polygon(2% 0, 100% 0, 98% 100%, 0 100%);
}

button:hover, input[type="submit"]:hover, input[type="button"]:hover {
  box-shadow: 0 4px 16px rgba(106, 90, 46, 0.3);
  transform: translateY(-1px);
}

button:focus-visible, input[type="submit"]:focus-visible, input[type="button"]:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

input[type="text"], input[type="email"], input[type="search"], textarea, select {
  width: 100%;
  padding: 0.75rem;
  font-family: var(--font-main);
  font-size: 1rem;
  border: 2px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-bg);
  color: var(--color-text);
  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: 0 0 0 3px rgba(168, 136, 74, 0.1);
}

ul:not(.site-nav ul), ol {
  margin: 1rem 0 1rem 2rem;
}

li {
  margin-bottom: 0.5rem;
}

code {
  background: var(--color-accent);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-size: 0.9em;
  color: var(--color-secondary);
}

pre {
  background: var(--color-surface);
  padding: 1.5rem;
  border-radius: var(--radius);
  overflow-x: auto;
  border-left: 4px solid var(--color-primary);
  margin: 1.5rem 0;
  clip-path: polygon(0 0, 100% 0, 99% 100%, 0 100%);
}

pre code {
  background: none;
  padding: 0;
}

hr {
  border: none;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--color-primary), transparent);
  margin: 2rem 0;
  clip-path: polygon(5% 0, 95% 0, 90% 100%, 10% 100%);
}

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

  h2 {
    font-size: 2.25rem;
  }

  .site-nav {
    flex-wrap: nowrap;
  }

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

  .card {
    padding: 2.5rem;
  }

  table {
    font-size: 1rem;
  }
}

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

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

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

  .container {
    display: grid;
    gap: 2rem;
  }
}

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

  details > *:not(summary) {
    animation: none;
  }
}

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

  .site-main {
    padding: 0;
  }

  .container {
    max-width: 100%;
  }

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

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

  body {
    background: white;
    color: black;
  }
}