*, *::before, *::after {
  box-sizing: border-box;
}

* {
  margin: 0;
  padding: 0;
}

:root {
  --color-primary: #475569;
  --color-secondary: #1e293b;
  --color-accent: #38bdf8;
  --color-bg: #ffffff;
  --color-surface: #f8fafc;
  --color-text: #0f172a;
  --color-text-muted: #64748b;
  --color-border: #e2e8f0;
  --font-main: 'Verdana', 'Geneva', 'Tahoma', sans-serif;
  --max-width: 1100px;
  --radius: 6px;
  --shadow-sm: inset 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --gradient-subtle: linear-gradient(135deg, var(--color-surface) 0%, var(--color-bg) 100%);
  --gradient-primary: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  --gradient-accent: linear-gradient(135deg, var(--color-accent) 0%, #0ea5e9 100%);
}

body {
  font-family: var(--font-main);
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-bg);
  background-image: var(--gradient-subtle);
  background-attachment: fixed;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

h2 {
  font-size: 2rem;
  border-bottom: 3px solid var(--color-accent);
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
}

h3 {
  font-size: 1.5rem;
  color: var(--color-primary);
}

h4 {
  font-size: 1.25rem;
}

h5 {
  font-size: 1.1rem;
}

h6 {
  font-size: 1rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

p {
  margin-bottom: 1.25rem;
  font-size: 1rem;
}

a {
  color: var(--color-accent);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  position: relative;
}

a:hover {
  color: #0ea5e9;
  text-decoration: underline;
}

a:focus-visible {
  outline: 2px 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: 2rem 0;
  padding: 1.5rem 1.5rem 1.5rem 2rem;
  background: var(--color-surface);
  border-left: 4px solid var(--color-accent);
  border-radius: var(--radius);
  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: 100%;
  background: linear-gradient(to right, rgba(56, 189, 248, 0.05), transparent);
  pointer-events: none;
  border-radius: var(--radius);
}

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

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

.site-header {
  background: var(--gradient-primary);
  color: var(--color-bg);
  padding: 2rem 0;
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 3px solid var(--color-accent);
}

.site-header .container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: center;
}

.site-header h1 {
  font-size: 2rem;
  margin: 0;
  color: var(--color-bg);
  background: none;
  -webkit-text-fill-color: initial;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.site-nav {
  width: 100%;
}

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

.site-nav li {
  flex: 1 1 auto;
  min-width: 120px;
}

.site-nav a {
  display: block;
  padding: 0.75rem 1.25rem;
  color: var(--color-bg);
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  text-align: center;
  font-weight: 600;
  transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.site-nav a:hover {
  background: rgba(255, 255, 255, 0.2);
  text-decoration: none;
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.site-nav a:focus-visible {
  outline-color: var(--color-accent);
  background: rgba(255, 255, 255, 0.25);
}

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

.breadcrumbs nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.875rem;
}

.breadcrumbs a {
  color: var(--color-primary);
  font-weight: 500;
}

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

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

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

.site-main > .container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow-md);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-accent);
}

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

.card h2 {
  margin-top: 0;
}

.card h3 {
  border-left: 4px solid var(--color-accent);
  padding-left: 1rem;
  margin-top: 1.5rem;
}

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

table thead {
  background: var(--gradient-primary);
  color: var(--color-bg);
}

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

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

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

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

table tbody tr:hover {
  background: rgba(56, 189, 248, 0.08);
  box-shadow: inset 0 0 0 1px var(--color-accent);
}

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

summary {
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  font-weight: 700;
  color: var(--color-primary);
  background: var(--gradient-subtle);
  user-select: none;
  transition: background-color 0.2s ease, color 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

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

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

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

details[open] summary {
  border-bottom: 1px solid var(--color-border);
  background: var(--color-primary);
  color: var(--color-bg);
}

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

.site-footer {
  background: var(--gradient-primary);
  color: var(--color-bg);
  padding: 3rem 0 2rem;
  margin-top: 4rem;
  box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.1);
  border-top: 3px solid var(--color-accent);
}

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

.site-footer h3 {
  color: var(--color-bg);
  font-size: 1.25rem;
  margin-bottom: 1rem;
  border-bottom: 2px solid rgba(56, 189, 248, 0.5);
  padding-bottom: 0.5rem;
}

.site-footer p {
  margin-bottom: 0.75rem;
  line-height: 1.6;
  opacity: 0.95;
}

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

.site-footer a:hover {
  color: var(--color-bg);
  text-decoration: underline;
}

.site-footer ul {
  list-style: none;
}

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

.site-footer .copyright {
  text-align: center;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 0.875rem;
  opacity: 0.9;
}

@media (min-width: 768px) {
  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;
  }

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

  .site-nav {
    width: auto;
  }

  .site-nav ul {
    justify-content: flex-end;
  }

  .site-nav li {
    flex: 0 1 auto;
  }

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

  .card.featured {
    grid-column: 1 / -1;
  }

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

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

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

  h1 {
    font-size: 3.5rem;
  }

  .container {
    padding: 0 2rem;
  }

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

  .card.featured {
    grid-column: span 2;
  }

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

  blockquote {
    padding: 2rem 2rem 2rem 2.5rem;
    margin: 2.5rem 0;
  }

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

  .card:hover {
    transform: none;
  }

  .site-nav a:hover {
    transform: none;
  }
}

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

  body {
    background: white;
    color: black;
  }

  .site-main {
    padding: 0;
  }

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

  .site-main > .container {
    display: block;
  }

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

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

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

  h1, h2, h3, h4, h5, h6 {
    page-break-after: avoid;
    color: #000;
    background: none;
    -webkit-text-fill-color: initial;
  }

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