:root {
  color-scheme: light dark;
  --background: #f2f2f7;
  --surface: #ffffff;
  --surface-muted: #e9e9ef;
  --text: #1c1c1e;
  --text-secondary: #515158;
  --accent: #005bbb;
  --accent-hover: #004a98;
  --border: #c7c7cc;
  --focus: #006ee6;
  --danger: #b4232d;
  --danger-surface: #fff1f2;
  --warning: #7a4b00;
  --warning-surface: #fff8e6;
  --radius: 12px;
  --content-width: 72rem;
  --prose-width: 72ch;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--background);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 100%;
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-width: 20rem;
  min-height: 100dvh;
  margin: 0;
  color: var(--text);
  background: var(--background);
}

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

a:visited {
  color: var(--accent);
}

a:active {
  opacity: 0.72;
}

@media (hover: hover) and (pointer: fine) {
  a:hover {
    color: var(--accent-hover);
  }
}

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

.skip-link {
  position: absolute;
  inset-block-start: 0.5rem;
  inset-inline-start: 0.5rem;
  z-index: 10;
  padding: 0.75rem 1rem;
  color: var(--surface);
  background: var(--text);
  border-radius: 8px;
  transform: translateY(-160%);
}

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

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

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

.site-footer {
  margin-top: 4rem;
  border-top: 1px solid var(--border);
}

.header-inner,
.footer-inner,
.page-shell {
  width: min(100% - 2rem, var(--content-width));
  margin-inline: auto;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 4rem;
  gap: 1rem;
}

.brand {
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 700;
  text-decoration: none;
}

.primary-nav ul,
.language-nav ul,
.footer-nav,
.link-list {
  padding: 0;
  margin: 0;
  list-style: none;
}

.primary-nav ul,
.language-nav ul,
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
}

.primary-nav a,
.language-nav a,
.footer-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.5rem 0.75rem;
  font-weight: 600;
}

.page-shell {
  padding-block: 2.5rem 0;
}

.page-intro {
  max-width: var(--prose-width);
  margin-bottom: 2rem;
}

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

h1 {
  max-width: 18ch;
  margin: 0 0 0.75rem;
  font-size: clamp(2rem, 7vw, 3.25rem);
  letter-spacing: -0.025em;
}

h2 {
  margin: 0 0 1rem;
  font-size: 1.75rem;
  letter-spacing: -0.015em;
}

h3 {
  margin: 2rem 0 0.75rem;
  font-size: 1.2rem;
}

p,
li,
dd,
td,
th {
  text-wrap: pretty;
}

.lede {
  max-width: 60ch;
  margin: 0;
  color: var(--text-secondary);
  font-size: 1.1rem;
}

.language-nav {
  margin-block: 1.5rem 2.5rem;
}

.language-nav a {
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  text-decoration: none;
}

.document {
  max-width: var(--prose-width);
  scroll-margin-top: 1rem;
}

.document + .document {
  padding-top: 3.5rem;
  margin-top: 3.5rem;
  border-top: 1px solid var(--border);
}

.document section + section {
  padding-top: 0.25rem;
}

.meta {
  color: var(--text-secondary);
}

.callout {
  padding: 1rem;
  margin-block: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.callout > :first-child {
  margin-top: 0;
}

.callout > :last-child {
  margin-bottom: 0;
}

.callout-warning {
  color: var(--warning);
  border-color: color-mix(in srgb, var(--warning) 45%, var(--surface));
  background: var(--warning-surface);
}

.callout-danger {
  color: var(--danger);
  border-color: color-mix(in srgb, var(--danger) 40%, var(--surface));
  background: var(--danger-surface);
}

.placeholder {
  padding: 0.08em 0.3em;
  border: 1px dashed currentColor;
  border-radius: 4px;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 0.9em;
  overflow-wrap: anywhere;
}

.link-list {
  max-width: 42rem;
  margin-top: 2rem;
  border-top: 1px solid var(--border);
}

.link-list li {
  border-bottom: 1px solid var(--border);
}

.link-list a {
  display: grid;
  gap: 0.25rem;
  min-height: 64px;
  padding: 1rem 0.25rem;
  text-decoration: none;
}

.link-title {
  color: var(--text);
  font-weight: 700;
}

.link-detail {
  color: var(--text-secondary);
}

ul,
ol {
  padding-inline-start: 1.4rem;
}

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

.table-wrap {
  max-width: 100%;
  overflow-x: auto;
  margin-block: 1rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

table {
  width: 100%;
  min-width: 38rem;
  border-collapse: collapse;
}

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

tr:last-child td {
  border-bottom: 0;
}

th {
  background: var(--surface-muted);
  font-weight: 700;
}

dt {
  margin-top: 1.25rem;
  font-weight: 700;
}

dd {
  margin: 0.35rem 0 0;
  color: var(--text-secondary);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 5rem;
  padding-block: 0.75rem;
}

.footer-inner p {
  margin: 0;
  color: var(--text-secondary);
}

@media (max-width: 42rem) {
  .header-inner,
  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    padding-block: 0.65rem;
  }

  .primary-nav ul,
  .footer-nav {
    margin-inline-start: -0.75rem;
  }

  .page-shell {
    padding-top: 2rem;
  }

  h1 {
    font-size: 2.15rem;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #0b0b0d;
    --surface: #1c1c1e;
    --surface-muted: #2c2c2e;
    --text: #f2f2f7;
    --text-secondary: #c7c7cc;
    --accent: #66adff;
    --accent-hover: #9dccff;
    --border: #48484a;
    --focus: #74b5ff;
    --danger: #ff858c;
    --danger-surface: #321519;
    --warning: #ffd080;
    --warning-surface: #2d2412;
  }
}

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

@media print {
  :root {
    color-scheme: light;
    --background: #ffffff;
    --surface: #ffffff;
    --surface-muted: #eeeeee;
    --text: #000000;
    --text-secondary: #333333;
    --border: #777777;
  }

  .skip-link,
  .primary-nav,
  .language-nav,
  .site-footer {
    display: none;
  }

  .page-shell {
    width: 100%;
    padding: 0;
  }

  .document + .document {
    break-before: page;
  }
}
