:root {
  --color-primary: #1F3A5F;
  --color-secondary: #2E6F7E;
  --color-accent: #D98E04;
  --color-background: #F6F3EE;
  --color-surface: #FFFFFF;
  --color-text: #111827;
  --color-text-muted: #4B5563;
  --color-border: #D6D0C6;
  --cs-radius: 14px;
  --cs-shadow: 0 10px 30px rgba(17, 24, 39, 0.10);
  --cs-max: 1120px;
  --font-system: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --baseline: 1.5rem;
}

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

html {
  font-size: 100%;
  line-height: 1.5;
  -webkit-text-size-adjust: 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: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-background);
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  grid-template-columns: 100%;
}

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

h1 {
  font-size: clamp(2rem, 1.5rem + 2vw, 3rem);
  margin-top: calc(var(--baseline) * 2);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.5rem, 1.25rem + 1vw, 2.25rem);
  margin-top: calc(var(--baseline) * 1.5);
  letter-spacing: -0.01em;
}

h3 {
  font-size: clamp(1.25rem, 1.1rem + 0.5vw, 1.75rem);
  margin-top: var(--baseline);
}

h4 {
  font-size: clamp(1.125rem, 1rem + 0.25vw, 1.375rem);
  margin-top: var(--baseline);
}

p {
  margin-bottom: var(--baseline);
}

a {
  color: var(--color-secondary);
  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-primary);
  text-decoration-thickness: 2px;
}

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

header {
  background-color: var(--color-surface);
  border-bottom: 2px solid var(--color-border);
  padding: calc(var(--baseline) * 0.75) 5vw;
  box-shadow: var(--cs-shadow);
}

header .header-inner {
  max-width: var(--cs-max);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

header .site-name {
  font-size: clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem);
  font-weight: 700;
  color: var(--color-primary);
  text-decoration: none;
  letter-spacing: -0.01em;
}

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

nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1rem, 0.75rem + 1vw, 2rem);
  align-items: center;
}

nav a {
  font-weight: 500;
  text-decoration: none;
  color: var(--color-text);
  transition: color 0.2s ease;
}

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

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

main {
  max-width: var(--cs-max);
  width: 100%;
  margin: 0 auto;
  padding: calc(var(--baseline) * 2) 5vw;
  display: grid;
  grid-template-columns: 1fr;
  gap: calc(var(--baseline) * 2);
}

@media (min-width: 1024px) {
  main {
    padding: calc(var(--baseline) * 3) 5vw;
  }
}

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

.breadcrumbs a {
  color: var(--color-text-muted);
  text-decoration: none;
}

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

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

section, article, aside {
  margin-bottom: calc(var(--baseline) * 2);
}

section + section,
article + section,
section + article {
  margin-top: calc(var(--baseline) * 2);
  padding-top: calc(var(--baseline) * 2);
  border-top: 1px solid var(--color-border);
}

blockquote {
  margin: var(--baseline) 0;
  padding: var(--baseline) calc(var(--baseline) * 1.5);
  background-color: var(--color-surface);
  border-left: 4px solid var(--color-accent);
  font-style: italic;
  color: var(--color-text-muted);
  box-shadow: var(--cs-shadow);
  border-radius: var(--cs-radius);
}

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

table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--baseline) 0;
  background-color: var(--color-surface);
  border-radius: var(--cs-radius);
  overflow: hidden;
  box-shadow: var(--cs-shadow);
  font-size: clamp(0.875rem, 0.85rem + 0.15vw, 1rem);
}

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

caption {
  text-align: left;
  font-weight: 700;
  color: var(--color-primary);
  padding: 1rem;
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  background-color: var(--color-surface);
}

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

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

th {
  text-align: left;
  padding: 1rem;
  font-weight: 600;
  border-bottom: 2px solid var(--color-border);
}

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

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

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

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

tbody tr:hover {
  background-color: rgba(46, 111, 126, 0.08);
}

details {
  margin-bottom: 1rem;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--cs-radius);
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(17, 24, 39, 0.05);
}

summary {
  padding: 1rem 1.5rem;
  font-weight: 600;
  color: var(--color-primary);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color 0.2s ease, color 0.2s ease;
  user-select: none;
}

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

summary::after {
  content: '+';
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-accent);
  transition: transform 0.3s ease;
  flex-shrink: 0;
  margin-left: 1rem;
}

details[open] summary::after {
  transform: rotate(45deg);
}

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

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

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

details .details-content {
  padding: 1.5rem;
}

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

aside {
  background-color: var(--color-surface);
  padding: calc(var(--baseline) * 1.5);
  border-left: 4px solid var(--color-secondary);
  border-radius: var(--cs-radius);
  box-shadow: var(--cs-shadow);
}

aside h2, aside h3, aside h4 {
  color: var(--color-secondary);
}

ul, ol {
  margin-bottom: var(--baseline);
  padding-left: 2rem;
}

li {
  margin-bottom: 0.5rem;
}

footer {
  background-color: var(--color-primary);
  color: var(--color-surface);
  padding: calc(var(--baseline) * 1.5) 5vw;
  margin-top: calc(var(--baseline) * 3);
  border-top: 4px solid var(--color-accent);
}

footer .footer-inner {
  max-width: var(--cs-max);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

footer p {
  margin-bottom: 0;
  font-size: 0.875rem;
}

footer a {
  color: var(--color-surface);
  text-decoration: underline;
}

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

@media (min-width: 768px) {
  main {
    gap: calc(var(--baseline) * 2.5);
  }
  
  section, article, aside {
    margin-bottom: calc(var(--baseline) * 2.5);
  }
}

@media (min-width: 1024px) {
  h1 {
    margin-top: calc(var(--baseline) * 2.5);
  }
  
  h2 {
    margin-top: calc(var(--baseline) * 2);
  }
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}