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

:root {
  --color-primary: #b44215;
  --color-secondary: #7c2d12;
  --color-accent: #fed7aa;
  --color-bg: #fffbf7;
  --color-surface: #fef3eb;
  --color-text: #431407;
  --color-text-muted: #9a7b6a;
  --color-border: #e8d5c4;
  --font-main: 'Verdana', 'Geneva', 'Tahoma', sans-serif;
  --max-width: 1100px;
  --radius: 8px;
}

body {
  font-family: var(--font-main);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

h1 {
  font-size: 2.5rem;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--color-secondary);
  font-weight: 700;
}

h2 {
  font-size: 2rem;
  line-height: 1.3;
  margin-bottom: 0.875rem;
  color: var(--color-secondary);
  font-weight: 600;
}

h3 {
  font-size: 1.5rem;
  line-height: 1.4;
  margin-bottom: 0.75rem;
  color: var(--color-primary);
  font-weight: 600;
}

h4 {
  font-size: 1.25rem;
  line-height: 1.4;
  margin-bottom: 0.625rem;
  color: var(--color-primary);
  font-weight: 600;
}

h5 {
  font-size: 1.125rem;
  line-height: 1.5;
  margin-bottom: 0.5rem;
  color: var(--color-text);
  font-weight: 600;
}

h6 {
  font-size: 1rem;
  line-height: 1.5;
  margin-bottom: 0.5rem;
  color: var(--color-text);
  font-weight: 600;
}

p {
  margin-bottom: 1rem;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

a:hover {
  color: var(--color-secondary);
  text-decoration: underline;
}

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

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

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

blockquote {
  margin: 1.5rem 0;
  padding: 1.25rem 1.5rem;
  background: rgba(254, 215, 170, 0.2);
  backdrop-filter: blur(10px);
  border-left: 4px solid var(--color-primary);
  border-radius: var(--radius);
  font-style: italic;
  color: var(--color-text);
}

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

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

.site-header {
  background: rgba(254, 243, 235, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(67, 20, 7, 0.05);
}

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

.site-header h1 {
  font-size: 1.5rem;
  margin-bottom: 0;
}

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

.site-nav a {
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(5px);
  border: 1px solid transparent;
}

.site-nav a:hover {
  background: rgba(180, 66, 21, 0.1);
  border-color: var(--color-border);
  text-decoration: none;
  box-shadow: 0 2px 4px rgba(67, 20, 7, 0.1);
}

.site-nav a:focus-visible {
  box-shadow: 0 0 0 3px rgba(180, 66, 21, 0.3);
}

.site-main {
  width: 100%;
}

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

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
  color: var(--color-text-muted);
  padding: 0.75rem 1rem;
  background: rgba(254, 243, 235, 0.6);
  backdrop-filter: blur(8px);
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
}

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

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

.breadcrumbs::before {
  content: '→';
  margin-right: 0.25rem;
  color: var(--color-primary);
}

.card {
  background: rgba(254, 243, 235, 0.7);
  backdrop-filter: blur(15px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 12px rgba(67, 20, 7, 0.08);
  transition: box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  box-shadow: 0 8px 24px rgba(67, 20, 7, 0.12);
  border-color: var(--color-accent);
  background: rgba(254, 243, 235, 0.85);
}

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

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(10px);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(67, 20, 7, 0.05);
}

table thead {
  background: rgba(180, 66, 21, 0.1);
  backdrop-filter: blur(8px);
}

table th {
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  color: var(--color-secondary);
  border-bottom: 2px solid var(--color-border);
}

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

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

table tbody tr:nth-child(odd) {
  background: rgba(254, 243, 235, 0.3);
}

table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.3);
}

table tbody tr:hover {
  background: rgba(254, 215, 170, 0.25);
}

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

details {
  margin: 1.5rem 0;
  background: rgba(254, 243, 235, 0.6);
  backdrop-filter: blur(12px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

details:hover {
  border-color: var(--color-accent);
  box-shadow: 0 4px 12px rgba(67, 20, 7, 0.08);
}

details[open] {
  background: rgba(254, 243, 235, 0.8);
  box-shadow: 0 6px 16px rgba(67, 20, 7, 0.1);
}

summary {
  padding: 1rem 1.25rem;
  cursor: pointer;
  font-weight: 600;
  color: var(--color-secondary);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color 0.2s ease, color 0.2s ease;
  user-select: none;
}

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

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

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

summary:hover {
  background: rgba(180, 66, 21, 0.05);
}

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

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

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

.site-footer {
  background: rgba(124, 45, 18, 0.95);
  backdrop-filter: blur(20px);
  color: var(--color-accent);
  border-top: 1px solid var(--color-secondary);
  margin-top: 3rem;
}

.site-footer .container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  padding: 2rem 1rem;
}

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

.site-footer a:hover {
  color: #fff;
}

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

button,
input[type="submit"],
input[type="button"] {
  background: var(--color-primary);
  color: #fff;
  border: 1px solid var(--color-primary);
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius);
  font-family: var(--font-main);
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  font-weight: 500;
}

button:hover,
input[type="submit"]:hover,
input[type="button"]:hover {
  background: var(--color-secondary);
  border-color: var(--color-secondary);
  box-shadow: 0 4px 12px rgba(124, 45, 18, 0.2);
}

button:focus-visible,
input[type="submit"]:focus-visible,
input[type="button"]:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(180, 66, 21, 0.2);
}

input[type="text"],
input[type="email"],
input[type="search"],
textarea {
  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: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(5px);
  color: var(--color-text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="search"]:focus,
textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(180, 66, 21, 0.1);
  background: rgba(255, 255, 255, 0.95);
}

@media (min-width: 768px) {
  .site-header .container {
    padding: 1.25rem 1.5rem;
  }

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

  .site-nav {
    gap: 1rem;
  }

  .container {
    padding: 2rem 1.5rem;
  }

  h1 {
    font-size: 3rem;
  }

  h2 {
    font-size: 2.25rem;
  }

  h3 {
    font-size: 1.75rem;
  }

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

  .card {
    padding: 2rem;
  }

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

@media (min-width: 1024px) {
  .container {
    padding: 2.5rem 2rem;
  }

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

  h1 {
    font-size: 3.5rem;
  }

  h2 {
    font-size: 2.5rem;
  }

  .card {
    padding: 2.5rem;
  }

  .site-nav a {
    padding: 0.625rem 1.25rem;
  }

  blockquote {
    padding: 1.5rem 2rem;
  }
}

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

  summary::after {
    transition: none;
  }
}

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

  body {
    background: #fff;
    color: #000;
  }

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

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

  a {
    color: #000;
    text-decoration: underline;
  }

  table {
    page-break-inside: avoid;
  }

  details {
    border: 1px solid #ccc;
  }

  details[open] summary::after {
    content: '';
  }

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