* {
  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: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --max-width: 1100px;
  --radius: 8px;
  --radius-sm: 4px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(43, 50, 18, 0.08);
  --shadow-md: 0 4px 6px rgba(43, 50, 18, 0.1), 0 2px 4px rgba(43, 50, 18, 0.06);
  --shadow-lg: 0 10px 15px rgba(43, 50, 18, 0.1), 0 4px 6px rgba(43, 50, 18, 0.05);
  --shadow-xl: 0 20px 25px rgba(43, 50, 18, 0.1), 0 10px 10px rgba(43, 50, 18, 0.04);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-text);
  background: linear-gradient(135deg, var(--color-bg) 0%, var(--color-surface) 100%);
  background-attachment: fixed;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

h1 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 2rem;
  margin-top: 2.5rem;
  margin-bottom: 1.25rem;
}

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

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

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

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

p {
  margin-bottom: 1.25rem;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
  border-bottom: 1px solid transparent;
}

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

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

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

em {
  font-style: italic;
}

blockquote {
  margin: 2rem 0;
  padding: 1.5rem 2rem;
  background: var(--color-surface);
  border-left: 4px solid var(--color-primary);
  border-radius: 0 var(--radius) var(--radius) 0;
  box-shadow: var(--shadow-sm);
  font-style: italic;
  color: var(--color-text-muted);
}

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

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

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

.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 1.25rem;
  gap: 2rem;
}

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

.site-header h1 a {
  color: inherit;
  border: none;
}

.site-header h1 a:hover {
  color: var(--color-secondary);
}

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

.site-nav a {
  display: block;
  padding: 0.625rem 1.25rem;
  color: var(--color-text);
  border: none;
  border-radius: var(--radius);
  transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
  font-weight: 500;
}

.site-nav a:hover {
  background: var(--color-accent);
  color: var(--color-secondary);
  box-shadow: var(--shadow-sm);
}

.site-nav a:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--color-primary);
}

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

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

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  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.875rem;
}

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

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

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

.card {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-lg);
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-2px);
  border-color: var(--color-primary);
}

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

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

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

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

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

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

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

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

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

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

details:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--color-primary);
}

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

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

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

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

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

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

summary:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: -2px;
}

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(180deg, rgba(253, 254, 246, 0.95) 0%, var(--color-surface) 100%);
  border-top: 1px solid var(--color-border);
  margin-top: 4rem;
  padding: 3rem 0 2rem;
  box-shadow: 0 -4px 6px rgba(43, 50, 18, 0.05);
}

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

.site-footer p {
  color: var(--color-text-muted);
  font-size: 0.875rem;
  margin: 0;
}

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

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

ul, ol {
  margin: 1rem 0 1.5rem 1.5rem;
}

li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

code {
  font-family: 'Courier New', monospace;
  background: var(--color-surface);
  padding: 0.125rem 0.375rem;
  border-radius: var(--radius-sm);
  font-size: 0.875em;
  border: 1px solid var(--color-border);
}

pre {
  background: var(--color-secondary);
  color: var(--color-accent);
  padding: 1.5rem;
  border-radius: var(--radius);
  overflow-x: auto;
  margin: 1.5rem 0;
  box-shadow: var(--shadow-md);
}

pre code {
  background: none;
  border: none;
  padding: 0;
  color: inherit;
}

hr {
  border: none;
  border-top: 2px solid var(--color-border);
  margin: 3rem 0;
  opacity: 0.5;
}

img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

button, .button {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  color: var(--color-bg);
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-main);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: box-shadow 0.2s ease, transform 0.2s ease, background-color 0.2s ease;
  box-shadow: var(--shadow-md);
  text-align: center;
}

button:hover, .button:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-1px);
  background: var(--color-secondary);
  color: var(--color-bg);
  border-bottom-color: transparent;
}

button:active, .button:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

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

input, textarea, select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-family: var(--font-main);
  font-size: 1rem;
  background: white;
  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(101, 116, 46, 0.1);
}

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

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

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

  h2 {
    font-size: 2.25rem;
  }

  h3 {
    font-size: 1.75rem;
  }

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

  .site-nav ul {
    gap: 1rem;
  }

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

  .container {
    padding: 0 2rem;
  }

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

  .card {
    padding: 2.5rem;
  }

  blockquote {
    padding: 2rem 2.5rem;
  }
}

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

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

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

  .container {
    padding: 0 2.5rem;
  }

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

  .card {
    padding: 3rem;
  }
}

@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-header,
  .site-nav,
  .site-footer,
  .breadcrumbs {
    display: none;
  }

  .site-main {
    padding: 0;
  }

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

  .card {
    box-shadow: none;
    border: 1px solid #ccc;
    page-break-inside: avoid;
  }

  a {
    text-decoration: underline;
  }

  body {
    background: white;
  }
}