* {
  box-sizing: border-box;
}

html, body, h1, h2, h3, h4, h5, h6, p, blockquote, figure, ul, ol, dl, dd {
  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 2px 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.08);
  --shadow-xl: 0 20px 25px rgba(43, 50, 18, 0.12), 0 8px 10px rgba(43, 50, 18, 0.08);
}

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%, #f9fae8 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

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

h2 {
  font-size: 2rem;
  margin-top: 3rem;
  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;
}

h6 {
  font-size: 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-secondary);
}

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

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

blockquote {
  margin: 2rem 0;
  padding: 1.5rem 1.5rem 1.5rem 2rem;
  background: linear-gradient(to right, var(--color-surface) 0%, var(--color-bg) 100%);
  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);
}

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

.site-header {
  background: var(--color-surface);
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--color-border);
}

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

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

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

.site-nav a {
  font-weight: 500;
  border-bottom: 2px solid transparent;
  padding-bottom: 0.25rem;
  color: var(--color-text);
}

.site-nav a:hover {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

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

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

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

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

.breadcrumbs::before {
  content: '→';
  margin: 0 0.5rem;
}

.breadcrumbs:first-child::before {
  content: '';
  margin: 0;
}

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

.card:hover {
  box-shadow: var(--shadow-xl);
  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);
  border: 1px solid var(--color-border);
}

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

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

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

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

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

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

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

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

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

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

summary::after {
  content: '+';
  position: absolute;
  right: 1.5rem;
  font-size: 1.5rem;
  line-height: 1;
  transition: transform 0.2s ease;
  color: var(--color-primary);
}

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

summary:hover {
  background: linear-gradient(to right, var(--color-accent) 0%, var(--color-surface) 100%);
  color: var(--color-primary);
}

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: var(--color-secondary);
  color: var(--color-accent);
  padding: 3rem 0 2rem;
  margin-top: 4rem;
  box-shadow: 0 -4px 6px rgba(43, 50, 18, 0.1);
}

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

.site-footer a:hover {
  color: white;
  border-bottom-color: white;
}

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

.site-footer p {
  margin-bottom: 0.75rem;
  font-size: 0.9375rem;
}

input, textarea, select, button {
  font-family: var(--font-main);
  font-size: 1rem;
}

button {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  color: var(--color-accent);
  border: none;
  padding: 0.75rem 2rem;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: box-shadow 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

button:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

button:active {
  transform: translateY(0);
}

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

ul:not(.site-nav ul) {
  margin: 1rem 0 1.5rem 1.5rem;
}

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

li {
  margin-bottom: 0.5rem;
}

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

@media (max-width: 767px) {
  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.75rem;
  }

  h3 {
    font-size: 1.35rem;
  }

  .site-header .container {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

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

  .card {
    padding: 1.5rem;
  }

  table {
    font-size: 0.875rem;
  }

  th, td {
    padding: 0.75rem 0.875rem;
  }

  .container {
    padding: 0 1rem;
  }
}

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

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

  .card {
    padding: 2.5rem;
  }
}

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

  h1 {
    font-size: 3.5rem;
  }

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

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

  .card {
    padding: 3rem;
  }

  details > *:not(summary) {
    padding: 2rem;
  }
}

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

  body {
    background: white;
    color: black;
  }

  .site-main {
    padding: 0;
  }

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

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

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

  table {
    page-break-inside: avoid;
  }
}