* {
  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: 'Georgia', 'Times New Roman', 'Palatino', 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.7;
  color: var(--color-text);
  background-color: var(--color-bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

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, 90% 0, 100% 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.2rem;
  width: 0;
  height: 0;
  border-left: 12px solid var(--color-primary);
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
}

h3 {
  font-size: 1.5rem;
  margin-top: 1.5rem;
}

h4 {
  font-size: 1.25rem;
  margin-top: 1.25rem;
}

h5 {
  font-size: 1.125rem;
  margin-top: 1rem;
}

h6 {
  font-size: 1rem;
  margin-top: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

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:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

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

em {
  font-style: italic;
}

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

blockquote {
  margin: 2rem 0;
  padding: 1.5rem 1.5rem 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);
  clip-path: polygon(0 0, 100% 0, 98% 100%, 0 100%);
}

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

.site-header {
  background: linear-gradient(135deg, var(--color-surface) 0%, var(--color-accent) 100%);
  border-bottom: 3px solid var(--color-border);
  position: relative;
}

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

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

.site-header h1 {
  font-size: 1.75rem;
  margin: 0;
  color: var(--color-secondary);
}

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

.site-nav {
  background-color: var(--color-secondary);
  position: relative;
  box-shadow: 0 4px 6px rgba(58, 47, 24, 0.1);
}

.site-nav::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent 0%, rgba(168, 136, 74, 0.1) 50%, transparent 100%);
  pointer-events: none;
}

.site-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  padding: 0;
  margin: 0;
  position: relative;
}

.site-nav li {
  flex: 1 1 auto;
  min-width: 120px;
  position: relative;
}

.site-nav li::after {
  content: '';
  position: absolute;
  right: 0;
  top: 25%;
  width: 2px;
  height: 50%;
  background: linear-gradient(180deg, transparent, var(--color-primary), transparent);
}

.site-nav li:last-child::after {
  display: none;
}

.site-nav a {
  display: block;
  padding: 1rem 1.5rem;
  color: var(--color-accent);
  text-align: center;
  font-weight: 600;
  transition: background-color 0.2s ease, color 0.2s ease;
  position: relative;
  overflow: hidden;
}

.site-nav a::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: -100%;
  width: 100%;
  height: 3px;
  background: var(--color-primary);
  transition: left 0.2s ease;
  clip-path: polygon(10% 0, 100% 0, 90% 100%, 0% 100%);
}

.site-nav a:hover {
  background-color: rgba(168, 136, 74, 0.2);
  color: var(--color-bg);
}

.site-nav a:hover::before {
  left: 0;
}

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

.site-main {
  flex: 1;
  padding: 3rem 0;
  position: relative;
}

.breadcrumbs {
  margin-bottom: 2rem;
  padding: 0.75rem 1rem;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  font-size: 0.875rem;
  position: relative;
  clip-path: polygon(0 0, 99% 0, 100% 100%, 0 100%);
}

.breadcrumbs a {
  color: var(--color-text-muted);
  transition: color 0.2s ease;
}

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

.breadcrumbs span {
  margin: 0 0.5rem;
  color: var(--color-text-muted);
}

.card {
  background-color: 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;
  position: relative;
  clip-path: polygon(0 0, 100% 0, 100% 95%, 98% 100%, 0 100%);
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 0;
  height: 0;
  border-top: 40px solid var(--color-accent);
  border-left: 40px solid transparent;
  transition: border-top-color 0.2s ease;
}

.card:hover {
  box-shadow: 0 8px 16px rgba(58, 47, 24, 0.15);
  border-color: var(--color-primary);
}

.card:hover::before {
  border-top-color: var(--color-primary);
}

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

table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  background-color: var(--color-bg);
  border: 2px solid var(--color-border);
  position: relative;
}

table::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 5px;
  height: 100%;
  background: linear-gradient(180deg, var(--color-primary), var(--color-secondary));
}

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

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

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

td {
  padding: 1rem;
  border-bottom: 1px solid var(--color-border);
  transition: background-color 0.2s ease;
}

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

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

tbody tr:hover td {
  color: var(--color-secondary);
}

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

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

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

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

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

summary::before {
  content: '';
  position: absolute;
  left: 1.5rem;
  top: 50%;
  transform: translateY(-50%) rotate(0deg);
  width: 0;
  height: 0;
  border-left: 8px solid var(--color-primary);
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  transition: transform 0.2s ease, border-left-color 0.2s ease;
}

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

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

details div {
  padding: 1.5rem;
  border-top: 2px solid var(--color-border);
  animation: slideDown 0.2s ease;
}

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

.site-footer {
  background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-primary) 100%);
  color: var(--color-accent);
  padding: 3rem 0 1.5rem;
  margin-top: 4rem;
  position: relative;
  border-top: 4px solid var(--color-primary);
}

.site-footer::before {
  content: '';
  position: absolute;
  top: -30px;
  left: 0;
  width: 100%;
  height: 30px;
  background: var(--color-bg);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 80%);
}

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

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

.site-footer a {
  color: var(--color-accent);
  transition: color 0.2s ease;
}

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

.site-footer h3 {
  color: var(--color-bg);
  font-size: 1.25rem;
  margin-bottom: 1rem;
  position: relative;
  padding-bottom: 0.5rem;
}

.site-footer h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 2px;
  background: var(--color-accent);
  clip-path: polygon(0 0, 90% 0, 100% 100%, 0% 100%);
}

.site-footer p {
  line-height: 1.8;
  margin-bottom: 0.75rem;
}

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

  h2 {
    font-size: 2.25rem;
  }

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

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

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

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

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

  .card {
    padding: 2.5rem;
  }
}

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

  .site-header .container {
    padding: 2.5rem 2rem;
  }

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

  .container {
    padding: 0 2rem;
  }

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

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

  .card {
    padding: 3rem;
  }

  table {
    font-size: 1rem;
  }
}

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

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

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

  .site-header {
    border-bottom: 2px solid black;
  }

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

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

  table {
    page-break-inside: avoid;
  }

  a {
    color: black;
    text-decoration: underline;
  }
}