:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", sans-serif;
  color: #171717;
  background: #fff;
  line-height: 1.8;
}

* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
a { color: inherit; text-underline-offset: 3px; }
button { font: inherit; }

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  max-width: 920px;
  margin: 0 auto;
  padding: 24px 32px;
  border-bottom: 1px solid #e5e5e5;
}
.brand { font-size: 21px; font-weight: 700; text-decoration: none; }
.language-switch { display: flex; gap: 4px; padding: 4px; border: 1px solid #ddd; border-radius: 10px; }
.language-switch button { min-height: 36px; padding: 3px 14px; border: 0; border-radius: 6px; background: transparent; color: #555; cursor: pointer; }
.language-switch button[aria-pressed="true"] { color: #fff; background: #171717; }
.language-switch button:hover { box-shadow: inset 0 0 0 1px #aaa; }
a:focus-visible, button:focus-visible { outline: 2px solid #6554c0; outline-offset: 4px; }

main { max-width: 920px; margin: 0 auto; padding: 40px 32px 64px; overflow-wrap: anywhere; }
article + article { margin-top: 64px; }
article[hidden] + article { margin-top: 0; }
h1 { margin: 0 0 20px; font-size: 32px; line-height: 1.35; }
h2 { margin: 36px 0 12px; font-size: 22px; line-height: 1.5; scroll-margin-top: 24px; }
h3 { margin: 24px 0 8px; font-size: 18px; line-height: 1.5; }
p { margin: 12px 0; }
.document-meta { margin-bottom: 24px; color: #555; font-size: 14px; }
.document-meta p { margin: 2px 0; }
.contents { margin: 28px 0 32px; padding: 20px 24px; border: 1px solid #e5e5e5; border-radius: 12px; font-size: 14px; }
.contents-title { margin: 0 0 8px; font-weight: 600; }
.contents ol { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 24px; margin: 0; padding-left: 24px; list-style: none; }
.contents a { text-decoration: none; }
.contents a:hover { text-decoration: underline; }
.document-content a { color: #413281; }
footer { margin-top: 40px; padding-top: 20px; border-top: 1px solid #e5e5e5; font-size: 14px; }

@media (max-width: 600px) {
  .page-header { padding: 18px 20px; }
  main { padding: 28px 20px 48px; }
  h1 { font-size: 27px; }
  h2 { font-size: 20px; }
  .contents { padding: 16px; }
  .contents ol { grid-template-columns: 1fr; padding-left: 0; }
}

@media print {
  .page-header, .contents, footer { display: none; }
  main { max-width: none; padding: 0; }
  h2, h3 { break-after: avoid; }
}
