* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --color-primary: #65742e;
  --color-secondary: #3f4a1c;
  --color-accent: #e2e88c;
  --color-bg: #fdfef6;
  --color-surface: #f5f6ea;
  --color-text: #2b3212;
  --color-text-muted: #7a7f5e;
  --color-border: #d4d7be;
  --font-main: 'Georgia', 'Times New Roman', 'Palatino', serif;
  --max-width: 1100px;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(63, 74, 28, 0.08), 0 1px 2px rgba(63, 74, 28, 0.06);
  --shadow-md: 0 4px 6px rgba(63, 74, 28, 0.1), 0 2px 4px rgba(63, 74, 28, 0.06);
  --shadow-lg: 0 10px 15px rgba(63, 74, 28, 0.12), 0 4px 6px rgba(63, 74, 28, 0.08);
  --shadow-xl: 0 20px 25px rgba(63, 74, 28, 0.15), 0 10px 10px rgba(63, 74, 28, 0.04);
}

body {
  font-family: var(--font-main);
  font-size: 18px;
  line-height: 1.7;
  color: var(--color-text);
  background: linear-gradient(135deg, var(--color-bg) 0%, #f9fae8 100%);
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

h1, h2, h3, h4, h5, h6 {
  line-height: 1.3;
  font-weight: 700;
  color: var(--color-secondary);
  margin-bottom: 0.75em;
}

h1 {
  font-size: 2.5rem;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 4px rgba(63, 74, 28, 0.08);
}

h2 {
  font-size: 2rem;
  letter-spacing: -0.01em;
}

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

h4 {
  font-size: 1.25rem;
}

h5 {
  font-size: 1.1rem;
}

h6 {
  font-size: 1rem;
  color: var(--color-text);
}

p {
  margin-bottom: 1.25em;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
  font-weight: 500;
}

a:hover {
  color: var(--color-secondary);
  border-bottom-color: var(--color-accent);
}

a:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: 3px;
}

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

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

blockquote {
  margin: 2em 0;
  padding: 1.5em 2em;
  background: linear-gradient(135deg, var(--color-surface) 0%, #f8f9e5 100%);
  border-left: 5px solid var(--color-primary);
  border-radius: 0 var(--radius) var(--radius) 0;
  box-shadow: var(--shadow-md);
  font-style: italic;
  color: var(--color-text-muted);
  position: relative;
}

blockquote::before {
  content: '"';
  font-size: 4rem;
  color: var(--color-accent);
  position: absolute;
  top: -0.25em;
  left: 0.25em;
  opacity: 0.5;
  line-height: 1;
}

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

.site-header {
  background: linear-gradient(180deg, var(--color-surface) 0%, var(--color-bg) 100%);
  padding: 1.5rem 0;
  box-shadow: var(--shadow-md);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
}

.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

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

.site-nav {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.site-nav a {
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.95rem;
}

.site-nav a:hover {
  background: var(--color-primary);
  color: var(--color-bg);
  border-color: var(--color-secondary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.site-nav a:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

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

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

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
  padding: 0.75rem 1.25rem;
  background: var(--color-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  font-size: 0.9rem;
  flex-wrap: wrap;
}

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

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

.breadcrumbs::after {
  content: '/';
  color: var(--color-border);
  margin: 0 0.25rem;
}

.breadcrumbs a:not(:last-child)::after {
  content: '/';
  color: var(--color-border);
  margin-left: 0.5rem;
  pointer-events: none;
}

.card {
  background: linear-gradient(135deg, #ffffff 0%, var(--color-surface) 100%);
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--color-border);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.card:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-4px);
}

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

table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  background: var(--color-surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border);
}

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

table th {
  padding: 1rem 1.25rem;
  text-align: left;
  font-weight: 700;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

table td {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--color-border);
}

table tbody tr {
  transition: background-color 0.2s ease;
}

table tbody tr:nth-child(even) {
  background: rgba(101, 116, 46, 0.03);
}

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

details {
  margin: 1.5rem 0;
  background: var(--color-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border);
  overflow: hidden;
  transition: box-shadow 0.2s ease;
}

details:hover {
  box-shadow: var(--shadow-lg);
}

details[open] {
  box-shadow: var(--shadow-lg);
}

summary {
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  font-weight: 700;
  color: var(--color-primary);
  user-select: none;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, var(--color-surface) 0%, #f8f9e5 100%);
  transition: background-color 0.2s ease, color 0.2s ease;
}

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

summary::after {
  content: '+';
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-accent);
  transition: transform 0.2s ease;
  background: var(--color-primary);
  color: var(--color-bg);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  flex-shrink: 0;
}

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

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

details > *:not(summary) {
  padding: 1.5rem;
  border-top: 1px 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(180deg, var(--color-surface) 0%, var(--color-secondary) 100%);
  color: var(--color-bg);
  padding: 3rem 0 2rem;
  margin-top: 4rem;
  box-shadow: 0 -4px 6px rgba(63, 74, 28, 0.1);
}

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

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

.site-footer p {
  margin-bottom: 0.5rem;
  opacity: 0.9;
}

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

  h1 {
    font-size: 3rem;
  }

  h2 {
    font-size: 2.25rem;
  }

  h3 {
    font-size: 1.75rem;
  }

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

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

  .site-nav {
    gap: 1rem;
  }

  .site-nav a {
    padding: 0.65rem 1.5rem;
  }

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

  .card {
    padding: 2.5rem;
  }

  .container {
    padding: 0 2rem;
  }

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

  table th,
  table td {
    padding: 1.25rem 1.5rem;
  }
}

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

  h1 {
    font-size: 3.5rem;
  }

  h2 {
    font-size: 2.5rem;
  }

  h3 {
    font-size: 2rem;
  }

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

  .card {
    padding: 3rem;
  }

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

  .site-footer {
    padding: 4rem 0 3rem;
  }
}

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

  .card:hover {
    transform: none;
  }

  .site-nav a:hover {
    transform: none;
  }
}

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

  .site-header {
    position: static;
    box-shadow: none;
    border-bottom: 2px solid var(--color-secondary);
  }

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

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

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

  body {
    background: white;
  }

  a {
    color: var(--color-text);
    border-bottom: 1px solid var(--color-text);
  }

  a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    color: var(--color-text-muted);
  }

  table {
    box-shadow: none;
  }

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

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

  h1, h2, h3, h4, h5, h6 {
    page-break-after: avoid;
  }
}