:root {
  color-scheme: light;
  --bg: #f3f4f4;
  --paper: #ffffff;
  --ink: #242424;
  --muted: #6d7072;
  --line: #d9dbdc;
  --soft: #eceeef;
  --accent: #e9652b;
  --accent-soft: #fff1e9;
  --max: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family:
    -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic UI",
    "Yu Gothic", Meiryo, sans-serif;
  font-size: 16px;
  line-height: 1.9;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 10;
  padding: 8px 12px;
  background: var(--ink);
  color: #fff;
  transform: translateY(-160%);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  border-bottom: 1px solid rgba(36, 36, 36, 0.1);
  background: rgba(243, 244, 244, 0.94);
  backdrop-filter: blur(16px);
}

.header-inner {
  width: min(calc(100% - 40px), var(--max));
  min-height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 30px;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
}

.brand i {
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  border-radius: 50%;
  background: var(--accent);
}

.legal-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.legal-nav a {
  min-height: 42px;
  padding: 8px 14px;
  display: inline-flex;
  align-items: center;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.legal-nav a:hover {
  color: var(--ink);
}

.legal-nav a[aria-current="page"] {
  border-bottom-color: var(--accent);
  color: var(--ink);
}

.legal-nav .language-link {
  margin-left: 8px;
  border-left: 1px solid var(--line);
}

.page {
  width: min(calc(100% - 40px), var(--max));
  margin: 0 auto;
  padding: 72px 0 96px;
}

.page-intro {
  max-width: 760px;
  margin-bottom: 56px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
}

h1,
h2,
h3 {
  margin-top: 0;
  color: var(--ink);
  line-height: 1.45;
  letter-spacing: 0;
}

h1 {
  margin-bottom: 18px;
  font-family: "Hiragino Mincho ProN", "Yu Mincho", YuMincho, serif;
  font-size: clamp(34px, 6vw, 58px);
  font-weight: 600;
}

.lede {
  max-width: 680px;
  margin: 0;
  color: #484b4d;
  font-size: 17px;
}

.updated {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.document-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 64px;
  align-items: start;
}

.toc {
  position: sticky;
  top: 108px;
}

.toc p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: toc;
}

.toc li {
  counter-increment: toc;
  display: grid;
  grid-template-columns: 22px 1fr;
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.toc li::before {
  content: counter(toc, decimal-leading-zero);
  color: #a0a2a4;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.toc a {
  text-decoration: none;
}

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

.document {
  min-width: 0;
  padding: 48px clamp(24px, 6vw, 72px) 64px;
  border: 1px solid var(--line);
  background: var(--paper);
}

.document section {
  padding: 8px 0 36px;
  border-bottom: 1px solid var(--soft);
  scroll-margin-top: 108px;
}

.document section + section {
  padding-top: 38px;
}

.document section:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.document h2 {
  margin-bottom: 20px;
  font-size: 21px;
  font-weight: 800;
}

.document h2 .number {
  display: block;
  margin-bottom: 6px;
  color: var(--accent);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 13px;
  font-weight: 700;
}

.document h3 {
  margin: 28px 0 8px;
  font-size: 16px;
}

.document p {
  margin: 0 0 14px;
}

.document ul,
.document ol {
  margin: 12px 0 18px;
  padding-left: 1.45em;
}

.document li {
  margin-bottom: 8px;
}

.data-list {
  margin: 18px 0;
  border-top: 1px solid var(--line);
}

.data-row {
  display: grid;
  grid-template-columns: minmax(140px, 0.34fr) minmax(0, 0.66fr);
  gap: 24px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.data-row dt {
  font-weight: 800;
}

.data-row dd {
  margin: 0;
  color: #4c4f51;
}

.note {
  margin: 24px 0;
  padding: 18px 20px;
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
}

.note strong {
  display: block;
  margin-bottom: 4px;
}

.text-link,
.document a {
  text-decoration-color: rgba(233, 101, 43, 0.5);
  text-underline-offset: 3px;
}

.text-link:hover,
.document a:hover {
  color: var(--accent);
}

.contact {
  margin-top: 18px;
  padding: 20px;
  background: var(--soft);
}

.contact p {
  margin: 0;
}

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

.footer-inner {
  width: min(calc(100% - 40px), var(--max));
  min-height: 88px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font-size: 12px;
}

.footer-inner nav {
  display: flex;
  gap: 18px;
}

.not-found {
  width: min(calc(100% - 40px), 680px);
  min-height: 100vh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}

.not-found h1 {
  margin-bottom: 12px;
  font-size: clamp(30px, 6vw, 48px);
}

@media (max-width: 820px) {
  .page {
    padding-top: 48px;
  }

  .page-intro {
    margin-bottom: 36px;
  }

  .document-layout {
    display: block;
  }

  .toc {
    position: static;
    margin-bottom: 28px;
    padding: 20px;
    border: 1px solid var(--line);
    background: var(--paper);
  }

  .toc ol {
    columns: 2;
    column-gap: 24px;
  }

  .toc li {
    break-inside: avoid;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 15px;
  }

  .header-inner {
    width: min(calc(100% - 24px), var(--max));
    min-height: 68px;
  }

  .brand {
    font-size: 26px;
  }

  .legal-nav a {
    padding: 8px 9px;
    font-size: 12px;
  }

  .legal-nav .language-link {
    margin-left: 2px;
  }

  .page {
    width: 100%;
    padding: 36px 0 64px;
  }

  .page-intro {
    padding: 0 20px;
  }

  h1 {
    font-size: 34px;
  }

  .lede {
    font-size: 16px;
  }

  .toc {
    margin: 0 20px 24px;
  }

  .toc ol {
    columns: 1;
  }

  .document {
    padding: 36px 20px 48px;
    border-right: 0;
    border-left: 0;
  }

  .document h2 {
    font-size: 19px;
  }

  .data-row {
    display: block;
  }

  .data-row dt {
    margin-bottom: 6px;
  }

  .footer-inner {
    width: min(calc(100% - 40px), var(--max));
    padding: 20px 0;
    display: block;
  }

  .footer-inner nav {
    margin-top: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
