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

:root {
  --color-primary: #0d9488;
  --color-secondary: #134e4a;
  --color-accent: #99f6e4;
  --color-bg: #ffffff;
  --color-surface: #f0fdfa;
  --color-text: #0c3530;
  --color-text-muted: #5b8a83;
  --color-border: #b8ddd6;
  --font-main: 'Courier New', 'Lucida Console', Monaco, monospace;
  --max-width: 1100px;
  --radius: 16px;
  --radius-small: 8px;
  --radius-large: 24px;
  --shadow-text: 2px 2px 0 rgba(13, 148, 136, 0.15);
  --shadow-text-hover: 3px 3px 0 rgba(13, 148, 136, 0.25);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  font-size: 16px;
  line-height: 1.7;
  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: bold;
  margin-bottom: 1rem;
  color: var(--color-secondary);
  text-shadow: var(--shadow-text);
}

h1 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

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

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

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

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

h6 {
  font-size: 1rem;
  margin-top: 1rem;
}

p {
  margin-bottom: 1.25rem;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  outline: 2px solid transparent;
  outline-offset: 4px;
  transition: color 0.2s ease, outline-color 0.2s ease, text-shadow 0.2s ease;
  border-bottom: 2px solid var(--color-accent);
}

a:hover {
  color: var(--color-secondary);
  text-shadow: var(--shadow-text-hover);
  border-bottom-color: var(--color-primary);
}

a:focus-visible {
  outline-color: var(--color-primary);
  color: var(--color-secondary);
}

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

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

blockquote {
  margin: 2rem 0;
  padding: 1.5rem;
  background: linear-gradient(135deg, var(--color-surface) 0%, #ffffff 100%);
  border-left: 5px solid var(--color-primary);
  border-radius: var(--radius);
  font-style: italic;
  color: var(--color-text-muted);
  box-shadow: 0 2px 8px rgba(13, 148, 136, 0.1);
}

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

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

.site-header {
  background: linear-gradient(180deg, var(--color-surface) 0%, var(--color-bg) 100%);
  border-bottom: 3px solid var(--color-border);
  padding: 2rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
}

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

.site-header h1 {
  margin: 0;
  font-size: 2rem;
  text-shadow: var(--shadow-text-hover);
}

.site-nav {
  width: 100%;
}

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

.site-nav li {
  flex: 0 0 auto;
}

.site-nav a {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background-color: var(--color-bg);
  border: 3px solid var(--color-border);
  border-radius: var(--radius-large);
  color: var(--color-text);
  font-weight: bold;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
  border-bottom: 3px solid var(--color-border);
}

.site-nav a:hover {
  background-color: var(--color-surface);
  border-color: var(--color-primary);
  color: var(--color-primary);
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.2);
}

.site-nav a:focus-visible {
  background-color: var(--color-accent);
  border-color: var(--color-secondary);
  color: var(--color-secondary);
}

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

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

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

.breadcrumbs a {
  border-bottom: 1px solid transparent;
}

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

.breadcrumbs span {
  color: var(--color-border);
}

.card {
  background: linear-gradient(135deg, var(--color-bg) 0%, var(--color-surface) 100%);
  border: 3px solid var(--color-border);
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 2rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  border-color: var(--color-primary);
  box-shadow: 0 8px 24px rgba(13, 148, 136, 0.15);
}

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

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

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

table th {
  padding: 1rem;
  text-align: left;
  font-weight: bold;
  border-bottom: 3px solid var(--color-secondary);
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.2);
}

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

table tbody tr {
  transition: background-color 0.2s ease;
}

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

table tbody tr:hover {
  background-color: var(--color-accent);
}

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

details {
  margin: 1.5rem 0;
  border: 3px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  background-color: var(--color-bg);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

details:hover {
  border-color: var(--color-primary);
}

details[open] {
  border-color: var(--color-primary);
  box-shadow: 0 4px 16px rgba(13, 148, 136, 0.15);
}

summary {
  padding: 1.25rem;
  cursor: pointer;
  background: linear-gradient(135deg, var(--color-surface) 0%, var(--color-bg) 100%);
  font-weight: bold;
  color: var(--color-secondary);
  transition: background-color 0.2s ease, color 0.2s ease;
  list-style: none;
  user-select: none;
  border-bottom: 3px solid transparent;
}

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

summary::before {
  content: '▶ ';
  display: inline-block;
  transition: transform 0.2s ease;
  color: var(--color-primary);
}

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

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

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

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

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

.site-footer {
  background: linear-gradient(180deg, var(--color-bg) 0%, var(--color-surface) 100%);
  border-top: 3px solid var(--color-border);
  padding: 2.5rem 1.5rem;
  margin-top: auto;
  color: var(--color-text-muted);
}

.site-footer .container {
  text-align: center;
}

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

.site-footer a {
  color: var(--color-primary);
  font-weight: bold;
}

button,
input[type="submit"],
input[type="button"] {
  font-family: var(--font-main);
  font-size: 1rem;
  padding: 0.875rem 2rem;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  color: var(--color-accent);
  border: 3px solid var(--color-secondary);
  border-radius: var(--radius-large);
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.2);
}

button:hover,
input[type="submit"]:hover,
input[type="button"]:hover {
  box-shadow: 0 6px 20px rgba(13, 148, 136, 0.3);
  border-color: var(--color-primary);
}

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

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

input[type="text"]:hover,
input[type="email"]:hover,
input[type="password"]:hover,
input[type="search"]:hover,
textarea:hover,
select:hover {
  border-color: var(--color-primary);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--color-primary);
  background-color: var(--color-bg);
  box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.1);
}

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

@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-nav {
    width: auto;
  }

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

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

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

  .site-footer {
    padding: 3rem 2rem;
  }

  .card {
    padding: 2.5rem;
  }
}

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

  h2 {
    font-size: 2.5rem;
  }

  h3 {
    font-size: 2rem;
  }

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

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

  .card {
    padding: 3rem;
  }

  table th,
  table td {
    padding: 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-nav,
  .breadcrumbs,
  button,
  input[type="submit"],
  input[type="button"] {
    display: none;
  }

  .site-header {
    position: static;
    border-bottom: 2px solid #000;
    background: #fff;
  }

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

  .container {
    max-width: 100%;
  }

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

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

  table {
    border: 2px solid #000;
  }

  details {
    border: 2px solid #000;
  }

  summary::before {
    content: '';
  }
}