/* jigglemode.com. The editor's visual language: system type, quiet greys, one blue. */

:root {
  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', system-ui, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', system-ui, sans-serif;
  --mono: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Consolas, monospace;

  --bg: #fbfbfd;
  --bg-2: #f3f3f6;
  --surface: #ffffff;
  --surface-2: #f5f5f7;
  --surface-3: #ebebef;
  --text: #1d1d1f;
  --text-2: #55555c;
  --text-3: #6b6b72;
  --line: rgba(0, 0, 0, 0.09);
  --line-strong: rgba(0, 0, 0, 0.16);
  --accent: #0a6cff;
  --accent-btn: #0063eb;
  --accent-btn-hover: #0057d1;
  --accent-text: #005ad6;
  --accent-soft: rgba(10, 108, 255, 0.1);
  --success: #1a8a41;
  --success-soft: rgba(30, 158, 74, 0.12);
  --success-text: #126b32;
  --warn: #8f5600;
  --warn-soft: rgba(255, 159, 10, 0.14);
  --danger: #c22a22;
  --danger-soft: rgba(215, 51, 42, 0.09);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.05), 0 1px 1px rgba(0, 0, 0, 0.03);
  --shadow-2: 0 8px 28px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-3: 0 30px 80px rgba(20, 20, 40, 0.16), 0 8px 24px rgba(20, 20, 40, 0.08);
  --header-bg: rgba(251, 251, 253, 0.8);
  --code-bg: #f5f5f7;

  /* Home Screen, as the editor draws it */
  --canvas: #e9e9ee;
  --widget-bg: rgba(255, 255, 255, 0.94);
  --widget-fg: #1c1c1e;
  --folder-bg: rgba(255, 255, 255, 0.34);
  --scrim: rgba(28, 28, 32, 0.22);
  --wall: linear-gradient(180deg, #27364d 0%, #4c5a74 42%, #8e7f86 68%, #3a3542 100%);
  --wall-glow: radial-gradient(60% 30% at 80% 70%, rgba(201, 154, 134, 0.55), transparent 70%),
    radial-gradient(60% 40% at 15% 15%, rgba(93, 115, 150, 0.6), transparent 70%);

  --radius: 14px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --wrap: 1180px;
  --gutter: 24px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e0e10;
    --bg-2: #151517;
    --surface: #1c1c1f;
    --surface-2: #242427;
    --surface-3: #2e2e32;
    --text: #f5f5f7;
    --text-2: #b4b4ba;
    --text-3: #9a9aa1;
    --line: rgba(255, 255, 255, 0.1);
    --line-strong: rgba(255, 255, 255, 0.18);
    --accent: #3a8dff;
    --accent-text: #6aa9ff;
    --accent-soft: rgba(58, 141, 255, 0.16);
    --success: #45c973;
    --success-soft: rgba(59, 196, 107, 0.16);
    --success-text: #5fd88a;
    --warn: #ffb340;
    --warn-soft: rgba(255, 179, 64, 0.12);
    --danger: #ff6f68;
    --danger-soft: rgba(255, 97, 89, 0.13);
    --shadow-2: 0 8px 28px rgba(0, 0, 0, 0.45), 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-3: 0 30px 80px rgba(0, 0, 0, 0.6), 0 8px 24px rgba(0, 0, 0, 0.35);
    --header-bg: rgba(14, 14, 16, 0.78);
    --code-bg: #19191c;
    --canvas: #141416;
    --widget-bg: rgba(32, 32, 35, 0.92);
    --widget-fg: #f2f2f7;
    --folder-bg: rgba(255, 255, 255, 0.2);
    --scrim: rgba(0, 0, 0, 0.45);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 76px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
main { flex: 1 0 auto; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--accent-text); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--font-display); letter-spacing: -0.022em; line-height: 1.1; margin: 0; text-wrap: balance; }
p { margin: 0 0 1em; text-wrap: pretty; }
code, kbd, pre { font-family: var(--mono); font-size: 0.88em; }
kbd {
  display: inline-block; min-width: 1.6em; padding: 0.05em 0.4em; border-radius: 6px; text-align: center;
  background: var(--surface); border: 1px solid var(--line-strong); box-shadow: 0 1px 0 var(--line-strong);
  font-family: var(--font); font-size: 0.82em; line-height: 1.5;
}
.i { width: 1.1em; height: 1.1em; flex: none; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--surface); padding: 10px 14px; border-radius: 10px; box-shadow: var(--shadow-2); }
.skip:focus { top: 12px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 820px; }
.eyebrow { font-size: 0.82rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-3); margin: 0 0 14px; }
.lede { font-size: 1.22rem; color: var(--text-2); line-height: 1.5; }

/* ---------- Header and footer ---------- */
.site-h {
  position: sticky; top: 0; z-index: 50; background: var(--header-bg);
  -webkit-backdrop-filter: saturate(180%) blur(18px); backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--line);
}
.site-h-in { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 16px; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 650; font-size: 1.05rem; letter-spacing: -0.01em; }
.logo .mark { width: 28px; height: 28px; }
.logo .by { font-weight: 450; font-size: 0.86rem; color: var(--text-3); letter-spacing: 0; margin-left: -3px; align-self: center; white-space: nowrap; }
@media (max-width: 720px) { .site-h .logo .by { display: none; } }
.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a:not(.btn) { color: var(--text-2); text-decoration: none; font-size: 0.94rem; padding: 8px 12px; border-radius: 10px; }
.site-nav a:not(.btn):hover, .site-nav a:not(.btn)[aria-current] { color: var(--text); background: var(--surface-2); }
.site-nav .btn { margin-left: 8px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--accent-btn); color: #fff; text-decoration: none; font-weight: 600;
  border: 0; border-radius: 12px; padding: 13px 22px; font-size: 1.02rem; cursor: pointer;
  transition: background 0.15s, transform 0.15s var(--ease);
}
.btn:hover { background: var(--accent-btn-hover); text-decoration: none; }
.btn:active { transform: scale(0.98); }
.btn-s { padding: 8px 14px; font-size: 0.92rem; border-radius: 10px; }
.btn-l { padding: 15px 26px; font-size: 1.08rem; border-radius: 14px; }
.btn-g { background: var(--surface); color: var(--text); border: 1px solid var(--line-strong); }
.btn-g:hover { background: var(--surface-2); }

.site-f { border-top: 1px solid var(--line); background: var(--bg-2); margin-top: 120px; padding: 56px 0 40px; font-size: 0.92rem; }
.f-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 32px; }
.f-brand p { color: var(--text-2); margin-top: 12px; max-width: 30ch; }
.site-f h2 { font-size: 0.82rem; font-weight: 600; color: var(--text); letter-spacing: 0; margin-bottom: 12px; }
.site-f ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-f nav a { color: var(--text-2); text-decoration: none; }
.site-f nav a:hover { color: var(--text); text-decoration: underline; }
.f-legal { margin-top: 44px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--text-3); font-size: 0.84rem; }
.f-legal p { margin: 0; }
.f-legal a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.f-brand .f-by { margin-top: 10px; font-size: 0.9rem; }
.f-brand .f-by a { color: var(--text); font-weight: 600; text-decoration: none; }
.f-brand .f-by a:hover, .f-legal a:hover { text-decoration: underline; color: var(--text); }

/* ---------- Commands with copy buttons ---------- */
.cmd {
  display: inline-flex; align-items: center; gap: 4px; max-width: 100%;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 12px; padding: 4px 4px 4px 14px;
}
.cmd code { font-size: 0.86rem; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text); padding: 6px 0; line-height: 1.45; }
.cmd code::before { content: '$ '; color: var(--text-3); }
.copy {
  display: inline-grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 8px;
  border: 0; background: transparent; color: var(--text-2); cursor: pointer;
}
.copy:hover { background: var(--surface-2); color: var(--text); }
.copy .i { width: 16px; height: 16px; grid-area: 1 / 1; }
.copy .ok { opacity: 0; color: var(--success); }
.copy.done .ok { opacity: 1; }
.copy.done .i:not(.ok) { opacity: 0; }

/* ---------- Hero ---------- */
.hero { padding: 88px 0 0; text-align: center; overflow: hidden; }
.hero h1 { font-size: clamp(2.6rem, 6.4vw, 5rem); font-weight: 700; letter-spacing: -0.035em; line-height: 1.02; max-width: 15ch; margin: 0 auto; }
.hero .lede { max-width: 40ch; margin: 22px auto 0; font-size: clamp(1.1rem, 1.9vw, 1.32rem); }
.cta { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 14px 18px; margin-top: 34px; }
.cta-meta { margin: 14px 0 0; font-size: 0.88rem; color: var(--text-3); }
.cta-meta a { color: inherit; }
.status-pill {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 26px; padding: 6px 14px 6px 8px;
  border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 0.86rem; color: var(--text-2);
  text-decoration: none; box-shadow: var(--shadow-1);
}
.status-pill b { white-space: nowrap; background: var(--accent-soft); color: var(--accent-text); padding: 2px 9px; border-radius: 999px; font-weight: 600; font-size: 0.78rem; }
.status-pill:hover { color: var(--text); text-decoration: none; }

.hero-demo { margin: 64px auto 0; max-width: 1240px; padding: 0 var(--gutter); container-type: inline-size; }
.demo-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin: 14px 4px 0; font-size: 0.84rem; color: var(--text-3); text-align: left; }
.demo-bar p { margin: 0; }
.demo-btn {
  display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-strong); background: var(--surface);
  color: var(--text-2); border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 0.82rem; cursor: pointer; flex: none;
}
.demo-btn:hover { color: var(--text); }
.demo-btn .i { width: 14px; height: 14px; }
.demo-btn .play { display: none; }
.demo-btn[aria-pressed='true'] .play { display: block; }
.demo-btn[aria-pressed='true'] .pause { display: none; }

/* ---------- The demo stage (1em = 1/120 of its width) ---------- */
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.stage {
  --stage-w: 120;
  font-size: calc(100cqw / var(--stage-w));
  position: relative; width: 100%; aspect-ratio: 120 / 62; overflow: hidden; text-align: left;
  border-radius: 1.6em; background: var(--canvas); border: 1px solid var(--line);
  box-shadow: var(--shadow-3); font-family: var(--font); line-height: 1.25; user-select: none;
  -webkit-user-select: none; color: var(--text);
}
.stage .tb {
  position: relative; z-index: 3; height: 4.6em; display: flex; align-items: center; justify-content: space-between;
  padding: 0 1.6em; background: var(--surface); border-bottom: 1px solid var(--line);
}
.stage .tb-l, .stage .tb-r { display: flex; align-items: center; gap: 1.4em; }
.stage .dots { display: flex; gap: 0.6em; }
.stage .dots i { width: 1.05em; height: 1.05em; border-radius: 50%; background: var(--surface-3); }
.stage .brand { display: flex; align-items: center; gap: 0.7em; font-size: 1.4em; }
.stage .brand .mark { width: 1.45em; height: 1.45em; }
.stage .dev { display: flex; align-items: center; gap: 0.45em; background: var(--surface-2); border-radius: 0.6em; padding: 0.4em 0.8em; font-size: 1.2em; font-weight: 600; }
.stage .dev svg { width: 1.2em; height: 1.2em; fill: none; stroke: currentColor; stroke-width: 1.8; }
.stage .dev em { font-style: normal; font-weight: 400; color: var(--text-2); }
.stage .chg { font-size: 1.2em; color: var(--text-2); display: flex; align-items: center; gap: 0.4em; }
.stage .chg.on { color: var(--text); }
.stage .chg.on::before { content: ''; width: 0.5em; height: 0.5em; border-radius: 50%; background: var(--accent); }
.stage .rv { font-size: 1.2em; font-weight: 600; color: var(--accent-text); background: var(--accent-soft); border-radius: 0.6em; padding: 0.5em 1em; transition: background 0.3s, color 0.3s, transform 0.15s; }
.stage .rv.on { color: #fff; background: var(--accent-btn); }
.stage .press { transform: scale(0.94); }

.stage .cv { position: absolute; inset: 4.6em 0 0; display: flex; flex-direction: column; align-items: center; padding-top: 2.4em; }
.stage .pages { display: flex; gap: 3.4em; }
.stage .pl { font-size: 1.15em; font-weight: 600; color: var(--text-2); margin: 0 0 0.7em 0.4em; }
.stage .ph {
  position: relative; width: 21em; height: 41em; border-radius: 3.2em; padding: 3.6em 1.1em 0;
  background: var(--wall-glow), var(--wall); box-shadow: 0 1em 3em rgba(20, 20, 40, 0.18), 0 0.2em 0.6em rgba(20, 20, 40, 0.1);
}
.stage .sb { position: absolute; top: 1.2em; left: 2.1em; right: 2.1em; display: flex; justify-content: space-between; color: #fff; font-size: 0.95em; font-weight: 600; }
.stage .sbi { display: flex; gap: 0.35em; align-items: center; }
.stage .sbi i { display: block; width: 1.3em; height: 0.65em; border-radius: 0.2em; border: 0.12em solid #fff; }
.stage .sbi i:first-child { width: 1em; border: 0; background: linear-gradient(90deg, #fff 0 22%, transparent 22% 39%, #fff 39% 61%, transparent 61% 78%, #fff 78%); clip-path: polygon(0 100%, 100% 0, 100% 100%); }
.stage .grid { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 5.75em; column-gap: 0.3em; }
.stage .t { display: flex; flex-direction: column; align-items: center; position: relative; }
.stage .ic { width: 3.55em; height: 3.55em; border-radius: 0.86em; clip-path: inset(0 round 0.86em); flex: none; }
.stage .l { margin-top: 0.35em; font-size: 0.82em; font-weight: 500; color: #fff; text-shadow: 0 0.05em 0.25em rgba(0, 0, 0, 0.35); white-space: nowrap; max-width: 6.2em; overflow: hidden; text-overflow: ellipsis; }
.stage .fo {
  display: grid; grid-template-columns: repeat(3, 1fr); align-content: start; gap: 0.2em; padding: 0.42em;
  background: var(--folder-bg); clip-path: none; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.stage .fo .ic { width: 0.82em; height: 0.82em; border-radius: 0.22em; clip-path: inset(0 round 0.22em); }
.stage .w { grid-column: span 4; grid-row: span 2; }
.stage .wi {
  position: relative; width: 100%; height: 9.9em; border-radius: 1.5em; background: var(--widget-bg); color: var(--widget-fg);
  padding: 1em 1.2em; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto 1fr auto; column-gap: 0.6em;
}
.stage .wi .ic { width: 1.5em; height: 1.5em; border-radius: 0.4em; clip-path: inset(0 round 0.4em); grid-row: 1; }
.stage .wi b { font-size: 1.05em; align-self: center; }
.stage .wi .deg { grid-column: 1 / -1; font-size: 3em; font-weight: 300; letter-spacing: -0.03em; line-height: 1.1; }
.stage .wi .wx { grid-column: 1 / -1; font-size: 0.85em; opacity: 0.7; }
.stage .bars { position: absolute; right: 1.2em; bottom: 1.1em; display: flex; align-items: flex-end; gap: 0.35em; height: 4em; }
.stage .bars i { width: 0.7em; border-radius: 0.35em; background: #f0b43c; opacity: 0.85; }
.stage .bars i:nth-child(1) { height: 50%; } .stage .bars i:nth-child(2) { height: 70%; } .stage .bars i:nth-child(3) { height: 90%; }
.stage .bars i:nth-child(4) { height: 75%; } .stage .bars i:nth-child(5) { height: 55%; } .stage .bars i:nth-child(6) { height: 40%; }
.stage .w .l { margin-top: 0.3em; align-self: center; }
.stage .pd { position: absolute; left: 0; right: 0; bottom: 1.3em; display: flex; justify-content: center; gap: 0.45em; }
.stage .pd i { width: 0.45em; height: 0.45em; border-radius: 50%; background: rgba(255, 255, 255, 0.45); }
.stage .pd i.on { background: #fff; }

.stage .dk { margin-top: 2.2em; display: flex; flex-direction: column; align-items: center; }
.stage .dkl { font-size: 1.15em; font-weight: 600; color: var(--text-2); margin-bottom: 0.6em; }
.stage .dkl span { font-weight: 400; color: var(--text-2); margin-left: 0.3em; }
.stage .dkb { display: flex; gap: 1.5em; padding: 1em 1.6em; border-radius: 2.4em; background: linear-gradient(180deg, #4a4252, #3a3542); box-shadow: 0 0.6em 1.6em rgba(20, 20, 40, 0.2); }

/* Motion */
.stage.jiggle .pg .t:not(.ghost) { animation: jig 0.26s ease-in-out infinite alternate; }
.stage.jiggle .pg .t:nth-child(2n) { animation-delay: -0.13s; animation-direction: alternate-reverse; }
.stage.jiggle .pg .t:nth-child(3n) { animation-duration: 0.3s; }
@keyframes jig { from { transform: rotate(-1.4deg); } to { transform: rotate(1.4deg); } }
.stage .t.lifted { opacity: 0.25; }
.stage .ghost { position: absolute; z-index: 6; top: 0; left: 0; pointer-events: none; }
.stage .ghost .ic { box-shadow: 0 0.8em 1.6em rgba(0, 0, 0, 0.35); }
.stage .t.target > .ic { transform: scale(1.12); outline: 0.22em solid rgba(255, 255, 255, 0.75); outline-offset: 0.1em; transition: transform 0.2s var(--ease); }
.stage .t.new > .ic { animation: pop 0.45s var(--ease); }
@keyframes pop { from { transform: scale(0.6); } 60% { transform: scale(1.08); } to { transform: scale(1); } }

.stage .scrim { position: absolute; inset: 4.6em 0 0; z-index: 4; background: var(--scrim); opacity: 0; transition: opacity 0.4s; pointer-events: none; }
.stage .scrim.on { opacity: 1; }
.stage .sheet {
  position: absolute; z-index: 5; top: 0.9em; right: 0.9em; bottom: 0.9em; width: 46em; border-radius: 1.6em;
  background: var(--surface); box-shadow: 0 2em 5em rgba(0, 0, 0, 0.25); border: 1px solid var(--line);
  transform: translateX(110%); transition: transform 0.55s var(--ease); overflow: hidden;
}
.stage .sheet.on { transform: none; }
.stage .sh-review, .stage .sh-apply { position: absolute; inset: 0; padding: 2.4em 2.4em 2em; display: flex; flex-direction: column; transition: opacity 0.35s, transform 0.35s var(--ease); }
.stage .sh-apply { opacity: 0; transform: translateX(3em); pointer-events: none; }
.stage .sheet.applying .sh-review { opacity: 0; transform: translateX(-3em); }
.stage .sheet.applying .sh-apply { opacity: 1; transform: none; }
.stage .sh-h b { display: block; font-size: 2.1em; letter-spacing: -0.02em; }
.stage .sh-h span { display: block; font-size: 1.25em; color: var(--text-3); margin-top: 0.3em; }
.stage .sh-sec { font-size: 1.25em; font-weight: 650; margin: 1.6em 0 0.6em; }
.stage .sh-sec em { font-style: normal; font-weight: 400; color: var(--text-3); margin-left: 0.3em; }
.stage .sh-list { list-style: none; margin: 0; padding: 0; background: var(--surface-2); border-radius: 1em; overflow: hidden; }
.stage .sh-list li { display: flex; align-items: center; gap: 0.8em; padding: 0.85em 1em; font-size: 1.22em; }
.stage .sh-list li + li { border-top: 1px solid var(--line); }
.stage .sh-i { display: grid; place-items: center; flex: none; width: 1.8em; height: 1.8em; border-radius: 0.5em; background: var(--accent-soft); }
.stage .sh-i svg, .stage .ok svg { width: 1.1em; height: 1.1em; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.stage .sh-note { font-size: 1.12em; color: var(--text-3); margin: 1.6em 0 0; line-height: 1.45; }
.stage .sh-f { margin-top: auto; display: flex; justify-content: flex-end; gap: 0.8em; padding-top: 1.2em; border-top: 1px solid var(--line); }
.stage .sh-f span { font-size: 1.25em; font-weight: 600; border-radius: 0.7em; padding: 0.6em 1em; transition: transform 0.15s; }
.stage .btn-g { background: var(--surface); border: 1px solid var(--line-strong); }
.stage .btn-p { background: var(--accent-btn); color: #fff; }
.stage .steps { list-style: none; margin: 2.2em 0 0; padding: 0; }
.stage .steps li { display: flex; align-items: center; gap: 0.9em; font-size: 1.3em; padding: 0.7em 0; color: var(--text-3); transition: color 0.3s; }
.stage .steps li::before { content: ''; flex: none; width: 1.1em; height: 1.1em; border-radius: 50%; border: 0.14em solid var(--line-strong); box-sizing: border-box; }
.stage .steps li.run { color: var(--text); }
.stage .steps li.run::before { border-color: var(--accent); border-right-color: transparent; animation: spin 0.8s linear infinite; }
.stage .steps li.ok { color: var(--text); }
.stage .steps li.ok::before { border: 0; background: var(--success) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 64% no-repeat; }
@keyframes spin { to { transform: rotate(1turn); } }
.stage .done { margin-top: auto; margin-bottom: auto; text-align: center; opacity: 0; transform: translateY(1em); transition: opacity 0.4s, transform 0.4s var(--ease); }
.stage .done.on { opacity: 1; transform: none; }
.stage .done .ok { display: grid; place-items: center; width: 5em; height: 5em; margin: 0 auto 1em; border-radius: 50%; background: var(--success); }
.stage .done .ok svg { width: 2.4em; height: 2.4em; stroke: #fff; stroke-width: 2.6; }
.stage .done b { font-size: 2.2em; letter-spacing: -0.02em; }
.stage .done p { font-size: 1.25em; color: var(--text-2); margin: 0.6em auto 0; max-width: 26em; line-height: 1.45; }
.stage .cur { position: absolute; z-index: 9; top: 0; left: 0; width: 2.4em; height: 2.4em; fill: #111; stroke: #fff; stroke-width: 1.4; stroke-linejoin: round; opacity: 0; filter: drop-shadow(0 0.15em 0.3em rgba(0, 0, 0, 0.3)); pointer-events: none; }

/* Narrow: two pages, bigger. */
@container (max-width: 760px) {
  .stage { --stage-w: 56; aspect-ratio: 56 / 63; border-radius: 1.2em; }
  .stage .pg[data-page='3'], .stage .pg[data-page='4'], .stage .dots, .stage .dev em, .stage .chg { display: none; }
  .stage .tb { padding: 0 1.2em; }
  .stage .brand b { display: none; }
  .stage .sheet { left: 0.9em; width: auto; top: 9em; }
  .stage .sh-note { display: none; }
}

/* ---------- Sections ---------- */
.sec { padding: 132px 0 0; }
.sec-head { max-width: 760px; }
.sec-head.c { margin: 0 auto; text-align: center; }
.sec h2 { font-size: clamp(2.05rem, 4.4vw, 3.3rem); font-weight: 700; letter-spacing: -0.03em; }
.sec-head p { font-size: 1.2rem; color: var(--text-2); margin-top: 18px; }
.feature { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; align-items: center; margin-top: 56px; }
.feature.flip { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.feature.flip > :first-child { order: 2; }
.feature h2 { margin-bottom: 18px; }
.feature h3 { font-size: 1.65rem; letter-spacing: -0.02em; margin-bottom: 14px; }
.feature p { color: var(--text-2); }
.checks { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 12px; }
.checks li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; color: var(--text-2); }
.checks li .i { width: 20px; height: 20px; margin-top: 3px; color: var(--accent); }
.checks b { color: var(--text); font-weight: 600; }

.shot { margin: 0; }
.shot picture { display: block; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow-2); background: var(--surface-2); }
.shot figcaption { font-size: 0.82rem; color: var(--text-3); margin-top: 10px; }
.shot .sample { white-space: nowrap; }
.shot.big { margin-top: 48px; }
.shot.big picture { border-radius: 20px; box-shadow: var(--shadow-3); }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }

/* Safety steps */
.steps4 { list-style: none; margin: 56px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; counter-reset: s; }
.steps4 li { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 26px 24px 24px; box-shadow: var(--shadow-1); }
.steps4 li::after { content: ''; position: absolute; top: 46px; right: -17px; width: 18px; height: 2px; background: var(--line-strong); }
.steps4 li:last-child::after { display: none; }
.steps4 .n { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-text); margin-bottom: 18px; }
.steps4 .n .i { width: 21px; height: 21px; }
.steps4 li:last-child .n { background: var(--success-soft); color: var(--success-text); }
.steps4 h3 { font-size: 1.2rem; margin-bottom: 8px; }
.steps4 p { color: var(--text-2); font-size: 0.97rem; margin: 0; }
.undo-line { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; color: var(--text-2); }

/* Agent conversation */
.agent { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 56px; margin-top: 56px; align-items: start; }
.chat { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 26px; box-shadow: var(--shadow-2); display: flex; flex-direction: column; gap: 14px; font-size: 0.97rem; }
.msg { max-width: 88%; padding: 12px 16px; border-radius: 18px; line-height: 1.45; }
.msg p { margin: 0; }
.msg p + p, .msg ul + p { margin-top: 8px; }
.msg ul { margin: 8px 0 0; padding-left: 18px; }
.msg li + li { margin-top: 4px; }
.msg.you { align-self: flex-end; background: var(--accent-btn); color: #fff; border-bottom-right-radius: 6px; }
.msg.ai { align-self: flex-start; background: var(--surface-2); border-bottom-left-radius: 6px; }
.who { font-size: 0.74rem; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.05em; margin: 4px 4px -8px; }
.who.r { align-self: flex-end; }
.confirm { align-self: center; width: min(100%, 360px); text-align: center; border: 1px solid var(--line-strong); border-radius: 16px; padding: 18px; background: var(--bg); }
.confirm .mark { width: 30px; height: 30px; margin: 0 auto 8px; }
.confirm b { display: block; }
.confirm p { font-size: 0.86rem; color: var(--text-2); margin: 4px 0 12px; }
.confirm .row { display: flex; gap: 8px; justify-content: center; }
.confirm .row span { padding: 6px 16px; border-radius: 9px; font-size: 0.86rem; font-weight: 600; border: 1px solid var(--line-strong); }
.confirm .row span:last-child { background: var(--accent-btn); border-color: transparent; color: #fff; }
.confirm small { display: block; margin-top: 10px; color: var(--text-3); font-size: 0.76rem; }
.tick { color: var(--success-text); font-weight: 600; }
.setup h3 { font-size: 1.3rem; margin: 0 0 6px; }
.setup p { color: var(--text-2); }
.setup .cmd { display: flex; margin: 6px 0 16px; }
.setup dl { margin: 0; }
.setup dt { font-weight: 600; font-size: 0.92rem; margin-top: 4px; }
.setup dd { margin: 0; }
.setup .note { font-size: 0.92rem; color: var(--text-2); border-left: 3px solid var(--accent); padding: 2px 0 2px 14px; margin-top: 22px; }

/* Cards row */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 48px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 26px; box-shadow: var(--shadow-1); }
.card .i { width: 26px; height: 26px; color: var(--accent); margin-bottom: 16px; }
.card h3 { font-size: 1.18rem; margin-bottom: 8px; }
.card p { color: var(--text-2); font-size: 0.97rem; margin: 0; }
.card p + p { margin-top: 10px; }
.card .cmd { margin-top: 14px; }
.badge { display: inline-block; font-size: 0.74rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; vertical-align: 2px; margin-left: 6px; }
.badge.ok { background: var(--success-soft); color: var(--success-text); }
.badge.wait { background: var(--warn-soft); color: var(--warn); }

/* Limits */
.limits { list-style: none; padding: 0; margin: 40px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 48px; }
.limits li { display: grid; grid-template-columns: 26px 1fr; gap: 10px; padding: 16px 0; border-top: 1px solid var(--line); color: var(--text-2); }
.limits li .i { width: 20px; height: 20px; color: var(--text-3); margin-top: 3px; }
.limits b { color: var(--text); font-weight: 600; }
.limits-note { margin-top: 28px; color: var(--text-2); max-width: 70ch; }

/* Compatibility table */
.table { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 600; background: var(--surface-2); font-size: 0.88rem; }
tbody th { background: transparent; font-size: inherit; }
tr:last-child td { border-bottom: 0; }
.ta-center { text-align: center; }
.ta-right { text-align: right; }
.yes { color: var(--success-text); font-weight: 600; white-space: nowrap; }
.not-yet { color: var(--warn); font-weight: 600; white-space: nowrap; }

/* Final call */
.final { text-align: center; padding: 140px 0 0; }
.final h2 { font-size: clamp(2.3rem, 5vw, 3.8rem); letter-spacing: -0.035em; }
.final .mark { width: 72px; height: 72px; margin: 0 auto 28px; filter: drop-shadow(0 12px 24px rgba(58, 91, 217, 0.3)); }

/* ---------- Download page ---------- */
.dl { padding-top: 72px; }
.dl h1 { font-size: clamp(2.3rem, 5vw, 3.4rem); letter-spacing: -0.03em; margin-bottom: 16px; }
.files .table + p { margin-top: 14px; }
.dl-main { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; margin-top: 40px; }
.dl-card { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 28px; box-shadow: var(--shadow-1); }
.dl-card h2 { font-size: 1.35rem; margin-bottom: 8px; }
.dl-card p { color: var(--text-2); }
.dl-card .btn { margin-top: 6px; }
.dl-card .cmd { display: flex; margin-top: 10px; }
.files { margin-top: 48px; }
.files h2, .after h2 { font-size: 1.5rem; margin-bottom: 16px; }
.files td code { font-size: 0.8rem; word-break: break-all; }
.files .muted, .muted { color: var(--text-3); }
.after { margin-top: 48px; }
.after ol { padding-left: 22px; color: var(--text-2); }
.after li { margin-bottom: 8px; }

/* ---------- Docs ---------- */
.docs { display: grid; grid-template-columns: 220px minmax(0, 1fr) 200px; gap: 56px; padding-top: 48px; align-items: start; }
.dn { position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow-y: auto; font-size: 0.92rem; padding-bottom: 24px; }
.dn-m { display: none; }
.dn-home { display: block; font-weight: 600; color: var(--text); text-decoration: none; padding: 6px 10px; border-radius: 8px; margin-bottom: 12px; }
.dn-g { margin-bottom: 20px; }
.dn h2 { font-size: 0.74rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-3); margin: 0 0 6px 10px; }
.dn ul { list-style: none; margin: 0; padding: 0; }
.dn a:not(.dn-home) { display: block; padding: 5px 10px; border-radius: 8px; color: var(--text-2); text-decoration: none; line-height: 1.35; }
.dn a:hover { color: var(--text); background: var(--surface-2); }
.dn a[aria-current] { color: var(--accent-text); background: var(--accent-soft); font-weight: 600; }
.toc-c { position: sticky; top: 84px; font-size: 0.86rem; }
.toc h2 { font-size: 0.74rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-3); margin-bottom: 10px; }
.toc ul { list-style: none; margin: 0; padding: 0 0 0 12px; border-left: 1px solid var(--line); }
.toc li { margin: 0 0 8px; }
.toc a { color: var(--text-2); text-decoration: none; }
.toc a:hover { color: var(--text); }

.prose { min-width: 0; }
.prose h1 { font-size: clamp(2.1rem, 4vw, 2.8rem); letter-spacing: -0.03em; margin-bottom: 18px; }
.prose h1 + p { font-size: 1.18rem; color: var(--text-2); }
.prose h2 { font-size: 1.6rem; margin: 56px 0 14px; letter-spacing: -0.02em; }
.prose h3 { font-size: 1.2rem; margin: 36px 0 10px; letter-spacing: -0.01em; }
.prose h4 { font-size: 1rem; margin: 24px 0 8px; }
.prose h2, .prose h3 { position: relative; scroll-margin-top: 84px; }
.prose .anchor { position: absolute; left: -0.9em; width: 0.9em; color: var(--text-3); text-decoration: none; opacity: 0; font-weight: 400; }
.prose h2:hover .anchor, .prose h3:hover .anchor, .prose .anchor:focus { opacity: 1; }
.prose ul, .prose ol { padding-left: 1.4em; margin: 0 0 1.1em; }
.prose li { margin-bottom: 0.4em; }
.prose li > ul, .prose li > ol { margin: 0.4em 0 0; }
:where(p, li, td, dd) > code, .prose :not(pre) > code { background: var(--code-bg); border: 1px solid var(--line); border-radius: 6px; padding: 0.08em 0.36em; font-size: 0.84em; overflow-wrap: anywhere; }
.prose a code { color: inherit; }
.prose .table { margin: 0 0 1.4em; }
.prose blockquote { margin: 0 0 1.2em; padding-left: 16px; border-left: 3px solid var(--line-strong); color: var(--text-2); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 40px 0; }
.code { position: relative; margin: 0 0 1.3em; }
.code pre { margin: 0; background: var(--code-bg); border: 1px solid var(--line); border-radius: 12px; padding: 14px 52px 14px 16px; overflow-x: auto; line-height: 1.55; font-size: 0.84rem; }
.code pre code { font-size: 1em; }
.code .copy { position: absolute; top: 7px; right: 7px; background: var(--code-bg); }
.code .lang { position: absolute; top: -9px; left: 12px; font: 600 0.68rem/1 var(--font); text-transform: uppercase; letter-spacing: 0.06em; padding: 3px 6px; border-radius: 5px; background: var(--surface-3); color: var(--text-2); }
.licenses h3 .muted { font-weight: 400; }
.licenses td { font-size: 0.86rem; padding: 7px 14px; }
.callout { border-radius: 14px; padding: 14px 18px; margin: 0 0 1.3em; background: var(--accent-soft); border: 1px solid transparent; }
.callout p { margin: 0 0 0.6em; }
.callout p:last-child { margin: 0; }
.callout-t { display: flex; align-items: center; gap: 8px; font-weight: 650; color: var(--accent-text); }
.callout.warning, .callout.important { background: var(--warn-soft); }
.callout.warning .callout-t, .callout.important .callout-t { color: var(--warn); }
.callout.tip { background: var(--success-soft); }
.callout.tip .callout-t { color: var(--success-text); }
.md-shot { margin: 8px 0 28px; }
.md-shot .shot picture { box-shadow: var(--shadow-1); border-radius: 12px; }
.pn { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 64px; padding-top: 24px; border-top: 1px solid var(--line); }
.pn a { display: block; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; text-decoration: none; color: var(--text); font-weight: 600; }
.pn a:hover { border-color: var(--line-strong); background: var(--surface); }
.pn a span { display: block; font-size: 0.8rem; font-weight: 400; color: var(--text-3); }
.pn-next { text-align: right; grid-column: 2; }
.doc-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 24px 0 8px; }
.doc-cards a { display: block; padding: 18px; border: 1px solid var(--line); background: var(--surface); border-radius: 14px; text-decoration: none; color: var(--text); }
.doc-cards a:hover { border-color: var(--line-strong); }
.doc-cards b { display: block; margin-bottom: 4px; }
.doc-cards span { color: var(--text-2); font-size: 0.92rem; }
.legal { padding-top: 56px; }
.notfound { padding: 120px 0 40px; text-align: center; }
.notfound h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); letter-spacing: -0.03em; margin-bottom: 16px; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .docs { grid-template-columns: 200px minmax(0, 1fr); gap: 40px; }
  .toc-c { display: none; }
  .steps4 { grid-template-columns: 1fr 1fr; }
  .steps4 li::after { display: none; }
}
@media (max-width: 860px) {
  :root { --gutter: 20px; }
  .feature, .feature.flip, .agent { grid-template-columns: 1fr; gap: 32px; }
  .feature.flip > :first-child { order: 0; }
  .cards { grid-template-columns: 1fr; }
  .limits { grid-template-columns: 1fr; }
  .f-grid { grid-template-columns: 1fr 1fr; }
  .f-brand { grid-column: 1 / -1; }
  .docs { grid-template-columns: 1fr; gap: 0; padding-top: 20px; }
  .dn { position: static; max-height: none; overflow: visible; padding: 0; }
  .dn-d { display: none; }
  .dn-m { display: block; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); margin-bottom: 28px; }
  .dn-m summary { display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 12px 14px; font-weight: 600; list-style: none; }
  .dn-m summary::-webkit-details-marker { display: none; }
  .dn-m nav { padding: 4px 4px 12px; }
  .dl-main { grid-template-columns: 1fr; }
  .sec { padding-top: 96px; }
}
@media (max-width: 600px) {
  :root { --gutter: 16px; }
  body { font-size: 16px; }
  .site-nav a:not(.btn):not([href='/docs/']) { display: none; }
  .hero { padding-top: 56px; }
  .cta { flex-direction: column; }
  .cta .cmd { max-width: 100%; }
  .hero-demo { margin-top: 44px; }
  .demo-bar { align-items: flex-start; }
  .steps4, .pair, .doc-cards { grid-template-columns: 1fr; }
  .sec { padding-top: 80px; }
  .chat { padding: 18px; }
  .msg { max-width: 94%; }
  .pn { grid-template-columns: 1fr; }
  .pn-next { grid-column: 1; }
  .prose .anchor { display: none; }
  .site-f { margin-top: 88px; }
  th, td { padding: 10px 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

@media print {
  .site-h, .site-f, .dn, .toc-c, .copy, .hero-demo, .pn { display: none !important; }
  body { background: #fff; color: #000; }
  .docs { display: block; }
}
