* {
  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: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --max-width: 1100px;
  --radius: 12px;
}

body {
  font-family: var(--font-main);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.6;
  font-size: 16px;
  overflow-x: hidden;
}

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

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

h2 {
  font-size: 2rem;
  margin-top: 2rem;
}

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

h4 {
  font-size: 1.25rem;
}

h5 {
  font-size: 1.125rem;
}

h6 {
  font-size: 1rem;
}

p {
  margin-bottom: 1rem;
}

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

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

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

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

blockquote::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, transparent 0%, rgba(148, 163, 184, 0.1) 100%);
  pointer-events: none;
}

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

.site-header {
  background: var(--color-bg);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  position: sticky;
  top: 0;
  z-index: 1000;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 calc(100% - 8px));
}

.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
}

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

.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;
  clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
  background: var(--color-bg);
}

.site-nav a:hover {
  background: var(--color-surface);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.site-nav a:focus-visible {
  box-shadow: 0 0 0 3px var(--color-accent);
}

.site-main {
  min-height: calc(100vh - 200px);
  padding: 2rem 0;
}

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

.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 40px;
  background: var(--color-secondary);
  transform: translateY(-100%);
  clip-path: polygon(0 100%, 100% 0, 100% 100%, 0 100%);
}

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

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

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

.breadcrumbs {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
  color: var(--color-text-muted);
  flex-wrap: wrap;
}

.breadcrumbs a {
  color: var(--color-text-muted);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  transition: color 0.2s ease, background-color 0.2s ease;
}

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

.breadcrumbs::after {
  content: '/';
  color: var(--color-border);
}

.breadcrumbs:last-child::after {
  display: none;
}

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

.card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, transparent 50%, var(--color-surface) 50%);
  pointer-events: none;
}

.card:hover {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  border-color: var(--color-accent);
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 2rem 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

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

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

table th::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--color-accent);
  clip-path: polygon(0 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
}

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

table tbody tr {
  background: var(--color-bg);
  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.15);
}

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

details {
  margin: 1.5rem 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--color-bg);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}

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

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

details summary::before {
  content: '▶';
  display: inline-block;
  margin-right: 0.5rem;
  transition: transform 0.2s ease;
}

details[open] summary::before {
  transform: rotate(90deg);
}

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

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

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

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

@media (max-width: 767px) {
  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.75rem;
  }

  h3 {
    font-size: 1.375rem;
  }

  .site-header .container {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }

  .site-nav {
    flex-direction: column;
    gap: 0.5rem;
  }

  .site-nav a {
    text-align: center;
  }

  table {
    font-size: 0.875rem;
  }

  table th,
  table td {
    padding: 0.75rem 0.5rem;
  }

  .card {
    padding: 1rem;
  }
}

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

  h1 {
    font-size: 3rem;
  }

  h2 {
    font-size: 2.25rem;
  }

  .site-header .container {
    padding: 1rem 2rem;
  }

  .site-nav {
    gap: 1rem;
  }

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

  .container {
    padding: 0 2rem;
  }
}

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

  h1 {
    font-size: 3.5rem;
  }

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

  .site-footer {
    padding: 4rem 0 2rem;
  }

  .card {
    padding: 2rem;
  }

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

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

  details summary::before {
    transition: none;
  }
}

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

  .site-main {
    padding: 0;
    min-height: auto;
  }

  .site-footer {
    margin-top: 2rem;
    padding: 1rem 0;
  }

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

  .card {
    box-shadow: none;
    page-break-inside: avoid;
  }

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

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