/* Textley site. The page reads like a document open in the editor:
   Markdown marks on headings, a real working window up top, a status bar at the foot.
   Built on the app icon's ink indigo and lilac. */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/assets/fonts/bricolage-grotesque-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: "Geist";
  src: url("/assets/fonts/geist-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("/assets/fonts/geist-mono-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #100e1f;
  --bg-2: #161429;
  --surface: #1c1934;
  --surface-2: #252142;
  --line: #2e2950;
  --line-2: #433c6b;
  --ink: #f4f1ff;
  --ink-2: #c7c0e0;
  --muted: #9189b3;
  --accent: #c6b2fa;
  --accent-strong: #a78bfa;
  --accent-ink: #1b1534;
  --ok: #7fe0b5;
  --warn: #ffb98a;
  --display: "Bricolage Grotesque", "Geist", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Helvetica Neue", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", SFMono-Regular, Menlo, monospace;
  /* Aliases the shared Protomota block and older pages expect. */
  --background: var(--bg);
  --system: var(--sans);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
h1, h2, h3, p, dl, dd, ol, ul, figure { margin: 0; }
img, svg { max-width: 100%; }
a { color: var(--accent); text-underline-offset: .22em; }
a:hover { color: var(--ink); }
button { font: inherit; color: inherit; }
:where(a, button, summary):focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
code, kbd { font-family: var(--mono); font-size: .88em; }
code { padding: .12em .38em; border-radius: 5px; background: var(--surface-2); border: 1px solid var(--line); overflow-wrap: anywhere; }
kbd { padding: .1em .45em; border-radius: 5px; border: 1px solid var(--line-2); border-bottom-width: 2px; background: var(--surface); color: var(--ink); white-space: nowrap; }

.shell { width: min(1160px, 100% - 48px); margin-inline: auto; }
.skip { position: fixed; z-index: 100; inset: 8px auto auto 8px; padding: 8px 16px; background: var(--surface-2); color: var(--ink); border-radius: 8px; transform: translateY(-200%); }
.skip:focus { transform: none; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav { height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 700 1.3rem/1 var(--display); letter-spacing: -.035em; }
.wordmark img { width: 30px; height: 30px; border-radius: 8px; display: block; box-shadow: 0 0 12px color-mix(in srgb, var(--accent) 28%, transparent); }
.nav nav { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 28px); }
.nav nav a { color: var(--ink-2); text-decoration: none; font-size: .9rem; font-weight: 500; white-space: nowrap; transition: color .15s; }
.nav nav a:hover, .nav nav a[aria-current="page"] { color: var(--accent); }
.nav nav a.nav-cta { padding: 7px 13px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--surface-2); color: var(--ink); }
.nav nav a.nav-cta:hover { border-color: var(--accent); color: var(--ink); }

/* Buttons */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 46px; padding: 10px 20px;
  border: 1px solid transparent; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink);
  font-weight: 650; font-size: .95rem; text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background .15s, border-color .15s, transform .15s;
}
.button:hover { background: #ddd0ff; color: var(--accent-ink); }
.button.secondary { background: transparent; color: var(--ink); border-color: var(--line-2); }
.button.secondary:hover { background: var(--surface); border-color: var(--accent); color: var(--ink); }
.button svg { flex-shrink: 0; }

/* Markdown-mark eyebrows and headings */
.mark { display: block; margin-bottom: 18px; font: 500 .8rem/1.4 var(--mono); letter-spacing: .02em; color: var(--accent); }
.mark::before { content: "## "; color: var(--muted); }
h1, h2 { font-family: var(--display); font-weight: 700; line-height: 1.02; letter-spacing: -.045em; text-wrap: balance; }
h2 { font-size: clamp(2.1rem, 4.6vw, 3.5rem); }
h2 em, h1 em { font-style: normal; color: var(--accent); }
.lead { margin-top: 20px; max-width: 58ch; font-size: 1.12rem; line-height: 1.6; color: var(--ink-2); text-wrap: pretty; }
.section { padding-block: clamp(72px, 10vw, 128px); }
.section-head { max-width: 780px; margin-bottom: clamp(36px, 5vw, 56px); }
.band { background: var(--bg-2); border-block: 1px solid var(--line); }

/* Hero */
.hero { position: relative; padding-block: clamp(56px, 8vw, 96px) 0; text-align: center; }
.hero::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 760px; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60% 55% at 50% 0%, color-mix(in srgb, var(--accent-strong) 26%, transparent), transparent 70%),
    repeating-linear-gradient(to bottom, transparent 0 31px, color-mix(in srgb, var(--accent) 5%, transparent) 31px 32px);
  -webkit-mask-image: linear-gradient(to bottom, #000 40%, transparent);
  mask-image: linear-gradient(to bottom, #000 40%, transparent);
}
.pill {
  display: inline-flex; align-items: center; gap: 9px; margin-bottom: 26px; padding: 6px 14px;
  border: 1px solid var(--line-2); border-radius: 999px; background: color-mix(in srgb, var(--surface) 70%, transparent);
  font: 500 .75rem/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--accent);
}
.pill i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.hero h1 { font-size: clamp(2.9rem, 8.4vw, 6.4rem); max-width: 12ch; margin-inline: auto; }
.caret { display: inline-block; width: .09em; height: .82em; margin-left: .06em; vertical-align: -.06em; background: var(--accent); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hero .lead { margin-inline: auto; max-width: 56ch; font-size: clamp(1.05rem, 1.7vw, 1.25rem); }
.hero .lead strong { color: var(--ink); font-weight: 600; }
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 32px; }
.fineprint { margin-top: 18px; font: .78rem/1.5 var(--mono); color: var(--muted); }

/* The working window */
.stage { position: relative; margin-top: clamp(40px, 6vw, 68px); }
.stage::before {
  content: ""; position: absolute; inset: 8% 6% -4%; z-index: -1; border-radius: 40px;
  background: color-mix(in srgb, var(--accent-strong) 30%, transparent); filter: blur(80px);
}
.win {
  --w-bg: #1e1e1e; --w-side: #282828; --w-bar: #2a2a2a; --w-line: #3b3b3b; --w-text: #ececec; --w-dim: #9a9a9a;
  --w-sel: #2f3d5e; --w-seg: #3a3a3a; --w-seg-on: #5c5c5c; --w-hover: #343434;
  --k: #bf5af2; --s: #ff6961; --n: #4aa3ff; --p: #5fd2e6;
  text-align: left; color: var(--w-text); background: var(--w-bg);
  border: 1px solid var(--w-line); border-radius: 12px; overflow: hidden;
  box-shadow: 0 0 0 1px #0006, 0 40px 90px -20px #05030fcc;
  font: 13px/1.5 -apple-system, BlinkMacSystemFont, var(--sans);
}
.win[data-appearance="light"] {
  --w-bg: #ffffff; --w-side: #ececec; --w-bar: #f4f4f4; --w-line: #d6d6d6; --w-text: #1d1d1f; --w-dim: #77777c;
  --w-sel: #cfdcf7; --w-seg: #e2e2e2; --w-seg-on: #ffffff; --w-hover: #e0e0e0;
  --k: #a033d3; --s: #d6362b; --n: #0a6fe0; --p: #1f8fa6;
}
.win button { background: none; border: 0; padding: 0; cursor: pointer; text-align: left; }
.win-title { display: flex; align-items: center; gap: 8px; height: 34px; padding-inline: 12px; background: var(--w-bar); color: var(--w-dim); font-weight: 600; }
.lights { display: flex; gap: 7px; margin-right: 6px; }
.lights i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.lights i:nth-child(2) { background: #febc2e; }
.lights i:nth-child(3) { background: #28c840; }
.win-tools { display: flex; align-items: center; gap: 14px; height: 40px; padding-inline: 12px; background: var(--w-bar); border-block: 1px solid var(--w-line); color: var(--w-dim); }
.win-tools .grow { flex: 1; }
.seg { display: inline-flex; padding: 2px; border-radius: 999px; background: var(--w-seg); }
.win .seg button { padding: 3px 14px; border-radius: 999px; color: var(--w-text); text-align: center; }
.win .seg button[aria-pressed="true"] { background: var(--w-seg-on); box-shadow: 0 1px 2px #0003; }
.win-body { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 430px; }
.win-side { background: var(--w-side); border-right: 1px solid var(--w-line); padding: 12px 10px; display: flex; flex-direction: column; gap: 2px; }
.side-label { padding: 6px 6px 4px; font-size: 11px; font-weight: 600; color: var(--w-dim); }
.side-label + .side-label, .win-side .side-label:not(:first-child) { margin-top: 10px; }
.win .row { display: flex; align-items: center; gap: 8px; width: 100%; padding: 5px 8px; border-radius: 6px; color: var(--w-text); }
.win button.row { border-radius: 999px; }
.win button.row:hover { background: var(--w-hover); }
.row svg { flex-shrink: 0; color: var(--w-dim); }
.row .x { margin-left: auto; color: var(--w-dim); font-size: 12px; }
.row.folder { color: var(--w-text); }
.row.nested { padding-left: 30px; }
.win[data-file="log"] .row.tab[data-open="log"],
.win[data-file="swift"] .row.tab[data-open="swift"],
.win[data-file="map"] .row.tab[data-open="map"] { background: var(--w-sel); }
.win-main { display: flex; flex-direction: column; min-width: 0; }
.pane { flex: 1; min-width: 0; display: none; }
.win[data-file="log"][data-view="source"] .pane-log-source,
.win[data-file="log"][data-view="preview"] .pane-log-preview,
.win[data-file="swift"] .pane-swift,
.win[data-file="map"] .pane-map { display: block; }
.win:not([data-file="log"]) .only-log,
.win:not([data-file="swift"]) .only-swift,
.win:not([data-file="map"]) .only-map,
.win[data-file="map"] .not-map,
.win:not([data-view="source"]) .only-source,
.win:not([data-view="preview"]) .only-preview { display: none; }
.code { list-style: none; padding: 14px 0; counter-reset: ln; font: 13px/1.75 var(--mono); }
.code li { counter-increment: ln; display: grid; grid-template-columns: 52px minmax(0, 1fr); white-space: pre-wrap; overflow-wrap: anywhere; min-height: 1.75em; }
.code li::before { content: counter(ln); padding-right: 16px; text-align: right; color: var(--w-dim); opacity: .7; -webkit-user-select: none; user-select: none; }
.code li.current { background: color-mix(in srgb, var(--w-text) 5%, transparent); }
.k { color: var(--k); } .s { color: var(--s); } .n { color: var(--n); } .p { color: var(--p); } .c { color: var(--w-dim); }
.rendered { padding: 26px 30px; font: 15px/1.6 -apple-system, BlinkMacSystemFont, var(--sans); }
.rendered .h1 { font: 700 30px/1.2 -apple-system, BlinkMacSystemFont, var(--sans); letter-spacing: -.01em; margin-bottom: 16px; }
.rendered .h2 { font: 700 22px/1.3 -apple-system, BlinkMacSystemFont, var(--sans); margin-bottom: 14px; }
.rendered p { margin-bottom: 12px; }
.rendered ul { margin: 0 0 12px; padding-left: 40px; display: grid; gap: 10px; }
.pane-map { background-image: linear-gradient(45deg, color-mix(in srgb, var(--w-text) 4%, transparent) 25%, transparent 25% 75%, color-mix(in srgb, var(--w-text) 4%, transparent) 75%), linear-gradient(45deg, color-mix(in srgb, var(--w-text) 4%, transparent) 25%, transparent 25% 75%, color-mix(in srgb, var(--w-text) 4%, transparent) 75%); background-size: 20px 20px; background-position: 0 0, 10px 10px; }
.pane-map img { display: block; width: min(560px, 100% - 48px); height: auto; margin: 28px auto; border-radius: 4px; box-shadow: 0 8px 30px #0005; }
.win-status { display: flex; align-items: center; gap: 18px; height: 28px; padding-inline: 12px; border-top: 1px solid var(--w-line); font-size: 11.5px; color: var(--w-text); }
.win-status .grow { flex: 1; }
.win-status .dd::after { content: "⌄"; margin-left: 4px; position: relative; top: -2px; font-size: 10px; }
.stage-note { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 20px; margin-top: 20px; font-size: .88rem; color: var(--muted); }
.chooser { display: inline-flex; align-items: center; gap: 8px; }
.chooser .opts { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.chooser button { padding: 4px 12px; border: 0; border-radius: 999px; background: none; color: var(--ink-2); font-size: .82rem; font-weight: 500; cursor: pointer; }
.chooser button[aria-pressed="true"] { background: var(--surface-2); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); }

/* Facts */
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: clamp(56px, 7vw, 88px); border-block: 1px solid var(--line); }
.facts div { padding: 28px 24px 28px 0; }
.facts div + div { padding-left: 24px; border-left: 1px solid var(--line); }
.facts dt { font: 700 clamp(2.2rem, 4vw, 3rem)/1 var(--display); letter-spacing: -.04em; color: var(--accent); font-variant-numeric: tabular-nums; }
.facts dd { margin-top: 10px; font-size: .92rem; line-height: 1.45; color: var(--ink-2); }

/* Editor features */
.bento { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
.card { grid-column: span 2; display: flex; flex-direction: column; gap: 10px; padding: 26px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); min-width: 0; }
.card.wide { grid-column: span 3; }
.card h3 { font: 650 1.18rem/1.25 var(--sans); letter-spacing: -.015em; }
.card p { color: var(--ink-2); font-size: .96rem; line-height: 1.55; }
.card .visual { margin-top: auto; padding-top: 16px; }
.mini { border: 1px solid var(--line-2); border-radius: 10px; background: var(--bg); font: 12.5px/1.5 var(--mono); overflow: hidden; }
.mini-row { display: flex; align-items: center; gap: 10px; padding: 9px 12px; min-width: 0; }
.mini-row + .mini-row { border-top: 1px solid var(--line); }
.mini-row .lbl { width: 62px; flex-shrink: 0; color: var(--muted); }
.mini-row .val { min-width: 0; overflow-wrap: anywhere; color: var(--ink); }
.mini-row .val b { font-weight: 500; color: var(--accent); }
.mini-row .end { margin-left: auto; display: flex; gap: 6px; flex-shrink: 0; color: var(--muted); }
.tog { padding: 1px 6px; border: 1px solid var(--line-2); border-radius: 5px; }
.tog.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.mini-row mark { background: color-mix(in srgb, var(--accent) 28%, transparent); color: var(--ink); border-radius: 3px; padding: 0 2px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; }
.chips li { padding: 4px 11px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--bg); font: 12.5px/1.5 var(--mono); color: var(--ink-2); }
.tabs-demo { display: grid; gap: 4px; padding: 8px; }
.tabs-demo span { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 7px; color: var(--ink-2); }
.tabs-demo span.on { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--ink); }
.tabs-demo .dot { margin-left: auto; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.tabs-demo small { margin-left: auto; font-size: 11px; color: var(--muted); }

/* Markdown */
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 80px); align-items: center; }
.ticks { list-style: none; padding: 0; margin-top: 28px; display: grid; gap: 14px; }
.ticks li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; color: var(--ink-2); }
.ticks li::before { content: "-"; font-family: var(--mono); color: var(--accent); text-align: center; }
.ticks strong { color: var(--ink); font-weight: 600; }
.shot img { display: block; width: 100%; height: auto; border: 1px solid var(--line-2); border-radius: 12px; box-shadow: 0 30px 70px -20px #05030fcc; }
.shot figcaption { margin-top: 14px; font: .78rem/1.5 var(--mono); color: var(--muted); text-align: center; }

/* Agents */
.agent { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 6vw, 80px); align-items: start; }
.clients { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.clients a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--surface); color: var(--ink); text-decoration: none; font-size: .9rem; font-weight: 550; transition: border-color .15s; }
.clients a:hover { border-color: var(--accent); }
.clients a span { color: var(--accent); }
.agent .actions { justify-content: flex-start; }
.session { border: 1px solid var(--line-2); border-radius: 16px; background: var(--bg); overflow: hidden; }
.session-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--surface); font-size: .85rem; color: var(--ink-2); }
.session-body { display: grid; gap: 14px; padding: 20px; }
.say { max-width: 46ch; padding: 12px 16px; border-radius: 14px; font-size: .95rem; line-height: 1.5; }
.say.you { justify-self: end; background: var(--surface-2); border-bottom-right-radius: 4px; }
.say.agent-says { background: color-mix(in srgb, var(--accent) 12%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); border-bottom-left-radius: 4px; }
.calls { list-style: none; padding: 0; display: grid; gap: 8px; font: 12.5px/1.5 var(--mono); }
.calls li { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.calls li::before { content: "✓"; color: var(--ok); }
.calls li.blocked { border-color: color-mix(in srgb, var(--warn) 45%, transparent); }
.calls li.blocked::before { content: "×"; color: var(--warn); }
.calls b { font-weight: 600; color: var(--ink); }
.calls span { display: block; color: var(--muted); overflow-wrap: anywhere; }
.calls li.blocked span { color: var(--warn); }
.session:not([data-mode="write"]) .only-write,
.session:not([data-mode="read"]) .only-read { display: none; }

/* Privacy trio */
.trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 4vw, 48px); }
.trio h3 { font: 650 1.1rem/1.3 var(--sans); margin-bottom: 8px; }
.trio h3::before { content: "- [x] "; font: 500 .85rem var(--mono); color: var(--accent); }
.trio p { color: var(--ink-2); font-size: .96rem; }

/* Closing */
.closing { text-align: center; }
.closing h2 { max-width: 16ch; margin-inline: auto; }
.closing .lead { margin-inline: auto; }

/* Footer, with the app's status bar underneath */
.footer { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px 24px; padding-block: 28px; border-top: 1px solid var(--line); color: var(--muted); font-size: .92rem; }
.footer-credit { padding-block: 0 24px; font: .75rem/1.4 var(--mono, ui-monospace, monospace); color: var(--muted); }
.footer nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer a { color: var(--ink-2); text-decoration: none; }
.footer a:hover { color: var(--accent); }
.footer a.product-credit {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  gap: 10px;
  padding: 9px 16px 9px 10px;
  border: 1px solid #1d2230;
  border-radius: 999px;
  background: #000;
  color: #fff;
  font: 600 13.5px/1.4 var(--sans);
  white-space: nowrap;
  transition: transform .15s;
}
.footer a.product-credit:hover { transform: translateY(-1px); }
.product-credit img { display: block; flex-shrink: 0; border-radius: 6px; object-fit: contain; }
.statusbar { border-top: 1px solid var(--line); background: var(--bg-2); font: .72rem/1 var(--mono); color: var(--muted); }
.statusbar .shell { display: flex; flex-wrap: wrap; gap: 6px 22px; padding-block: 10px; }
.statusbar .grow { flex: 1; }

/* Inner pages */
.page-head { position: relative; padding-block: clamp(48px, 7vw, 88px) clamp(28px, 4vw, 44px); }
.page-head::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 100vw; transform: translateX(-50%); z-index: -1; pointer-events: none; background: radial-gradient(50% 90% at 20% 0%, color-mix(in srgb, var(--accent-strong) 18%, transparent), transparent 70%); }
.page-head h1 { font-size: clamp(2.5rem, 6vw, 4.4rem); max-width: 16ch; }
.page-head .lead { max-width: 62ch; }
.doc { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); padding-bottom: clamp(64px, 9vw, 112px); align-items: start; }
.doc.single { grid-template-columns: minmax(0, 760px); }
.toc { position: sticky; top: 96px; display: grid; gap: 2px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.toc strong { padding: 4px 10px 8px; font: 500 .72rem var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.toc a { padding: 7px 10px; border-radius: 8px; color: var(--ink-2); text-decoration: none; font-size: .92rem; }
.toc a:hover { background: var(--surface-2); color: var(--ink); }
.prose { display: grid; gap: 20px; min-width: 0; }
.prose > section { display: grid; gap: 16px; padding: clamp(22px, 3vw, 34px); border: 1px solid var(--line); border-radius: 16px; background: var(--surface); min-width: 0; }
.prose h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); letter-spacing: -.03em; }
.prose h2::before { content: "## "; font: 500 .6em var(--mono); letter-spacing: 0; color: var(--muted); vertical-align: .12em; }
.prose p, .prose li { color: var(--ink-2); max-width: 70ch; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose ol { list-style: none; padding: 0; display: grid; gap: 12px; counter-reset: step; }
.prose ol li { counter-increment: step; display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 14px; }
.prose ol li::before { content: counter(step); display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--bg); font: 500 .8rem var(--mono); color: var(--accent); }
.prose ol li > span { padding-top: 2px; min-width: 0; }
.prose .links { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: .92rem; }
.prose .button { justify-self: start; }
.note { padding: 14px 18px; border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); border-radius: 12px; background: color-mix(in srgb, var(--accent) 9%, transparent); color: var(--ink-2); }
.prompt { padding: 14px 18px; border-left: 2px solid var(--accent); background: var(--bg); border-radius: 0 10px 10px 0; font: .9rem/1.6 var(--mono); color: var(--ink); }

@media (max-width: 960px) {
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card, .card.wide { grid-column: span 1; }
  .split, .agent { grid-template-columns: minmax(0, 1fr); }
  .doc { grid-template-columns: minmax(0, 1fr); }
  .toc { position: static; display: flex; flex-wrap: wrap; align-items: center; }
  .toc strong { padding: 4px 10px; }
}
@media (max-width: 720px) {
  .shell { width: calc(100% - 32px); }
  .nav nav a.nav-hide { display: none; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts div { padding: 22px 16px 22px 0; }
  .facts div + div { padding-left: 16px; }
  .facts div:nth-child(3) { padding-left: 0; border-left: 0; }
  .facts div:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .bento { grid-template-columns: minmax(0, 1fr); }
  .trio { grid-template-columns: minmax(0, 1fr); }
  .win-body { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .win-side { flex-direction: row; gap: 6px; padding: 8px; border-right: 0; border-bottom: 1px solid var(--w-line); overflow-x: auto; }
  .win-side .side-label, .win-side .row.folder, .win-side .row.nested { display: none; }
  .win .row.tab { width: auto; white-space: nowrap; }
  .pane { min-height: 320px; }
  .code li { grid-template-columns: 40px minmax(0, 1fr); }
  .rendered { padding: 20px; }
  .win-tools .tool-icons { display: none; }
  .win-status { gap: 12px; }
}
@media (max-width: 420px) {
  .nav nav a.nav-hide-sm { display: none; }
  .win-status .only-wide { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .caret { animation: none; }
  * { transition: none !important; }
}

/* Studio credit and sibling apps. Shared across Protomota sites; this site supplies type and palette. */
.protomota-family-block {
  --family-text: var(--ink);
  --family-muted: var(--muted);
  --family-link: var(--accent);
  --family-rule: var(--line);
  --family-heading: var(--display);
  color: var(--family-text);
  text-align: left;
  padding-block: clamp(28px, 4vw, 54px);
}
.protomota-family-block .family-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: clamp(22px, 4vw, 56px);
  padding-block-start: clamp(22px, 3vw, 34px);
  border-block-start: 1px solid var(--family-rule);
}
.protomota-family-block .family-title {
  margin: 0 0 10px;
  font-family: var(--family-heading, inherit);
  font-size: clamp(21px, 2.1vw, 29px);
  font-weight: 650;
  line-height: 1.16;
  letter-spacing: -.025em;
}
.protomota-family-block .family-about p {
  max-width: 32ch;
  margin: 0 0 12px;
  color: var(--family-muted);
  font-size: .875rem;
  line-height: 1.5;
}
.protomota-family-block .family-hub {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--family-link);
  padding-block: 5px;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-size: .875rem;
  font-weight: 650;
}
.protomota-family-block .family-apps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: 4px 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.protomota-family-block .family-entry {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  height: 100%;
  min-height: 60px;
  padding: 7px 5px;
  color: inherit;
  text-decoration: none;
}
.protomota-family-block .family-entry img {
  display: block;
  width: 34px;
  height: 34px;
  object-fit: contain;
  border-radius: 8px;
}
.protomota-family-block .family-entry strong,
.protomota-family-block .family-detail { display: block; }
.protomota-family-block .family-entry strong { font-size: .875rem; line-height: 1.25; }
.protomota-family-block .family-detail {
  margin-block-start: 3px;
  color: var(--family-muted);
  font-size: .8125rem;
  line-height: 1.35;
}
.protomota-family-block .family-arrow { color: var(--family-link); font-size: .875rem; }
.protomota-family-block a.family-entry:is(:hover, :focus-visible) {
  background: color-mix(in srgb, currentColor 5%, transparent);
  border-radius: 8px;
}
.protomota-family-block a.family-entry:is(:hover, :focus-visible) strong {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.protomota-family-block a:focus-visible {
  outline: 2px solid var(--family-link);
  outline-offset: 3px;
}
@media (max-width: 760px) {
  .protomota-family-block .family-inner { grid-template-columns: 1fr; }
}
@media (max-width: 450px) {
  .protomota-family-block .family-apps { grid-template-columns: 1fr; }
}

/* App status under each entry (2026-11-12): App Store link or Coming soon. */
.protomota-family-block .family-apps > li { display: flex; flex-direction: column; }
.protomota-family-block .family-entry { min-height: 52px; padding-block-end: 2px; }
.protomota-family-block .family-store,
.protomota-family-block .family-soon {
  align-self: flex-start;
  margin: 0 0 6px 48px;
  font-size: .75rem;
  font-weight: 650;
  line-height: 1.3;
  letter-spacing: .01em;
}
.protomota-family-block .family-store { color: var(--family-link); text-decoration: none; }
.protomota-family-block .family-store:is(:hover, :focus-visible) { text-decoration: underline; text-underline-offset: 3px; }
.protomota-family-block .family-soon { color: var(--family-muted); }

/* Download and install guide */
.download-head .actions { justify-content: flex-start; }
.download-head .fineprint + .fineprint { margin-top: 4px; }
.install-preview { margin: 18px 0 0; }
.install-preview img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 12px; }
.install-preview figcaption { margin-top: 8px; font-size: .88rem; color: var(--muted); }
.download-verification { border-top: 1px solid var(--line); padding-top: 16px; display: grid; gap: 10px; }
.download-verification summary { cursor: pointer; color: var(--ink); font-weight: 600; }
.download-verification code { justify-self: start; overflow-wrap: anywhere; }

/* App icons: a hairline edge and a soft glow (dark) or shadow (light), so dark icons
   show on dark backgrounds and light icons on light ones. */
.protomota-family-block .family-entry img { filter: drop-shadow(0 0 .6px rgb(255 255 255 / .55)) drop-shadow(0 0 7px rgb(255 255 255 / .16)); }

.mac-download::before {
  content: "";
  display: block;
  width: 1em;
  height: 1em;
  flex: none;
  background: currentColor;
  mask: url("/assets/apple-logo.svg") center / contain no-repeat;
}
.nav nav a.nav-cta.mac-download { display: inline-flex; align-items: center; gap: 6px; padding-inline: 16px; }
@media (max-width: 420px) {
  .nav nav { gap: 10px; }
  .nav { gap: 10px; }
  .nav nav a.nav-cta.mac-download { padding-inline: 11px; }
}

/* Help and missing pages */
.help-section { scroll-margin-top: 90px; }
.prose > .support-ticket { border-color: var(--line-2); background: var(--surface-2); }
.help-answer { border-top: 1px solid var(--line); padding-top: 14px; }
.help-answer summary { color: var(--ink); cursor: pointer; font-weight: 650; }
.help-answer p { margin-top: 10px; }
.missing-page { min-height: calc(100svh - 185px); display: grid; align-items: center; }
.missing-editor { max-width: 760px; padding: clamp(26px, 6vw, 64px); border: 1px solid var(--line-2); border-radius: 16px; background: var(--surface); }
.missing-editor .cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

/* Discord + newsletter callouts at the end of the homepage */
.community-callouts { display: grid; gap: 16px; padding-bottom: clamp(48px, 7vw, 88px); }
.community-callout { display: flex; align-items: center; gap: 24px 32px; padding: 32px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); scroll-margin-top: 90px; }
.community-copy { flex: 1; min-width: 0; }
.community-callout h2 { margin: 0 0 10px; font-size: clamp(1.5rem, 2.4vw, 1.9rem); line-height: 1.15; letter-spacing: -.03em; }
.community-callout p { margin: 0; max-width: 560px; color: var(--ink-2); }
.community-callout .button { flex-shrink: 0; }
.discord-avatar { flex-shrink: 0; width: 72px; height: 72px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 1px rgb(245 128 37 / .6), 0 0 22px rgb(245 128 37 / .38); }
@media (max-width: 720px) { .community-callout { flex-direction: column; align-items: flex-start; padding: 28px 24px; } .community-callout .button { white-space: normal; } }

/* Compare page */
.compare-head h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); max-width: 20ch; line-height: 1.06; }
.doc.compare-doc { grid-template-columns: minmax(0, 1fr); }
.compare-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-2); }
.compare { width: 100%; min-width: 680px; border-collapse: collapse; font-size: .92rem; line-height: 1.55; }
.compare th, .compare td { padding: 13px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.compare thead th { font: 700 1.02rem/1.3 var(--display); letter-spacing: -.02em; color: var(--ink); }
.compare thead th:first-of-type { color: var(--accent); }
.compare tbody th { width: 9.5em; font: 500 .8rem/1.6 var(--mono); color: var(--muted); }
.compare td { color: var(--ink-2); }
.compare tbody td:first-of-type { color: var(--ink); }
.compare tbody tr:last-child > * { border-bottom: 0; }

/* Share pill (2026-11-21), behavior in assets/protomota-share.js */
/* Styles come from assets/protomota-share.css (linked, since the CSP blocks injected styles). Matches .button.secondary. */
.pm-share-btn.tx-share {
  --pm-share-accent: var(--accent);
  gap: 9px; height: auto; min-height: 46px; padding: 10px 20px;
  border: 1px solid var(--line-2); background: transparent; color: var(--ink);
  font-weight: 650; font-size: .95rem; box-shadow: none;
  transition: background .15s, border-color .15s, transform .15s;
}
.pm-share-btn.tx-share:hover { background: var(--surface); border-color: var(--accent); box-shadow: none; }
.pm-share-btn.tx-share svg { width: 15px; height: 15px; color: currentColor; }

.nowrap { white-space: nowrap; }

/* Official Substack / Discord marks on the newsletter and Discord buttons: glyph only, in the button's text color (CSP blocks inline styles here). */
.brand-ico { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; flex: none; color: currentColor; line-height: 0; }
.brand-ico svg, .brand-ico svg path { display: block; fill: currentColor; stroke: none; }
.brand-ico svg[width="15"] { width: 15px; height: 15px; }
.brand-ico svg[width="18"] { width: 18px; height: 18px; }

/* 2026-11-24: icon, title and arrow share the title line; icons load eagerly. */
.protomota-family-block .family-entry { align-items: start; }
.protomota-family-block .family-entry > span:not(.family-arrow),
.protomota-family-block .family-arrow { align-self: baseline; }
.protomota-family-block .family-arrow { line-height: 1.25; }
