:root {
  --bg: #fbfbfa; --bg2: #ffffff; --sunk: #f3f3f1; --fg: #18181b; --dim: #63636b; --faint: #9b9ba3;
  --line: #e6e6e3; --line2: #d4d4d0;
  --accent: #2b59c3; --on-accent: #fff; --ok: #1e7a46; --gold: #9a6a12;
  /* Buttons: the app's and the web page's blue, the same in both themes, with white text. */
  --btn: #2b59c3; --btn-hi: #2450b0; --on-btn: #fff;
  --mono: ui-monospace, "Cascadia Mono", "JetBrains Mono", "SF Mono", Consolas, monospace;
  --sans: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, Ubuntu, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
  --bg: #0e0e10; --bg2: #151517; --sunk: #1b1b1e; --fg: #ededee; --dim: #a1a1a8; --faint: #6b6b73;
    --line: #26262a; --line2: #34343a;
    --accent: #8fb1ff; --on-accent: #0e0e10; --ok: #5fcf8b; --gold: #e0b45a;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0e0e10; --bg2: #151517; --sunk: #1b1b1e; --fg: #ededee; --dim: #a1a1a8; --faint: #6b6b73;
  --line: #26262a; --line2: #34343a;
  --accent: #8fb1ff; --on-accent: #0e0e10; --ok: #5fcf8b; --gold: #e0b45a;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
body { margin: 0; font: 16px/1.6 var(--sans); background: var(--bg); color: var(--fg); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
a { color: inherit; text-decoration-color: var(--line2); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
p a, dd a, td a, li a { color: var(--accent); text-decoration-color: color-mix(in srgb, var(--accent) 35%, transparent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.12; letter-spacing: -.022em; font-weight: 600; margin: 0; }
h2 { font-size: clamp(28px, 3.6vw, 40px); }
h3 { font-size: 17px; letter-spacing: -.01em; line-height: 1.3; }
p { margin: 0 0 1em; }
code, pre, kbd { font-family: var(--mono); font-size: .875em; }
code { background: var(--sunk); padding: .12em .4em; border-radius: 4px; }
kbd { border: 1px solid var(--line2); border-bottom-width: 2px; border-radius: 4px; padding: 0 5px; background: var(--bg2); font-size: .8em; }
svg { width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.2em; flex: none; }
img { max-width: 100%; display: block; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--fg); color: var(--bg); padding: 8px 12px; border-radius: 6px; z-index: 30; }
.skip:focus { left: 8px; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 28px; }
.dim { color: var(--dim); }
.small { font-size: 14px; }
.eyebrow { font: 500 12px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--faint); margin: 0 0 18px; display: block; }

/* Header */
header.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid transparent; transition: border-color .2s; }
header.top.scrolled { border-bottom-color: var(--line); }
header.top .wrap { display: flex; align-items: center; gap: 20px; height: 60px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 600; letter-spacing: -.01em; text-decoration: none; font-size: 15px; }
.brand svg { width: 22px; height: 22px; }
#nav { display: flex; gap: 2px; margin-left: auto; align-items: center; }
#nav a { color: var(--dim); text-decoration: none; padding: 6px 11px; border-radius: 6px; font-size: 14px; }
#nav a:hover, #nav a[aria-current] { color: var(--fg); }
#nav a.gh { display: inline-flex; align-items: center; gap: 6px; }
.icon-btn { background: none; border: 0; color: var(--dim); border-radius: 6px; width: 34px; height: 34px; display: grid; place-items: center; cursor: pointer; }
.icon-btn:hover { color: var(--fg); background: var(--sunk); }
#menu { display: none; }
@media (max-width: 780px) {
  #menu { display: grid; margin-left: auto; }
  #nav { display: none; position: absolute; top: 60px; left: 0; right: 0; flex-direction: column; align-items: stretch; background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px 20px 18px; }
  #nav a { padding: 10px 4px; font-size: 16px; }
  #nav.open { display: flex; }
}

/* Buttons */
.btns { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.btn { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 18px; border-radius: 8px; background: var(--btn); color: var(--on-btn); text-decoration: none; font-weight: 600; font-size: 15px; border: 1px solid var(--btn); cursor: pointer; transition: background .15s, border-color .15s; }
.btn:hover { background: var(--btn-hi); border-color: var(--btn-hi); }
.btn.alt { background: var(--bg2); color: var(--fg); border-color: var(--line2); font-weight: 500; }
.btn.alt:hover { background: var(--sunk); border-color: var(--line2); }
.btn .k { font: 12px var(--mono); opacity: .6; }
.btn.sm { height: 34px; padding: 0 12px; font-size: 14px; gap: 6px; white-space: nowrap; }
#webapp { margin-left: 4px; }
@media (max-width: 780px) { #webapp { margin-left: 0; } }
@media (max-width: 420px) { #webapp { width: 34px; padding: 0; justify-content: center; font-size: 0; gap: 0; } #webapp svg { font-size: 16px; } }

/* Hero */
.hero { padding: clamp(64px, 10vw, 120px) 0 0; overflow: hidden; }
.hero h1 { font-size: clamp(40px, 6.6vw, 76px); letter-spacing: -.04em; line-height: 1.02; max-width: 15ch; margin: 0 0 24px; }
.hero h1 span { color: var(--faint); }
.lead { font-size: clamp(17px, 1.6vw, 19px); color: var(--dim); max-width: 60ch; margin: 0 0 32px; line-height: 1.55; }
.hero .facts { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 26px 0 0; padding: 0; list-style: none; font: 13px var(--mono); color: var(--faint); }
.hero .facts li::before { content: "— "; }
.stage { margin-top: clamp(48px, 7vw, 80px); position: relative; }
.stage::before { content: ""; position: absolute; inset: 12% -40px -1px; background: var(--sunk); border-radius: 20px 20px 0 0; z-index: -1; }
.window { border-radius: 12px; overflow: hidden; border: 1px solid var(--line2); background: var(--bg2); box-shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 30px 80px -20px rgba(0,0,0,.35), 0 10px 24px -12px rgba(0,0,0,.25); }
.window img { width: 100%; height: auto; }
.duo { display: grid; grid-template-columns: 1.15fr 1fr; gap: 24px; align-items: start; }
.duo .window:nth-child(2) { margin-top: 64px; }
@media (max-width: 820px) { .duo { grid-template-columns: 1fr; } .duo .window:nth-child(2) { margin-top: 0; } }

/* Shots follow the theme */
.th-light { display: none !important; }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .th-dark { display: none !important; } :root:not([data-theme="dark"]) .th-light { display: block !important; } }
:root[data-theme="light"] .th-dark { display: none !important; }
:root[data-theme="light"] .th-light { display: block !important; }

/* Sections */
section { padding: clamp(72px, 10vw, 128px) 0; border-top: 1px solid var(--line); }
.hero + section { border-top: 0; }
section.alt { background: var(--bg2); }
.section-head { max-width: 680px; margin-bottom: 48px; }
.section-head h2 { margin-bottom: 14px; }
.section-head p { font-size: 17px; }

/* Feature rows: text beside a real screenshot */
.feature { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(32px, 6vw, 88px); align-items: center; }
.feature + .feature { margin-top: clamp(72px, 9vw, 120px); }
.feature.flip { grid-template-columns: 7fr 5fr; }
.feature.flip > :first-child { order: 2; }
.feature h3 { font-size: clamp(22px, 2.4vw, 28px); letter-spacing: -.02em; margin-bottom: 14px; }
.feature p { color: var(--dim); }
.points { list-style: none; padding: 0; margin: 22px 0 0; border-top: 1px solid var(--line); }
.points li { padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 15px; display: grid; grid-template-columns: 9ch 1fr; gap: 16px; }
.points b { font: 500 12px/1.9 var(--mono); color: var(--faint); text-transform: uppercase; letter-spacing: .05em; }
@media (max-width: 860px) { .feature, .feature.flip { grid-template-columns: 1fr; } .feature.flip > :first-child { order: 0; } }

/* Index of everything else: a ruled list, not cards */
.index { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.index > div { padding: 26px 28px 30px 0; border-bottom: 1px solid var(--line); }
.index > div:not(:nth-child(3n)) { border-right: 1px solid var(--line); }
.index > div:not(:nth-child(3n+1)) { padding-left: 28px; }
.index h3 { margin-bottom: 8px; display: flex; align-items: center; gap: 10px; }
.index h3 svg { color: var(--faint); }
.index p { color: var(--dim); font-size: 15px; margin: 0; }
@media (max-width: 900px) {
  .index { grid-template-columns: 1fr 1fr; }
  .index > div { padding: 22px 20px 24px 0 !important; border-right: 0 !important; }
  .index > div:nth-child(2n) { padding-left: 20px !important; border-left: 1px solid var(--line); }
}
@media (max-width: 560px) { .index { grid-template-columns: 1fr; } .index > div:nth-child(2n) { padding-left: 0 !important; border-left: 0; } }

/* Comparison */
.compare { width: 100%; border-collapse: collapse; font-size: 15px; }
.compare th, .compare td { text-align: left; padding: 16px 20px 16px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.compare thead th { font-size: 18px; font-weight: 600; letter-spacing: -.01em; border-bottom-color: var(--line2); padding-bottom: 18px; }
.compare thead th small { display: block; font: 400 13px var(--mono); color: var(--faint); margin-top: 6px; letter-spacing: 0; }
.compare tbody th { font: 500 12px/1.9 var(--mono); color: var(--faint); text-transform: uppercase; letter-spacing: .05em; width: 18%; }
.compare td { color: var(--dim); width: 41%; }
.compare td pre { margin: 6px 0 0; }
.scroll-x { overflow-x: auto; }

/* Commands */
pre { background: var(--sunk); border: 1px solid var(--line); border-radius: 8px; padding: 13px 16px; overflow-x: auto; margin: 12px 0; line-height: 1.6; }
pre code { background: none; padding: 0; font-size: 13.5px; }
pre.cmd { position: relative; padding-right: 50px; }
pre .c { color: var(--faint); }
button.copy { position: absolute; top: 7px; right: 7px; width: 30px; height: 30px; border-radius: 6px; border: 0; background: transparent; color: var(--faint); cursor: pointer; display: grid; place-items: center; }
button.copy:hover { color: var(--fg); background: var(--bg2); }
button.copy.done { color: var(--ok); }

/* Downloads: a table of files */
.files { border-top: 1px solid var(--fg); }
.file { display: grid; grid-template-columns: 28px 1fr auto auto; gap: 18px; align-items: center; padding: 18px 4px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--fg); transition: background .15s; }
.file:hover { background: var(--sunk); }
.file svg { width: 20px; height: 20px; color: var(--dim); }
.file b { font-weight: 500; display: block; }
.file .meta { font: 12px var(--mono); color: var(--faint); word-break: break-all; }
.file .size { font: 13px var(--mono); color: var(--dim); white-space: nowrap; }
.file .go { font-size: 14px; color: var(--dim); display: inline-flex; gap: 6px; align-items: center; }
.file:hover .go { color: var(--fg); }
@media (max-width: 620px) { .file { grid-template-columns: 24px 1fr; } .file .size, .file .go { grid-column: 2; } }
.version { font: 500 13px var(--mono); color: var(--dim); border: 1px solid var(--line2); border-radius: 999px; padding: 2px 10px; vertical-align: middle; margin-left: 10px; letter-spacing: 0; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; counter-reset: s; }
.steps > div { counter-increment: s; }
.steps > div::before { content: "0" counter(s); display: block; font: 500 13px var(--mono); color: var(--faint); padding-bottom: 14px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.steps h3 { margin-bottom: 8px; }
.steps p { color: var(--dim); font-size: 15px; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }

/* Closing call */
.closing { text-align: center; }
.closing h2 { font-size: clamp(32px, 4.6vw, 52px); letter-spacing: -.035em; margin-bottom: 16px; }
.closing .btns { justify-content: center; margin-top: 28px; }

/* Page heads (extensions, docs) */
.page-head { padding: clamp(56px, 8vw, 96px) 0 40px; }
.page-head h1 { font-size: clamp(36px, 5vw, 56px); letter-spacing: -.035em; margin: 0 0 16px; }

/* Cards, still used by the extension list and the plans */
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); }
.grid > * { min-width: 0; }
.card { background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 24px; }
section.alt .card { background: var(--bg); }
.card p { margin: 0; color: var(--dim); }
.ico { width: 36px; height: 36px; border-radius: 8px; display: grid; place-items: center; margin-bottom: 16px; color: var(--fg); border: 1px solid var(--line2); }
.ico svg { width: 18px; height: 18px; }
.badge { display: inline-flex; align-items: center; gap: 4px; font: 500 11.5px/1.7 var(--mono); padding: 0 8px; border-radius: 4px; border: 1px solid var(--line2); color: var(--dim); white-space: nowrap; }
.badge.brand { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.badge.gold { color: var(--gold); border-color: color-mix(in srgb, var(--gold) 45%, transparent); }
.badge svg { width: 12px; height: 12px; }

/* Extensions */
.tools { display: flex; flex-wrap: wrap; gap: 12px; margin: 8px 0 20px; align-items: center; }
.search { position: relative; flex: 1 1 300px; }
.search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--faint); }
.search input { width: 100%; }
input[type="search"], select { font: inherit; font-size: 15px; color: var(--fg); background: var(--bg2); border: 1px solid var(--line2); border-radius: 8px; height: 42px; padding: 0 12px; }
input[type="search"] { padding-left: 38px; }
input[type="search"]:focus { outline: none; border-color: var(--fg); }
.chips { display: flex; flex-wrap: wrap; gap: 4px; padding: 3px; border: 1px solid var(--line2); border-radius: 9px; }
.chip { font: inherit; font-size: 14px; border: 0; background: none; color: var(--dim); border-radius: 6px; padding: 6px 12px; cursor: pointer; }
.chip:hover { color: var(--fg); }
.chip[aria-pressed="true"] { background: var(--btn); border-color: var(--btn); color: var(--on-btn); }
.ext { display: flex; flex-direction: column; gap: 14px; transition: border-color .15s; }
.ext:hover { border-color: var(--line2); }
.ext .row { display: flex; gap: 14px; align-items: flex-start; }
.ext .ico { margin: 0; }
.ext h3 { margin: 0; }
.ext .tags { display: flex; flex-wrap: wrap; gap: 6px; }
.ext dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0; font-size: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.ext dt { font: 12px/1.9 var(--mono); color: var(--faint); }
.ext dd { margin: 0; color: var(--dim); }
.ext pre { margin: auto 0 0; overflow: visible; white-space: pre-wrap; overflow-wrap: anywhere; }
.ext details { font-size: 14px; color: var(--dim); }
.ext summary { cursor: pointer; }
.empty { text-align: center; padding: 64px; color: var(--dim); }

/* Docs */
.docs { display: grid; grid-template-columns: 210px 1fr; gap: 64px; padding-top: 24px; padding-bottom: 96px; }
.docs nav { position: sticky; top: 88px; align-self: start; font-size: 14px; }
.docs nav a { display: block; color: var(--dim); text-decoration: none; padding: 6px 0 6px 14px; border-left: 1px solid var(--line); }
.docs nav a:hover, .docs nav a.on { color: var(--fg); border-left-color: var(--fg); }
.docs article { min-width: 0; max-width: 740px; }
.docs article h2 { font-size: 28px; margin: 72px 0 16px; }
.docs article h2:first-child { margin-top: 0; }
.docs article h3 { margin: 28px 0 8px; }
.docs article p, .docs article li { color: var(--dim); }
.docs article b, .docs article strong { color: var(--fg); font-weight: 500; }
.docs table { border-collapse: collapse; width: 100%; font-size: 15px; margin: 16px 0; }
.docs th, .docs td { text-align: left; border-bottom: 1px solid var(--line); padding: 10px 12px 10px 0; vertical-align: top; }
.docs th { font: 500 12px var(--mono); text-transform: uppercase; letter-spacing: .05em; color: var(--faint); }
.note { border-left: 2px solid var(--fg); padding: 2px 0 2px 18px; margin: 20px 0; color: var(--dim); }
.faq details { border-bottom: 1px solid var(--line); padding: 16px 0; }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 500; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 18px/1 var(--mono); color: var(--faint); }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 12px 0 0; }
@media (max-width: 860px) { .docs { grid-template-columns: 1fr; gap: 24px; } .docs nav { position: static; display: flex; flex-wrap: wrap; gap: 4px 16px; } .docs nav a { border: 0; padding: 4px 0; } }

footer { border-top: 1px solid var(--line); padding: 40px 0 56px; color: var(--faint); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; align-items: center; }
footer nav { display: flex; flex-wrap: wrap; gap: 20px; }
footer a { color: var(--dim); text-decoration: none; }
footer a:hover { color: var(--fg); }
.stage > .window { max-width: 980px; margin: 0 auto; }
.feature > *, .steps > *, .index > *, .hero .wrap > * { min-width: 0; }
.chips:empty { display: none; }
@media (max-width: 620px) { .wrap { padding: 0 20px; } .stage::before { inset: 12% -20px -1px; } }
/* Phosphor icons are filled shapes; the logo is drawn with lines in the accent colour. */
svg.ph { fill: currentColor; stroke: none; }
svg.logo { fill: none; }
.brand svg.logo { width: 22px; height: 22px; color: var(--accent); }
