* {
  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: 0;
}

body {
  font-family: var(--font-main);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.7;
  font-size: 17px;
}

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

h1 {
  font-size: 3rem;
  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, 95% 0, 100% 100%, 5% 100%);
}

h2 {
  font-size: 2.25rem;
  margin-top: 2.5rem;
  position: relative;
  padding-left: 1.5rem;
}

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

h3 {
  font-size: 1.75rem;
  margin-top: 2rem;
}

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

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

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

p {
  margin-bottom: 1.25rem;
}

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 1.5rem 1.5rem 2rem;
  background: var(--color-surface);
  border-left: 5px solid var(--color-primary);
  position: relative;
  font-style: italic;
  color: var(--color-text-muted);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 15px), calc(100% - 15px) 100%, 0 100%);
}

blockquote::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary) 0%, transparent 100%);
}

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

.site-header {
  background: var(--color-secondary);
  color: var(--color-bg);
  padding: 0;
  position: relative;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 30px), 0 100%);
}

.site-header::after {
  content: '';
  position: absolute;
  bottom: -30px;
  left: 0;
  width: 100%;
  height: 30px;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 70%);
  z-index: -1;
}

.site-nav {
  background: var(--color-primary);
  margin-top: -30px;
  padding: 1rem 0;
  position: relative;
  z-index: 10;
}

.site-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.site-nav li {
  position: relative;
}

.site-nav a {
  color: var(--color-bg);
  padding: 0.75rem 1.5rem;
  display: block;
  background: transparent;
  transition: background-color 0.2s ease, color 0.2s ease;
  clip-path: polygon(5% 0, 100% 0, 95% 100%, 0 100%);
  position: relative;
}

.site-nav a::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--color-secondary);
  z-index: -1;
  opacity: 0;
  transition: opacity 0.2s ease;
  clip-path: polygon(5% 0, 100% 0, 95% 100%, 0 100%);
}

.site-nav a:hover::before {
  opacity: 1;
}

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

.site-main {
  min-height: 60vh;
  padding: 3rem 0;
}

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

.site-footer::before {
  content: '';
  position: absolute;
  top: -40px;
  left: 0;
  width: 100%;
  height: 40px;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  clip-path: polygon(0 0, 100% 40%, 100% 100%, 0 100%);
}

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

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

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

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 2rem;
  padding: 0.75rem 1rem;
  background: var(--color-surface);
  font-size: 0.9rem;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 100%, 10px 100%);
}

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

.breadcrumbs::before {
  content: '';
  width: 4px;
  height: 1rem;
  background: var(--color-primary);
  transform: skewX(-10deg);
}

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

.card::before {
  content: '';
  position: absolute;
  top: -2px;
  right: -2px;
  width: 25px;
  height: 25px;
  background: var(--color-primary);
  clip-path: polygon(0 0, 100% 0, 100% 100%);
}

.card:hover {
  box-shadow: 0 10px 30px rgba(51, 65, 85, 0.15);
  border-color: var(--color-primary);
}

.card h3 {
  margin-top: 0;
}

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

table thead {
  background: var(--color-primary);
  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;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--color-secondary) 0%, transparent 100%);
}

table td {
  padding: 1rem;
  border-bottom: 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(148, 163, 184, 0.1);
}

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

details {
  margin: 1.5rem 0;
  border: 2px solid var(--color-border);
  background: var(--color-bg);
  position: relative;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%);
}

summary {
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  font-weight: 700;
  color: var(--color-primary);
  background: var(--color-surface);
  transition: background-color 0.2s ease, color 0.2s ease;
  position: relative;
  user-select: none;
}

summary::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 5px;
  height: 100%;
  background: var(--color-primary);
  transition: width 0.2s ease;
}

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

summary:hover::before {
  width: 8px;
}

summary::marker {
  content: '';
}

summary::after {
  content: '▸';
  position: absolute;
  right: 1.5rem;
  top: 50%;
  transform: translateY(-50%) rotate(0deg);
  transition: transform 0.2s ease;
  font-size: 1.2rem;
}

details[open] summary::after {
  transform: translateY(-50%) rotate(90deg);
}

details[open] summary {
  border-bottom: 2px solid var(--color-border);
}

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) {
  h1 {
    font-size: 3.5rem;
  }

  h2 {
    font-size: 2.5rem;
  }

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

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

  .card {
    padding: 2.5rem;
  }
}

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

  h2 {
    font-size: 3rem;
  }

  .site-header {
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 50px), 0 100%);
  }

  .site-header::after {
    bottom: -50px;
    height: 50px;
  }

  .site-nav {
    margin-top: -50px;
  }

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

  .site-footer::before {
    top: -60px;
    height: 60px;
  }
}

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

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

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

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

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

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

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