/* Shared by the privacy policy, terms of use and guide pages; colours match index.html. */
:root {
  --bg: #f7f5fb;
  --surface: #ffffff;
  --text: #1b1630;
  --muted: #625b78;
  --line: #e6e1f0;
  --brand: #6a4bd8;
  --brand-soft: #ece6fb;
  --hero-a: #1a0f3a;
  --hero-b: #5a2fb8;
  --on-hero: #faf7ff;
  --on-hero-muted: #cfc3f2;
  --gold: #fbc75e;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #110d1d;
    --surface: #1a1529;
    --text: #f1edfa;
    --muted: #a59dbd;
    --line: #2b2440;
    --brand: #a58bff;
    --brand-soft: #2a2148;
    --hero-a: #0c0720;
    --hero-b: #3d1f86;
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.8 -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); }
img, video { display: block; max-width: 100%; }
.wrap { max-width: 820px; margin: 0 auto; padding-left: 20px; padding-right: 20px; }

header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
header .wrap { max-width: 1080px; display: flex; align-items: center; justify-content: space-between; height: 56px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; text-decoration: none; color: var(--text); }
.brand img { width: 28px; height: 28px; border-radius: 7px; }
header nav a { margin-left: 22px; text-decoration: none; color: var(--muted); font-size: 15px; }
header nav a:hover, header nav a[aria-current] { color: var(--text); }

.banner { background: radial-gradient(120% 90% at 85% 10%, var(--hero-b), var(--hero-a) 70%); color: var(--on-hero); }
.banner .wrap { padding-top: 48px; padding-bottom: 44px; }
.banner h1 { font-size: clamp(28px, 5vw, 42px); line-height: 1.25; margin: 0 0 8px; }
.banner p { margin: 0; color: var(--on-hero-muted); }
.banner .lang { display: inline-block; margin-top: 14px; color: var(--on-hero); font-size: 14px; border: 1px solid rgb(255 255 255 / .25); border-radius: 999px; padding: 3px 14px; text-decoration: none; }

article { padding: 40px 0 64px; }
article h2 { font-size: 22px; line-height: 1.4; margin: 40px 0 10px; padding-top: 8px; }
article h2:first-child { margin-top: 0; }
article h3 { font-size: 18px; margin: 24px 0 6px; }
article p, article li { color: var(--text); }
article p { margin: 0 0 14px; }
article ul, article ol { margin: 0 0 14px; padding-left: 1.4em; }
article li { margin: 6px 0; }
article strong { font-weight: 650; }
.meta { color: var(--muted); font-size: 15px; }

/* Table of contents */
.toc { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px 22px; margin-bottom: 32px; }
.toc b { display: block; margin-bottom: 6px; }
.toc ol, .toc ul { margin: 0; padding-left: 1.3em; columns: 2; column-gap: 32px; }
.toc ul { list-style: none; padding-left: 0; }
.toc a { color: var(--text); text-decoration: none; }
.toc a:hover { color: var(--brand); }

/* Guide */
.tool { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 24px 26px; margin-top: 18px; scroll-margin-top: 72px; }
.tool h2 { margin: 0 0 4px; font-size: 22px; }
.tool .what { color: var(--muted); margin: 0 0 14px; }
.tool ol { counter-reset: s; list-style: none; padding: 0; }
.tool ol li { position: relative; padding-left: 36px; margin: 10px 0; }
.tool ol li::before {
  counter-increment: s; content: counter(s);
  position: absolute; left: 0; top: .2em;
  display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  background: var(--brand-soft); color: var(--brand); font-weight: 700; font-size: 13px;
}
.tip { background: var(--brand-soft); border-radius: 12px; padding: 10px 14px; font-size: 15px; margin: 12px 0 0; }

footer { border-top: 1px solid var(--line); padding: 28px 0 44px; color: var(--muted); font-size: 14px; text-align: center; }
footer p { margin: 4px 0; }
footer a { margin: 0 8px; color: inherit; }

@media (max-width: 600px) {
  header nav a { margin-left: 14px; }
  .toc ol, .toc ul { columns: 1; }
  .tool { padding: 20px; }
}
@media (max-width: 420px) {
  /* The brand already links home. */
  header nav a:first-child { display: none; }
}

/* Support */
.tool a { color: var(--brand); }
.tool ul { padding-left: 1.2em; margin: 0; }
.tool ul li { margin: 6px 0; }
.tool details { background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: 0 18px; margin-top: 10px; }
.tool summary { cursor: pointer; list-style: none; padding: 14px 0; font-weight: 600; display: flex; justify-content: space-between; gap: 16px; }
.tool summary::-webkit-details-marker { display: none; }
.tool summary::after { content: "+"; color: var(--brand); font-size: 20px; line-height: 1; }
.tool details[open] summary::after { content: "–"; }
.tool details p { margin: 0 0 14px; color: var(--muted); }

/* Language switcher */
header nav { display: flex; align-items: center; }
.langs { position: relative; margin-left: 18px; }
.langs summary { list-style: none; cursor: pointer; color: var(--muted); font-size: 15px; white-space: nowrap; }
.langs summary::-webkit-details-marker { display: none; }
.langs[open] summary, .langs summary:hover { color: var(--text); }
.langs div { position: absolute; right: 0; top: calc(100% + 10px); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 6px; min-width: 150px; box-shadow: 0 12px 30px rgb(0 0 0 / .18); z-index: 20; }
.langs div a { display: block; margin: 0; padding: 7px 12px; border-radius: 9px; color: var(--text); text-decoration: none; font-size: 15px; }
.langs div a:hover, .langs div a[aria-current] { background: var(--brand-soft); color: var(--brand); }
@media (max-width: 520px) {
  .langs { margin-left: 12px; }
  .langs summary span { display: none; }
}
