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

:root {
  --color-primary: #b45309;
  --color-secondary: #78350f;
  --color-accent: #fde68a;
  --color-bg: #fffef7;
  --color-surface: #fefce8;
  --color-text: #422006;
  --color-text-muted: #92743d;
  --color-border: #e5dbb8;
  --font-main: 'Georgia', 'Times New Roman', 'Palatino', serif;
  --max-width: 1100px;
  --radius: 16px;
}

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

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

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

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

h3 {
  font-size: 1.6rem;
}

h4 {
  font-size: 1.3rem;
}

h5 {
  font-size: 1.1rem;
}

h6 {
  font-size: 1rem;
}

p {
  margin-bottom: 1.2em;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  border-bottom: 2px 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-color: var(--color-secondary);
  background-color: var(--color-accent);
}

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

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

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

blockquote {
  margin: 2rem 0;
  padding: 1.5rem 2rem;
  background: linear-gradient(135deg, var(--color-surface) 0%, var(--color-bg) 100%);
  border-left: 6px solid var(--color-primary);
  border-radius: var(--radius);
  font-style: italic;
  color: var(--color-text-muted);
  box-shadow: 0 4px 12px rgba(180, 83, 9, 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: 4px dotted var(--color-border);
  padding: 2rem 1.5rem;
  box-shadow: 0 6px 20px rgba(120, 53, 15, 0.08);
}

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

.site-nav {
  width: 100%;
}

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

.site-nav a {
  display: block;
  padding: 0.75rem 1.5rem;
  background-color: var(--color-surface);
  border: 2px dotted var(--color-border);
  border-radius: var(--radius);
  color: var(--color-text);
  border-bottom: 2px dotted var(--color-border);
  font-weight: 600;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.site-nav a:hover {
  background-color: var(--color-primary);
  color: var(--color-bg);
  border-color: var(--color-primary);
  border-bottom-color: var(--color-primary);
  box-shadow: 0 4px 12px rgba(180, 83, 9, 0.3);
  transform: translateY(-2px);
}

.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;
  align-items: center;
  padding: 1rem;
  margin-bottom: 2rem;
  background-color: var(--color-surface);
  border-radius: var(--radius);
  border: 2px dashed var(--color-border);
  font-size: 0.9rem;
}

.breadcrumbs a {
  color: var(--color-text-muted);
  border-bottom: 1px dotted var(--color-text-muted);
}

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

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

.card {
  background: linear-gradient(135deg, var(--color-surface) 0%, var(--color-bg) 100%);
  border: 3px dotted var(--color-border);
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 6px 18px rgba(120, 53, 15, 0.12);
  transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.card:hover {
  box-shadow: 0 10px 30px rgba(180, 83, 9, 0.2);
  border-color: var(--color-primary);
  transform: translateY(-4px);
}

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

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 2rem 0;
  background-color: var(--color-surface);
  border: 3px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(120, 53, 15, 0.1);
}

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

table th {
  padding: 1rem 1.5rem;
  text-align: left;
  font-weight: 700;
  border-bottom: 3px dashed var(--color-accent);
}

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

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

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

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;
  background-color: var(--color-surface);
  border: 2px dotted var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 3px 10px rgba(120, 53, 15, 0.08);
}

summary {
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  font-weight: 600;
  color: var(--color-secondary);
  background: linear-gradient(90deg, var(--color-surface) 0%, var(--color-bg) 100%);
  border-bottom: 2px dashed transparent;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s 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;
  font-size: 1.2em;
  transition: transform 0.2s ease;
  color: var(--color-primary);
}

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

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

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

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

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

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

.site-footer {
  background: linear-gradient(180deg, var(--color-bg) 0%, var(--color-surface) 100%);
  border-top: 4px dotted var(--color-border);
  padding: 2.5rem 1.5rem;
  margin-top: 4rem;
  text-align: center;
  color: var(--color-text-muted);
  box-shadow: 0 -6px 20px rgba(120, 53, 15, 0.08);
}

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

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

img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius);
  border: 3px dotted var(--color-border);
}

ul:not(.site-nav ul) {
  list-style: none;
  margin: 1.5rem 0;
  padding-left: 0;
}

ul:not(.site-nav ul) li {
  padding-left: 2rem;
  margin-bottom: 0.75rem;
  position: relative;
}

ul:not(.site-nav ul) li::before {
  content: '◆';
  position: absolute;
  left: 0;
  color: var(--color-primary);
  font-size: 0.8em;
}

ol {
  margin: 1.5rem 0;
  padding-left: 2rem;
}

ol li {
  margin-bottom: 0.75rem;
  padding-left: 0.5rem;
}

ol li::marker {
  color: var(--color-primary);
  font-weight: 700;
}

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-bg);
  border: 3px dotted var(--color-primary);
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 600;
  transition: background-color 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
  box-shadow: 0 4px 12px rgba(180, 83, 9, 0.2);
}

button:hover, input[type="submit"]:hover, input[type="button"]:hover {
  background: var(--color-secondary);
  box-shadow: 0 6px 20px rgba(180, 83, 9, 0.35);
  border-color: var(--color-secondary);
  transform: translateY(-2px);
}

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

input[type="text"], input[type="email"], input[type="tel"], input[type="search"], textarea, select {
  font-family: var(--font-main);
  font-size: 1rem;
  padding: 0.875rem 1.25rem;
  background-color: var(--color-surface);
  color: var(--color-text);
  border: 2px dotted 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;
  margin-bottom: 1rem;
}

input[type="text"]:focus, input[type="email"]:focus, input[type="tel"]: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(180, 83, 9, 0.1);
}

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

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

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

code {
  background-color: var(--color-surface);
  padding: 0.2em 0.5em;
  border-radius: 6px;
  font-family: monospace;
  font-size: 0.9em;
  border: 1px dotted var(--color-border);
  color: var(--color-secondary);
}

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

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

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

  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-main {
    padding: 4rem 2rem;
  }

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

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

  .card {
    padding: 2.5rem;
  }
}

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

  h1 {
    font-size: 3.5rem;
  }

  h2 {
    font-size: 2.5rem;
  }

  h3 {
    font-size: 2rem;
  }

  .site-main {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
  }

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

  .site-nav a {
    padding: 0.875rem 2rem;
  }
}

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

  summary::before {
    transition: none;
  }
}

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

  .site-header, .site-nav, .site-footer {
    display: none;
  }

  .site-main {
    padding: 0;
  }

  .container {
    max-width: 100%;
  }

  a {
    color: black;
    border-bottom: 1px solid black;
  }

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

  table {
    border: 1px solid black;
  }

  img {
    max-width: 100%;
    page-break-inside: avoid;
  }
}