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

:root {
  --color-primary: #334155;
  --color-secondary: #0f172a;
  --color-accent: #94a3b8;
  --color-bg: #ffffff;
  --color-surface: #f1f5f9;
  --color-text: #0f172a;
  --color-text-muted: #64748b;
  --color-border: #cbd5e1;
  --font-main: 'Georgia', 'Times New Roman', 'Palatino', serif;
  --max-width: 1100px;
  --radius: 2px;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

h1 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  position: relative;
  padding-bottom: 1rem;
}

h1::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 80px;
  height: 4px;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
  clip-path: polygon(0 0, 90% 0, 100% 100%, 0 100%);
}

h2 {
  font-size: 2rem;
  margin-top: 2rem;
  position: relative;
  padding-left: 1.25rem;
}

h2::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.25rem;
  width: 6px;
  height: calc(100% - 0.5rem);
  background: var(--color-primary);
  transform: skewX(-5deg);
}

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

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

h5 {
  font-size: 1.125rem;
  margin-top: 1rem;
}

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

p {
  margin-bottom: 1rem;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  position: relative;
  transition: color 0.2s ease;
}

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

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

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

em {
  font-style: italic;
}

blockquote {
  margin: 2rem 0;
  padding: 1.5rem 2rem;
  background-color: var(--color-surface);
  border-left: 6px solid var(--color-primary);
  position: relative;
  font-style: italic;
  color: var(--color-text-muted);
  clip-path: polygon(0 0, 100% 0, 98% 100%, 0 100%);
}

blockquote::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 60px;
  height: 60px;
  background: var(--color-accent);
  opacity: 0.1;
  clip-path: polygon(100% 0, 0 0, 100% 100%);
}

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

.site-header {
  background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-primary) 100%);
  color: var(--color-bg);
  padding: 2rem 1rem;
  position: relative;
  overflow: hidden;
}

.site-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 8px;
  background: var(--color-accent);
  clip-path: polygon(0 0, 100% 100%, 100% 100%, 0 100%);
}

.site-header .container {
  position: relative;
  z-index: 1;
}

.site-header h1 {
  color: var(--color-bg);
  margin-bottom: 0.5rem;
  font-size: 2.75rem;
}

.site-header h1::after {
  display: none;
}

.site-header p {
  color: var(--color-accent);
  font-size: 1.125rem;
  margin-bottom: 0;
}

.site-nav {
  background-color: var(--color-surface);
  border-bottom: 2px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
}

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

.site-nav li {
  position: relative;
}

.site-nav a {
  display: block;
  padding: 1rem 1.5rem;
  color: var(--color-text);
  font-weight: 600;
  font-size: 0.95rem;
  position: relative;
  transition: background-color 0.2s ease, color 0.2s ease;
  clip-path: polygon(0 0, 95% 0, 100% 100%, 5% 100%);
  margin: 0 2px;
}

.site-nav a:hover {
  background-color: var(--color-primary);
  color: var(--color-bg);
}

.site-nav a:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px var(--color-primary);
}

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

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

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
  padding: 0.75rem 1rem;
  background-color: var(--color-surface);
  border-left: 4px solid var(--color-accent);
  font-size: 0.9rem;
  transform: skewX(-2deg);
}

.breadcrumbs > * {
  transform: skewX(2deg);
}

.breadcrumbs a {
  color: var(--color-text-muted);
  transition: color 0.2s ease;
}

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

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

.card {
  background-color: var(--color-bg);
  border: 2px solid var(--color-border);
  padding: 2rem;
  margin-bottom: 2rem;
  position: relative;
  box-shadow: 4px 4px 0 var(--color-surface);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 15px), calc(100% - 15px) 100%, 0 100%);
}

.card::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 20px;
  height: 20px;
  background: var(--color-accent);
  clip-path: polygon(100% 0, 100% 100%, 0 100%);
}

.card:hover {
  border-color: var(--color-primary);
  box-shadow: 6px 6px 0 var(--color-surface);
}

.card h2 {
  margin-top: 0;
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 2rem 0;
  background-color: var(--color-bg);
  border: 2px solid var(--color-border);
  overflow: hidden;
}

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

table th {
  padding: 1rem;
  text-align: left;
  font-weight: 700;
  position: relative;
}

table th::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--color-accent);
}

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

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

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

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

details {
  margin: 1.5rem 0;
  border: 2px solid var(--color-border);
  background-color: var(--color-bg);
  position: relative;
}

details::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 6px;
  background: var(--color-accent);
  transition: background-color 0.2s ease;
  transform: skewY(-2deg);
}

details[open]::before {
  background: var(--color-primary);
}

summary {
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  font-weight: 700;
  color: var(--color-primary);
  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: 0.8rem;
  transition: transform 0.2s ease;
  color: var(--color-accent);
}

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

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

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

details > *:not(summary) {
  padding: 1.5rem;
  border-top: 2px solid var(--color-border);
  animation: slideDown 0.2s ease;
}

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

.site-footer {
  background-color: var(--color-secondary);
  color: var(--color-accent);
  padding: 3rem 1rem 2rem;
  margin-top: 4rem;
  position: relative;
}

.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-accent) 50%, var(--color-primary) 100%);
  clip-path: polygon(0 100%, 100% 0, 100% 100%, 0 100%);
}

.site-footer a {
  color: var(--color-accent);
  text-decoration: underline;
  transition: color 0.2s ease;
}

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

.site-footer p {
  text-align: center;
  margin: 0;
  font-size: 0.95rem;
}

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

  h2 {
    font-size: 2.25rem;
  }

  h3 {
    font-size: 1.75rem;
  }

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

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

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

  .site-nav ul {
    justify-content: center;
  }

  .card {
    padding: 2.5rem;
  }

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

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

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

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

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

  .card {
    padding: 3rem;
  }

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

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

  html {
    scroll-behavior: auto;
  }
}

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

  .site-header {
    background: none;
    color: var(--color-text);
    padding: 1rem 0;
  }

  .site-header::after {
    display: none;
  }

  .site-header h1,
  .site-header p {
    color: var(--color-text);
  }

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

  .container {
    max-width: 100%;
  }

  .card {
    box-shadow: none;
    border: 1px solid var(--color-border);
    page-break-inside: avoid;
  }

  table {
    page-break-inside: avoid;
  }

  a {
    text-decoration: underline;
  }

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