:root {
  color-scheme: dark light;
  --bg: #0f1c2a;
  --surface: #172838;
  --surface-2: #1e3246;
  --line: rgba(255, 255, 255, 0.1);
  --ink: #f5f3ee;
  --muted: #a3b2bd;
  --faint: #7f909c;
  --accent: #d7b47b;
  --accent-ink: #101e2d;
  --teal: #4fb5ad;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 18px;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f5f5f7;
    --surface: #ffffff;
    --surface-2: #eef0f3;
    --line: rgba(16, 30, 45, 0.12);
    --ink: #1d1d1f;
    --muted: #4a5561;
    --faint: #6b7680;
    --accent: #8a6420;
    --accent-ink: #ffffff;
    --teal: #1f6f6a;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 24px; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

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

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }

/* Header */

header.site { border-bottom: 1px solid var(--line); }
header.site .wrap {
  display: flex; align-items: center; justify-content: space-between; gap: 12px 20px;
  padding-top: 16px; padding-bottom: 16px; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 600 17px var(--display); }
.brand img { width: 30px; height: 30px; border-radius: 7px; }
header.site nav { display: flex; align-items: center; gap: 4px 18px; flex-wrap: wrap; }
header.site nav a { color: var(--muted); text-decoration: none; font-size: 15px; padding: 6px 0; }
header.site nav a:hover, header.site nav a[aria-current="page"] { color: var(--ink); }
header.site nav a.lang {
  border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; font-size: 13px; font-weight: 600; letter-spacing: 0.02em;
}

/* Typography */

h1, h2, h3, h4 { font-family: var(--display); color: var(--ink); line-height: 1.2; letter-spacing: -0.01em; }
h1 { font-size: clamp(34px, 6vw, 48px); font-weight: 700; margin: 0 0 12px; letter-spacing: -0.02em; }
h2 { font-size: clamp(24px, 3.4vw, 30px); font-weight: 700; margin: 56px 0 14px; }
h3 { font-size: 20px; font-weight: 600; margin: 32px 0 8px; }
h4 { font-size: 17px; font-weight: 600; margin: 22px 0 4px; }

p, li, td, dd { color: var(--muted); }
strong { color: var(--ink); font-weight: 600; }
ul, ol { padding-left: 22px; }
li { margin: 6px 0; }
li::marker { color: var(--faint); }

.lede { font-size: 20px; line-height: 1.5; color: var(--muted); margin: 0 0 20px; max-width: 640px; }
.small { font-size: 14px; color: var(--faint); }
.path { color: var(--ink); font-weight: 500; }
kbd, .key {
  font: 600 14px var(--sans); color: var(--ink); background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 6px; padding: 1px 7px; white-space: nowrap;
}

/* Page header */

.page-head { padding: 48px 0 8px; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 0; padding: 0; list-style: none; font-size: 15px; }
.meta li { margin: 0; color: var(--faint); }
.meta strong { color: var(--muted); font-weight: 600; }

/* Layout with table of contents */

.doc { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 56px; padding: 8px 0 72px; }
.doc > article { min-width: 0; max-width: 760px; }

.toc-mobile { margin: 24px 0 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.toc-mobile summary { padding: 14px 18px; font-weight: 600; color: var(--ink); cursor: pointer; list-style: none; display: flex; justify-content: space-between; }
.toc-mobile summary::-webkit-details-marker { display: none; }
.toc-mobile summary::after { content: "+"; color: var(--faint); font-weight: 400; }
.toc-mobile[open] summary::after { content: "−"; }
.toc-mobile ol { margin: 0; padding: 0 18px 14px 40px; font-size: 15px; }

.toc-desktop { display: none; }
.toc-desktop p { margin: 0 0 10px; font-size: 13px; font-weight: 600; color: var(--faint); }
.toc-desktop ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.toc-desktop li { margin: 0; }
.toc-desktop a { display: block; padding: 5px 0 5px 14px; color: var(--muted); text-decoration: none; font-size: 14px; line-height: 1.4; margin-left: -1px; border-left: 2px solid transparent; }
.toc-desktop a:hover { color: var(--ink); border-left-color: var(--accent); }
.toc a { color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--ink); }

@media (min-width: 980px) {
  .doc { grid-template-columns: 230px minmax(0, 1fr); }
  .toc-desktop { display: block; position: sticky; top: 28px; align-self: start; max-height: calc(100vh - 56px); overflow-y: auto; padding: 4px 0; }
  .toc-mobile { display: none; }
}

article > section { scroll-margin-top: 24px; }
article > section:first-of-type h2 { margin-top: 32px; }

/* Blocks */

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; }
.card h3 { margin-top: 0; }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }

.summary { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; margin: 28px 0 8px; }
article > section.summary h2 { margin: 0 0 12px; font-size: 21px; }
.summary ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.summary li { margin: 0; padding-left: 28px; position: relative; }
.summary li::before {
  content: ""; position: absolute; left: 2px; top: 0.55em; width: 12px; height: 7px;
  border-left: 2px solid var(--teal); border-bottom: 2px solid var(--teal); transform: rotate(-45deg);
}

.note { border-left: 3px solid var(--accent); background: var(--surface); border-radius: 0 12px 12px 0; padding: 14px 18px; margin: 20px 0; }
.note p { margin: 0; }
.note p + p { margin-top: 8px; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin: 24px 0; }
.tile { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; text-decoration: none; }
.tile:hover { border-color: var(--accent); }
.tile strong { display: block; font-size: 17px; margin-bottom: 2px; }
.tile span { color: var(--muted); font-size: 15px; line-height: 1.45; display: block; }

.contact { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; }
.contact p { margin: 0; }
.button {
  display: inline-block; background: var(--accent); color: var(--accent-ink); font-weight: 600; text-decoration: none;
  padding: 11px 22px; border-radius: 999px; white-space: nowrap;
}
.button:hover { text-decoration: none; filter: brightness(1.06); }

/* Steps */

ol.steps { counter-reset: step; list-style: none; padding: 0; margin: 16px 0; }
ol.steps > li { counter-increment: step; position: relative; padding-left: 42px; margin: 12px 0; min-height: 28px; }
ol.steps > li::before {
  content: counter(step); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--ink); font-size: 14px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
}

/* Tables */

.table { overflow-x: auto; margin: 18px 0; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.45; }
th, td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--line); }
tr:last-child td { border-bottom: 0; }
th { color: var(--ink); font-weight: 600; background: var(--surface-2); white-space: nowrap; }
td:first-child { color: var(--ink); font-weight: 500; }

/* Definition lists */

dl.terms { margin: 16px 0; }
dl.terms dt { color: var(--ink); font-weight: 600; margin-top: 16px; }
dl.terms dd { margin: 4px 0 0; }

/* FAQ */

.faq { margin: 16px 0; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none; padding: 16px 32px 16px 0; position: relative;
  color: var(--ink); font-weight: 600; font-size: 17px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 14px; font-size: 22px; font-weight: 300; color: var(--faint); }
.faq details[open] summary::after { content: "−"; }
.faq details > *:not(summary) { margin-top: 0; }
.faq details > :last-child { margin-bottom: 18px; }

/* Home */

.hero {
  position: relative; border-radius: 26px; overflow: hidden; min-height: 380px;
  display: flex; align-items: flex-end; margin: 32px 0 28px; border: 1px solid var(--line);
  background: #0f1c2a url("/hero.jpg") center / cover no-repeat;
}
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(15,28,42,0) 30%, rgba(15,28,42,0.94) 100%); }
.hero div { position: relative; z-index: 1; padding: 28px; }
.hero h1 { color: #f5f3ee; margin-bottom: 4px; }
.hero p { color: rgba(245, 243, 238, 0.78); font-size: 20px; margin: 0; }
.home main { padding-bottom: 64px; }

/* Footer */

footer { border-top: 1px solid var(--line); padding: 28px 0 44px; font-size: 14px; color: var(--faint); }
footer p { margin: 4px 0; color: var(--faint); }
footer nav { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 8px; }
footer nav a { color: var(--muted); text-decoration: none; }
footer nav a:hover { color: var(--ink); }
