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

body {
  font-family: var(--font-main);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  font-size: 16px;
}

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, 98% 100%, 0 100%);
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  padding-right: 2%;
}

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

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

h3 {
  font-size: 1.5rem;
}

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

blockquote {
  background: var(--color-surface);
  border-left: 4px solid var(--color-primary);
  padding: 1.5rem;
  margin: 1.5rem 0;
  position: relative;
  clip-path: polygon(0 0, 100% 0, 99% 100%, 0 100%);
  box-shadow: 2px 2px 8px rgba(58, 47, 24, 0.08);
}

blockquote::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 40px;
  height: 40px;
  background: var(--color-accent);
  clip-path: polygon(100% 0, 100% 100%, 0 0);
}

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

.site-header {
  background: var(--color-surface);
  box-shadow: 0 4px 12px rgba(58, 47, 24, 0.1);
  position: relative;
  clip-path: polygon(0 0, 100% 0, 100% 95%, 0 100%);
  padding-bottom: 1rem;
}

.site-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-accent) 50%, var(--color-primary) 100%);
}

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

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

.site-nav a {
  font-weight: 500;
  padding: 0.5rem 1rem;
  display: block;
  position: relative;
  overflow: hidden;
}

.site-nav a::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--color-primary);
  transform: translateX(-100%) skewX(-20deg);
  transition: transform 0.2s ease;
}

.site-nav a:hover::before {
  transform: translateX(0) skewX(-20deg);
}

.site-main {
  min-height: 60vh;
  padding: 3rem 1.5rem;
}

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

.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);
  clip-path: polygon(0 0, 95% 0, 100% 100%, 0 100%);
  padding-right: 0.5rem;
}

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

.breadcrumbs::after {
  content: '/';
  margin: 0 0.25rem;
}

.breadcrumbs:last-child::after {
  display: none;
}

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 3px 3px 12px rgba(58, 47, 24, 0.08);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
  clip-path: polygon(0 0, 100% 0, 99.5% 100%, 0 100%);
  position: relative;
}

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

.card:hover {
  box-shadow: 5px 5px 20px rgba(58, 47, 24, 0.12);
  border-color: var(--color-primary);
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  background: var(--color-surface);
  box-shadow: 2px 2px 10px rgba(58, 47, 24, 0.06);
  clip-path: polygon(0 0, 100% 0, 99.8% 100%, 0 100%);
}

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

table th {
  padding: 1rem;
  text-align: left;
  font-weight: 700;
  border-bottom: 2px 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: var(--color-bg);
}

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

details {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  overflow: hidden;
  clip-path: polygon(0 0, 100% 0, 99.5% 100%, 0 100%);
  box-shadow: 2px 2px 8px rgba(58, 47, 24, 0.06);
}

summary {
  padding: 1.25rem;
  cursor: pointer;
  font-weight: 600;
  background: var(--color-surface);
  transition: background-color 0.2s ease, color 0.2s ease;
  list-style: none;
  position: relative;
  clip-path: polygon(0 0, 99% 0, 100% 100%, 0 100%);
}

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

summary::before {
  content: '▸';
  display: inline-block;
  margin-right: 0.5rem;
  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-primary);
  background: var(--color-accent);
}

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

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

.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-accent) 100%);
}

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

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

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

button, input[type="submit"], input[type="button"] {
  background: var(--color-primary);
  color: var(--color-bg);
  border: none;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-main);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: var(--radius);
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
  clip-path: polygon(0 0, 98% 0, 100% 100%, 0 100%);
  box-shadow: 2px 2px 8px rgba(58, 47, 24, 0.15);
}

button:hover, input[type="submit"]:hover, input[type="button"]:hover {
  background: var(--color-secondary);
  box-shadow: 3px 3px 12px rgba(58, 47, 24, 0.25);
}

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"], input[type="tel"], input[type="url"], textarea, select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
  color: var(--color-text);
  font-family: var(--font-main);
  font-size: 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  clip-path: polygon(0 0, 99.5% 0, 100% 100%, 0 100%);
}

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

textarea {
  min-height: 120px;
  resize: vertical;
}

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

  h2 {
    font-size: 2.25rem;
  }

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

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

  .card {
    padding: 2.5rem;
  }

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

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

  h2 {
    font-size: 2.5rem;
  }

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

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

  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-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 {
    text-decoration: underline;
  }

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