:root {
  --color-primary: #2B2A7A;
  --color-secondary: #0E6F6A;
  --color-accent: #E24A6A;
  --color-background: #F6F3EE;
  --color-surface: #FFFFFF;
  --color-text: #14131A;
  --color-text-muted: #5B5A66;
  --color-border: #D7D2C8;
  --radius: 14px;
  --shadow: 0 10px 28px rgba(20, 19, 26, 0.10);
  --maxw: 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%;
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
}

body {
  font-family: var(--font-system);
  background-color: var(--color-background);
  color: var(--color-text);
  line-height: 1.7;
  font-size: 1.0625rem;
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  grid-template-columns: 100%;
}

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

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

h2 {
  font-size: clamp(1.5rem, 3vw + 0.75rem, 2.25rem);
  margin-top: 2rem;
}

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

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

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

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-accent);
  text-decoration-thickness: 2px;
}

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

header {
  background-color: var(--color-surface);
  border-bottom: 2px solid var(--color-border);
  padding: 1.5rem 1rem;
  box-shadow: var(--shadow);
}

header .header-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: flex-start;
}

header .site-name {
  font-size: clamp(1.375rem, 2.5vw + 0.5rem, 1.875rem);
  font-weight: 800;
  color: var(--color-primary);
  text-decoration: none;
  letter-spacing: -0.02em;
}

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

header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: center;
}

header nav a {
  font-weight: 600;
  font-size: 1rem;
  white-space: nowrap;
}

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

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

aside h3, aside h4 {
  color: var(--color-accent);
  margin-top: 0;
}

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

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

nav[aria-label="Breadcrumb"] {
  margin-bottom: 1.5rem;
  font-size: 0.9375rem;
}

nav[aria-label="Breadcrumb"] ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

nav[aria-label="Breadcrumb"] li {
  display: flex;
  align-items: center;
}

nav[aria-label="Breadcrumb"] li:not(:last-child)::after {
  content: "›";
  margin-left: 0.5rem;
  color: var(--color-text-muted);
  font-weight: 600;
}

nav[aria-label="Breadcrumb"] a {
  color: var(--color-secondary);
}

details {
  background-color: var(--color-surface);
  border: 2px solid var(--color-border);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  overflow: hidden;
  transition: border-color 0.2s ease;
}

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

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

summary {
  padding: 1.25rem 1.5rem;
  font-weight: 700;
  font-size: 1.125rem;
  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);
  color: var(--color-secondary);
}

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

details .details-content {
  padding: 0 1.5rem 1.5rem 1.5rem;
  animation: slideDown 0.3s ease;
}

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

.table-wrapper {
  overflow-x: auto;
  margin: 2rem 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

table {
  width: 100%;
  border-collapse: collapse;
  background-color: var(--color-surface);
  font-size: 0.9375rem;
  min-width: 600px;
}

caption {
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--color-primary);
  text-align: left;
  padding: 1.25rem 1.5rem;
  background-color: var(--color-surface);
  border-bottom: 2px solid var(--color-border);
}

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

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

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

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

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

tbody tr:hover {
  background-color: rgba(43, 42, 122, 0.05);
}

footer {
  background-color: var(--color-surface);
  border-top: 2px solid var(--color-border);
  padding: 2rem 1rem;
  margin-top: 4rem;
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.9375rem;
}

footer .footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
}

ul, ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.5rem;
}

section {
  margin-bottom: 3rem;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  details[open] summary::after {
    transform: none;
  }
  
  details .details-content {
    animation: none;
  }
}

@media (min-width: 768px) {
  header .header-inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
  
  main {
    padding: 3rem 2rem;
  }
  
  table {
    font-size: 1rem;
  }
  
  thead th {
    position: sticky;
    top: 0;
    z-index: 10;
  }
  
  p {
    font-size: 1.125rem;
  }
}

@media (min-width: 1024px) {
  header {
    padding: 2rem 2rem;
  }
  
  main {
    padding: 4rem 2rem;
  }
  
  .table-wrapper {
    overflow-x: visible;
  }
  
  table {
    min-width: 100%;
  }
}

@media print {
  body {
    background-color: white;
    color: black;
  }
  
  header, footer, nav[aria-label="Breadcrumb"] {
    display: none;
  }
  
  main {
    max-width: 100%;
    padding: 0;
  }
  
  a {
    color: black;
    text-decoration: underline;
  }
  
  details {
    border: 1px solid black;
  }
  
  details summary::after {
    display: none;
  }
  
  details .details-content {
    display: block !important;
  }
  
  table {
    border: 1px solid black;
  }
  
  th, td {
    border: 1px solid black;
    padding: 0.5rem;
  }
  
  thead {
    background-color: #f0f0f0;
    color: black;
  }
  
  tbody tr:nth-child(odd) {
    background-color: #f9f9f9;
  }
  
  h1, h2, h3, h4, h5, h6 {
    color: black;
    page-break-after: avoid;
  }
  
  p, li {
    orphans: 3;
    widows: 3;
  }
  
  blockquote, aside {
    border: 1px solid black;
    page-break-inside: avoid;
  }
}