/* SimpleSync website
   Obsidian-adjacent palette (flat greys, one violet accent) and soft rounded
   shapes. The visual motif is the sync network itself: devices, one server,
   revision numbers. No glows, no gradients. */

:root {
  color-scheme: dark;
  --bg: #141414;
  --bg-raised: #191919;
  --surface: #1e1e1e;
  --surface-2: #252525;
  --line: #2b2b2b;
  --line-strong: #383838;
  --text: #d8d8d8;
  --text-strong: #f4f4f4;
  --muted: #979797;
  --faint: #6a6a6a;
  --dot: rgba(255, 255, 255, .07);
  --accent: #8b7cf6;
  --accent-text: #aa9ffa;
  --accent-soft: rgba(139, 124, 246, .13);
  --accent-line: rgba(139, 124, 246, .45);
  --on-accent: #ffffff;
  --ok: #5fb77c;
  --ok-soft: rgba(95, 183, 124, .12);
  --warn: #e0a24a;
  --warn-soft: rgba(224, 162, 74, .10);
  --info-soft: rgba(139, 124, 246, .08);

  --r-sm: 8px;
  --r: 12px;
  --r-lg: 18px;
  --wrap: 1160px;
  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --bg: #ffffff;
    --bg-raised: #f9f9f8;
    --surface: #f5f5f4;
    --surface-2: #ececea;
    --line: #e7e7e4;
    --line-strong: #d3d3cf;
    --text: #2a2a2a;
    --text-strong: #0f0f0f;
    --muted: #666666;
    --faint: #9a9a9a;
    --dot: rgba(0, 0, 0, .07);
    --accent: #6c55e8;
    --accent-text: #5a43d6;
    --accent-soft: rgba(108, 85, 232, .09);
    --accent-line: rgba(108, 85, 232, .45);
    --ok: #2f8a4f;
    --ok-soft: rgba(47, 138, 79, .10);
    --warn: #a86a12;
    --warn-soft: rgba(200, 130, 20, .09);
    --info-soft: rgba(108, 85, 232, .06);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 96px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { color: var(--text-strong); text-wrap: balance; margin: 0; }
p { margin: 0; }
code, kbd, pre { font-family: var(--mono); }
:not(pre) > code {
  font-size: .85em;
  background: var(--surface-2);
  border: 1px solid var(--line);
  padding: 1px 6px;
  border-radius: 6px;
  color: var(--text-strong);
  overflow-wrap: anywhere;
}
kbd { font-size: .8em; border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 5px; padding: 0 5px; background: var(--surface); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--accent-soft); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: 24px; }
@media (max-width: 480px) { .wrap { padding-inline: 16px; } }

.icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mono { font-family: var(--mono); }
.link-accent { color: var(--accent-text); text-decoration: underline; text-decoration-color: var(--accent-line); text-underline-offset: 3px; }
.link-accent:hover { text-decoration-color: currentColor; }

/* dotted canvas, fading out */
.dots {
  background-image: radial-gradient(var(--dot) 1.2px, transparent 1.3px);
  background-size: 22px 22px;
}

/* ---------- floating nav ---------- */
.nav { position: sticky; top: 12px; z-index: 50; margin: 12px 0 0; padding-inline: 16px; }
.nav-inner {
  max-width: var(--wrap); margin: 0 auto; height: 58px;
  display: flex; align-items: center; gap: 24px; padding: 0 10px 0 16px;
  border: 1px solid var(--line); border-radius: 16px;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
}
.logo { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 1rem; color: var(--text-strong); letter-spacing: -.01em; }
.logo img { width: 26px; height: 26px; }
.nav-links { display: flex; gap: 2px; font-size: .9rem; color: var(--muted); }
.nav-links a { padding: 6px 11px; border-radius: 8px; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text-strong); background: var(--surface-2); }
.nav-end { margin-left: auto; display: flex; gap: 6px; align-items: center; }
@media (max-width: 900px) { .nav-links { display: none; } }
@media (max-width: 480px) { .nav-end .btn-quiet { display: none; } .nav-inner { gap: 12px; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border-radius: 10px;
  font: 500 .95rem/1.2 var(--font);
  border: 1px solid transparent;
  transition: background-color .15s, border-color .15s, color .15s, transform .15s;
  cursor: pointer; white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn.small { padding: 8px 13px; font-size: .88rem; border-radius: 9px; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 86%, var(--text-strong)); }
.btn-secondary { background: var(--surface); border-color: var(--line-strong); color: var(--text-strong); }
.btn-secondary:hover { background: var(--surface-2); }
.btn-quiet { color: var(--muted); }
.btn-quiet:hover { color: var(--text-strong); background: var(--surface-2); }
.btn .icon { width: 16px; height: 16px; }
.cta { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- hero ---------- */
.hero { position: relative; padding-block: 72px 0; }
.hero::before {
  content: ""; position: absolute; inset: -80px 0 0; z-index: -1;
  background-image: radial-gradient(var(--dot) 1.2px, transparent 1.3px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 70% 40%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 70% 40%, #000 30%, transparent 75%);
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 40px; align-items: center; }
@media (max-width: 980px) { .hero-grid { grid-template-columns: 1fr; gap: 48px; } }
.kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .84rem; color: var(--muted);
  background: var(--bg); border: 1px solid var(--line); border-radius: 99px; padding: 5px 12px 5px 8px;
}
.kicker:hover { border-color: var(--line-strong); color: var(--text); }
.kicker b { font-weight: 500; color: var(--text-strong); }
.kicker .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.hero h1 {
  font-size: clamp(2.5rem, 4.9vw, 4rem);
  line-height: 1; letter-spacing: -.05em; font-weight: 600;
  margin: 24px 0 22px;
}
.hero h1 .soft { color: var(--faint); }
.hero h1 .accent { color: var(--accent-text); }
.hero .lead { font-size: clamp(1.05rem, 1.5vw, 1.18rem); color: var(--muted); max-width: 34rem; margin-bottom: 32px; }
.hero-points { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: .88rem; color: var(--muted); }
.hero-points li { display: flex; gap: 7px; align-items: center; }
.hero-points .icon { width: 15px; height: 15px; color: var(--ok); }

/* ---------- sync network (hero visual) ---------- */
.net {
  position: relative; width: 100%; aspect-ratio: 6 / 5;
  container-type: inline-size;
}
.net svg.wires { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.wire { fill: none; stroke: var(--faint); stroke-opacity: .55; stroke-width: 1.5; stroke-dasharray: 3 5; }
.pulse { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round; opacity: 0; }
.node {
  position: absolute; transform: translate(-50%, -50%);
  background: var(--bg-raised); border: 1px solid var(--line-strong); border-radius: var(--r);
  padding: 2.2cqw 2.6cqw; display: grid; gap: .7cqw;
  font-size: clamp(10px, 2.3cqw, 14px); line-height: 1.35;
  transition: border-color .3s, background-color .3s;
  white-space: nowrap;
}
.node-head { display: flex; align-items: center; gap: 1.4cqw; color: var(--text-strong); font-weight: 500; }
.node-head .icon { width: 1.25em; height: 1.25em; color: var(--muted); }
.node-status { font: .82em/1.3 var(--mono); color: var(--faint); display: flex; align-items: center; gap: .6em; }
.node-status::before { content: ""; width: .55em; height: .55em; border-radius: 50%; background: var(--ok); flex: none; }
.node.editing .node-status::before { background: var(--accent); }
.node.busy { border-color: var(--accent-line); }
.node.fresh { border-color: var(--accent-line); background: color-mix(in srgb, var(--accent) 7%, var(--bg-raised)); }
.node.server {
  padding: 2.8cqw 3.2cqw; gap: 1.2cqw; border-radius: var(--r-lg);
  background: var(--surface); min-width: 38cqw;
}
.node.server .node-head img { width: 1.6em; height: 1.6em; }
.server-host { font: .82em/1 var(--mono); color: var(--faint); }
.server-rev { display: flex; align-items: baseline; gap: .6em; padding-top: 1.2cqw; border-top: 1px solid var(--line); }
.server-rev .lbl { font: .8em/1 var(--mono); color: var(--faint); text-transform: uppercase; letter-spacing: .08em; }
.server-rev .num { font: 500 2.1em/1 var(--mono); color: var(--text-strong); font-variant-numeric: tabular-nums; letter-spacing: -.03em; }
.server-rev .num.bump { color: var(--accent-text); }
.server-meta { font-size: .82em; color: var(--muted); }
.net-caption { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); font: .78rem/1 var(--mono); color: var(--faint); white-space: nowrap; }
.net-caption b { color: var(--muted); font-weight: 500; }

/* ---------- runs-on strip ---------- */
.runs { margin-top: 72px; border-block: 1px solid var(--line); }
.runs-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 34px; padding-block: 20px; color: var(--muted); font-size: .92rem; }
.runs-inner span { color: var(--faint); font: .76rem/1 var(--mono); text-transform: uppercase; letter-spacing: .08em; margin-right: 6px; }
.runs-inner b { font-weight: 500; color: var(--text); }

/* ---------- sections ---------- */
.section { padding-block: 120px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font: 500 .76rem/1 var(--mono); text-transform: uppercase; letter-spacing: .09em; color: var(--accent-text); margin-bottom: 18px; }
.eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 2px; background: currentColor; }
.section-head { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 16px 56px; align-items: end; margin-bottom: 56px; }
.section-head h2, .split h2, .final h2 { font-size: clamp(2rem, 4vw, 3rem); line-height: 1.04; letter-spacing: -.045em; font-weight: 600; }
.section-head p { color: var(--muted); font-size: 1.05rem; max-width: 30rem; }
@media (max-width: 800px) { .section-head { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .section { padding-block: 80px; } .section-head { margin-bottom: 36px; } }

/* ---------- steps: a real sequence, drawn as a path ---------- */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; position: relative; }
.steps::before {
  content: ""; position: absolute; left: 22px; right: 22px; top: 22px; height: 0;
  border-top: 1.5px dashed var(--line-strong);
}
.step { position: relative; display: flex; flex-direction: column; gap: 12px; }
.step-n {
  width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center;
  font: 500 .95rem/1 var(--mono); color: var(--text-strong);
  background: var(--bg); border: 1px solid var(--line-strong);
  margin-bottom: 14px;
}
.step:last-child .step-n { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.step h3 { font-size: 1.2rem; font-weight: 600; letter-spacing: -.02em; }
.step p { color: var(--muted); font-size: .96rem; max-width: 22rem; }
.step .demo { margin-top: 10px; }
@media (max-width: 900px) {
  .steps { grid-template-columns: 1fr; gap: 40px; }
  .steps::before { left: 22px; right: auto; top: 22px; bottom: 22px; height: auto; border-top: 0; border-left: 1.5px dashed var(--line-strong); }
  .step { padding-left: 64px; }
  .step-n { position: absolute; left: 0; top: 0; }
}
.term { font: .82rem/1.65 var(--mono); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px 14px; color: var(--text); overflow-x: auto; white-space: pre; }
.term .d { color: var(--faint); }
.fields { display: grid; gap: 8px; max-width: 22rem; }
.fields label { display: grid; grid-template-columns: 7.5em 1fr; align-items: center; font-size: .8rem; color: var(--faint); }
.fields span { font-size: .88rem; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.picker { display: grid; gap: 6px; max-width: 22rem; font-size: .9rem; }
.picker div { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); }
.picker .on { border-color: var(--accent-line); background: var(--accent-soft); color: var(--text-strong); }
.picker i { width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid var(--faint); flex: none; }
.picker .on i { border: 4px solid var(--accent); }
.picker em { margin-left: auto; font: .76rem/1 var(--mono); font-style: normal; color: var(--faint); }

/* ---------- bento ---------- */
.bento {
  display: grid; gap: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-areas:
    "sync sync hist back"
    "sync sync role wins"
    "ready size lang lang";
}
.tile {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 24px; display: flex; flex-direction: column; gap: 10px; min-width: 0;
}
.tile h3 { font-size: 1.04rem; font-weight: 600; letter-spacing: -.015em; }
.tile p { color: var(--muted); font-size: .92rem; }
.tile .viz { margin-top: auto; padding-top: 14px; }
.t-sync { grid-area: sync; }
.t-hist { grid-area: hist; }
.t-back { grid-area: back; }
.t-role { grid-area: role; }
.t-wins { grid-area: wins; }
.t-ready { grid-area: ready; }
.t-size { grid-area: size; }
.t-lang { grid-area: lang; }
@media (max-width: 1000px) {
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-areas: "sync sync" "hist back" "role wins" "ready size" "lang lang"; }
}
@media (max-width: 560px) {
  .bento { grid-template-columns: 1fr; grid-template-areas: "sync" "hist" "back" "role" "wins" "ready" "size" "lang"; }
}
.t-sync h3 { font-size: 1.5rem; letter-spacing: -.03em; }
.t-sync p { font-size: 1rem; max-width: 30rem; }
.log { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; font: .8rem/1.4 var(--mono); background: var(--bg); }
.log-row { display: grid; grid-template-columns: 5.2em 6.8em minmax(0, 1fr) 4.5em; gap: 12px; padding: 10px 14px; align-items: center; }
.log-row + .log-row { border-top: 1px solid var(--line); }
.log-row .r { color: var(--faint); font-variant-numeric: tabular-nums; }
.log-row .d { color: var(--muted); }
.log-row .f { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.log-row .t { color: var(--faint); text-align: right; }
.log-row.new { background: var(--accent-soft); }
.log-row.new .r, .log-row.new .t { color: var(--accent-text); }
@media (max-width: 520px) { .log-row { grid-template-columns: 4.6em minmax(0, 1fr) 4em; } .log-row .d { display: none; } }
.timeline { position: relative; display: flex; justify-content: space-between; align-items: center; height: 18px; }
.timeline::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 1.5px solid var(--line-strong); }
.timeline i { position: relative; width: 10px; height: 10px; border-radius: 50%; background: var(--surface); border: 1.5px solid var(--faint); }
.timeline i.sel { width: 14px; height: 14px; background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.timeline-lbl { display: flex; justify-content: space-between; font: .72rem/1 var(--mono); color: var(--faint); margin-top: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font: .76rem/1 var(--mono); padding: 6px 9px; border-radius: 7px; border: 1px solid var(--line-strong); color: var(--muted); background: var(--bg); }
.chip.on { border-color: var(--accent-line); background: var(--accent-soft); color: var(--text-strong); }
.flow { display: flex; align-items: center; gap: 8px; font: .78rem/1 var(--mono); color: var(--muted); flex-wrap: wrap; }
.flow .icon { width: 14px; height: 14px; color: var(--faint); }
.flow span { padding: 6px 9px; border-radius: 7px; border: 1px solid var(--line-strong); background: var(--bg); }
.big { font: 500 clamp(2.6rem, 5vw, 3.4rem)/1 var(--mono); letter-spacing: -.05em; color: var(--text-strong); }
.big small { font-size: .4em; letter-spacing: 0; color: var(--muted); margin-left: 4px; }
.langs { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 6px; }
.langs span { font: 500 .8rem/1 var(--mono); text-align: center; padding: 10px 0; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--bg); color: var(--text); }
@media (max-width: 560px) { .langs { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* ---------- split / conflicts ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 72px; align-items: center; }
.split > div > p { color: var(--muted); margin-top: 20px; font-size: 1.02rem; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; gap: 44px; } }
.checks { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 10px; }
.checks li { display: flex; gap: 10px; align-items: flex-start; }
.checks .icon { color: var(--ok); margin-top: 3px; width: 17px; height: 17px; }
.merge { display: grid; gap: 12px; }
.merge-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.doc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); font: .82rem/1.5 var(--mono); overflow: hidden; }
.doc-head { font: 500 .8rem/1 var(--font); color: var(--muted); padding: 11px 14px; border-bottom: 1px solid var(--line); display: flex; gap: 8px; align-items: center; }
.doc-head .icon { width: 15px; height: 15px; }
.doc-head .rev { margin-left: auto; font: .72rem/1 var(--mono); color: var(--faint); }
.doc .ln { padding: 3px 14px; }
.doc .ln:first-of-type { padding-top: 10px; }
.doc .ln:last-child { padding-bottom: 12px; }
.doc .add { background: var(--ok-soft); color: var(--text-strong); }
.doc .add::before { content: "+ "; color: var(--ok); }
.doc.result { border-color: var(--accent-line); }
.doc.result .doc-head { color: var(--text-strong); }
.merge-arrow { display: flex; align-items: center; gap: 10px; font: .74rem/1 var(--mono); color: var(--faint); text-transform: uppercase; letter-spacing: .08em; }
.merge-arrow::before, .merge-arrow::after { content: ""; flex: 1; border-top: 1.5px dashed var(--line-strong); }
@media (max-width: 440px) { .merge-row { grid-template-columns: 1fr; } }

/* ---------- admin screenshots ---------- */
.seg { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-raised); margin-bottom: 20px; }
.tab {
  font: 500 .88rem/1 var(--font); color: var(--muted);
  background: none; border: 0; border-radius: 8px;
  padding: 9px 13px; cursor: pointer;
}
.tab:hover { color: var(--text-strong); }
.tab.on { color: var(--text-strong); background: var(--surface-2); }
.shot { border: 1px solid var(--line-strong); border-radius: var(--r-lg); overflow: hidden; background: #18181d; padding: 10px; }
.shot img { width: 100%; height: auto; border-radius: 10px; transition: opacity .15s; }
.shot-caption { margin-top: 14px; color: var(--muted); font-size: .92rem; }

/* ---------- install ---------- */
.install { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 900px) { .install { grid-template-columns: 1fr; } }
.panes { border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--bg-raised); }
.panes .seg { margin: 12px 12px 0; }
.pane { padding: 18px 20px 20px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.pane[hidden] { display: none; }
.pane > p { color: var(--muted); }
.code { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.code pre { margin: 0; padding: 16px 18px; font-size: .82rem; line-height: 1.65; overflow-x: auto; color: var(--text); }
.code pre.tall { max-height: 300px; overflow-y: auto; }
.copy {
  position: absolute; top: 8px; right: 8px;
  font: 500 .76rem/1 var(--font); color: var(--muted);
  background: var(--bg); border: 1px solid var(--line); border-radius: 7px;
  padding: 6px 9px; cursor: pointer;
}
.copy:hover { color: var(--text-strong); border-color: var(--line-strong); }
.plugin-card {
  display: grid; gap: 16px; align-content: start;
  padding: 24px; border: 1px solid var(--accent-line); border-radius: var(--r-lg);
  background: color-mix(in srgb, var(--accent) 6%, var(--bg-raised));
}
.plugin-card .top { display: flex; gap: 14px; align-items: center; }
.plugin-card img { width: 46px; height: 46px; }
.plugin-card h3 { font-size: 1.08rem; font-weight: 600; }
.plugin-card .by { font-size: .84rem; color: var(--muted); }
.plugin-card ol { margin: 0; padding-left: 1.2em; color: var(--muted); font-size: .93rem; display: grid; gap: 4px; }
.plugin-card ol b { color: var(--text-strong); font-weight: 500; }

/* ---------- privacy ---------- */
.privacy-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.privacy-grid > div { padding: 24px; border-radius: var(--r-lg); border: 1px solid var(--line); }
.privacy-grid h3 { font-size: 1rem; font-weight: 600; margin: 16px 0 8px; }
.privacy-grid p { color: var(--muted); font-size: .93rem; }
.privacy-grid .icon { width: 20px; height: 20px; color: var(--accent-text); }
@media (max-width: 800px) { .privacy-grid { grid-template-columns: 1fr; } }

/* ---------- FAQ ---------- */
.faq-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.4fr); gap: 56px; align-items: start; }
.faq-grid .section-head { display: block; position: sticky; top: 110px; margin: 0; }
.faq-grid .section-head p { margin-top: 16px; }
@media (max-width: 800px) { .faq-grid { grid-template-columns: 1fr; gap: 28px; } .faq-grid .section-head { position: static; } }
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 20px 40px 20px 0; position: relative; font-weight: 500; color: var(--text-strong); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 9px; height: 9px; margin-top: -7px;
  border-right: 1.6px solid var(--faint); border-bottom: 1.6px solid var(--faint); transform: rotate(45deg); transition: transform .2s;
}
.faq details[open] summary::after { transform: rotate(225deg); margin-top: -2px; }
.faq details p { color: var(--muted); padding: 0 0 22px; max-width: 40rem; }

/* ---------- closing ---------- */
.final { position: relative; padding-block: 110px; border-top: 1px solid var(--line); overflow: hidden; }
.final::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image: radial-gradient(var(--dot) 1.2px, transparent 1.3px);
  background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(to right, transparent 20%, #000 90%);
  mask-image: linear-gradient(to right, transparent 20%, #000 90%);
}
.final-inner { display: flex; flex-wrap: wrap; gap: 28px 48px; align-items: end; justify-content: space-between; }
.final h2 { font-size: clamp(2.4rem, 6vw, 4.2rem); }
.final p { color: var(--muted); margin-top: 12px; font-size: 1.08rem; }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--line); padding-block: 36px; font-size: .88rem; color: var(--faint); }
.foot-inner { display: flex; flex-wrap: wrap; gap: 14px 32px; align-items: center; }
.foot-inner .logo { font-size: .95rem; }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.foot-links a:hover { color: var(--text-strong); }
.foot-note { margin-left: auto; }
@media (max-width: 700px) { .foot-note { margin-left: 0; width: 100%; } }

/* ============ Guide (docs) page ============ */
.docs { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 64px; padding-block: 48px 96px; }
.toc { position: sticky; top: 96px; align-self: start; max-height: calc(100vh - 120px); overflow-y: auto; font-size: .9rem; padding-bottom: 12px; }
.toc-title { font: 500 .74rem/1 var(--mono); text-transform: uppercase; letter-spacing: .09em; color: var(--faint); margin: 0 0 14px; }
.toc ol { list-style: none; margin: 0; padding: 0; position: relative; }
.toc ol::before { content: ""; position: absolute; left: 5px; top: 10px; bottom: 10px; border-left: 1.5px solid var(--line-strong); }
.toc li { position: relative; }
.toc a { display: flex; align-items: center; gap: 12px; padding: 5px 8px 5px 0; color: var(--muted); border-radius: 6px; }
.toc a::before { content: ""; position: relative; width: 11px; height: 11px; flex: none; border-radius: 50%; background: var(--bg); border: 1.5px solid var(--line-strong); transition: background-color .2s, border-color .2s; }
.toc a:hover { color: var(--text-strong); }
.toc a.done::before { border-color: var(--accent-line); background: var(--accent-soft); }
.toc a.on { color: var(--text-strong); }
.toc a.on::before { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.toc .sub a { padding-left: 20px; font-size: .86rem; }
.toc .sub a::before { width: 7px; height: 7px; margin-left: -18px; margin-right: 4px; }
@media (max-width: 900px) {
  .docs { grid-template-columns: minmax(0, 1fr); gap: 28px; padding-top: 32px; }
  .toc { position: static; max-height: none; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px 16px; }
  .toc .sub { display: none; }
}

.doc-body { max-width: 44rem; }
.doc-body > header { padding-bottom: 32px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.doc-body > header h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); letter-spacing: -.05em; font-weight: 600; line-height: 1.02; }
.doc-body > header p { color: var(--muted); font-size: 1.08rem; margin-top: 16px; }
.doc-body h2 { font-size: 1.6rem; letter-spacing: -.03em; font-weight: 600; margin: 72px 0 14px; line-height: 1.2; }
.doc-body h3 { font-size: 1.12rem; font-weight: 600; letter-spacing: -.01em; margin: 36px 0 10px; }
.doc-body p, .doc-body li { color: var(--text); }
.doc-body p + p, .doc-body p + ol, .doc-body p + ul, .doc-body ol + p, .doc-body ul + p { margin-top: 14px; }
.doc-body ol, .doc-body ul { padding-left: 1.3em; margin: 14px 0 0; display: grid; gap: 8px; }
.doc-body li::marker { color: var(--faint); }
.doc-body a:not(.btn) { color: var(--accent-text); text-decoration: underline; text-decoration-color: var(--accent-line); text-underline-offset: 3px; }
.doc-body a:not(.btn):hover { text-decoration-color: currentColor; }
.doc-body .code, .doc-body .callout, .doc-body .table-scroll, .doc-body .panes, .doc-body .figure, .doc-body .plugin-card { margin-top: 18px; }
.doc-body .panes .pane ol { margin-top: 0; }
.doc-body b, .doc-body strong { color: var(--text-strong); font-weight: 600; }
.doc-body .plugin-card .cta { margin-top: 2px; }
.path { font-weight: 500; color: var(--text-strong); }
.path .sep { color: var(--faint); margin: 0 5px; font-weight: 400; }

.callout { border-radius: var(--r); padding: 15px 17px 16px; background: var(--info-soft); border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent); }
.callout-title { display: flex; gap: 8px; align-items: center; font-weight: 600; color: var(--accent-text); margin-bottom: 6px; }
.callout-title .icon { width: 17px; height: 17px; }
.callout p, .callout li { font-size: .95rem; }
.callout.warning { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 28%, transparent); }
.callout.warning .callout-title { color: var(--warn); }
.callout.tip { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 26%, transparent); }
.callout.tip .callout-title { color: var(--ok); }

.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); }
.doc-body table { border-collapse: collapse; width: 100%; font-size: .93rem; }
.doc-body th, .doc-body td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.doc-body tr:last-child td { border-bottom: 0; }
.doc-body th { font-weight: 500; color: var(--muted); background: var(--bg-raised); font-size: .84rem; }
.doc-body td:first-child { white-space: nowrap; color: var(--text-strong); }
.sym { font-family: var(--mono); }

.figure { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: #18181d; }
.figure img { width: 100%; height: auto; }
.figure figcaption { padding: 10px 14px; font-size: .86rem; color: var(--muted); border-top: 1px solid var(--line); background: var(--bg-raised); }
figure.figure { margin: 18px 0 0; }

.next { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 72px; }
.next a { border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; display: grid; gap: 2px; }
.next a:hover { border-color: var(--line-strong); background: var(--bg-raised); }
.next small { color: var(--faint); font-size: .8rem; }
.next span { color: var(--text-strong); font-weight: 500; }
@media (max-width: 560px) { .next { grid-template-columns: 1fr; } }

/* ---------- web editor & publishing ---------- */
#editor .shot { margin-bottom: 28px; }
.editor-points { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; }
.editor-points h3 { font-size: 1rem; font-weight: 600; letter-spacing: -.01em; margin-bottom: 8px; }
.editor-points p { color: var(--muted); font-size: .93rem; }
@media (max-width: 900px) { .editor-points { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .editor-points { grid-template-columns: 1fr; } }
.url-chip { display: inline-flex; align-items: center; gap: 8px; margin-top: 22px; padding: 9px 13px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--surface); font: .86rem/1.3 var(--mono); color: var(--muted); max-width: 100%; overflow-wrap: anywhere; }
.url-chip b { color: var(--accent-text); font-weight: 500; }
.url-chip .icon { width: 15px; height: 15px; color: var(--faint); }
