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

:root {
  --color-primary: #475569;
  --color-secondary: #1e293b;
  --color-accent: #38bdf8;
  --color-bg: #ffffff;
  --color-surface: #f8fafc;
  --color-text: #0f172a;
  --color-text-muted: #64748b;
  --color-border: #e2e8f0;
  --font-main: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --max-width: 1100px;
  --radius: 16px;
  --radius-sm: 8px;
  --radius-lg: 24px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 6px rgba(15, 23, 42, 0.07);
  --shadow-lg: 0 10px 15px rgba(15, 23, 42, 0.1);
  --shadow-inner: inset 0 2px 4px rgba(15, 23, 42, 0.06);
  --transition-speed: 0.2s;
}

body {
  font-family: var(--font-main);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  background-attachment: fixed;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

h1 {
  font-size: 2.5rem;
  background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

h2 {
  font-size: 2rem;
  color: var(--color-primary);
}

h3 {
  font-size: 1.5rem;
}

h4 {
  font-size: 1.25rem;
}

h5 {
  font-size: 1.125rem;
}

h6 {
  font-size: 1rem;
}

p {
  margin-bottom: 1em;
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition-speed) ease, text-shadow var(--transition-speed) ease;
  border-radius: var(--radius-sm);
}

a:hover {
  color: var(--color-primary);
  text-shadow: 0 0 8px rgba(56, 189, 248, 0.3);
}

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

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

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

blockquote {
  margin: 1.5em 0;
  padding: 1.25em 1.5em;
  background: linear-gradient(135deg, var(--color-surface) 0%, #ffffff 100%);
  border-left: 4px solid var(--color-accent);
  border-radius: var(--radius);
  box-shadow: var(--shadow-inner);
  font-style: italic;
  color: var(--color-text-muted);
}

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

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

.site-header {
  background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-primary) 100%);
  color: var(--color-bg);
  padding: 1.5rem 1rem;
  box-shadow: var(--shadow-lg);
  position: sticky;
  top: 0;
  z-index: 1000;
}

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

.site-header h1 {
  font-size: 1.75rem;
  color: var(--color-bg);
  background: none;
  -webkit-text-fill-color: currentColor;
  margin-bottom: 0;
}

.site-nav {
  width: 100%;
}

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

.site-nav a {
  display: block;
  padding: 0.625rem 1.25rem;
  color: var(--color-bg);
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  transition: background-color var(--transition-speed) ease, box-shadow var(--transition-speed) ease, transform var(--transition-speed) ease;
  backdrop-filter: blur(10px);
}

.site-nav a:hover {
  background: rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
  color: var(--color-bg);
  text-shadow: none;
}

.site-nav a:focus-visible {
  outline-color: var(--color-bg);
}

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

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

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 1.5rem;
  padding: 0.75rem 1rem;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-inner);
  font-size: 0.875rem;
}

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

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

.breadcrumbs::before {
  content: '🏠';
  margin-right: 0.25rem;
}

.breadcrumbs span:not(:last-child)::after {
  content: '›';
  margin-left: 0.5rem;
  color: var(--color-border);
}

.card {
  background: linear-gradient(135deg, #ffffff 0%, var(--color-surface) 100%);
  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 var(--transition-speed) ease, transform var(--transition-speed) ease;
}

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

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

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

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

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

table tbody tr {
  transition: background-color var(--transition-speed) ease;
}

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

table tbody tr:hover {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.08) 0%, rgba(71, 85, 105, 0.05) 100%);
}

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

details {
  margin: 1rem 0;
  background: linear-gradient(135deg, var(--color-surface) 0%, #ffffff 100%);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-speed) ease;
}

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

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

summary {
  padding: 1rem 1.25rem;
  cursor: pointer;
  font-weight: 600;
  color: var(--color-primary);
  background: linear-gradient(135deg, rgba(71, 85, 105, 0.05) 0%, rgba(56, 189, 248, 0.05) 100%);
  transition: background-color var(--transition-speed) ease, color var(--transition-speed) ease;
  user-select: none;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

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

summary::before {
  content: '▶';
  display: inline-block;
  transition: transform var(--transition-speed) ease;
  color: var(--color-accent);
  font-size: 0.75rem;
}

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

summary:hover {
  background: linear-gradient(135deg, rgba(71, 85, 105, 0.1) 0%, rgba(56, 189, 248, 0.1) 100%);
  color: var(--color-secondary);
}

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

details .content {
  padding: 1.25rem;
  border-top: 1px solid var(--color-border);
  background: var(--color-bg);
  box-shadow: var(--shadow-inner);
}

.site-footer {
  background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-primary) 100%);
  color: var(--color-bg);
  padding: 2rem 1rem;
  margin-top: 3rem;
  box-shadow: 0 -4px 6px rgba(15, 23, 42, 0.07);
}

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

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

.site-footer a:hover {
  color: var(--color-bg);
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

.site-footer p {
  opacity: 0.9;
}

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

  h1 {
    font-size: 3rem;
  }

  h2 {
    font-size: 2.25rem;
  }

  h3 {
    font-size: 1.75rem;
  }

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

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

  .site-nav {
    width: auto;
  }

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

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

  .card {
    padding: 2rem;
  }

  blockquote {
    padding: 1.5em 2em;
  }

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

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

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

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

  .site-nav a {
    padding: 0.75rem 1.5rem;
  }

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

  .card {
    padding: 2.5rem;
  }

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

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

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

  .site-main {
    padding: 0;
  }

  .container {
    max-width: 100%;
  }

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

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

  body {
    background: #fff;
  }

  table {
    box-shadow: none;
  }
}

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

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.1);
}

button,
.button {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-main);
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-bg);
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-primary) 100%);
  border: none;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: box-shadow var(--transition-speed) ease, transform var(--transition-speed) ease;
  box-shadow: var(--shadow-md);
}

button:hover,
.button:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
  color: var(--color-bg);
  text-shadow: none;
}

button:focus-visible,
.button:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

button:active,
.button:active {
  transform: translateY(0);
}

hr {
  border: none;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--color-border) 50%, transparent 100%);
  margin: 2rem 0;
}

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

code {
  font-family: 'Courier New', monospace;
  background: var(--color-surface);
  padding: 0.125rem 0.375rem;
  border-radius: var(--radius-sm);
  font-size: 0.875em;
  color: var(--color-secondary);
  border: 1px solid var(--color-border);
}

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

pre code {
  background: none;
  padding: 0;
  border: none;
}

ul:not(.site-nav ul),
ol {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.5rem;
}