* {
  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 {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  font-size: 18px;
  line-height: 1.7;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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: 3rem;
  margin-bottom: 1.5rem;
  position: relative;
  padding-bottom: 1.5rem;
}

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: 2.25rem;
  margin-top: 2.5rem;
  margin-bottom: 1.25rem;
  position: relative;
  padding-left: 1.5rem;
}

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

h3 {
  font-size: 1.75rem;
  margin-top: 2rem;
}

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

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

h6 {
  font-size: 1.1rem;
  margin-top: 1rem;
  color: var(--color-text-muted);
}

p {
  margin-bottom: 1.25rem;
}

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: 3px;
}

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

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

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

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

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

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

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

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

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

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

.site-nav {
  display: flex;
  gap: 0;
}

.site-nav a {
  padding: 0.75rem 1.5rem;
  color: var(--color-text);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  position: relative;
  transition: color 0.2s ease, background-color 0.2s ease;
  clip-path: polygon(8% 0, 100% 0, 92% 100%, 0 100%);
  margin-right: -8px;
}

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

.site-nav a:first-child {
  clip-path: polygon(0 0, 100% 0, 92% 100%, 0 100%);
}

.site-main {
  min-height: calc(100vh - 400px);
}

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

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

.breadcrumbs a {
  color: var(--color-text-muted);
  position: relative;
  padding: 0.25rem 0.5rem;
}

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

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

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

.card:hover {
  border-color: var(--color-primary);
  box-shadow: 8px 8px 0 rgba(168, 136, 74, 0.15);
}

.card h3 {
  margin-top: 0;
}

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

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

table th {
  padding: 1rem;
  text-align: left;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  border-bottom: 3px solid var(--color-secondary);
}

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

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

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

details {
  margin: 1.5rem 0;
  border: 2px solid var(--color-border);
  background-color: var(--color-surface);
  overflow: hidden;
  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: 700;
  color: var(--color-secondary);
  background-color: var(--color-surface);
  transition: background-color 0.2s ease, color 0.2s ease;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}

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

summary::after {
  content: '▼';
  font-size: 0.8rem;
  transition: transform 0.2s ease;
  color: var(--color-primary);
}

details[open] summary::after {
  transform: rotate(-180deg);
}

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

details[open] summary {
  border-bottom: 2px solid var(--color-border);
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-surface) 100%);
}

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

.site-footer {
  background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-text) 100%);
  color: var(--color-accent);
  margin-top: 4rem;
  position: relative;
  clip-path: polygon(0 30px, 100% 0, 100% 100%, 0 100%);
  padding-top: 50px;
}

.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 30px;
  background: var(--color-bg);
}

.site-footer .container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  padding: 3rem 1rem 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);
  margin-top: 0;
  font-size: 1.25rem;
}

.site-footer p {
  font-size: 0.95rem;
  line-height: 1.6;
}

.hero-section {
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-surface) 50%, var(--color-accent) 100%);
  padding: 4rem 0;
  margin: -2rem -1rem 3rem;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 40px), 0 100%);
  border-bottom: 3px solid var(--color-primary);
}

.hero-section .container {
  padding: 2rem 1rem;
}

.hero-section h1 {
  font-size: 3.5rem;
  margin-bottom: 1rem;
}

.hero-section p {
  font-size: 1.25rem;
  color: var(--color-text-muted);
  max-width: 700px;
}

.grid-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin: 2rem 0;
}

.diagonal-section {
  position: relative;
  background-color: var(--color-surface);
  padding: 3rem 1rem;
  margin: 3rem 0;
  clip-path: polygon(0 30px, 100% 0, 100% calc(100% - 30px), 0 100%);
  border-top: 2px solid var(--color-border);
  border-bottom: 2px solid var(--color-border);
}

.button {
  display: inline-block;
  padding: 0.875rem 2rem;
  background-color: var(--color-primary);
  color: var(--color-bg);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  border: none;
  font-family: var(--font-main);
  clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
}

.button:hover {
  background-color: var(--color-secondary);
  box-shadow: 6px 6px 0 rgba(58, 47, 24, 0.2);
  transform: translate(-2px, -2px);
}

.button:focus-visible {
  outline: 2px solid var(--color-text);
  outline-offset: 3px;
}

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

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 4px 4px 0 rgba(168, 136, 74, 0.1);
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--color-secondary);
}

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

  h2 {
    font-size: 2.5rem;
  }

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

  .site-nav {
    gap: 0.5rem;
  }

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

  .container {
    padding: 3rem 2rem;
  }

  table {
    font-size: 1rem;
  }

  .hero-section {
    padding: 6rem 0;
    margin: -3rem -2rem 4rem;
  }

  .hero-section h1 {
    font-size: 4rem;
  }
}

@media (min-width: 1024px) {
  body {
    font-size: 19px;
  }

  h1 {
    font-size: 4rem;
  }

  h2 {
    font-size: 2.75rem;
  }

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

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

  .site-nav a {
    padding: 0.875rem 2rem;
    font-size: 1rem;
  }

  .card {
    padding: 2.5rem;
  }

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

  .hero-section {
    padding: 8rem 0;
  }

  .hero-section h1 {
    font-size: 4.5rem;
  }

  .hero-section p {
    font-size: 1.35rem;
  }
}

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

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

  summary::after {
    transition: none;
  }
}

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

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

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

  .card,
  details,
  blockquote {
    clip-path: none;
    page-break-inside: avoid;
  }

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

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