/* EditStatic site. Headings and logo: Funnel Display. Everything else: Inter.
   Colours come from the editor itself: blue = editable outline, orange = unsaved,
   yellow = highlight, black = buttons. */
:root {
  --bg: #ffffff;
  --fg: #0b0b0d;
  --text: #2c2c31;
  --muted: #5f5f67;
  --soft: #f5f5f6;
  --panel: #ffffff;
  --line: #e4e4e7;
  --line-strong: #d4d4d8;
  --edit: #2563eb;
  --edit-soft: rgba(37, 99, 235, 0.16);
  --dirty: #dc2626;
  --mark: #ffe14d;
  --mark-fg: #111111;
  --ok: #16a34a;
  --del: #fde2e1;
  --del-fg: #9f1d1d;
  --add: #dcfce7;
  --add-fg: #14532d;
  --btn: #2563eb;
  --btn-fg: #ffffff;
  --btn-line: #2563eb;
  --btn-hover: #1d4ed8;
  --shadow: 0 10px 40px rgba(15, 15, 20, 0.10);
  --radius: 10px;
  --gap: 104px;
  --display: "Funnel Display", "Segoe UI", system-ui, sans-serif;
  --body: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a0a0b; --fg: #f5f5f6; --text: #d9d9de; --muted: #a3a3ab; --soft: #141416; --panel: #18181b;
    --line: #27272a; --line-strong: #3a3a40; --edit: #5b8def; --edit-soft: rgba(91, 141, 239, 0.22);
    --mark: #f5d63d; --del: #3a1517; --del-fg: #fca5a5; --add: #10301c; --add-fg: #86efac;
    --btn: #2563eb; --btn-fg: #ffffff; --btn-line: #2563eb; --btn-hover: #3b74f0; --shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0a0a0b; --fg: #f5f5f6; --text: #d9d9de; --muted: #a3a3ab; --soft: #141416; --panel: #18181b;
  --line: #27272a; --line-strong: #3a3a40; --edit: #5b8def; --edit-soft: rgba(91, 141, 239, 0.22);
  --mark: #f5d63d; --del: #3a1517; --del-fg: #fca5a5; --add: #10301c; --add-fg: #86efac;
  --btn: #2563eb; --btn-fg: #ffffff; --btn-line: #2563eb; --btn-hover: #3b74f0; --shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
[id] { scroll-margin-top: 72px; }
body {
  background: var(--bg); color: var(--text);
  font: 400 16px/1.6 var(--body); -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
:focus-visible { outline: 2px solid var(--edit); outline-offset: 3px; }
p, li, summary { text-wrap: pretty; }
td, th, small, .flow b, .facts li { text-wrap: balance; }
h1, h2, h3 { font-family: var(--display); color: var(--fg); font-weight: 600; letter-spacing: -0.02em; line-height: 1.08; text-wrap: balance; }
.wrap { max-width: 1120px; margin: 0 auto; padding-inline: 20px; }
code { font: 0.9em/1 var(--mono); background: var(--soft); border: 1px solid var(--line); border-radius: 4px; padding: 2px 5px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding-inline: 20px; border: 1px solid transparent; border-radius: 8px;
  font: 500 15px/1 var(--body); text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease, opacity 0.12s ease;
}
.btn-primary { background: var(--btn); color: var(--btn-fg); border-color: var(--btn-line); }
.btn-primary:hover { background: var(--btn-hover); border-color: var(--btn-hover); }
.btn-outline { background: var(--bg); color: var(--fg); border-color: var(--line-strong); }
.btn-outline:hover { background: var(--soft); }
.btn-ghost { background: transparent; color: var(--fg); height: 36px; padding-inline: 12px; font-size: 14.5px; }
.btn-ghost:hover { background: var(--soft); }
.btn-icon { width: 36px; padding: 0; }
.btn-icon svg { width: 19px; height: 19px; fill: currentColor; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
}
.bar { display: flex; align-items: center; gap: 6px; height: 62px; }
.brand { font: 600 23px/1 var(--display); letter-spacing: -0.02em; color: var(--fg); text-decoration: none; margin-right: auto; display: inline-flex; align-items: center; gap: 9px; }
.brand-mark { width: 1.2em; height: 1.2em; flex: none; }
.brand-caret { fill: var(--edit); }
/* the caret blinks a few times when the page opens, then stays */
@media (prefers-reduced-motion: no-preference) {
  .site-header .brand-caret { animation: caret 1.1s steps(1) 4; }
  @keyframes caret { 50% { opacity: 0; } }
}
.site-header nav { display: flex; gap: 2px; }
#theme .i-sun, #theme[data-dark="true"] .i-moon { display: none; }
#theme[data-dark="true"] .i-sun { display: block; }
@media (max-width: 560px) { .site-header nav .hide-sm { display: none; } }

/* ---------- sections ---------- */
section { padding-block: var(--gap); }
section + section { padding-top: 0; }
.section-head { display: grid; gap: 14px; margin-bottom: 56px; max-width: 760px; }
.section-head h2 { font-size: clamp(32px, 4.6vw, 48px); }
.section-head p { font-size: 18px; color: var(--text); text-wrap: balance; }
section > .section-head { margin-inline: auto; text-align: center; justify-items: center; }
/* a hand-placed line break for wide screens; phones let the browser balance the lines */
@media (max-width: 640px) { .br-wide { display: none; } }
@media (max-width: 640px) { :root { --gap: 72px; } .section-head { margin-bottom: 40px; } }

/* ---------- hero ---------- */
.hero { text-align: center; padding-block: 88px var(--gap); }
.hero h1 { font-size: clamp(40px, 6.6vw, 76px); margin-bottom: 22px; }
.hero .lede { max-width: 660px; margin: 0 auto; font-size: 19px; color: var(--text); }
.hero-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 34px; }
/* "Works with": hosts and builders it's been tested on; one quiet row, logos in the text colour so both themes match */
.works { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 14px 30px; margin-top: 40px; color: var(--muted); }
.works-label { font: 400 11px/1 var(--body); letter-spacing: 0.12em; text-transform: uppercase; }
.works-logo { display: inline-flex; align-items: center; gap: 8px; font: 600 17px/1 var(--display); letter-spacing: -0.01em; white-space: nowrap; }
.works-logo svg { width: 20px; height: 20px; flex: none; fill: currentColor; }
/* four logos on one line, or two by two: never three and a lone one */
.works-logos { display: grid; grid-template-columns: repeat(4, auto); gap: 14px 30px; justify-content: center; }
@media (max-width: 860px) { .works-label { flex-basis: 100%; text-align: center; } .works-logos { grid-template-columns: repeat(2, auto); gap: 12px 26px; } }
.hero .frame { margin-top: 64px; text-align: left; }
@media (max-width: 640px) { .hero { padding-top: 56px; } .hero .lede { font-size: 17px; } .hero .frame { margin-top: 44px; } }
.mark { background: var(--mark); color: var(--mark-fg); padding: 0 0.12em; box-decoration-break: clone; -webkit-box-decoration-break: clone; }

/* ---------- browser frame (all diagrams) ---------- */
.frame {
  position: relative; container-type: inline-size;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); overflow: hidden;
}
.frame-top { display: flex; align-items: center; gap: 7px; height: 38px; padding-inline: 14px; border-bottom: 1px solid var(--line); background: var(--soft); }
.frame-top i { width: 11px; height: 11px; border-radius: 50%; background: #c7c7c7; }
.frame-top i:nth-child(1) { background: #e8112d; }
.frame-top i:nth-child(2) { background: #ffdd00; }
.frame-top .url { margin-left: 10px; flex: 1; max-width: 340px; height: 24px; border-radius: 6px; background: var(--panel); border: 1px solid var(--line); font: 12.5px/22px var(--body); color: var(--muted); padding-inline: 10px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

/* the little site inside a frame */
.mock { position: relative; padding: 0 0 92px; color: #1c1c1c; background: #fafaf7; font-family: var(--body); }
.mock-promo { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; padding: 9px 5cqi; background: #000; color: #fff; font: 600 13px/1.3 var(--body); }
.mock-promo svg { width: 16px; height: 16px; flex: none; }
.promo-social { display: flex; gap: 14px; color: #fff; }
.promo-text { text-align: center; text-wrap: balance; }
.promo-call { display: flex; align-items: center; gap: 7px; justify-self: end; white-space: nowrap; }
.mock-promo .ed { outline-offset: 3px; }
@container (max-width: 760px) {
  .mock-promo { grid-template-columns: 1fr; padding-block: 8px; }
  .promo-social, .promo-call { display: none; }
}
.mock-nav { display: flex; align-items: center; justify-content: space-between; padding: 16px 5cqi; background: #fff; border-bottom: 1px solid #e7e7e2; font-size: 14px; }
.mock-nav b { font-weight: 700; font-size: 15px; }
.mock-nav span { display: flex; gap: 18px; color: #333; }
.mock-hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 4cqi; align-items: center; padding: 5cqi 5cqi 0; }
.mock-hero .h { font: 700 clamp(22px, 4.4cqi, 44px)/1.1 var(--body); letter-spacing: -0.02em; color: #151515; margin-bottom: 14px; }
.mock-hero p { font-size: clamp(14px, 1.6cqi, 17px); color: #444; margin-bottom: 18px; line-height: 1.55; }
.mock-btn { display: inline-block; background: #000; color: #fff; font-size: 14px; font-weight: 600; padding: 11px 16px; border-radius: 6px; }
.mock-img { position: relative; aspect-ratio: 4 / 3; border-radius: 8px; overflow: hidden; background: #cfd8dc; }
.mock-img svg { position: absolute; inset: 0; width: 100%; height: 100%; transition: opacity 0.35s ease; }
.mock-img .img-b { opacity: 0; }
.mock-img.swapped .img-a { opacity: 0; }
.mock-img.swapped .img-b { opacity: 1; }
@container (max-width: 620px) {
  .mock-hero { grid-template-columns: 1fr; gap: 20px; padding-top: 24px; }
  .mock-hero .h { font-size: 26px; }
  .mock-nav span { gap: 12px; }
}

/* editable states, same look as the real editor */
.ed { border-radius: 2px; outline: 2px solid transparent; outline-offset: 4px; transition: outline-color 0.15s ease; }
.ed.hover { outline: 2px dashed var(--edit); }
.ed.focus { outline: 2px solid var(--edit); }
.ed.dirty { color: var(--dirty); }
.mock-img.ed.dirty { outline: 2px solid var(--dirty); }
.ed.focus.dirty { outline: 2px solid var(--edit); }
.sel { background: var(--edit-soft); }
.caret { display: inline-block; width: 2px; height: 1em; background: currentColor; vertical-align: -0.12em; margin-left: 1px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* the EditStatic bar */
.es-bar {
  position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 3;
  display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 14px; white-space: nowrap;
  background: #fff; color: #111; border: 1px solid #d4d4d8; border-radius: 12px; box-shadow: 0 8px 30px rgba(0,0,0,.18);
  font: 500 13px/1.2 var(--body);
}
.es-bar .b-brand { font: 600 14px/1 var(--display); letter-spacing: -0.01em; }
.es-bar .b-select, .es-bar .b-toggle { border: 1px solid #d4d4d8; border-radius: 7px; padding: 6px 8px; color: #111; background: #fff; }
.es-bar .b-toggle { padding: 0; display: flex; overflow: hidden; }
.es-bar .b-toggle span { padding: 6px 8px; color: #52525b; }
.es-bar .b-toggle span:first-child { background: #f4f4f5; color: #111; }
.es-bar .b-status { color: #52525b; min-width: 118px; }
.es-bar .b-status.dirty { color: var(--dirty); }
.es-bar .b-status.ok { color: #15803d; }
.es-bar .b-btn { border-radius: 7px; padding: 7px 12px; border: 1px solid #d4d4d8; background: #fff; color: #111; transition: opacity .15s; }
.es-bar .b-save { background: #000; color: #fff; border-color: #000; }
.es-bar .off { opacity: 0.4; }
.es-bar .pressed { transform: scale(0.95); }
@container (max-width: 760px) { .es-bar .b-select, .es-bar .b-toggle { display: none; } }
@container (max-width: 470px) {
  .es-bar { left: 10px; right: 10px; transform: none; gap: 6px; padding: 6px 6px 6px 10px; }
  .es-bar .b-brand { display: none; }
  .es-bar .b-status { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; }
  .es-bar .b-btn { padding: 7px 9px; }
}

/* image popover */
.es-pop {
  position: absolute; z-index: 4; width: 250px; padding: 13px; background: #fff; color: #111;
  border: 1px solid #d4d4d8; border-radius: 12px; box-shadow: 0 8px 30px rgba(0,0,0,.18); font: 400 13px/1.4 var(--body);
}
.es-pop strong { font-weight: 600; font-size: 14px; }
.es-pop .p-replace { margin-top: 9px; border: 1px solid #d4d4d8; border-radius: 7px; padding: 7px; text-align: center; font-weight: 500; transition: background .15s; }
.es-pop .p-replace.pressed { background: #f4f4f5; }
.es-pop label { display: block; font-weight: 500; margin: 9px 0 4px; }
.es-pop .p-alt { border: 1px solid #d4d4d8; border-radius: 7px; padding: 6px 8px; min-height: 31px; color: #111; }
.es-pop .p-hint { color: #71717a; font-size: 11.5px; margin-top: 4px; }

/* cursor */
.cursor { position: absolute; left: 0; top: 0; z-index: 6; width: 22px; height: 22px; pointer-events: none; transition: transform 0.8s cubic-bezier(.45,.05,.3,1); will-change: transform; }
.cursor svg { position: absolute; inset: 0; width: 22px; height: 22px; }
.cursor .c-beam { display: none; }
.cursor.beam .c-arrow { display: none; }
.cursor.beam .c-beam { display: block; }
.cursor::after { content: ""; position: absolute; left: -9px; top: -9px; width: 18px; height: 18px; border-radius: 50%; background: var(--edit); opacity: 0; transform: scale(.4); }
.cursor.click::after { animation: ripple .45s ease-out; }
@keyframes ripple { 0% { opacity: .45; transform: scale(.4); } 100% { opacity: 0; transform: scale(1.6); } }
@media (prefers-reduced-motion: reduce) { .cursor { display: none; } .caret { animation: none; } }

/* ---------- steps ---------- */
.steps { display: grid; gap: 96px; list-style: none; }
.step { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 64px; align-items: center; }
.step:nth-child(even) .step-text { order: 2; }
.step-num { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; background: var(--fg); color: var(--bg); font: 600 15px/1 var(--display); margin-bottom: 18px; }
.step h3 { font-size: clamp(26px, 3vw, 34px); margin-bottom: 14px; }
.step p { font-size: 17px; color: var(--text); }
.step p + p { margin-top: 12px; }
.facts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; list-style: none; }
.facts li { font-size: 13.5px; font-weight: 500; color: var(--fg); background: var(--soft); border: 1px solid var(--line); border-radius: 999px; padding: 5px 11px; }
@media (max-width: 860px) {
  .steps { gap: 72px; }
  .step { grid-template-columns: 1fr; gap: 28px; }
  .step:nth-child(even) .step-text { order: 0; }
}

/* diagram 1: click to edit */
.d-click .mock { padding-bottom: 28px; }
.d-click .tag { position: absolute; z-index: 3; font: 600 12px/1 var(--body); color: #fff; background: var(--edit); border-radius: 5px; padding: 5px 7px; white-space: nowrap; }
.d-click .locked { color: #8a8a8a; }

/* diagram 2: image + popover */
.d-image .mock { padding: 24px; display: grid; grid-template-columns: 1fr; }
.d-image .stage { position: relative; }
.d-image .mock-img { max-width: 62%; }
.d-image .es-pop { right: 0; top: 18px; }
.d-image .chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; list-style: none; }
.d-image .chips li { font: 500 12.5px/1 var(--body); color: #1c1c1c; background: #fff; border: 1px solid #e2e2dc; border-radius: 999px; padding: 7px 10px; display: flex; gap: 6px; align-items: center; }
.d-image .chips s { color: #8a8a8a; }
@container (max-width: 520px) {
  .d-image .mock-img { max-width: none; }
  .d-image .es-pop { position: relative; top: auto; right: auto; width: auto; margin-top: -40px; margin-inline: 12px; }
}

/* diagram 3: the bar with two unsaved edits */
.d-save .mock { padding-bottom: 96px; }
.d-save .mock-hero { grid-template-columns: 1fr; padding-bottom: 8px; }
.d-save .mock-hero .h { font-size: clamp(22px, 4cqi, 34px); }

/* diagram 4: the diff */
.diff { font: 13px/1.75 var(--mono); color: var(--text); background: var(--panel); padding-block: 12px; overflow-x: auto; }
.diff div { display: grid; grid-template-columns: 34px 18px 1fr; padding-right: 16px; white-space: pre; }
.diff .n { color: var(--muted); text-align: right; padding-right: 8px; user-select: none; }
.diff .s { color: var(--muted); user-select: none; }
.diff .del { background: var(--del); color: var(--del-fg); }
.diff .add { background: var(--add); color: var(--add-fg); }
.diff .del .s, .diff .add .s { color: inherit; }
.diff .gap { color: var(--muted); }
.diff-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 16px; border-top: 1px solid var(--line); background: var(--soft); font: 500 13px/1.4 var(--body); color: var(--muted); }
.diff-foot b { color: var(--fg); font-weight: 600; }

/* diagram 5: the publish flow */
.flow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; padding: 32px 22px; background: var(--soft); list-style: none; }
.flow li { position: relative; display: grid; justify-items: center; gap: 10px; text-align: center; padding-inline: 6px; }
.flow li + li::before { content: ""; position: absolute; top: 27px; right: calc(50% + 32px); width: calc(100% - 64px); height: 2px; background: repeating-linear-gradient(90deg, var(--line-strong) 0 6px, transparent 6px 11px); }
.flow .node { width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center; background: var(--panel); border: 1px solid var(--line); box-shadow: 0 2px 8px rgba(0,0,0,.05); }
.flow .node svg { width: 26px; height: 26px; fill: var(--fg); }
.flow li:last-child .node { background: var(--fg); border-color: var(--fg); }
.flow li:last-child .node svg { fill: var(--bg); }
.flow b { font: 600 15px/1.2 var(--display); color: var(--fg); }
.flow small { font-size: 12.5px; color: var(--muted); line-height: 1.35; }
.flow-foot { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-top: 1px solid var(--line); font-size: 14px; color: var(--text); background: var(--panel); }
.flow-foot .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); flex: none; box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 20%, transparent); }
@container (max-width: 520px) {
  .flow { grid-template-columns: 1fr; gap: 26px; padding: 26px 22px; }
  .flow li { grid-template-columns: 56px 1fr; justify-items: start; text-align: left; column-gap: 14px; row-gap: 2px; }
  .flow li .node { grid-row: span 2; }
  .flow li + li::before { top: -22px; left: 27px; right: auto; width: 2px; height: 18px; background: repeating-linear-gradient(180deg, var(--line-strong) 0 5px, transparent 5px 9px); }
}

/* ---------- two versions ---------- */
.versions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; list-style: none; }
.version { border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; background: var(--panel); display: grid; gap: 12px; align-content: start; }
.version svg { width: 30px; height: 30px; fill: var(--fg); }
.version h3 { font-size: 24px; }
.version p { color: var(--text); }
@media (max-width: 760px) { .versions { grid-template-columns: 1fr; } }

/* ---------- compare table ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
table { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 900px; font-size: 15px; }
th, td { text-align: left; vertical-align: top; padding: 14px 16px; border-bottom: 1px solid var(--line); }
tbody tr:last-child > * { border-bottom: 0; }
thead th { font: 600 18px/1.2 var(--display); color: var(--fg); padding-block: 18px 14px; }
thead th small { display: block; margin-top: 4px; font: 400 13px/1.35 var(--body); color: var(--muted); }
tbody th { font-weight: 600; color: var(--fg); width: 16%; }
td { color: var(--text); width: 21%; }
.col-es { background: color-mix(in srgb, var(--edit) 9%, var(--panel)); color: var(--fg); font-weight: 500; border-bottom-color: color-mix(in srgb, var(--edit) 22%, var(--panel)); box-shadow: inset 2px 0 0 var(--btn), inset -2px 0 0 var(--btn); }
thead .col-es { background: var(--btn); color: var(--btn-fg); border-bottom-color: var(--btn); }
thead .col-es small { color: color-mix(in srgb, var(--btn-fg) 82%, var(--btn)); }
tbody tr:last-child > .col-es { box-shadow: inset 2px 0 0 var(--btn), inset -2px 0 0 var(--btn), inset 0 -2px 0 var(--btn); }
tbody th, thead td:first-child { position: sticky; left: 0; z-index: 1; background: var(--panel); box-shadow: 1px 0 0 var(--line); }
.soon { display: inline-block; font: 600 11.5px/1 var(--body); padding: 4px 7px; border-radius: 999px; background: rgba(0,0,0,.1); margin-right: 6px; vertical-align: 1px; }

/* ---------- FAQ ---------- */
.faq-list { max-width: 820px; margin-inline: auto; border-top: 1px solid var(--line); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 0; cursor: pointer; list-style: none; font: 600 19px/1.3 var(--display); color: var(--fg); }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: ""; flex: none; width: 10px; height: 10px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg) translate(-3px, -3px); transition: transform .2s ease; }
.faq-list details[open] summary::after { transform: rotate(225deg) translate(-3px, -3px); }
.faq-list details p { padding: 0 0 22px; max-width: 68ch; color: var(--text); }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding-block: 28px; font-size: 14px; color: var(--muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; }
.site-footer .brand { font-size: 18px; margin-right: auto; }

/* ---------- 404 ---------- */
.notfound { min-height: calc(100vh - 62px - 85px); display: grid; place-content: center; text-align: center; gap: 18px; padding-block: 64px; }
.notfound .code { font: 600 20px/1 var(--display); color: var(--muted); }
.notfound h1 { font-size: clamp(36px, 6vw, 60px); }
.notfound .btn { justify-self: center; margin-top: 8px; }

/* ---------- header: current page ---------- */
.site-header nav a[aria-current="page"] { background: var(--soft); }

/* ---------- docs ---------- */
.docs-index { padding-block: 72px var(--gap); }
.docs-index > .section-head h1 { font-size: clamp(36px, 5.4vw, 56px); }
.docs-index > .section-head p { font-size: 19px; }
.doc-group + .doc-group { margin-top: 56px; }
.doc-group h2 { font-size: 24px; margin-bottom: 18px; }
.doc-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; list-style: none; }
.doc-card { display: block; height: 100%; padding: 22px 22px 24px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; transition: border-color .12s ease; }
.doc-card:hover { border-color: var(--edit); }
.doc-card h3 { font-size: 19px; margin-bottom: 8px; }
.doc-card p { font-size: 15px; color: var(--muted); }
@media (max-width: 860px) { .doc-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .docs-index { padding-top: 48px; } .doc-cards { grid-template-columns: 1fr; } }

.docs-layout { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 72px; padding-block: 56px var(--gap); }
.docs-nav { position: sticky; top: 94px; align-self: start; max-height: calc(100vh - 110px); overflow-y: auto; font-size: 14.5px; }
.docs-nav p { font-size: 13px; font-weight: 600; color: var(--muted); margin: 24px 0 6px; }
.docs-nav p:first-child { margin-top: 0; }
.docs-nav ul { list-style: none; display: grid; gap: 1px; }
.docs-nav a { display: block; padding: 6px 10px; border-radius: 6px; color: var(--text); text-decoration: none; line-height: 1.35; }
.docs-nav a:hover { background: var(--soft); }
.docs-nav a[aria-current="page"] { background: var(--soft); color: var(--fg); font-weight: 600; }
.docs-nav .all { margin-bottom: 4px; }

.doc { max-width: 720px; min-width: 0; }
.doc-crumb { font-size: 14px; color: var(--muted); margin-bottom: 16px; }
.doc-crumb a { color: var(--muted); text-underline-offset: 3px; }
.doc h1 { font-size: clamp(34px, 5vw, 50px); }
.doc .lede { font-size: 19px; margin-top: 18px; }
.doc h2 { font-size: 27px; margin: 56px 0 16px; }
.doc h3 { font-size: 19px; line-height: 1.25; letter-spacing: -0.01em; margin: 32px 0 8px; }
.doc p, .doc ul, .doc ol, .doc pre, .doc-note { margin-bottom: 16px; }
.doc ul, .doc ol { padding-left: 22px; }
.doc li + li { margin-top: 6px; }
.doc li::marker { color: var(--muted); }
.doc strong { color: var(--fg); font-weight: 600; }
.doc :is(p, li) a { color: var(--fg); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.doc :is(p, li) a:hover { color: var(--edit); }
.doc pre { background: var(--soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; overflow-x: auto; font: 14px/1.6 var(--mono); color: var(--fg); }
.doc pre code { font: inherit; background: none; border: 0; padding: 0; }
/* docs tables (settings, messages): scroll inside their own box on phones */
.doc-table { overflow-x: auto; margin-bottom: 16px; border: 1px solid var(--line); border-radius: var(--radius); }
.doc table { width: 100%; min-width: 0; border-collapse: collapse; font-size: 15px; line-height: 1.5; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.doc thead th { background: var(--soft); color: var(--fg); font-weight: 600; font-size: 14px; }
.doc tbody tr:last-child td { border-bottom: 0; }
.doc td:first-child { white-space: nowrap; color: var(--fg); }
@media (max-width: 560px) { .doc td:first-child { white-space: normal; } }
.doc-note { background: var(--soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.doc-note p:last-child { margin-bottom: 0; }

.doc-steps { list-style: none; padding: 0 !important; counter-reset: step; margin: 28px 0 24px; display: grid; gap: 26px; }
.doc-steps > li { counter-increment: step; display: grid; grid-template-columns: 34px minmax(0, 1fr); column-gap: 18px; margin: 0 !important; }
.doc-steps > li::before { content: counter(step); grid-row: span 9; display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; background: var(--fg); color: var(--bg); font: 600 15px/1 var(--display); }
.doc-steps h3 { margin: 5px 0 6px; }
.doc-steps p { margin-bottom: 8px; }
.doc-steps > li > :last-child { margin-bottom: 0; }

.doc-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 72px; padding-top: 32px; border-top: 1px solid var(--line); }
.doc-pager a { display: block; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; transition: border-color .12s ease; }
.doc-pager a:hover { border-color: var(--edit); }
.doc-pager small { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.doc-pager b { font: 600 17px/1.3 var(--display); color: var(--fg); }
.doc-pager .next { grid-column: 2; text-align: right; }

@media (max-width: 900px) {
  .docs-layout { grid-template-columns: minmax(0, 1fr); padding-top: 40px; }
  .docs-nav { display: none; }
}
@media (max-width: 560px) {
  .doc .lede { font-size: 17px; }
  .doc h2 { font-size: 24px; margin-top: 48px; }
  .doc-pager { grid-template-columns: 1fr; }
  .doc-pager .next { grid-column: auto; }
}
.doc-group { padding-block: 0; }
@media (max-width: 640px) { .doc-group + .doc-group { margin-top: 40px; } }
