:root {
  --color-primary: #1F4E5F;
  --color-secondary: #C86B3C;
  --color-accent: #2E8B6D;
  --color-background: #F6F1E8;
  --color-surface: #FFFFFF;
  --color-text: #1B1E22;
  --color-text-muted: #5A646E;
  --color-border: #D9D0C4;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(27, 30, 34, 0.10);
  --max: 1120px;
  --font-system: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html {
  font-size: 100%;
  scroll-behavior: smooth;
}

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

body {
  font-family: var(--font-system);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--color-text);
  background-color: var(--color-background);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100vh;
}

main {
  max-width: var(--max);
  width: 100%;
  margin: 0 auto;
  padding: 2rem 1.25rem;
}

@media (min-width: 768px) {
  main {
    padding: 3rem 2rem;
  }
}

@media (min-width: 1024px) {
  main {
    padding: 4rem 2.5rem;
  }
}

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

h1 {
  font-size: clamp(2rem, 4vw + 1rem, 3rem);
  margin-bottom: 1.5rem;
}

h2 {
  font-size: clamp(1.625rem, 3vw + 0.75rem, 2.25rem);
  margin-top: 2.5rem;
  margin-bottom: 1.25rem;
}

h3 {
  font-size: clamp(1.375rem, 2vw + 0.5rem, 1.75rem);
  margin-top: 2rem;
}

h4 {
  font-size: clamp(1.125rem, 1.5vw + 0.5rem, 1.375rem);
}

p {
  max-width: 70ch;
  margin-bottom: 1.25rem;
}

a {
  color: var(--color-accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

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

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

header {
  background-color: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

header > div {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

@media (min-width: 768px) {
  header > div {
    padding: 1.25rem 2rem;
  }
}

.site-name {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--color-primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.site-name:hover {
  color: var(--color-secondary);
}

nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: center;
}

nav a {
  color: var(--color-text);
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 0.75rem;
  border-radius: calc(var(--radius) / 2);
  transition: background-color 0.2s ease, color 0.2s ease;
}

nav a:hover {
  background-color: var(--color-background);
  color: var(--color-primary);
}

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

.breadcrumbs {
  margin-bottom: 1.5rem;
  font-size: 0.9375rem;
}

.breadcrumbs ol {
  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);
}

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

section {
  margin-bottom: 3rem;
}

@media (min-width: 768px) {
  section {
    margin-bottom: 4rem;
  }
}

aside {
  background-color: var(--color-surface);
  border-left: 4px solid var(--color-accent);
  padding: 1.5rem;
  margin: 2rem 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

aside h2, aside h3 {
  margin-top: 0;
  font-size: 1.25rem;
}

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

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

table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  background-color: var(--color-surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  font-size: 0.9375rem;
}

@media (max-width: 767px) {
  table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

caption {
  font-weight: 600;
  text-align: left;
  padding: 1rem 1.25rem;
  background-color: var(--color-primary);
  color: var(--color-surface);
  font-size: 1.0625rem;
}

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

@media (min-width: 1024px) {
  thead {
    position: sticky;
    top: 0;
    z-index: 10;
  }
}

th {
  text-align: left;
  padding: 1rem 1.25rem;
  font-weight: 600;
}

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

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

tbody tr:hover {
  background-color: rgba(46, 139, 109, 0.08);
  transition: background-color 0.2s ease;
}

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

details {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
}

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

summary {
  font-weight: 600;
  color: var(--color-primary);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
  transition: color 0.2s ease;
}

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

summary::before {
  content: "▸";
  font-size: 1.25rem;
  color: var(--color-accent);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

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

summary:hover {
  color: var(--color-secondary);
}

summary:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: calc(var(--radius) / 2);
}

details > *:not(summary) {
  margin-top: 1rem;
  padding-left: 2rem;
}

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

footer {
  background-color: var(--color-surface);
  border-top: 1px solid var(--color-border);
  margin-top: auto;
}

footer > div {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  footer > div {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 2rem;
  }
}

footer nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  list-style: none;
}

footer nav a {
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: 0.9375rem;
  transition: color 0.2s ease;
}

footer nav a:hover {
  color: var(--color-accent);
}

footer p {
  color: var(--color-text-muted);
  font-size: 0.875rem;
  margin: 0;
}

ul:not(nav ul, .breadcrumbs ol, footer ul) {
  list-style-position: outside;
  margin-left: 1.5rem;
  margin-bottom: 1.25rem;
}

ul:not(nav ul, .breadcrumbs ol, footer ul) li {
  margin-bottom: 0.5rem;
  padding-left: 0.5rem;
}

ol:not(.breadcrumbs ol) {
  list-style-position: outside;
  margin-left: 1.5rem;
  margin-bottom: 1.25rem;
}

ol:not(.breadcrumbs ol) li {
  margin-bottom: 0.5rem;
  padding-left: 0.5rem;
}

strong {
  font-weight: 600;
  color: var(--color-primary);
}

em {
  font-style: italic;
}

code {
  font-family: "Courier New", Courier, monospace;
  background-color: var(--color-background);
  padding: 0.125rem 0.375rem;
  border-radius: 4px;
  font-size: 0.9em;
}

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

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

@media print {
  body {
    background-color: white;
    color: black;
  }
  
  header, footer, nav, aside {
    display: none;
  }
  
  main {
    max-width: 100%;
    padding: 0;
  }
  
  a {
    text-decoration: underline;
    color: black;
  }
  
  a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 0.875rem;
  }
  
  details {
    border: 1px solid #ccc;
  }
  
  summary::before {
    content: "";
  }
  
  details[open] summary ~ * {
    display: block;
  }
  
  table {
    page-break-inside: avoid;
  }
  
  h1, h2, h3, h4, h5, h6 {
    page-break-after: avoid;
  }
}

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

.hero {
  background-color: var(--color-surface);
  padding: 3rem 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 3rem;
}

@media (min-width: 768px) {
  .hero {
    padding: 4rem 3rem;
  }
}

.hero h1 {
  margin-bottom: 1.5rem;
}

button {
  font-family: var(--font-system);
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-surface);
  background-color: var(--color-accent);
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

button:hover {
  background-color: var(--color-secondary);
  transform: translateY(-2px);
}

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

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