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

:root {
  --color-primary: #db2777;
  --color-secondary: #9d174d;
  --color-accent: #fbcfe8;
  --color-bg: #fffbfd;
  --color-surface: #fef1f7;
  --color-text: #500724;
  --color-text-muted: #9b6b80;
  --color-border: #e8c8d8;
  --font-main: 'Courier New', 'Lucida Console', Monaco, monospace;
  --max-width: 1100px;
  --radius: 6px;
  --shadow-sm: 0 2px 4px rgba(80, 7, 36, 0.08);
  --shadow-md: 0 4px 8px rgba(80, 7, 36, 0.12), 0 2px 4px rgba(80, 7, 36, 0.08);
  --shadow-lg: 0 8px 16px rgba(80, 7, 36, 0.16), 0 4px 8px rgba(80, 7, 36, 0.12);
  --shadow-xl: 0 12px 24px rgba(80, 7, 36, 0.2), 0 6px 12px rgba(80, 7, 36, 0.16);
}

html {
  font-size: 16px;
}

body {
  font-family: var(--font-main);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--color-text);
  background-color: var(--color-bg);
  background-image: linear-gradient(180deg, var(--color-bg) 0%, var(--color-surface) 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

h1 {
  font-size: 2.25rem;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 4px rgba(80, 7, 36, 0.1);
}

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

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;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

p {
  margin-bottom: 1rem;
}

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

a:hover {
  color: var(--color-secondary);
  text-decoration-thickness: 2px;
}

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

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

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

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

blockquote::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  background: linear-gradient(180deg, var(--color-primary) 0%, var(--color-secondary) 100%);
}

::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;
  transition: box-shadow 0.2s ease;
}

.site-header:hover {
  box-shadow: var(--shadow-lg);
}

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

.site-header h1 {
  margin: 0;
  font-size: 1.75rem;
  text-shadow: 0 2px 8px rgba(219, 39, 119, 0.2);
}

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

.site-nav li {
  display: inline-block;
}

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

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

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

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

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

.breadcrumbs {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  padding: 0.75rem 1rem;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 0.875rem;
  box-shadow: var(--shadow-sm);
}

.breadcrumbs li::after {
  content: '→';
  margin-left: 0.5rem;
  color: var(--color-text-muted);
}

.breadcrumbs li:last-child::after {
  content: '';
}

.breadcrumbs a {
  color: var(--color-primary);
  text-decoration: none;
}

.breadcrumbs a:hover {
  text-decoration: underline;
}

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

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

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
  border-color: var(--color-primary);
}

.card:hover::before {
  opacity: 0.5;
}

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

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

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

th {
  padding: 1rem;
  text-align: left;
  font-weight: 700;
  font-family: Georgia, 'Times New Roman', Times, serif;
  border-bottom: 3px solid var(--color-secondary);
  letter-spacing: 0.05em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

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

tbody tr {
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

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

tbody tr:hover {
  background-color: var(--color-accent);
  box-shadow: inset 0 0 0 2px var(--color-primary);
}

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

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

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

summary {
  padding: 1rem 1.25rem;
  cursor: pointer;
  font-weight: 700;
  font-family: Georgia, 'Times New Roman', Times, serif;
  color: var(--color-secondary);
  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.75rem;
  transition: transform 0.2s ease;
  color: var(--color-primary);
}

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

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

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

details > *:not(summary) {
  padding: 0 1.25rem 1.25rem;
  animation: slideDown 0.2s ease;
}

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

.site-footer {
  margin-top: auto;
  background-color: var(--color-secondary);
  color: var(--color-surface);
  padding: 2rem 0 1.5rem;
  border-top: 4px solid var(--color-primary);
  box-shadow: var(--shadow-xl);
  position: relative;
}

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

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

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

.site-footer p {
  margin-bottom: 0.5rem;
  text-align: center;
}

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

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

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

  .site-nav {
    gap: 0.75rem;
  }

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

  .container {
    padding: 0 1.5rem;
  }

  .card {
    padding: 2rem;
  }

  h1 {
    font-size: 2.75rem;
  }

  h2 {
    font-size: 2.25rem;
  }

  h3 {
    font-size: 1.75rem;
  }
}

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

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

  .site-nav {
    gap: 1rem;
  }

  .site-nav a {
    padding: 0.625rem 1.25rem;
  }

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

  .container {
    padding: 0 2rem;
  }

  .card {
    padding: 2.5rem;
  }

  h1 {
    font-size: 3rem;
  }

  h2 {
    font-size: 2.5rem;
  }

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

  details {
    margin: 2rem 0;
  }
}

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

  details > *:not(summary) {
    animation: none;
  }
}

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

  .site-header {
    position: static;
    box-shadow: none;
    border-bottom: 2px solid #000;
  }

  body {
    background: white;
    color: black;
  }

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

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

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

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