:root {
  color-scheme: light dark;
  --bg: #f5f5f7; --text: #1d1d1f; --secondary: #55555c; --muted: #6e6e73;
  --line: rgba(29,29,31,.10); --accent: #315c83; --nav: #f5f5f7;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000; --text: #f5f5f7; --secondary: #c0c0c6; --muted: #a0a0a8;
    --line: rgba(255,255,255,.14); --accent: #a7c7e7; --nav: #000;
  }
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #000; --text: #f5f5f7; --secondary: #c0c0c6; --muted: #a0a0a8;
  --line: rgba(255,255,255,.14); --accent: #a7c7e7; --nav: #000;
}
* { box-sizing: border-box; }
html { background: var(--bg); color: var(--text); scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
  font-size: 16px; line-height: 1.9; font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; overflow-wrap: anywhere;
}
main { width: min(100%,740px); margin: 0 auto; padding: 0 24px 44px; }
a { color: var(--accent); text-underline-offset: .22em; text-decoration-thickness: 1px; -webkit-tap-highlight-color: transparent; touch-action: manipulation; transition: color 150ms ease, opacity 150ms ease; }
a:active { opacity: .55; }
a:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; border-radius: 3px; }
.document-switch { position: sticky; top: 0; z-index: 2; display: flex; gap: 30px; min-height: 58px; border-bottom: 1px solid var(--line); background: var(--nav); }
.document-switch a { position: relative; display: flex; align-items: center; padding: 14px 0; color: var(--muted); font-size: .875rem; font-weight: 500; text-decoration: none; }
.document-switch a[aria-current="page"] { color: var(--text); font-weight: 650; }
.document-switch a[aria-current="page"]::after { content: ""; position: absolute; height: 2px; bottom: -1px; left: 0; right: 0; background: var(--text); border-radius: 2px; }
.document-header { padding: 28px 0 20px; }
.eyebrow { margin: 0 0 12px; color: var(--muted); font-size: .75rem; font-weight: 550; letter-spacing: .035em; }
h1 { margin: 0; font-size: 2rem; line-height: 1.35; font-weight: 650; letter-spacing: -.025em; }
.lead { max-width: 36em; margin: 12px 0 0; color: var(--secondary); font-size: .9375rem; line-height: 1.85; }
.meta { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 14px; color: var(--muted); font-size: .75rem; line-height: 1.8; }
.contents { margin: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.contents summary { display: flex; align-items: baseline; gap: 12px; position: relative; min-height: 56px; padding: 16px 30px 16px 0; list-style: none; color: var(--text); font-size: .8125rem; font-weight: 550; cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.contents summary::-webkit-details-marker { display: none; }
.contents summary span { color: var(--muted); font-size: .6875rem; font-weight: 400; }
.contents summary::after { content: ""; position: absolute; right: 4px; top: 22px; width: 7px; height: 7px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(45deg); transition: transform 180ms ease; }
.contents[open] summary::after { transform: rotate(225deg); }
.contents summary:active { opacity: .6; }
.contents nav { display: grid; grid-template-columns: 1fr; padding-bottom: 14px; }
.contents a { display: flex; align-items: baseline; gap: 14px; padding: 9px 0; min-height: 44px; color: var(--secondary); font-size: .8125rem; text-decoration: none; }
.chapter-index { flex: 0 0 22px; color: var(--muted); font-size: .6875rem; font-variant-numeric: tabular-nums; }
section { padding: 28px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 80px; }
section:last-of-type { border-bottom: 0; }
h2 { display: flex; align-items: baseline; gap: 12px; margin: 0 0 14px; font-size: 1.125rem; line-height: 1.55; font-weight: 600; letter-spacing: -.01em; }
.section-number { flex: 0 0 22px; color: var(--muted); font-size: .6875rem; font-weight: 450; letter-spacing: 0; font-variant-numeric: tabular-nums; }
h3 { margin: 0; font-size: .9375rem; line-height: 1.65; font-weight: 600; }
p { margin: 12px 0 0; }
section p, section li, dd { color: var(--secondary); font-size: .9375rem; }
strong { color: var(--text); font-weight: 600; }
.data-list { margin-top: 22px; }
.data-row + .data-row { margin-top: 25px; }
.data-row p { margin-top: 7px; }
.note { margin-top: 18px; padding-left: 14px; border-left: 2px solid var(--line); }
.note p { margin-top: 6px; font-size: .9375rem; }
.note h3 { font-size: .875rem; }
.permission-list { margin: 20px 0 0; }
.permission-row { display: grid; grid-template-columns: 1fr; gap: 5px; padding: 16px 0; }
.permission-row + .permission-row { border-top: 1px solid var(--line); }
dt { font-size: .875rem; font-weight: 600; }
dd { margin: 0; line-height: 1.8; }
.service-meta { margin-top: 3px !important; color: var(--muted); font-size: .75rem !important; }
.text-link { display: inline-flex; align-items: center; min-height: 44px; gap: 6px; font-size: .8125rem; text-decoration: none; }
.text-link::after { content: "↗"; font-size: .875rem; }
ul { margin: 14px 0 0; padding-left: 1.15em; }
li { padding-left: 3px; }
li + li { margin-top: 12px; }
li::marker { color: var(--muted); font-size: .8em; }
.contact { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.contact p { margin-top: 6px; }
.footer-note { display: flex; flex-direction: column; gap: 9px; padding-top: 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: .75rem; }
.footer-note a { align-self: flex-start; font-size: .8125rem; text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.back-to-top { margin-top: 4px; }
::selection { background: rgba(100,130,165,.22); color: var(--text); }
@media (min-width: 620px) {
  main { padding-left: 44px; padding-right: 44px; }
  .document-header { padding-top: 36px; }
  h1 { font-size: 2.25rem; }
  .contents nav { grid-template-columns: repeat(2,minmax(0,1fr)); column-gap: 24px; }
  .permission-row { grid-template-columns: 120px minmax(0,1fr); gap: 24px; }
  section { padding-top: 32px; padding-bottom: 32px; }
}
@media (max-width: 359px) { main { padding-left: 20px; padding-right: 20px; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } a, .contents summary::after { transition: none; } }
@media (prefers-contrast: more) { :root { --secondary: var(--text); --muted: var(--text); } }
@media print {
  .document-switch, .contents, .back-to-top { display: none; }
  :root { --bg: #fff; --text: #000; --secondary: #222; --muted: #444; }
  main { width: 100%; padding: 0; }
  section, .data-row, .permission-row { break-inside: avoid; }
}
