/* Anonify public pages: FAQ, tutorial, docs, changelog, privacy policy. System fonts only (no third-party requests). */
:root {
  --bg: #f7f7fb;
  --surface: #ffffff;
  --surface-2: #f1f2f8;
  --text: #1b1d29;
  --muted: #5b6075;
  --border: #e3e5ef;
  --accent: #4f46e5;
  --accent-2: #0ea5a4;
  --accent-soft: #eef0ff;
  --warn-bg: #fff7e6;
  --warn-border: #f5c46b;
  --ok: #138a5b;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20, 22, 40, .04), 0 8px 24px rgba(20, 22, 40, .06);
  --hero-from: #eef0ff;
  --hero-to: #e6f7f6;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1117;
    --surface: #171a23;
    --surface-2: #1e2230;
    --text: #e8e9f0;
    --muted: #a2a7ba;
    --border: #2a2f40;
    --accent: #8b85ff;
    --accent-2: #3fd0c9;
    --accent-soft: #232650;
    --warn-bg: #2b2414;
    --warn-border: #7a5b1f;
    --ok: #4ad295;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    --hero-from: #1a1d3a;
    --hero-to: #12282b;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
img { max-width: 100%; }
code {
  font: .9em ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: .08em .35em;
}
.wrap { width: 100%; max-width: 920px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; z-index: 10; background: var(--surface); padding: 8px 12px; border-radius: 8px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.1rem; color: var(--text); text-decoration: none; }
.brand img { border-radius: 9px; }
.nav { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.nav a {
  display: block; padding: 6px 12px; border-radius: 999px;
  color: var(--muted); text-decoration: none; font-weight: 500; font-size: .95rem;
}
.nav a:hover { color: var(--text); background: var(--surface-2); }
.nav a[aria-current="page"] { color: var(--accent); background: var(--accent-soft); }

.btn {
  display: inline-block; padding: 8px 16px; border-radius: 999px; font-weight: 600; font-size: .92rem;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; text-decoration: none;
  box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 30%, transparent);
}
.btn:hover { filter: brightness(1.06); }
@media (prefers-color-scheme: dark) { .btn { color: #0f1117; } }

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--hero-from), var(--hero-to));
  border-bottom: 1px solid var(--border);
  padding: 56px 0 44px;
}
.eyebrow { margin: 0 0 8px; color: var(--accent); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; font-size: .8rem; }
.hero h1 { margin: 0; font-size: clamp(1.9rem, 4vw, 2.7rem); line-height: 1.15; letter-spacing: -.02em; }
.lede { margin: 14px 0 0; max-width: 640px; color: var(--muted); font-size: 1.1rem; }

/* Content */
.content { padding-top: 40px; padding-bottom: 64px; }
.content h2 { font-size: 1.45rem; letter-spacing: -.01em; margin: 44px 0 12px; scroll-margin-top: 80px; }
.content h2:first-child { margin-top: 0; }
.content h3 { font-size: 1.1rem; margin: 28px 0 8px; }
.content p, .content li { max-width: 72ch; }
.content ul, .content ol { padding-left: 1.3em; }
.content li + li { margin-top: 6px; }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 22px 24px; margin: 16px 0;
}
.card > :first-child { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin: 20px 0; }
.grid .card { margin: 0; }
.card h3 { margin-top: 0; }
.icon-badge {
  display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px;
  background: var(--accent-soft); color: var(--accent); font-weight: 700; margin-bottom: 10px;
}

.callout {
  border: 1px solid var(--warn-border); background: var(--warn-bg);
  border-radius: 12px; padding: 14px 18px; margin: 18px 0;
}
.callout.info { border-color: var(--border); background: var(--accent-soft); }
.callout > :first-child { margin-top: 0; }
.callout > :last-child { margin-bottom: 0; }

.content .toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; padding: 0; list-style: none; }
.content .toc li + li { margin-top: 0; }
.toc a {
  display: inline-block; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); text-decoration: none; font-size: .92rem;
}
.toc a:hover { border-color: var(--accent); color: var(--accent); }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); margin: 16px 0; }
table { border-collapse: collapse; width: 100%; min-width: 520px; font-size: .95rem; }
th, td { text-align: left; padding: 11px 16px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { background: var(--surface-2); font-weight: 600; }
tr:last-child td { border-bottom: 0; }

/* Steps (tutorial) */
.steps { counter-reset: step; list-style: none; padding: 0 !important; }
.steps > li {
  counter-increment: step; position: relative; padding: 20px 22px 20px 74px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
  max-width: none !important;
}
.steps > li + li { margin-top: 14px; }
.steps > li::before {
  content: counter(step); position: absolute; left: 22px; top: 20px;
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; font-weight: 700;
}
.steps h3 { margin: 4px 0 6px; }
.steps p:last-child, .steps ul:last-child { margin-bottom: 0; }

/* FAQ */
details.faq {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; margin: 10px 0;
  box-shadow: var(--shadow);
}
details.faq summary {
  cursor: pointer; list-style: none; padding: 16px 52px 16px 20px; font-weight: 600; position: relative;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after {
  content: "+"; position: absolute; right: 20px; top: 50%; transform: translateY(-50%);
  font-size: 1.4rem; font-weight: 400; color: var(--accent); transition: transform .2s;
}
details.faq[open] summary::after { transform: translateY(-50%) rotate(45deg); }
details.faq .answer { padding: 0 20px 16px; color: var(--text); }
details.faq .answer > :first-child { margin-top: 0; }
details.faq .answer > :last-child { margin-bottom: 0; }
summary:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }

/* Changelog */
.release { position: relative; padding-left: 28px; border-left: 2px solid var(--border); margin-left: 8px; padding-bottom: 8px; }
.release::before {
  content: ""; position: absolute; left: -8px; top: 26px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--surface); border: 3px solid var(--accent);
}
.release .card { margin-top: 0; }
.release-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; margin-bottom: 6px; }
.release-head h2 { margin: 0 !important; font-size: 1.2rem; }
.tag {
  display: inline-block; font-size: .78rem; font-weight: 600; padding: 2px 10px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent);
}
.tag.new { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); }
time { color: var(--muted); font-size: .92rem; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); background: var(--surface); padding: 28px 0; font-size: .95rem; }
.footer-inner { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer-brand { display: flex; align-items: center; gap: 8px; font-weight: 600; margin: 0 0 4px; }
.footer-brand img { border-radius: 5px; }
.footer-inner p { margin: 0; }
.footer-inner p + p { margin-top: 6px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--accent); }

@media (max-width: 600px) {
  .hero { padding: 36px 0 30px; }
  .header-inner { padding-top: 8px; padding-bottom: 8px; }
  .nav a { padding: 5px 9px; font-size: .9rem; }
  .steps > li { padding: 18px 18px 18px 62px; }
  .steps > li::before { left: 16px; }
  .card { padding: 18px; }
}
@media print {
  .site-header, .site-footer, .skip { display: none; }
  .hero { background: none; }
}
