* {
  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 2px 4px rgba(43, 50, 18, 0.08);
  --shadow-md: 0 4px 8px rgba(43, 50, 18, 0.12), 0 2px 4px rgba(43, 50, 18, 0.06);
  --shadow-lg: 0 8px 16px rgba(43, 50, 18, 0.16), 0 4px 8px rgba(43, 50, 18, 0.08);
  --shadow-hover: 0 12px 24px rgba(43, 50, 18, 0.2), 0 6px 12px rgba(43, 50, 18, 0.1);
}

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

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

h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  text-shadow: 0 2px 4px rgba(101, 116, 46, 0.1);
}

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

h3 {
  font-size: 1.6rem;
  margin-top: 1.3em;
}

h4 {
  font-size: 1.3rem;
  margin-top: 1.2em;
}

h5 {
  font-size: 1.1rem;
  margin-top: 1.1em;
}

h6 {
  font-size: 1rem;
  margin-top: 1em;
}

p {
  margin-bottom: 1.25em;
}

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: 2px solid transparent;
}

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

a:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 3px;
  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%, #f9faee 100%);
  border-left: 5px solid var(--color-primary);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  font-style: italic;
  color: var(--color-text-muted);
}

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

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

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

.site-header h1 {
  font-size: 1.75rem;
  margin: 0;
  color: var(--color-primary);
  text-shadow: 0 2px 4px rgba(101, 116, 46, 0.15);
}

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

.site-nav a {
  display: block;
  padding: 0.6rem 1.2rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
  border-bottom: 2px solid transparent;
}

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

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

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

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

.breadcrumbs {
  margin-bottom: 1.5rem;
  padding: 0.75rem 1.25rem;
  background: var(--color-surface);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
}

.breadcrumbs ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.9rem;
}

.breadcrumbs li:not(:last-child)::after {
  content: '→';
  margin-left: 0.5rem;
  color: var(--color-text-muted);
}

.breadcrumbs a {
  color: var(--color-primary);
  border-bottom: 1px solid transparent;
}

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

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

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

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

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 2rem 0;
  background: var(--color-surface);
  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-bg);
}

th {
  padding: 1rem;
  text-align: left;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

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

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

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

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

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

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

summary {
  font-weight: 700;
  cursor: pointer;
  padding: 0.75rem 1rem;
  margin: -1rem;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  color: var(--color-bg);
  list-style: none;
  display: flex;
  align-items: center;
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
  user-select: none;
  box-shadow: var(--shadow-sm);
}

summary:hover {
  box-shadow: var(--shadow-md);
  opacity: 0.9;
}

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

summary::before {
  content: '▶';
  display: inline-block;
  margin-right: 0.75rem;
  transition: transform 0.2s ease;
}

details[open] summary::before {
  transform: rotate(90deg);
}

details[open] summary {
  margin-bottom: 1rem;
  border-radius: var(--radius) var(--radius) 0 0;
}

details > *:not(summary) {
  padding: 0 1rem 0.5rem 1rem;
  animation: fadeIn 0.2s ease;
}

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

.site-footer {
  background: linear-gradient(180deg, var(--color-secondary) 0%, #2f3616 100%);
  color: var(--color-surface);
  padding: 2rem 1rem;
  margin-top: auto;
  box-shadow: 0 -4px 12px rgba(43, 50, 18, 0.15);
  border-top: 3px solid var(--color-primary);
}

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

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

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

.site-footer p {
  margin-bottom: 0.5em;
}

input[type="text"],
input[type="email"],
input[type="search"],
textarea,
select {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: var(--font-main);
  font-size: 1rem;
  color: var(--color-text);
  background: var(--color-bg);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-sm);
  box-shadow: inset 0 2px 4px rgba(43, 50, 18, 0.05);
  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: inset 0 2px 4px rgba(43, 50, 18, 0.05), 0 0 0 3px rgba(101, 116, 46, 0.2);
}

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

button:hover,
.button:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
  color: var(--color-bg);
  border-bottom: none;
}

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

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

ul:not(.site-nav ul):not(.breadcrumbs 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: 2.5rem 0;
  box-shadow: 0 1px 2px rgba(43, 50, 18, 0.05);
}

code {
  font-family: 'Courier New', monospace;
  background: var(--color-surface);
  padding: 0.2em 0.5em;
  border-radius: 4px;
  border: 1px solid var(--color-border);
  font-size: 0.9em;
}

pre {
  background: var(--color-surface);
  padding: 1.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  overflow-x: auto;
  box-shadow: var(--shadow-sm);
  margin: 1.5rem 0;
}

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

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

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

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

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

  .card {
    padding: 2.5rem;
  }

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

  details {
    padding: 1.5rem;
  }

  summary {
    padding: 1rem 1.5rem;
    margin: -1.5rem;
  }

  details[open] summary {
    margin-bottom: 1.5rem;
  }

  details > *:not(summary) {
    padding: 0 1.5rem 1rem 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-header {
    padding: 2.5rem 2rem;
  }

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

  .site-footer {
    padding: 3rem 2rem;
  }

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

  .card {
    padding: 3rem;
  }

  blockquote {
    padding: 2rem 2.5rem;
  }
}

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

  summary::before {
    transition: none;
  }

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

@media print {
  body {
    background: white;
    color: black;
  }

  .site-header,
  .site-nav,
  .site-footer,
  .breadcrumbs,
  button,
  .button {
    display: none;
  }

  .site-main {
    padding: 0;
  }

  .container {
    max-width: 100%;
  }

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

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

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

  table {
    box-shadow: none;
  }
}