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

:root {
  --color-primary: #2563eb;
  --color-secondary: #1d4ed8;
  --color-accent: #bfdbfe;
  --color-bg: #ffffff;
  --color-surface: #eff6ff;
  --color-text: #172554;
  --color-text-muted: #6080b0;
  --color-border: #c8daf0;
  --font-main: 'Trebuchet MS', 'Lucida Sans', 'Lucida Grande', sans-serif;
  --max-width: 1100px;
  --radius: 4px;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.7;
  background-image: radial-gradient(circle, var(--color-surface) 1px, transparent 1px);
  background-size: 20px 20px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 3px dotted var(--color-border);
}

h2 {
  font-size: 2rem;
  margin-top: 2rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px dashed var(--color-border);
}

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

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

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

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

p {
  margin-bottom: 1rem;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  border-bottom: 1px dotted var(--color-primary);
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

a:hover {
  color: var(--color-secondary);
  border-bottom-style: solid;
  background-color: var(--color-accent);
}

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

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

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

blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.5rem;
  background-color: var(--color-surface);
  border-left: 4px solid var(--color-primary);
  font-style: italic;
  color: var(--color-text-muted);
  background-image: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 10px,
    rgba(37, 99, 235, 0.02) 10px,
    rgba(37, 99, 235, 0.02) 20px
  );
}

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

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

.site-header {
  background-color: var(--color-bg);
  border-bottom: 3px dotted var(--color-border);
  padding: 1.5rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(23, 37, 84, 0.05);
}

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

.site-header h1 {
  font-size: 1.75rem;
  margin: 0;
  border: none;
  padding: 0;
}

.site-header a {
  border: none;
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 600;
}

.site-header a:hover {
  background-color: transparent;
  color: var(--color-secondary);
}

.site-nav {
  width: 100%;
}

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

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

.site-nav a {
  display: block;
  padding: 0.5rem 1rem;
  background-color: var(--color-surface);
  border: 2px dotted var(--color-border);
  border-radius: var(--radius);
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.site-nav a:hover {
  background-color: var(--color-primary);
  color: var(--color-bg);
  border-style: solid;
}

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

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

.breadcrumbs {
  margin-bottom: 1.5rem;
  padding: 0.75rem 0;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  border-bottom: 1px dashed var(--color-border);
}

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

.breadcrumbs li {
  display: flex;
  align-items: center;
}

.breadcrumbs li:not(:last-child)::after {
  content: "›";
  margin-left: 0.5rem;
  color: var(--color-border);
  font-weight: bold;
}

.breadcrumbs a {
  border: none;
  padding: 0.25rem 0.5rem;
}

.card {
  background-color: var(--color-bg);
  border: 2px dotted var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 4px rgba(23, 37, 84, 0.08);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
  border-color: var(--color-primary);
  border-style: solid;
}

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

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

table thead {
  background-color: var(--color-surface);
  background-image: repeating-linear-gradient(
    90deg,
    transparent,
    transparent 5px,
    rgba(37, 99, 235, 0.03) 5px,
    rgba(37, 99, 235, 0.03) 10px
  );
}

table th {
  padding: 0.75rem;
  text-align: left;
  font-weight: 700;
  color: var(--color-text);
  border-bottom: 2px dashed var(--color-border);
  font-family: Georgia, 'Times New Roman', serif;
}

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

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

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

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

details {
  margin: 1.5rem 0;
  border: 2px dotted var(--color-border);
  border-radius: var(--radius);
  padding: 0;
  background-color: var(--color-bg);
  transition: border-color 0.2s ease;
}

details[open] {
  border-style: solid;
  border-color: var(--color-primary);
}

summary {
  padding: 1rem 1.5rem;
  cursor: pointer;
  font-weight: 600;
  color: var(--color-primary);
  font-family: Georgia, 'Times New Roman', serif;
  user-select: none;
  transition: background-color 0.2s ease, color 0.2s ease;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

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

summary::before {
  content: "▸";
  display: inline-block;
  transition: transform 0.2s ease;
}

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

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

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

details div {
  padding: 0 1.5rem 1.5rem 1.5rem;
  border-top: 1px dashed var(--color-border);
  margin-top: 0.5rem;
}

.site-footer {
  background-color: var(--color-surface);
  border-top: 3px dotted var(--color-border);
  padding: 2rem 0;
  margin-top: 3rem;
  background-image: radial-gradient(circle, var(--color-accent) 1px, transparent 1px);
  background-size: 15px 15px;
}

.site-footer .container {
  text-align: center;
  color: var(--color-text-muted);
}

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

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

ul:not(.site-nav ul):not(.breadcrumbs ul) {
  margin: 1rem 0 1rem 2rem;
}

ol {
  margin: 1rem 0 1rem 2rem;
}

li {
  margin-bottom: 0.5rem;
}

ul:not(.site-nav ul):not(.breadcrumbs ul) li {
  list-style-type: none;
  position: relative;
  padding-left: 1.5rem;
}

ul:not(.site-nav ul):not(.breadcrumbs ul) li::before {
  content: "▪";
  position: absolute;
  left: 0;
  color: var(--color-primary);
  font-weight: bold;
}

ol li {
  padding-left: 0.5rem;
}

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

pre {
  background-color: var(--color-surface);
  padding: 1rem;
  border-radius: var(--radius);
  border: 2px dotted var(--color-border);
  overflow-x: auto;
  margin: 1.5rem 0;
}

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

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

@media (min-width: 768px) {
  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 {
    justify-content: flex-end;
  }

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

  .container {
    padding: 0 2rem;
  }

  .card {
    padding: 2rem;
  }

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

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

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

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

  .card {
    padding: 2.5rem;
  }

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

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

  html {
    scroll-behavior: auto;
  }

  summary::before {
    transition: none;
  }
}

@media print {
  body {
    background: white;
    background-image: none;
  }

  .site-header {
    position: static;
    border-bottom: 2px solid black;
  }

  .site-nav {
    display: none;
  }

  .site-footer {
    border-top: 2px solid black;
    background: white;
    background-image: none;
  }

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

  a {
    color: black;
    text-decoration: underline;
  }

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

  details {
    border: 1px solid black;
  }

  details[open] summary ~ * {
    display: block;
  }
}