:root {
  color-scheme: light dark;
  --bg: #f2f3f3;
  --surface: #ffffff;
  --text: #121518;
  --muted: #5a5f5d;
  --border: #d4d7d7;
  --accent: #c2b8aa;
  --accent-soft: #ece8e2;
  --success: #47753d;
  --radius: 16px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #080b0c;
    --surface: #121518;
    --text: #f4f3f1;
    --muted: #afb0ac;
    --border: #303538;
    --accent: #c2b8aa;
    --accent-soft: #24221f;
    --success: #78a66a;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
}

a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

.skip { position: absolute; left: -9999px; }
.skip:focus {
  left: 16px;
  top: 16px;
  padding: 8px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  z-index: 10;
}

.page {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 20px 64px;
}

header.site {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  padding: 20px 0 16px;
  border-bottom: 1px solid var(--border);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.22em;
  font-size: 15px;
}
.brand img { width: 30px; height: auto; display: block; }

nav.main { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; }
nav.main a { font-size: 15px; color: var(--muted); text-decoration: none; }
nav.main a:hover, nav.main a[aria-current="page"] { color: var(--text); }
nav.main a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
}

nav.main a.lang {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 3px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
}

main { padding-top: 32px; }

.eyebrow {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

h1 { font-size: 34px; line-height: 1.15; letter-spacing: -0.01em; margin: 6px 0; }
h2 { font-size: 22px; line-height: 1.3; margin: 0 0 10px; scroll-margin-top: 16px; }
h3 { font-size: 17px; line-height: 1.4; margin: 22px 0 6px; }

.meta { color: var(--muted); font-size: 15px; margin: 0 0 20px; }

p, ul, ol { margin: 8px 0; }
ul, ol { padding-left: 22px; }
li { margin: 6px 0; }
li::marker { color: var(--muted); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin: 20px 0;
}
.card > :first-child { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }

.summary { border-left: 4px solid var(--accent); }
.summary h2 { font-size: 17px; margin-bottom: 8px; }
.summary ul { list-style: none; padding-left: 0; }
.summary li { position: relative; padding-left: 28px; }
.summary li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.45em;
  width: 13px;
  height: 7px;
  border-left: 2px solid var(--success);
  border-bottom: 2px solid var(--success);
  transform: rotate(-45deg);
}

.toc h2 {
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.toc ol { margin: 0; padding-left: 26px; }
.toc li { margin: 4px 0; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }
@media (min-width: 640px) {
  .toc ol { columns: 2; column-gap: 36px; }
  .toc li { break-inside: avoid; }
}

section.doc {
  padding-top: 28px;
  border-top: 1px solid var(--border);
  margin-top: 28px;
}
section.doc h2 .num { color: var(--muted); font-variant-numeric: tabular-nums; margin-right: 6px; }
section.doc:target h2 {
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 3px;
  text-underline-offset: 6px;
}

.notice { background: var(--accent-soft); border-color: transparent; }

.links { display: grid; gap: 12px; margin: 28px 0; padding: 0; list-style: none; }
@media (min-width: 640px) { .links { grid-template-columns: repeat(3, 1fr); } }
.links li { margin: 0; }
.links a {
  display: block;
  height: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  text-decoration: none;
}
.links a:hover { border-color: var(--accent); }
.links strong { display: block; font-size: 17px; }
.links span { display: block; color: var(--muted); font-size: 15px; margin-top: 2px; }

.hero { padding: 24px 0 8px; }
.hero img { width: 72px; height: auto; display: block; margin-bottom: 18px; }
.hero p { font-size: 19px; color: var(--muted); max-width: 520px; }

address { font-style: normal; }

footer.site {
  margin-top: 56px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
}
footer.site a { color: var(--muted); }

@media (max-width: 480px) {
  body { font-size: 16.5px; }
  h1 { font-size: 30px; }
}

@media print {
  header.site nav, .toc, .skip, footer.site { display: none; }
  body { background: #fff; color: #000; }
  .card { border-color: #ccc; }
}
