:root {
  color-scheme: light dark;
  --background: #f6f8fb;
  --surface: #ffffff;
  --text: #202a37;
  --muted: #526174;
  --border: #d6dee8;
  --link: #075ca5;
  --highlight: #edf5ff;
  --focus: #b74900;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #111820;
    --surface: #18222e;
    --text: #edf2f8;
    --muted: #b4c1d1;
    --border: #3b4b5e;
    --link: #8dc5ff;
    --highlight: #1b3048;
    --focus: #ffc17c;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  overflow-wrap: anywhere;
}

.container {
  width: min(100% - 2rem, 1000px);
  margin-inline: auto;
}

a {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 0.15em;
}

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

.skip-link {
  position: absolute;
  top: 0.75rem;
  left: 1rem;
  z-index: 10;
  padding: 0.65rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header,
.site-footer {
  background: var(--surface);
}

.site-header {
  border-bottom: 1px solid var(--border);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  padding-block: 1rem;
}

.brand {
  font-size: 1.25rem;
  font-weight: 750;
}

.site-header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.25rem;
}

.site-header nav a {
  padding-block: 0.4rem;
}

.site-header nav .active {
  color: var(--text);
  font-weight: 650;
  text-decoration-thickness: 0.15em;
}

.document {
  max-width: 75ch;
  padding-block: clamp(2rem, 5vw, 3.5rem);
}

.document-header {
  margin-bottom: 2rem;
}

.eyebrow {
  margin-bottom: 0.5rem;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 650;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  line-height: 1.3;
  text-wrap: balance;
}

h1 {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 5vw, 2.8rem);
  letter-spacing: -0.025em;
}

h2 {
  margin: 0 0 1rem;
  font-size: 1.45rem;
}

h3 {
  margin: 1.5rem 0 0.6rem;
  font-size: 1.12rem;
}

p,
ul,
ol {
  margin: 0 0 1rem;
}

ul,
ol {
  padding-left: 1.4rem;
}

li + li {
  margin-top: 0.4rem;
}

.lead {
  font-size: 1.1rem;
}

.updated,
.site-footer {
  color: var(--muted);
  font-size: 0.9rem;
}

.summary,
.notice,
.contact-card {
  margin-block: 1.5rem;
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background: var(--surface);
}

.summary,
.notice {
  background: var(--highlight);
}

.summary h2,
.toc h2 {
  font-size: 1.15rem;
}

.summary > :last-child,
.notice > :last-child,
.contact-card > :last-child {
  margin-bottom: 0;
}

.toc {
  margin-block: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

article section {
  margin-top: 2.25rem;
}

[id] {
  scroll-margin-top: 1.5rem;
}

.table-wrapper {
  overflow-x: auto;
  margin-block: 1.25rem;
}

table {
  width: 100%;
  min-width: 36rem;
  border-collapse: collapse;
  font-size: 0.95rem;
}

caption {
  padding-bottom: 0.75rem;
  text-align: left;
  font-weight: 650;
}

th,
td {
  padding: 0.85rem;
  border: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--highlight);
  font-weight: 650;
}

td {
  background: var(--surface);
}

td > :last-child {
  margin-bottom: 0;
}

.site-footer {
  padding-block: 1.5rem;
  border-top: 1px solid var(--border);
}

.site-footer p:last-child {
  margin-bottom: 0;
}

@media (max-width: 480px) {
  .header-content {
    align-items: flex-start;
    flex-direction: column;
  }

  .summary,
  .notice,
  .contact-card {
    padding: 1rem;
  }
}
