* {
  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: 'Trebuchet MS', 'Lucida Sans', 'Lucida Grande', sans-serif;
  --max-width: 1100px;
  --radius: 8px;
  --shadow-sm: 0 1px 3px rgba(157, 23, 77, 0.12), 0 1px 2px rgba(157, 23, 77, 0.08);
  --shadow-md: 0 4px 6px rgba(157, 23, 77, 0.15), 0 2px 4px rgba(157, 23, 77, 0.1);
  --shadow-lg: 0 10px 15px rgba(157, 23, 77, 0.2), 0 4px 6px rgba(157, 23, 77, 0.15);
  --shadow-xl: 0 20px 25px rgba(157, 23, 77, 0.25), 0 10px 10px rgba(157, 23, 77, 0.1);
}

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

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

h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  text-shadow: 0 2px 4px rgba(157, 23, 77, 0.1);
}

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

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

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

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

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

p {
  margin-bottom: 1rem;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
  font-weight: 500;
}

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

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;
  color: var(--color-text);
}

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

blockquote p:last-child {
  margin-bottom: 0;
}

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

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

.site-header h1 {
  margin: 0;
  font-size: 1.75rem;
  color: var(--color-primary);
  text-shadow: 0 2px 4px rgba(219, 39, 119, 0.15);
}

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

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

.site-nav a:hover {
  background-color: var(--color-primary);
  color: white;
  text-decoration: none;
  box-shadow: var(--shadow-md);
  border-color: var(--color-primary);
}

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

.site-main {
  flex: 1;
  width: 100%;
}

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

.breadcrumbs {
  padding: 1rem 0;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.breadcrumbs ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

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

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

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

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

.card::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  border-radius: var(--radius);
  z-index: -1;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.card:hover {
  box-shadow: var(--shadow-lg);
  background-color: var(--color-surface);
}

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

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

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

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

table th {
  padding: 1rem;
  text-align: left;
  font-weight: 700;
  border-bottom: 2px solid var(--color-secondary);
}

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

table tbody tr {
  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:last-child td {
  border-bottom: none;
}

details {
  background-color: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow 0.2s ease;
}

details:hover {
  box-shadow: var(--shadow-md);
}

details[open] {
  box-shadow: var(--shadow-lg);
}

summary {
  padding: 1rem 1.25rem;
  background-color: var(--color-surface);
  cursor: pointer;
  font-weight: 700;
  color: var(--color-secondary);
  transition: background-color 0.2s ease, color 0.2s ease;
  border-left: 4px solid var(--color-primary);
  user-select: none;
}

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

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

details[open] summary {
  background-color: var(--color-primary);
  color: white;
  border-left-color: var(--color-secondary);
}

details > *:not(summary) {
  padding: 1.25rem;
  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: white;
  margin-top: 3rem;
  padding: 2rem 0;
  box-shadow: 0 -4px 6px rgba(157, 23, 77, 0.1);
}

.site-footer .container {
  display: grid;
  gap: 2rem;
}

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

.site-footer a:hover {
  color: white;
}

.site-footer p {
  color: rgba(255, 255, 255, 0.9);
}

ul, ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.5rem;
}

code {
  background-color: var(--color-surface);
  color: var(--color-secondary);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-size: 0.9em;
  border: 1px solid var(--color-border);
}

pre {
  background-color: var(--color-surface);
  padding: 1rem;
  border-radius: var(--radius);
  overflow-x: auto;
  margin-bottom: 1rem;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}

pre code {
  background-color: transparent;
  padding: 0;
  border: none;
}

hr {
  border: none;
  border-top: 2px solid var(--color-border);
  margin: 2rem 0;
}

img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

button, input[type="submit"], input[type="button"] {
  background-color: var(--color-primary);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-main);
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
  box-shadow: var(--shadow-sm);
}

button:hover, input[type="submit"]:hover, input[type="button"]:hover {
  background-color: var(--color-secondary);
  box-shadow: var(--shadow-md);
}

button:focus-visible, input[type="submit"]:focus-visible, input[type="button"]:focus-visible {
  outline: 2px solid var(--color-secondary);
  outline-offset: 2px;
}

input[type="text"], input[type="email"], input[type="search"], input[type="url"], input[type="tel"], textarea, select {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid var(--color-border);
  border-radius: var(--radius);
  font-family: var(--font-main);
  font-size: 1rem;
  background-color: white;
  color: var(--color-text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input[type="text"]:focus, input[type="email"]:focus, input[type="search"]:focus, input[type="url"]:focus, input[type="tel"]:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(219, 39, 119, 0.1);
}

textarea {
  resize: vertical;
  min-height: 120px;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--color-secondary);
}

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

  h2 {
    font-size: 2.25rem;
  }

  h3 {
    font-size: 1.875rem;
  }

  .site-header .container {
    flex-wrap: nowrap;
  }

  .site-nav ul {
    gap: 1rem;
  }

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

  .card {
    padding: 2rem;
  }

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

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

  h1 {
    font-size: 3.5rem;
  }

  .container {
    padding: 0 2rem;
  }

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

  .site-nav ul {
    gap: 1.5rem;
  }

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

  .card {
    padding: 2.5rem;
  }

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

  details:hover {
    transform: translateY(-1px);
  }
}

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

  details:hover {
    transform: none;
  }
}

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

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

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

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

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

  body {
    background-color: white;
  }
}