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

:root {
  --color-primary: #525252;
  --color-secondary: #262626;
  --color-accent: #a3e635;
  --color-bg: #fafafa;
  --color-surface: #f5f5f5;
  --color-text: #171717;
  --color-text-muted: #737373;
  --color-border: #d4d4d4;
  --font-main: 'Courier New', 'Lucida Console', Monaco, monospace;
  --max-width: 1100px;
  --radius: 4px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1), 0 10px 10px rgba(0, 0, 0, 0.04);
}

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

h1, h2, h3, h4, h5, h6 {
  font-family: Georgia, 'Times New Roman', Times, serif;
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-secondary);
  margin-bottom: 0.75rem;
}

h1 {
  font-size: 2.5rem;
  letter-spacing: -0.02em;
  border-bottom: 3px solid var(--color-accent);
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
}

h2 {
  font-size: 2rem;
  border-bottom: 2px solid var(--color-border);
  padding-bottom: 0.4rem;
  margin-top: 2rem;
  margin-bottom: 1.25rem;
}

h3 {
  font-size: 1.5rem;
  margin-top: 1.75rem;
  position: relative;
  padding-left: 0.75rem;
}

h3::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.25rem;
  bottom: 0.25rem;
  width: 3px;
  background-color: var(--color-accent);
}

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

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

h6 {
  font-size: 1rem;
  margin-top: 1rem;
  color: var(--color-primary);
}

p {
  margin-bottom: 1.25rem;
}

a {
  color: var(--color-primary);
  text-decoration: underline;
  text-decoration-color: var(--color-accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  transition: color 0.2s ease, text-decoration-color 0.2s ease, background-color 0.2s ease;
}

a:hover {
  color: var(--color-secondary);
  text-decoration-color: var(--color-secondary);
  background-color: rgba(163, 230, 53, 0.1);
}

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

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

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

blockquote {
  margin: 1.5rem 0;
  padding: 1.25rem 1.5rem;
  background-color: var(--color-surface);
  border-left: 5px solid var(--color-accent);
  box-shadow: var(--shadow-sm);
  font-style: italic;
  color: var(--color-primary);
  position: relative;
}

blockquote::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(to right, var(--color-accent), transparent);
}

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

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

.site-header .container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem 1.5rem;
}

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

.site-nav a {
  padding: 0.5rem 1rem;
  background-color: var(--color-bg);
  border: 2px solid var(--color-border);
  text-decoration: none;
  color: var(--color-text);
  font-weight: 600;
  border-radius: var(--radius);
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
  position: relative;
}

.site-nav a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 3px;
  background-color: var(--color-accent);
  transform: scaleX(0);
  transition: transform 0.2s ease;
}

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

.site-nav a:hover::after {
  transform: scaleX(1);
}

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

.site-footer {
  background-color: var(--color-secondary);
  color: var(--color-surface);
  border-top: 4px solid var(--color-accent);
  margin-top: 4rem;
  box-shadow: 0 -4px 6px rgba(0, 0, 0, 0.1);
}

.site-footer .container {
  padding: 2rem 1.5rem;
  text-align: center;
}

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

.site-footer a:hover {
  color: var(--color-surface);
  background-color: rgba(163, 230, 53, 0.2);
}

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

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  padding: 1rem 0;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--color-border);
}

.breadcrumbs a {
  text-decoration: none;
  color: var(--color-primary);
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius);
  transition: all 0.2s ease;
}

.breadcrumbs a:hover {
  background-color: var(--color-surface);
  color: var(--color-secondary);
}

.breadcrumbs::before {
  content: '→';
  margin-right: 0.25rem;
  color: var(--color-accent);
  font-weight: bold;
}

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

.card::before {
  content: '';
  position: absolute;
  top: 4px;
  left: 4px;
  right: -4px;
  bottom: -4px;
  background-color: var(--color-surface);
  border-radius: var(--radius);
  z-index: -1;
  transition: all 0.2s ease;
}

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

.card:hover::before {
  top: 8px;
  left: 8px;
}

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

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

table thead {
  background-color: var(--color-secondary);
  color: white;
}

table th {
  padding: 1rem;
  text-align: left;
  font-weight: 700;
  border-bottom: 3px solid var(--color-accent);
  font-family: Georgia, 'Times New Roman', Times, serif;
  letter-spacing: 0.5px;
}

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

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

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

table tbody tr:hover {
  background-color: rgba(163, 230, 53, 0.15);
}

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

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

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

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

summary {
  padding: 1rem 1.5rem;
  background-color: var(--color-surface);
  cursor: pointer;
  font-weight: 700;
  font-family: Georgia, 'Times New Roman', Times, serif;
  color: var(--color-secondary);
  transition: background-color 0.2s ease, color 0.2s ease;
  user-select: none;
  position: relative;
  border-bottom: 2px solid var(--color-border);
}

summary::marker {
  color: var(--color-accent);
}

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

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

details[open] summary {
  background-color: var(--color-secondary);
  color: white;
  border-bottom-color: var(--color-accent);
}

details[open] summary::marker {
  color: var(--color-accent);
}

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

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

  h1 {
    font-size: 3rem;
  }

  h2 {
    font-size: 2.25rem;
  }

  h3 {
    font-size: 1.75rem;
  }

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

  .site-nav {
    gap: 0.75rem;
  }

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

  .card {
    padding: 2rem;
  }

  .site-footer .container {
    padding: 2.5rem 2rem;
  }
}

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

  h1 {
    font-size: 3.5rem;
  }

  h2 {
    font-size: 2.5rem;
  }

  h3 {
    font-size: 2rem;
  }

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

  .site-nav {
    gap: 1rem;
  }

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

  .card {
    padding: 2.5rem;
  }

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

@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-color: white;
    color: black;
  }

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

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

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

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

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

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