/* reright.it. Catppuccin Mocha (dark) and Latte (light), as in the app.
   Monospace for headings, controls and code; IBM Plex Sans (self-hosted) for reading text.
   Written mobile first: base rules are for a phone, min-width queries add the wide layout. */

@font-face {
    font-family: 'IBM Plex Sans';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/assets/fonts/ibm-plex-sans-latin-400-normal.woff2') format('woff2');
}
@font-face {
    font-family: 'IBM Plex Sans';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('/assets/fonts/ibm-plex-sans-latin-600-normal.woff2') format('woff2');
}

:root {
    color-scheme: dark;
    --base: #1e1e2e;
    --mantle: #181825;
    --crust: #11111b;
    --text: #cdd6f4;
    --text-2: #bac2de;
    --text-3: #a6adc8;
    --line: #313244;
    --line-2: #45475a;
    --line-3: #6c7086;
    --accent: #cba6f7;
    --on-accent: #11111b;
    --link: #89b4fa;
    --ok: #a6e3a1;
    --ok-fill: #a6e3a1;
    --on-ok: #11111b;
    --bad: #f38ba8;
    --warn: #fab387;
    --info: #89b4fa;
    --placeholder: #f9e2af;
    --mono: 'Cascadia Code', ui-monospace, 'SF Mono', 'Source Code Pro', Menlo, Consolas, 'DejaVu Sans Mono', monospace;
    --sans: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --gutter: 20px;
    --band: #181825;
    --card: #181825;
    --band-line: #313244;
    --term-bg: #11111b;
    --term-text: #cdd6f4;
    --term-dim: #a6adc8;
    --term-chrome: #313244;
    --term-chrome-text: #bac2de;
    --term-bad: #f38ba8;
    --term-ok: #a6e3a1;
    --term-warn: #fab387;
    --term-accent: #cba6f7;
    --term-edge: #6c7086;
    --dot-1: #f38ba8;
    --dot-2: #f9e2af;
    --dot-3: #a6e3a1;
    --shadow-soft: 0 14px 30px -18px rgba(0, 0, 0, 0.6);
    --shadow-pop: 0 8px 20px -10px rgba(0, 0, 0, 0.6);
    --shadow-deep: 0 22px 44px -22px rgba(0, 0, 0, 0.7);
    --limit-bg: color-mix(in srgb, var(--warn) 7%, transparent);
    --cmp-head: #313244;
    --cmp-tint: color-mix(in srgb, var(--accent) 14%, transparent);
    --cta-bg: #11111b;
    --cta-text: #f2f4ff;
    --cta-sub: #bac2de;
    --cta-btn-bg: #cba6f7;
    --cta-btn-text: #11111b;
    --cta-edge: #8c90a8;
    --selection: color-mix(in srgb, var(--accent) 35%, transparent);
    --pane: #181825;
    --chrome: #313244;
    --edge: #6c7086;
    --shadow: 0 26px 50px -18px rgba(0, 0, 0, 0.85);
}

[data-theme="light"] {
    color-scheme: light;
    --base: #eff1f5;
    --mantle: #e6e9ef;
    --crust: #dce0e8;
    --text: #363850;
    --text-2: #42455c;
    --text-3: #4f5269;
    --band: #e0e4eb;
    --card: #e0e4eb;
    --band-line: #c4c9d6;
    --term-bg: #dce0e8;
    --term-text: #363850;
    --term-dim: #4f5269;
    --term-chrome: #ccd0da;
    --term-chrome-text: #363850;
    --term-bad: #b8102f;
    --term-ok: #2c6f1e;
    --term-warn: #a74107;
    --term-accent: #6a22c9;
    --term-edge: #7c7f93;
    --dot-1: #d20f39;
    --dot-2: #df8e1d;
    --dot-3: #40a02b;
    --shadow-soft: 0 14px 30px -18px rgba(76, 79, 105, 0.45);
    --shadow-pop: 0 8px 20px -10px rgba(76, 79, 105, 0.45);
    --shadow-deep: 0 22px 44px -22px rgba(76, 79, 105, 0.5);
    --limit-bg: #f8ece3;
    --cmp-head: #ccd0da;
    --cmp-tint: color-mix(in srgb, var(--accent) 10%, #f4f5f8);
    --cta-bg: #7f30e6;
    --cta-text: #ffffff;
    --cta-sub: #f1e9ff;
    --cta-btn-bg: #ffffff;
    --cta-btn-text: #5b1bb5;
    --cta-edge: #d9c2fb;
    --selection: color-mix(in srgb, var(--accent) 28%, transparent);
    --pane: #ffffff;
    --chrome: #dce0e8;
    --edge: #7c7f93;
    --shadow: 0 26px 50px -18px rgba(76, 79, 105, 0.55);
    --line: #ccd0da;
    --line-2: #bcc0cc;
    --line-3: #7c7f93;
    --accent: #7f30e6;
    --on-accent: #ffffff;
    --link: #1446b8;
    --ok: #2c6f1e;
    --ok-fill: #2e7d1f;
    --on-ok: #ffffff;
    --bad: #b8102f;
    --warn: #a74107;
    --info: #1957d9;
    --placeholder: #7a4b00;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }

body {
    margin: 0;
    background: var(--base);
    color: var(--text);
    font-family: var(--sans);
    font-size: 1rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
}

a { color: var(--link); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
button, summary, a.btn { touch-action: manipulation; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.skip {
    position: absolute;
    left: 8px;
    top: -80px;
    background: var(--accent);
    color: var(--on-accent);
    padding: 10px 16px;
    border-radius: 6px;
    z-index: 30;
}
.skip:focus { top: 8px; }

.wrap { max-width: 1320px; margin: 0 auto; padding: 0 var(--gutter); }

h1, h2, h3 { font-family: var(--mono); line-height: 1.2; margin: 0 0 12px; letter-spacing: -0.01em; text-wrap: balance; }
h1 { font-size: 1.875rem; letter-spacing: -0.03em; line-height: 1.12; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.0625rem; }
p { margin: 0 0 1em; }
.muted { color: var(--text-3); }
.fine { font-size: 0.9375rem; color: var(--text-3); }

/* Header: 56px, sticky on phones in portrait and on wide screens */
header.site { position: sticky; top: 0; z-index: 20; border-bottom: 1px solid var(--line); background: var(--mantle); }
header.site .wrap { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 56px; }
.brand { font-family: var(--mono); font-weight: 700; font-size: 1.1875rem; letter-spacing: -0.02em; color: var(--text); text-decoration: none; padding: 10px 0; }
.brand:hover { color: var(--text); text-decoration: none; }
.brand .slash { color: var(--accent); }
.brand .r { color: var(--ok); }
nav.main { display: flex; align-items: center; gap: 2px; font-family: var(--mono); font-size: 0.9375rem; }
nav.main a:not(.btn) { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; color: var(--text-2); text-decoration: none; border-radius: 8px; }
nav.main a:not(.btn):hover { color: var(--text); background: var(--line); }
nav.main a[aria-current="page"] { color: var(--text); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 6px; text-decoration-thickness: 2px; }
nav.main a.hide-sm:not(.btn) { display: none; }
nav.main a.btn { min-height: 44px; padding: 0 14px; margin: 0 2px; display: inline-flex; align-items: center; }

button.theme {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    color: var(--text-2);
    background: transparent;
    border: 1px solid var(--line-2);
    border-radius: 8px;
    cursor: pointer;
}
button.theme:hover { color: var(--text); border-color: var(--accent); }
button.theme svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
/* The icon shows the theme you will switch to. */
[data-theme="dark"] button.theme .i-moon, [data-theme="light"] button.theme .i-sun { display: none; }

.btn {
    display: inline-block;
    font-family: var(--mono);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    text-align: center;
    min-height: 48px;
    padding: 13px 20px;
    border-radius: 8px;
    border: 1px solid var(--accent);
    background: var(--accent);
    color: var(--on-accent);
    cursor: pointer;
}
.btn:hover { color: var(--on-accent); filter: brightness(1.08); text-decoration: none; }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--line-3); }
.btn.ghost:hover { color: var(--text); border-color: var(--accent); filter: none; }

code, pre, kbd { font-family: var(--mono); }
code { background: var(--line); padding: 1px 6px; border-radius: 4px; font-size: 0.875em; overflow-wrap: anywhere; }
pre { background: var(--crust); border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; overflow-x: auto; margin: 0 0 16px; font-size: 0.875rem; line-height: 1.55; }
pre code { background: none; padding: 0; font-size: inherit; overflow-wrap: normal; }
kbd { border: 1px solid var(--line-3); border-bottom-width: 2px; border-radius: 5px; padding: 0 6px; font-size: 0.8125em; background: var(--mantle); color: var(--text); white-space: nowrap; }

section { padding: 48px 0; border-top: 1px solid var(--line); }
section:first-child { border-top: 0; }
section.hero { border-top: 0; padding: 28px 0 44px; }
section > .wrap > h2 { margin-bottom: 20px; }

.cta { display: grid; gap: 12px; margin: 24px 0 16px; }
.lede { font-size: 1.125rem; line-height: 1.55; color: var(--text-2); max-width: 34em; }
.hero h1 { margin-bottom: 14px; }
.compat { font-weight: 600; color: var(--text); margin: 0 0 10px; max-width: 34em; }
.two { display: grid; gap: 4px 32px; grid-template-columns: minmax(0, 1fr); max-width: 66ch; }
.two h3 { margin-top: 12px; }
.prose > .two { max-width: 66ch; }
.hero-grid { display: grid; gap: 36px; grid-template-columns: minmax(0, 1fr); }

/* Reserve the space while the live demo is being built, so the page does not jump. */
.motion .demo:not(.live) .examples { display: none; }
.motion .demo:not(.live) { min-height: 40rem; }

/* Demo. The live version is built by site.js from the list of examples; without it the list is the demo. */
.demo { position: relative; margin: 0; min-width: 0; --ring: var(--accent); --halo: color-mix(in srgb, var(--accent) 22%, transparent); }
.demo figcaption { margin: 16px 2px 0; font-size: 0.9375rem; color: var(--text-3); max-width: 46em; }

.examples { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.ex-item { border: 1px solid var(--line-3); border-radius: 12px; background: var(--mantle); padding: 16px; box-shadow: var(--shadow-soft); }
.ex-item h3 { margin-bottom: 10px; }
.ba { display: grid; gap: 12px; max-width: 46em; }
.ba .tag { font-family: var(--mono); font-size: 0.875rem; color: var(--text-3); margin: 0 0 4px; }
.ex-item pre { margin: 0; background: var(--base); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 0.875rem; }
ins { text-decoration: none; background: color-mix(in srgb, var(--ok-fill) 22%, transparent); border-bottom: 1px solid var(--ok); color: var(--text); }
del { text-decoration: line-through; text-decoration-color: var(--bad); text-decoration-thickness: 1px; background: color-mix(in srgb, var(--bad) 16%, transparent); color: var(--text-3); }


.demo.live .examples { display: none; }
.demo .deskbar { margin-top: 10px; }
.demo .tabs { display: flex; gap: 8px; }
.demo .tab { position: relative; flex: 1 1 0; min-width: 0; min-height: 44px; padding: 0; background: transparent; border: 0; border-radius: 8px; cursor: pointer; }
.demo .tab:focus-visible { outline-offset: -2px; }
.demo .tab::before, .demo .tab::after { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 2px; margin-top: -1px; border-radius: 2px; transition: height 0.15s ease, margin-top 0.15s ease, opacity 0.15s ease; }
.demo .tab::before { background: var(--line-2); opacity: 0.55; }
.demo .tab::after { background: var(--accent); opacity: 0.5; transform: scaleX(0); transform-origin: left; }
.demo .tab.done::after { transform: scaleX(1); }
.demo .tab.run::after { animation: fill var(--dur, 9s) linear forwards; }
.demo .tab:hover::before, .demo .tab:focus-visible::before, .demo .tab:hover::after, .demo .tab:focus-visible::after { height: 4px; margin-top: -2px; }
.demo .tab:hover::before, .demo .tab:focus-visible::before { background: var(--line-3); opacity: 1; }
.demo .tab:hover::after, .demo .tab:focus-visible::after { opacity: 1; }
.demo.paused .tab.run::after { animation-play-state: paused; opacity: 0.25; }
@keyframes fill { to { transform: scaleX(1); } }

/* Two windows: the terminal where the agent runs, and the review page. Stacked on a phone or tablet. */
.demo .windows { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; font-family: var(--mono); font-size: 0.875rem; line-height: 1.5; }
.demo .win { display: flex; flex-direction: column; min-width: 0; overflow: hidden; background: var(--pane); border: 1px solid var(--edge); border-radius: 12px; box-shadow: var(--shadow); transition: box-shadow 0.35s ease, border-color 0.35s ease; }
.demo .win.active { border-color: var(--ring); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ring) 35%, transparent), var(--shadow); }
.demo .win.term { background: var(--term-bg); color: var(--term-text); --text: var(--term-text); --text-3: var(--term-dim); --bad: var(--term-bad); --ok: var(--term-ok); --warn: var(--term-warn); --accent: var(--term-accent); --chrome: var(--term-chrome); --edge: var(--term-edge); --ring: var(--term-accent); }
.demo .titlebar { display: flex; align-items: center; gap: 12px; padding: 0 14px; min-height: 40px; background: var(--chrome); border-bottom: 1px solid var(--edge); color: var(--text-3); }
.demo .win.term .titlebar { color: var(--term-chrome-text); }
.demo .dots { display: flex; gap: 6px; }
.demo .dots i { width: 11px; height: 11px; border-radius: 50%; background: var(--dot-1); }
.demo .dots i:nth-child(2) { background: var(--dot-2); }
.demo .dots i:nth-child(3) { background: var(--dot-3); }
.demo .wbody { display: grid; flex: 1 1 auto; }
.demo .wbody > .pane { grid-area: 1 / 1; visibility: hidden; min-width: 0; display: flex; flex-direction: column; }
.demo .wbody > .pane.cur { visibility: visible; }
.demo .stack, .demo .slot { display: grid; }
.demo .stack > *, .demo .slot > * { grid-area: 1 / 1; min-width: 0; }
.demo .agent { padding: 16px; }
.demo .agent p { margin: 0; }
.demo .agent .lbl { color: var(--text-3); margin-bottom: 4px; }
.demo .agent .cmd { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 4px; }
.demo .pr { color: var(--accent); }
.demo .bad { color: var(--bad); }
.demo .ok { color: var(--ok); }
.demo .wait { color: var(--warn); }
.demo .review { position: relative; padding: 16px; flex: 1 1 auto; }
.demo .rh { display: flex; justify-content: space-between; gap: 10px; color: var(--text-3); margin-bottom: 10px; }
.demo .rh .stack { justify-items: end; }
.demo .kind { font-weight: 700; }
.demo .k-commit { --kc: var(--ok-fill); }
.demo .k-commit .kind { color: var(--ok); }
.demo .k-pr, .demo .k-pr_comment { --kc: var(--info); }
.demo .k-pr .kind, .demo .k-pr_comment .kind { color: var(--info); }
.demo .k-chat { --kc: var(--accent); }
.demo .k-chat .kind { color: var(--accent); }
.demo .k-email { --kc: var(--warn); }
.demo .k-email .kind { color: var(--warn); }
.demo .slot { flex: 1 1 auto; }
.demo .idle { color: var(--text-3); text-align: center; padding: 24px 8px; border: 1px dashed var(--line-3); border-radius: 8px; align-self: start; }
.demo .editor { display: flex; flex-direction: column; background: var(--base); border: 1px solid var(--line); border-left: 3px solid var(--kc); border-radius: 0 8px 8px 0; }
.demo .editor > .stack { flex: 1 1 auto; align-content: start; }
.demo .txt { margin: 0; padding: 10px 12px; font-size: 0.9375rem; line-height: 1.5; color: var(--text); white-space: pre-wrap; overflow-wrap: anywhere; align-self: start; }
.demo .win del { background: none; text-decoration: none; color: inherit; }
.demo .win del.hit { text-decoration: line-through; text-decoration-color: var(--bad); background: color-mix(in srgb, var(--bad) 18%, transparent); color: var(--text-3); }
.demo .win del.gone { display: none; }
.demo .win ins { display: none; }
.demo .win ins.hit { display: inline; animation: appear 0.4s ease; }
.demo .pane.done ins { background: none; border-bottom-color: transparent; }
.demo .caret.off { display: none; }
.demo .foot { display: grid; justify-items: start; gap: 12px; padding: 5px 12px 7px; border-top: 1px solid var(--line); color: var(--text-3); }
.demo .foot > * { grid-area: 1 / 1; }
.demo .foot .edited { color: var(--warn); }
.demo .caret { display: inline-block; width: 2px; height: 1.1em; background: var(--accent); vertical-align: text-bottom; margin-left: 1px; animation: blink 1.1s steps(1) infinite; }
.demo .actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 12px; min-height: 40px; }
.demo .actions .stack { margin-right: auto; }
.demo .stamp { color: var(--ok); font-weight: 700; }
.demo .b { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--line-2); white-space: nowrap; }
.demo .b.rej { color: var(--bad); border-color: var(--bad); }
.demo .b.go { background: var(--ok-fill); border-color: var(--ok-fill); color: var(--on-ok); font-weight: 700; }
.demo .b kbd { display: none; margin-left: 8px; font-size: 0.75rem; }
.demo .b.go kbd { background: transparent; color: var(--on-ok); border-color: currentColor; }
.demo.pressing .b.go { filter: brightness(1.15); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok-fill) 35%, transparent); }
.demo .toast { position: absolute; left: 16px; right: 16px; top: 46px; z-index: 2; background: var(--chrome); border: 1px solid var(--line-3); border-left: 3px solid var(--ok-fill); border-radius: 8px; padding: 8px 12px; color: var(--text); box-shadow: var(--shadow-pop); }
.demo .toast b { display: block; }

/* Scene ranges: data-show="from-to". Only the current example's panes are visible. Things fade in and
   disappear at once, so two states never overlap. */
.demo [data-show] { visibility: hidden; opacity: 0; }
.demo [data-show].on { visibility: inherit; opacity: 1; animation: appear 0.3s ease; }
.demo.measuring [data-show].on { animation: none; }

@keyframes appear { from { opacity: 0; } to { opacity: 1; } }
@keyframes blink { 50% { opacity: 0; } }

/* How it works */
.steps { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr); counter-reset: s; padding: 0; list-style: none; margin: 0; }
.steps li { counter-increment: s; border-top: 2px solid var(--line-2); padding-top: 14px; }
.steps li::before { content: counter(s); display: block; font-family: var(--mono); font-weight: 700; color: var(--accent); margin-bottom: 2px; }
.steps h3 { margin-bottom: 6px; }
.steps p { margin: 0; color: var(--text-2); }

/* Pricing: one row per plan on a phone, name and price side by side */
.plans { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); margin: 0 0 20px; padding: 0; list-style: none; }
.plan { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 2px 12px; background: var(--mantle); border: 1px solid var(--line); border-radius: 10px; padding: 16px; }
.plan h3 { margin: 0; color: var(--text-2); }
.plan .price { grid-column: 2; grid-row: 1; margin: 0; font-family: var(--mono); font-size: 1.75rem; font-weight: 700; letter-spacing: -0.03em; line-height: 1.2; }
.plan .price small { font-size: 0.875rem; font-weight: 400; color: var(--text-3); letter-spacing: 0; }
.plan .quota, .plan .keep { grid-column: 1 / -1; margin: 0; }
.plan .quota { margin-top: 6px; font-weight: 600; }
.plan .keep { color: var(--text-3); font-size: 0.9375rem; }
.plan .btn { grid-column: 1 / -1; margin-top: 14px; }
.notes { color: var(--text-3); font-size: 0.9375rem; margin: 0; padding-left: 1.2em; max-width: 66ch; }
.notes li { margin-bottom: 6px; }

/* Text sections */
.prose > * { max-width: 66ch; }
.prose > .wide, .prose > table, .prose > .table-scroll { max-width: 100%; }
.promise { margin: 0 0 20px; border-left: 3px solid var(--accent); background: var(--mantle); padding: 14px 16px; border-radius: 0 8px 8px 0; }
.promise p:last-child { margin-bottom: 0; }

/* FAQ */
details { border-top: 1px solid var(--line); }
details:last-of-type { border-bottom: 1px solid var(--line); }
summary { display: flex; align-items: center; min-height: 56px; padding: 10px 40px 10px 0; cursor: pointer; font-family: var(--mono); font-weight: 700; font-size: 0.9375rem; line-height: 1.35; list-style: none; position: relative; }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; position: absolute; right: 6px; top: 50%; transform: translateY(-50%); color: var(--accent); font-size: 1.5rem; font-weight: 400; line-height: 1; }
details[open] > summary::after { content: '\2212'; }
summary:hover { color: var(--accent); }
summary:focus-visible { outline-offset: -2px; }
details > p:last-child { margin-bottom: 16px; }


/* Docs and legal pages */
table { border-collapse: collapse; width: 100%; margin: 0 0 20px; font-size: 0.9375rem; line-height: 1.5; }
th, td { text-align: left; vertical-align: top; padding: 9px 12px 9px 0; border-bottom: 1px solid var(--line); }
th { color: var(--text-3); font-weight: 600; border-bottom-color: var(--line-2); }
.table-scroll { overflow-x: auto; margin-bottom: 20px; }
.table-scroll table { margin: 0; }
.page { padding: 32px var(--gutter) 64px; overflow-wrap: break-word; }
.page.wrap { max-width: calc(66ch + 2 * var(--gutter)); }
.page > * { max-width: none; }
.toc.auto { display: none; }
.page h1 { margin-bottom: 18px; }
.page h2 { margin-top: 44px; padding-top: 4px; }
.page h3 { margin-top: 26px; }
.page ul, .page ol { padding-left: 1.5em; margin: 0 0 1em; }
.page li { margin-bottom: 8px; }
.page li::marker { color: var(--text-3); }
.toc { background: var(--mantle); border: 1px solid var(--line); border-radius: 8px; padding: 6px 16px; margin-bottom: 28px; font-size: 0.9375rem; }
.toc ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.toc li { margin: 0; }
.toc a { display: flex; align-items: center; min-height: 44px; }
.draft-note { border: 1px dashed var(--warn); border-radius: 8px; padding: 12px 16px; margin-bottom: 20px; color: var(--text-2); font-size: 0.9375rem; }
.ph { background: var(--line); border-radius: 4px; padding: 0 4px; color: var(--placeholder); }


/* Section layouts. One rule: the heading sits on top at the left edge of the container and the content
   uses the full width underneath, in columns or cards. */
.lead { font-size: 1.0625rem; line-height: 1.6; color: var(--text-2); max-width: 62ch; margin-bottom: 24px; }
.cards { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); margin-bottom: 20px; }
.card { background: var(--mantle); border: 1px solid var(--line); border-radius: 10px; padding: 18px 20px; }
.card h3 { margin-bottom: 6px; }
.card p { margin: 0; color: var(--text-2); max-width: 62ch; }
.promise { max-width: none; }
.cols3 { display: grid; gap: 4px 40px; grid-template-columns: minmax(0, 1fr); margin-top: 24px; }
.cols3 p { max-width: 62ch; }
.faq { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); align-items: start; }
.faq details { border: 1px solid var(--line); border-radius: 10px; background: var(--mantle); padding: 0 18px; }
.faq details:last-of-type { border-bottom: 1px solid var(--line); }
.faq summary { padding-right: 34px; }
.faq summary::after { right: 0; }
.faq details > p:last-child { max-width: 62ch; }
.intro { max-width: 62ch; color: var(--text-2); margin-bottom: 24px; }
.final-cta { background: var(--mantle); }
.final-cta .wrap { display: grid; gap: 4px 48px; grid-template-columns: minmax(0, 1fr); align-items: center; }
.final-cta h2 { margin-bottom: 8px; }
.final-cta .lede { margin: 0; }
.final-cta .cta { margin: 16px 0 0; }
@media (min-width: 720px) {
    .final-cta .wrap { grid-template-columns: minmax(0, 1fr) auto; }
    .final-cta .cta { margin: 0; display: flex; }
}
@media (min-width: 640px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 900px) {
    .cols3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .faq { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 24px; }
}

/* Comparison table on the home page */
table.compare { font-size: 1rem; }
.compare th, .compare td { padding: 14px 18px 14px 0; }
.compare thead th { font-family: var(--sans); font-size: 0.9375rem; }
.compare tbody th { font-family: var(--mono); font-size: 0.9375rem; color: var(--text); white-space: nowrap; padding-right: 20px; }
.compare td:last-child { background: color-mix(in srgb, var(--accent) 9%, transparent); padding-left: 16px; border-bottom-color: color-mix(in srgb, var(--accent) 25%, var(--line)); }
.compare thead th:last-child { padding-left: 16px; color: var(--text); }
.compare td:nth-child(2) { color: var(--text-2); }
@media (max-width: 639px) {
    .js .compare th { display: block; }
    .js .compare thead { position: absolute; left: -9999px; }
    .js .compare tr { padding: 16px 0; }
    .js .compare tbody th { padding: 0 0 6px; white-space: normal; border: 0; font-size: 1rem; }
    .js .compare td:first-child { font-weight: 400; }
    .js .compare td { margin-bottom: 8px; }
    .js .compare td:last-child { padding: 10px 12px; border: 0; border-radius: 8px; margin-bottom: 0; }
    .js .compare td::before { font-family: var(--mono); font-weight: 600; margin-bottom: 2px; }
}
@media (min-width: 640px) { .compare tr > :nth-child(1) { width: 14%; } .compare tr > :nth-child(2) { width: 38%; } }

/* Docs and legal pages on wide screens: a sticky contents list on the left, the text in a centred column */
@media (min-width: 1100px) {
    .js .page.toc-page.wrap { display: grid; grid-template-columns: 240px minmax(0, 66ch); column-gap: 72px; justify-content: center; max-width: 1180px; align-content: start; }
    .js .page.toc-page > * { grid-column: 2; min-width: 0; }
    .js .page.toc-page > .toc { grid-column: 1; grid-row: 1 / span 80; position: sticky; top: 88px; align-self: start; max-height: calc(100vh - 110px); overflow-y: auto; background: none; border: 0; border-left: 1px solid var(--line-2); border-radius: 0; padding: 4px 0 4px 18px; margin: 6px 0 0; display: block; }
    .js .page.toc-page > .toc ul { display: block; }
    .js .page.toc-page > .toc a { min-height: 36px; }
    .toc li { margin-bottom: 2px; }
}
@media (max-height: 520px) { .js .page.toc-page > .toc { position: static; max-height: none; } }

/* Copy button for text blocks */
.copy-wrap { position: relative; }
button.copy { display: block; margin: 0 0 8px auto; min-height: 44px; padding: 0 16px; font-family: var(--mono); font-size: 0.875rem; color: var(--text-2); background: transparent; border: 1px solid var(--line-3); border-radius: 8px; cursor: pointer; }
button.copy:hover { color: var(--text); border-color: var(--accent); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Wide tables become stacked rows on a phone (labels are added by site.js) */
@media (max-width: 639px) {
    .js .table-scroll table, .js .table-scroll tbody, .js .table-scroll tr, .js .table-scroll td { display: block; }
    .js .table-scroll thead { position: absolute; left: -9999px; }
    .js .table-scroll tr { padding: 12px 0; border-bottom: 1px solid var(--line-2); }
    .js .table-scroll td { border: 0; padding: 3px 0; }
    .js .table-scroll td:first-child { font-weight: 600; padding-top: 0; }
    .js .table-scroll td:first-child::before { display: none; }
    .js .table-scroll td::before { content: attr(data-label); display: block; font-size: 0.8125rem; color: var(--text-3); }
    .table-scroll { overflow: visible; }
}
@media (min-width: 640px) { .table-scroll table { min-width: 560px; } }

footer.site { border-top: 1px solid var(--line); background: var(--mantle); padding: 24px 0 28px; font-size: 0.9375rem; color: var(--text-3); }
footer.site .wrap { display: grid; gap: 8px; }
footer.site p { margin: 0; }
footer.site ul { list-style: none; display: flex; flex-wrap: wrap; gap: 0 12px; margin: 0 -6px; padding: 0; }
footer.site a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 6px; color: var(--text-2); }

/* Narrow phones (320px) */
@media (max-width: 359px) {
    :root { --gutter: 16px; }
    .brand { font-size: 1.0625rem; }
    nav.main a:not(.btn) { padding: 0 8px; }
    nav.main a.btn { padding: 0 10px; }
    .demo .agent, .demo .review { padding-left: 12px; padding-right: 12px; }
    .demo .titlebar { padding: 0 12px; }
}

@media (min-width: 480px) {
    .cta { display: flex; flex-wrap: wrap; }
    .demo .b kbd { display: inline; }
}

@media (min-width: 600px) {
    .two { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 100%; }
    .prose > .two { max-width: 46rem; }
    nav.main a.hide-sm:not(.btn) { display: inline-flex; }
    .toc ul { display: flex; flex-wrap: wrap; gap: 0 22px; }
    .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 720px) {
    :root { --gutter: 28px; }
    .demo .windows { font-size: 0.9375rem; }
    body { font-size: 1.0625rem; }
    h1 { font-size: 2.6rem; }
    h2 { font-size: 1.6rem; }
    section { padding: 72px 0; }
    section.hero { padding: 56px 0 68px; }
    .lede { font-size: 1.25rem; }
    .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
    .page { padding-top: 48px; padding-bottom: 80px; }
}

@media (min-width: 900px) {
    .demo .windows { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); grid-template-rows: none; }
    .demo .agent .cmd { white-space: pre-wrap; overflow-wrap: anywhere; }
    .demo .b kbd { display: inline; }
}

@media (min-width: 960px) {
    h1 { font-size: 2.9rem; }
    /* 960 to 1199: headline on the left, sentence and buttons on the right, demo full width below. */
    .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
    .hero-copy { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: start; }
    .hero-copy h1 { margin: 0; }
    .hero-sub .lede { margin-top: 6px; }
}

@media (min-width: 1200px) {
    /* 1200 and up: copy 36%, demo 64%. The copy column is as tall as the demo and spreads its parts. */
    .hero-grid { grid-template-columns: minmax(0, 0.36fr) minmax(0, 0.64fr); align-items: stretch; gap: 56px; }
    .hero-copy { display: flex; flex-direction: column; justify-content: space-between; gap: 32px; padding: 6px 0 4px; }
    .hero-sub { display: contents; }
    .hero-copy h1 { margin: 0; }
    .hero-mid .lede { margin: 0; }
    .hero-end .cta { margin-top: 0; }
    .hero-end .compat { margin-top: 20px; }
    .hero-end .fine { margin-bottom: 0; }
}

@media (min-width: 1000px) {
    .plans { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .plan { display: flex; flex-direction: column; padding: 20px; }
    .plan .price { margin: 4px 0 12px; font-size: 2.1rem; }
    .plan .btn { margin-top: auto; }
    .plan .keep { margin-bottom: 18px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .demo .caret { animation: none; }
}

/* Desktop windows shorter than 900px: keep the buttons near the top instead of at the foot of the column */
@media (min-width: 1200px) and (max-height: 899px) {
    .hero-copy { justify-content: flex-start; gap: 28px; }
}

/* Short landscape phones: do not let the header take a seventh of the screen */
@media (max-height: 520px) {
    header.site { position: static; }
    html { scroll-padding-top: 12px; }
    section.hero { padding-top: 16px; }
    h1 { font-size: 1.75rem; margin-bottom: 8px; }
    .lede { font-size: 1rem; margin-bottom: 0.6em; }
    .cta { margin-top: 12px; }
}
pre[data-copy] { white-space: pre-wrap; overflow-wrap: anywhere; }

/* ==========================================================================
   Hierarchy pass. Rank is shown by size and weight, not by colour alone.
   Scale: 0.9375 (notes) / 1.0625 to 1.125 (body) / 1.25 to 1.375 (lead) / 1.375 (step and plan titles)
          / 2 to 3 (section titles) / 2.25 to 3.5 (hero).
   Three callouts: statement (accent bar, large), card (border and surface), limit (dashed, honest caveat).
   ========================================================================== */
body { font-size: 1.0625rem; line-height: 1.65; }
@media (min-width: 720px) { body { font-size: 1.125rem; } }

h1 { font-size: clamp(2.125rem, 9vw, 3.5rem); font-weight: 800; letter-spacing: -0.035em; line-height: 1.05; }
h2 { font-size: clamp(1.875rem, 6.5vw, 3rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.08; margin-bottom: 14px; }
h3 { font-size: 1.25rem; font-weight: 700; }
.page h1 { font-size: clamp(2rem, 7vw, 3rem); }
.page h2 { font-size: clamp(1.5rem, 4.6vw, 2rem); font-weight: 700; }
.page h3 { font-size: 1.125rem; }
@media (min-width: 720px) { h1 { font-size: clamp(2.6rem, 5vw, 3.25rem); } }
@media (min-width: 1200px) { h1 { font-size: 3.5rem; } }

.lead { font-size: 1.1875rem; line-height: 1.5; color: var(--text-2); max-width: 36em; margin: 0 0 32px; }
@media (min-width: 720px) { .lead { font-size: 1.375rem; } }
.lede { font-size: 1.1875rem; line-height: 1.5; color: var(--text); max-width: 30em; }
@media (min-width: 720px) { .lede { font-size: 1.3125rem; } }
.fine, .notes { color: var(--text-2); }
.fine { font-size: 0.9375rem; line-height: 1.55; }

/* Rhythm: more air, alternating surface bands */
section { padding: 64px 0; border-top: 0; }
section.hero { padding: 36px 0 64px; }
@media (min-width: 720px) { section { padding: 104px 0; } section.hero { padding: 64px 0 96px; } }
section.band { background: var(--band); border-top: 1px solid var(--band-line); border-bottom: 1px solid var(--band-line); --card: var(--base); }
section:not(.band) { --card: var(--mantle); }
[data-theme="light"] section.band { --card: var(--base); }

/* Hero: headline and call to action first, demo as the focal object */
.hero h1 { margin-bottom: 18px; }
.hero .btn { min-height: 56px; font-size: 1.0625rem; padding: 14px 26px; }
.hero .compat { font-size: 1.0625rem; font-weight: 600; color: var(--text); }
.hero .fine { max-width: 34em; }

/* How it works: a sequence with strong markers */
.steps { gap: 40px 48px; }
.steps li { border-top: 0; padding-top: 0; position: relative; }
.steps li::before { width: 52px; height: 52px; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); border-radius: 12px; font-size: 1.625rem; font-weight: 800; margin-bottom: 16px; }
.steps h3 { font-size: 1.375rem; margin-bottom: 8px; }
.steps p { font-size: 1.0625rem; color: var(--text); }
@media (min-width: 720px) {
    .steps li:not(:last-child)::after { content: ''; position: absolute; top: 25px; left: 68px; right: -32px; height: 2px; background: var(--line-3); opacity: 0.6; }
}
@media (max-width: 719px) {
    .steps li:not(:last-child)::after { content: ''; position: absolute; top: 60px; bottom: -36px; left: 25px; width: 2px; background: var(--line-3); opacity: 0.5; }
    .steps li { padding-left: 76px; min-height: 52px; }
    .steps li::before { position: absolute; left: 0; top: 0; margin: 0; }
}

/* Cards: one treatment for supporting content */
.card, .plan, .ex-item { background: var(--card); border: 1px solid var(--band-line); border-radius: 12px; }
.card h3 { font-size: 1.25rem; }
.card p { font-size: 1.0625rem; color: var(--text); }
.cards { gap: 16px; }

/* Limit note: the honest caveat, dashed and warm so it reads as a different kind of text */
.limit { border: 2px dashed var(--warn); border-radius: 12px; padding: 18px 22px; background: var(--limit-bg); }
.limit p { margin: 0; font-size: 1.0625rem; color: var(--text); max-width: 70ch; }

/* Statement: the one line a section must say */
.statement { font-family: var(--mono); font-size: 1.5rem; font-weight: 700; line-height: 1.3; letter-spacing: -0.02em; border-left: 6px solid var(--accent); padding: 4px 0 4px 22px; margin: 0 0 20px; max-width: 30em; color: var(--text); }
@media (min-width: 720px) { .statement { font-size: 2rem; } }
.statement-sub { font-size: 1.125rem; color: var(--text-2); max-width: 46em; margin: 0 0 36px 28px; }
.cols3 { margin-top: 0; border-top: 1px solid var(--band-line); padding-top: 28px; gap: 8px 48px; }
.cols3 p { font-size: 1.0625rem; color: var(--text-2); }

/* Comparison */
table.compare { font-size: 1.0625rem; border-top: 0; }
.compare thead th { background: var(--cmp-head); color: var(--text); font-family: var(--mono); font-weight: 700; font-size: 0.9375rem; padding: 14px 18px; border-bottom: 2px solid var(--line-3); }
.compare th, .compare td { border-bottom: 1px solid var(--line-3); padding: 18px 20px 18px 0; }
.compare tbody th { font-size: 1.0625rem; font-weight: 700; color: var(--text); padding-left: 18px; }
.compare td:nth-child(2) { color: var(--text-2); }
.compare thead th:first-child { padding-left: 18px; }
.compare td:last-child { background: var(--cmp-tint); border-left: 4px solid var(--accent); color: var(--text); padding: 18px 20px; font-weight: 500; }
.compare thead th:last-child { background: var(--accent); color: var(--on-accent); padding-left: 24px; }
@media (max-width: 639px) {
    .js .compare tbody th { padding: 0 0 6px; font-size: 1.1875rem; }
    .js .compare td:last-child { padding: 12px 14px; border-left-width: 4px; }
    .js .compare tr { padding: 20px 0; border-bottom: 1px solid var(--line-3); }
}

/* Pricing: the price leads */
.plans { gap: 16px; }
.plan { padding: 22px 22px 24px; }
.plan h3 { font-size: 1.125rem; color: var(--text-2); margin: 0; }
.plan .price { font-size: 3rem; letter-spacing: -0.04em; line-height: 1; margin: 6px 0 14px; }
.plan .price small { font-size: 1rem; }
.plan .quota { font-size: 1.125rem; font-weight: 700; color: var(--text); }
.plan .keep { font-size: 0.9375rem; color: var(--text-2); }
.plan.pick { border: 2px solid var(--accent); box-shadow: 0 14px 34px -20px color-mix(in srgb, var(--accent) 70%, transparent); }
.plan.pick .btn.ghost { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
@media (max-width: 999px) { .plan { grid-template-columns: 1fr auto; } .plan .price { font-size: 2.25rem; margin: 0; } }
.notes { font-size: 0.9375rem; margin-top: 8px; }

/* FAQ */
.faq details { background: var(--card); border: 1px solid var(--band-line); }
.faq summary { min-height: 64px; font-size: 1.0625rem; font-weight: 700; }
.faq details[open] { border-color: var(--line-3); }
.faq details > p:last-child { font-size: 1.0625rem; color: var(--text); padding-bottom: 4px; }
summary::after { font-size: 1.75rem; }

/* Final call to action: the strongest band on the page */
.final-cta { background: var(--cta-bg); color: var(--cta-text); border-top: 1px solid var(--band-line); --text: var(--cta-text); }
.final-cta h2 { color: var(--cta-text); font-size: clamp(1.875rem, 6vw, 2.75rem); }
.final-cta .lede { color: var(--cta-sub); }
.final-cta .btn { background: var(--cta-btn-bg); color: var(--cta-btn-text); border-color: var(--cta-btn-bg); }
.final-cta .btn.ghost { background: transparent; color: var(--cta-text); border-color: var(--cta-edge); }
.final-cta .btn:focus-visible { outline-color: var(--cta-text); }
.final-cta a:focus-visible { outline-color: var(--cta-text); }

::selection { background: var(--selection); color: var(--text); }

/* Footer */
footer.site { font-size: 1rem; }

/* Get started */
.start-grid { display: grid; gap: 36px 56px; grid-template-columns: minmax(0, 1fr); align-items: start; margin-bottom: 36px; }
@media (min-width: 900px) { .start-grid { grid-template-columns: minmax(0, 0.54fr) minmax(0, 0.46fr); } }
.quick { list-style: none; counter-reset: q; margin: 0; padding: 0; }
.quick li { counter-increment: q; position: relative; padding: 0 0 26px 66px; min-height: 58px; }
.quick li::before { content: counter(q); position: absolute; left: 0; top: 0; width: 44px; height: 44px; display: grid; place-items: center; border: 2px solid var(--accent); border-radius: 12px; font-family: var(--mono); font-weight: 800; font-size: 1.25rem; color: var(--accent); background: var(--base); }
.quick li:not(:last-child)::after { content: ''; position: absolute; left: 21px; top: 52px; bottom: 6px; width: 2px; background: var(--line-3); opacity: 0.55; }
.quick li:last-child { padding-bottom: 0; }
.quick li:last-child::before { background: var(--ok-fill); border-color: var(--ok-fill); color: var(--on-ok); }
.quick h3 { font-size: 1.3125rem; margin: 0 0 4px; }
.quick p { margin: 0; color: var(--text); font-size: 1.0625rem; max-width: 34em; }
.paste { margin: 0; }
.paste-bar { display: flex; align-items: center; gap: 12px; padding: 0 14px; min-height: 40px; background: var(--term-chrome); color: var(--term-chrome-text); border: 1px solid var(--term-edge); border-bottom: 0; border-radius: 12px 12px 0 0; font-family: var(--mono); font-size: 0.875rem; }
.paste .dots { display: flex; gap: 6px; }
.paste .dots i { width: 11px; height: 11px; border-radius: 50%; background: var(--dot-1); }
.paste .dots i:nth-child(2) { background: var(--dot-2); }
.paste .dots i:nth-child(3) { background: var(--dot-3); }
pre.paste-body { margin: 0; background: var(--term-bg); color: var(--term-text); border: 1px solid var(--term-edge); border-radius: 0 0 12px 12px; padding: 18px 18px 20px; font-size: 0.9375rem; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; box-shadow: var(--shadow-deep); }
.paste-body .dim { color: var(--term-dim); }
.paste-body .pr { color: var(--term-accent); }
.paste-body .ok { color: var(--term-ok); }
.paste figcaption { margin-top: 14px; font-size: 0.9375rem; color: var(--text-2); }

/* Short landscape phones keep the call to action on screen */
@media (max-height: 520px) {
    section.hero { padding: 16px 0 40px; }
    h1 { font-size: 1.75rem; margin-bottom: 8px; }
    .lede { font-size: 1rem; margin-bottom: 0.6em; }
    .hero .btn { min-height: 48px; }
    .cta { margin-top: 12px; }
}

/* Keyboard-only pause control: hidden until it has keyboard focus, then shown in the corner of the demo */
.demo .kbd-pause { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.demo .kbd-pause:focus-visible { width: auto; height: auto; margin: 0; overflow: visible; clip: auto; top: 10px; right: 10px; z-index: 6; min-height: 44px; padding: 0 16px; font-family: var(--mono); font-size: 0.9375rem; font-weight: 700; color: var(--on-accent); background: var(--accent); border: 2px solid var(--on-accent); border-radius: 8px; box-shadow: var(--shadow-pop); outline: 3px solid var(--accent); outline-offset: 2px; cursor: pointer; }

@media (min-width: 1000px) { .limit p { columns: 2; column-gap: 48px; max-width: none; } }
