/* Simple tool pages: Why → (Copy now | Customize first) → Customize → one extra. Loaded after product.css. */

.sp { --sp-acc: var(--accent, var(--lime)); }

/* ---------- 1. why ---------- */
.sp-hero { padding: 36px 0 26px; }
.sp-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.sp-why .crumbs { margin-bottom: 24px; }
.sp .p-title h1 { font-size: clamp(38px, 5.2vw, 68px); white-space: nowrap; letter-spacing: -.035em; }
.sp-promise { margin: 20px 0 0; max-width: 560px; font: 400 clamp(17px, 1.5vw, 20px)/1.5 var(--f-ui); color: var(--text-2); text-wrap: pretty; }
.sp-points { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 10px; max-width: 560px; }
.sp-points li { display: flex; gap: 12px; align-items: center; padding: 10px 14px 10px 10px; border-radius: 12px; border: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 70%, transparent); }
.sp-pi { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: var(--sp-acc); background: color-mix(in srgb, var(--sp-acc) 10%, transparent); border: 1px solid color-mix(in srgb, var(--sp-acc) 30%, transparent); }
:root[data-theme="light"] .sp-pi { color: var(--lime-ink); }
.sp-pi svg { width: 17px; height: 17px; }
.sp-points div { display: grid; gap: 2px; min-width: 0; }
.sp-points b { font: 600 14.5px/1.25 var(--f-display); color: var(--text); }
.sp-points div span { font-size: 13.5px; color: var(--muted); line-height: 1.4; }
.sp-points code { font-size: 12px; }

.sp-visual { min-width: 0; }
.sp-visual .tp-visual { position: static; }
/* Vibe Accounts visual: the passkey → profile diagram, framed */
.sp-visual-id { position: relative; height: 400px; border-radius: var(--r-lg); border: 1px solid var(--line-2); overflow: hidden;
  background: radial-gradient(70% 90% at 80% 40%, color-mix(in srgb, var(--cyan) 9%, transparent), transparent 65%), radial-gradient(60% 80% at 10% 90%, color-mix(in srgb, var(--lime) 8%, transparent), transparent 60%), var(--code-bg);
  box-shadow: 0 40px 80px -44px rgba(0,0,0,.9), 0 0 60px -36px var(--lime-glow); }
.sp-visual-id::before { content: ''; position: absolute; inset: 0; background-image: linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px); background-size: 28px 28px; opacity: .9; }
.sp-visual-id .pdiag { padding: 24px; flex-direction: column; justify-content: center; align-items: center; gap: 0; }
.sp-visual-id .pd-key, .sp-visual-id .pd-link { display: flex; }
.sp-visual-id .pd-link { flex: none; width: 2px; height: 58px; min-width: 0; max-width: none; margin: 14px 0 18px; background: repeating-linear-gradient(180deg, rgba(46,230,255,.75) 0 6px, transparent 6px 11px); background-size: 2px 22px; animation: sp-flow-y 1.2s linear infinite; }
.sp-visual-id .pd-link::after { right: auto; top: auto; left: -4px; bottom: -6px; border: 5px solid transparent; border-top: 7px solid rgba(46,230,255,.85); border-bottom: 0; }
.sp-visual-id .pd-link span { left: 16px; bottom: auto; top: 50%; transform: translateY(-50%); }
.sp-visual-id .pd-kt small { max-width: none; }
.sp-visual-id .reroll { position: absolute; right: 14px; bottom: 14px; margin: 0; }
@keyframes sp-flow-y { to { background-position: 0 22px; } }
.sp-visual-id .pd-kt b { color: #e8ece6; }
.sp-visual-id .pd-card { background: rgba(10,13,17,.86); border-color: rgba(255,255,255,.1); }
.sp-visual-id .pd-name { color: #eef2f5; }

/* ---------- 2. two paths ---------- */
.sp-paths-sec { padding: 8px 0 34px; }
.sp-paths { display: grid; grid-template-columns: minmax(0, 1.25fr) auto minmax(0, 1fr); gap: 0; align-items: stretch; }
.sp-path { position: relative; display: flex; flex-direction: column; gap: 18px; padding: 24px; border-radius: var(--r-lg); border: 1px solid var(--line-2); background: var(--surface); box-shadow: var(--shadow); min-width: 0; }
.sp-path-copy { border-color: color-mix(in srgb, var(--lime-ink) 32%, var(--line-2)); background: radial-gradient(90% 120% at 0% 0%, color-mix(in srgb, var(--lime) 6%, transparent), transparent 55%), var(--surface); }
.sp-path-cz { background: radial-gradient(90% 120% at 100% 0%, color-mix(in srgb, var(--cyan) 6%, transparent), transparent 55%), var(--surface); }
.sp-path-head { display: flex; gap: 14px; align-items: flex-start; }
.sp-k { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font: 700 12px/1 var(--f-mono); color: var(--on-lime); background: var(--lime); box-shadow: 0 0 18px -4px var(--lime-glow); }
.sp-path-cz .sp-k { background: var(--cyan); color: #06181c; box-shadow: 0 0 18px -4px rgba(46,230,255,.45); }
.sp-path h2 { margin: 0; font: 650 21px/1.2 var(--f-display); letter-spacing: -.015em; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.sp-path h2 em { font: 600 10.5px/1 var(--f-mono); font-style: normal; letter-spacing: .14em; text-transform: uppercase; color: var(--lime-ink); padding: 5px 8px; border-radius: 999px; background: var(--lime-soft); border: 1px solid color-mix(in srgb, var(--lime-ink) 35%, transparent); transform: translateY(-2px); }
.sp-path-head p { margin: 6px 0 0; font-size: 14px; color: var(--muted); line-height: 1.5; max-width: 460px; }
.sp-lines { display: grid; gap: 8px; margin-top: auto; }
.sp-lines .code-line { height: 46px; padding: 0 8px 0 12px; font-size: 14px; border-radius: 11px; }
.sp-lines .code-line.term .cl-text { color: color-mix(in srgb, var(--lime-ink) 62%, var(--text)); font-weight: 400; }
.sp-lines .code-line.prompt .cl-text { color: color-mix(in srgb, var(--cyan-ink) 55%, var(--text)); }
.sp-lines .code-line .cl-icon { width: 32px; height: 32px; }
.sp-lines .code-line { height: auto; min-height: 46px; padding-block: 7px; }
.sp-lines .code-line .cl-text { line-height: 1.4; }
.sp-lines .code-line.prompt .cl-text { white-space: normal; }
.sp-lines .code-line.one .cl-text { white-space: nowrap; }
.sp-or { display: grid; place-items: center; width: 52px; position: relative; }
.sp-or::before { content: ''; position: absolute; top: 18px; bottom: 18px; left: 50%; width: 1px; background: linear-gradient(var(--line), var(--line-2), var(--line)); }
.sp-or span { position: relative; padding: 6px 0; font: 600 10.5px/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--dim); background: var(--bg); }
.sp-open { margin-top: auto; align-self: flex-start; gap: 10px; padding: 13px 22px; font-weight: 700; }
.sp-open svg { width: 15px; height: 15px; transition: transform .2s var(--ease); }
.sp-open:hover svg { transform: translateY(2px); }
.sp-open[aria-expanded="true"] { opacity: .75; }

/* "nothing to set" note beside a copy-only path */
.sp-paths.single { grid-template-columns: minmax(0, 1fr); }
.sp-path-copy.wide { flex-direction: row; align-items: center; gap: 28px; }
.sp-path-copy.wide .sp-path-head { flex: 0 1 300px; }
.sp-path-copy.wide .sp-lines { flex: 1; margin: 0; min-width: 0; }
.sp-nocfg { display: flex; gap: 8px; align-items: center; margin: 12px 4px 0; font-size: 12.5px; color: var(--dim); }
.sp-nocfg svg { width: 14px; height: 14px; flex: none; }

/* teaser in the customize path */
.sp-teaser { display: grid; gap: 12px; padding: 14px; border-radius: 14px; border: 1px dashed var(--line-2); background: color-mix(in srgb, var(--bg) 55%, transparent); min-width: 0; }
.sp-t-avs { display: flex; gap: 8px; min-height: 40px; flex-wrap: wrap; }
.sp-t-avs span { width: 40px; height: 40px; border-radius: 11px; overflow: hidden; flex: none; box-shadow: 0 6px 16px -6px rgba(0,0,0,.6), 0 0 0 1px var(--line); }
.sp-t-avs svg { width: 100%; height: 100%; display: block; }
.sp-t-pals { display: flex; gap: 8px; flex-wrap: wrap; }
.sp-t-pals i { display: block; width: 30px; height: 18px; border-radius: 999px; background: linear-gradient(90deg, var(--c1) 50%, var(--c2) 50%); box-shadow: 0 0 0 1px var(--line-2); }

/* ---------- 3. customize ---------- */
.sp-cz { padding: 8px 0 40px; scroll-margin-top: calc(var(--header-h) + 8px); }
.sp-cz[hidden] { display: none; }
.sp-cz > .wrap { animation: card-in .35s var(--ease); }
.sp-cz-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; padding: 22px 0 18px; border-top: 1px solid var(--line); }
.sp-cz-head h2 { margin-top: 10px; }
.sp-cz-head p { margin: 8px 0 0; font-size: 14px; max-width: 560px; }
.sp-cz-actions { display: flex; gap: 8px; }
.sp-cz-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.sp-editor { min-width: 0; }
.sp-preview { position: sticky; top: calc(var(--header-h) + 14px); display: grid; gap: 10px; min-width: 0; }
.sp-preview-label { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 11px; }
.sp-preview-box { border-radius: var(--r-lg); border: 1px solid var(--line-2); background: var(--surface); padding: 6px; min-width: 0; overflow: hidden; box-shadow: var(--shadow); }
.sp-jump { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 14px; border-radius: 11px; border: 1px dashed color-mix(in srgb, var(--lime-ink) 40%, transparent); background: transparent; color: var(--lime-ink); font: 600 12.5px/1 var(--f-mono); cursor: pointer; transition: background .2s; }
.sp-jump:hover { background: var(--lime-soft); }
.sp-jump svg { width: 14px; height: 14px; }

/* output */
.sp-out-wrap { margin-top: 26px; padding: 22px; border-radius: var(--r-lg); border: 1px solid color-mix(in srgb, var(--lime-ink) 28%, var(--line-2)); background: var(--surface); box-shadow: var(--shadow); scroll-margin-top: calc(var(--header-h) + 14px); }
.sp-out-title { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.sp-out-title h3 { margin: 0; font: 650 19px/1.2 var(--f-display); letter-spacing: -.01em; }
.sp-out { display: grid; gap: 12px; }
.sp-out-status { display: flex; align-items: baseline; gap: 8px; font-size: 13px; color: var(--muted); line-height: 1.45; }
.sp-out-rows { display: grid; gap: 8px; }
.sp-pill { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; width: 100%; min-height: 46px; padding: 8px 8px 8px 12px; border-radius: 11px; border: 1px solid var(--line-2); background: var(--code-bg); color: #dfe5dc; text-align: left; cursor: copy; transition: border-color .2s, box-shadow .2s; position: relative; overflow: hidden; }
.sp-pill:hover { border-color: color-mix(in srgb, var(--lime-ink) 45%, transparent); }
.sp-pill .cl-pill { font: 600 9.5px/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; padding: 5px 8px; border-radius: 999px; white-space: nowrap; color: #c6ff3d; background: rgba(198,255,61,.1); border: 1px solid rgba(198,255,61,.35); }
.sp-pill.prompt .cl-pill { color: #2ee6ff; background: rgba(46,230,255,.1); border-color: rgba(46,230,255,.35); }
.sp-pill-text { font: 600 13.5px/1.5 var(--f-code); color: color-mix(in srgb, #c6ff3d 62%, #dfe5dc); background: none; padding: 0; border: 0; white-space: pre-wrap; overflow-wrap: anywhere; min-width: 0; }
.sp-pill.prompt .sp-pill-text { color: color-mix(in srgb, #2ee6ff 50%, #dfe5dc); font-weight: 400; }
.sp-pill .cl-icon { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; color: #8a919a; transition: background .2s, color .2s; }
.sp-pill:hover .cl-icon { background: rgba(198,255,61,.1); color: #c6ff3d; }
.sp-pill .cl-icon svg { width: 14px; height: 14px; }
.sp-pill .i-check { display: none; }
.sp-pill.copied .i-copy { display: none; }
.sp-pill.copied .i-check { display: block; color: #c6ff3d; }
.sp-pill.flash { box-shadow: 0 0 0 1px color-mix(in srgb, var(--lime) 50%, transparent), 0 0 24px -8px var(--lime-glow); }
.sp-out-extra { display: grid; gap: 10px; }
.sp-file { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 12.5px; }
.sp-file span { min-width: 0; flex: 1 1 220px; }
.sp-dl { gap: 8px; font-family: var(--f-code); font-weight: 700; }
.sp-dl svg { width: 15px; height: 15px; color: var(--lime-ink); }
.sp-dl:disabled { opacity: .45; cursor: not-allowed; }
.sp-code summary { cursor: pointer; width: max-content; max-width: 100%; font: 500 11.5px/1.3 var(--f-mono); color: var(--muted); letter-spacing: .02em; }
.sp-code summary:hover { color: var(--text); }
.sp-code-body { position: relative; margin-top: 10px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--code-bg); }
.sp-code-body pre { margin: 0; padding: 14px 16px; padding-right: 96px; overflow-x: auto; font: 500 12.5px/1.6 var(--f-code); color: #dfe5dc; scrollbar-width: thin; }
.sp-code-body .copy-btn { position: absolute; top: 8px; right: 8px; }

/* ---------- 4. the one extra section ---------- */
.sp-more { padding: 8px 0 56px; }
.sp-more-card { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 18px 36px; padding: 26px; border-radius: var(--r-lg); border: 1px solid var(--line-2); background: var(--surface); box-shadow: var(--shadow); }
.sp-more-head h2 { margin-top: 10px; }
.sp-more-head p { margin: 8px 0 0; font-size: 14px; }
.sp-ledger { display: grid; gap: 10px; align-content: start; }
.sp-ledger > div { display: grid; gap: 6px; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-2); }
.sp-ledger b { font: 600 12px/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; }
.sp-ledger span { font-size: 13.5px; color: var(--text-2); line-height: 1.55; }
.sp-never { color: var(--danger); }
.sp-fine { grid-column: 1 / -1; margin: 0; font-size: 12.5px; }
.sp-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.sp-steps li { display: grid; gap: 6px; align-content: start; padding: 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-2); min-width: 0; }
.sp-steps i { font: 600 10.5px/1 var(--f-mono); font-style: normal; color: var(--lime-ink); letter-spacing: .1em; }
.sp-steps b { font: 600 15px/1.2 var(--f-display); }
.sp-steps span { font-size: 13px; color: var(--muted); line-height: 1.45; }
.sp-steps code { font: 500 11.5px/1.4 var(--f-code); color: #dfe5dc; background: var(--code-bg); padding: 6px 8px; border-radius: 7px; overflow-wrap: anywhere; }
.sp-ctrl { display: grid; gap: 8px; align-content: start; }
.sp-ctrl-row { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 12px; align-items: center; }
.sp-ctrl-row > span { font-size: 13px; color: var(--muted); line-height: 1.35; }
.sp-ctrl-row > span b { display: block; color: var(--text); font: 600 14px/1.3 var(--f-display); }
.sp-ctrl .code-line { height: 42px; font-size: 13.5px; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .sp-cz-grid { grid-template-columns: minmax(0, 1fr); }
  .sp-preview { position: static; }
  .sp-jump { display: none; }
}
@media (max-width: 960px) {
  .sp-hero-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .sp-paths { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .sp-or { width: auto; height: 44px; }
  .sp-or::before { top: 50%; bottom: auto; left: 18px; right: 18px; width: auto; height: 1px; background: linear-gradient(90deg, var(--line), var(--line-2), var(--line)); }
  .sp-or span { padding: 0 12px; }
  .sp-path-copy.wide { flex-direction: column; align-items: stretch; }
  .sp-path-copy.wide .sp-path-head { flex: none; }
  .sp-more-card { grid-template-columns: minmax(0, 1fr); }
  .sp-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .sp-hero { padding: 22px 0 18px; }
  .sp .p-mark svg { width: 60px; height: 60px; }
  .sp-promise { font-size: 16.5px; }
  .sp-visual-id { height: 270px; }
  .sp-visual-id .pdiag { padding: 18px 12px; }
  .sp-path { padding: 18px; gap: 16px; }
  .sp-path h2 { font-size: 19px; }
  .sp-lines .code-line { height: auto; min-height: 46px; font-size: 13px; }
  .sp-open { align-self: stretch; justify-content: center; }
  .sp-cz-head { align-items: stretch; }
  .sp-cz-actions { width: 100%; }
  .sp-cz-actions .btn { flex: 1; justify-content: center; }
  .sp-out-wrap { padding: 16px; }
  .sp-pill { grid-template-columns: minmax(0, 1fr) auto; }
  .sp-pill .cl-pill { grid-column: 1 / -1; justify-self: start; }
  .sp-pill-text { font-size: 12.5px; }
  .sp-more-card { padding: 18px; }
  .sp-steps { grid-template-columns: minmax(0, 1fr); }
  .sp-ctrl-row { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .cz-ai-copy { justify-self: stretch; }
}
@media (max-width: 400px) { .sp .p-title h1 { font-size: 34px; } }
@media (prefers-reduced-motion: reduce) { .sp-cz > .wrap { animation: none; } }

/* ---------- form editor (tools without their own admin panel) ---------- */
.sp-form { display: grid; gap: 14px; }
.sp-card { padding: 16px 18px; border-radius: var(--r-lg); border: 1px solid var(--line-2); background: var(--surface); min-width: 0; }
.sp-card-h { margin: 0 0 6px; font: 600 11px/1 var(--f-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--dim); }
.sp-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); min-width: 0; }
.sp-card-h + .sp-row { border-top: 0; }
.sp-row-top { flex-wrap: wrap; }
.sp-k2 { font-size: 14px; font-weight: 600; color: var(--text); min-width: 0; flex: 1 1 200px; }
.sp-k2 small { display: block; margin-top: 3px; font-size: 12.5px; font-weight: 400; color: var(--muted); line-height: 1.4; }
.sp-k2 code { font-size: 11.5px; }
.sp-in { flex: 0 1 240px; min-width: 0; height: 38px; font-size: 14px; }
.sp-in:disabled { opacity: .45; }
.sp-tog { appearance: none; flex: none; width: 42px; height: 24px; border-radius: 99px; background: var(--line-3); position: relative; cursor: pointer; transition: background .2s; }
.sp-tog::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: left .2s var(--ease); }
.sp-tog:checked { background: var(--lime); }
.sp-tog:checked::after { left: 21px; background: var(--on-lime); }
.sp-tog:focus-visible, .sp-corner:focus-visible, .sp-sw:focus-visible, .sp-seg button:focus-visible { outline: 2px solid var(--lime-ink); outline-offset: 2px; }
.sp-corners { display: grid; grid-template-columns: repeat(2, 64px); grid-template-rows: repeat(2, 40px); gap: 0; padding: 4px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--bg-2); flex: none; }
.sp-corner { position: relative; border: 0; background: none; cursor: pointer; border-radius: 8px; }
.sp-corner span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.sp-corner::after { content: ''; position: absolute; width: 22px; height: 10px; border-radius: 99px; background: var(--line-3); transition: background .2s, box-shadow .2s; }
.sp-corner.top-left::after { top: 6px; left: 6px; } .sp-corner.top-right::after { top: 6px; right: 6px; }
.sp-corner.bottom-left::after { bottom: 6px; left: 6px; } .sp-corner.bottom-right::after { bottom: 6px; right: 6px; }
.sp-corner:hover::after { background: var(--muted); }
.sp-corner[aria-pressed="true"]::after { background: var(--accent, var(--lime)); box-shadow: 0 0 12px -2px var(--accent, var(--lime)); }
.sp-swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.sp-sw { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px 5px 6px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--muted); font: 500 11.5px/1 var(--f-mono); cursor: pointer; }
.sp-sw i { width: 16px; height: 16px; border-radius: 50%; background: var(--c); box-shadow: 0 0 10px -3px var(--c); }
.sp-sw[aria-pressed="true"] { border-color: color-mix(in srgb, var(--lime-ink) 60%, transparent); color: var(--text); background: color-mix(in srgb, var(--lime) 7%, var(--bg-2)); }
.sp-sw-custom input { width: 18px; height: 18px; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; }
.sp-sw-custom input::-webkit-color-swatch-wrapper { padding: 0; }
.sp-sw-custom input::-webkit-color-swatch { border: 0; border-radius: 50%; }
.sp-seg { display: inline-flex; flex: none; border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; }
.sp-seg button { padding: 8px 14px; border: 0; background: none; color: var(--muted); font: 600 12.5px/1 var(--f-ui); cursor: pointer; }
.sp-seg button[aria-pressed="true"] { background: var(--lime); color: var(--on-lime); }

/* Vibe Bug preview frame: transform makes the widget's fixed launcher sit in the frame's corner */
.sp-bug-frame { position: relative; height: 300px; border-radius: var(--r-lg); border: 1px solid var(--line-2); background: var(--bg-2); overflow: hidden; transform: translateZ(0); box-shadow: var(--shadow); }
.sp-bf-bar { position: absolute; top: 22px; left: 50%; transform: translateX(-50%); padding: 6px 14px; border-radius: 99px; border: 1px solid var(--line-2); font-size: 11px; color: var(--dim); background: var(--surface); }
.sp-bf-body { display: grid; gap: 10px; padding: 92px 26px 26px; }
.sp-bf-body i { display: block; height: 10px; border-radius: 99px; background: var(--line-2); }
.sp-bf-body i.s { width: 60%; }
.sp-bf-note { position: absolute; left: 50%; top: 52%; transform: translate(-50%, -50%); width: max-content; max-width: 86%; margin: 0; padding: 10px 14px; border-radius: 10px; border: 1px dashed var(--line-3); background: var(--surface); font-size: 12.5px; color: var(--muted); text-align: center; }
.sp-bf-note[hidden] { display: none; }
.sp-preview > [data-open-sheet] { justify-self: start; }
.sp-json { color: #ffc247; }
.sp-teaser-bug { grid-template-columns: auto 1fr; align-items: center; gap: 16px; }
.sp-tb-frame { position: relative; width: 120px; height: 70px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--bg-2); }
.sp-tb-frame i { position: absolute; width: 22px; height: 8px; border-radius: 99px; background: var(--line-3); }
.sp-tb-frame .tl { top: 7px; left: 7px; } .sp-tb-frame .tr { top: 7px; right: 7px; } .sp-tb-frame .bl { bottom: 7px; left: 7px; } .sp-tb-frame .br { bottom: 7px; right: 7px; }
.sp-tb-frame i.on { background: #ffb547; box-shadow: 0 0 12px -2px #ffb547; animation: sp-hop 4s steps(1) infinite; }
@keyframes sp-hop { 0% { bottom: 7px; right: 7px; top: auto; left: auto; } 25% { bottom: 7px; left: 7px; right: auto; top: auto; } 50% { top: 7px; left: 7px; bottom: auto; right: auto; } 75% { top: 7px; right: 7px; bottom: auto; left: auto; } }
.sp .demo { position: static; }
@media (max-width: 640px) {
  .sp-row { flex-wrap: wrap; }
  .sp-in { flex: 1 1 100%; }
  .sp-bug-frame { height: 240px; }
  .sp-preview > [data-open-sheet] { justify-self: stretch; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) { .sp-tb-frame i.on { animation: none; } }
.demo-fallback[hidden] { display: none; } /* was always visible: display:flex beat [hidden] */
.sp-more-card.sp-more-stack { grid-template-columns: minmax(0, 1fr); }
.sp-hero-grid .sp-visual .term-body { max-height: none; }
.sp-hero-solo { grid-template-columns: minmax(0, 760px); }
.sp-points.planned .sp-pi { color: var(--amber-ink); background: var(--amber-soft); border-color: color-mix(in srgb, var(--amber) 30%, transparent); }
.sp-why .disclaimer { margin-top: 20px; max-width: 560px; }
.sp-path-none { border-style: dashed; }
.sp-k-off { background: var(--raised-2); color: var(--muted); box-shadow: none; }
.sp-path-none a { color: var(--lime-ink); }
.sp-visual-cover { position: relative; height: 320px; border-radius: var(--r-lg); border: 1px solid var(--line-2); overflow: hidden; background: radial-gradient(60% 70% at 50% 50%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 70%), var(--code-bg); box-shadow: 0 40px 80px -44px rgba(0,0,0,.9); display: grid; place-items: center; }
.sp-visual-cover > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.sp-cover-mark { position: relative; filter: drop-shadow(0 20px 40px rgba(0,0,0,.6)) drop-shadow(0 0 40px color-mix(in srgb, var(--accent) 30%, transparent)); }
.sp-cover-mark svg { width: 132px; height: 132px; display: block; }
.sp-visual-cover.dim .sp-cover-mark { opacity: .7; filter: grayscale(.4) drop-shadow(0 20px 40px rgba(0,0,0,.6)); }
@media (max-width: 960px) { .sp-visual-cover { display: none; } }
.sp-verified { color: var(--muted); }
.sp-fine.sp-verified + .sp-fine { margin-top: -10px; }
.sp-nocfg { align-items: flex-start; line-height: 1.45; }
.sp-nocfg svg { margin-top: 2px; }
@media (max-width: 640px) { .sp-ctrl .code-line { height: auto; min-height: 42px; padding-block: 8px; } }
@media (max-width: 480px) { .sp-t-avs { flex-wrap: nowrap; gap: 6px; } .sp-t-avs span { width: 34px; height: 34px; border-radius: 9px; } }

/* ---------- Vibe Backup (tools/backup.html) ---------- */
/* hero visual: snapshot timeline → one encrypted package → four destinations */
.bk-vis { position: relative; display: grid; gap: 14px; padding: 18px; border-radius: var(--r-lg); border: 1px solid var(--line-2); overflow: hidden;
  background: radial-gradient(70% 60% at 50% 0%, color-mix(in srgb, var(--cyan) 10%, transparent), transparent 70%), radial-gradient(60% 50% at 50% 100%, color-mix(in srgb, var(--lime) 6%, transparent), transparent 70%), var(--code-bg);
  box-shadow: 0 40px 80px -44px rgba(0,0,0,.9), 0 0 60px -36px rgba(46,230,255,.5); color: #dfe5dc; }
.bk-vis::before { content: ''; position: absolute; inset: 0; pointer-events: none; background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px); background-size: 28px 28px; }
.bk-vis > * { position: relative; }
.bk-vis-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 11px; color: #7d858e; min-width: 0; }
.bk-vis-top > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.bk-live { display: inline-flex; align-items: center; gap: 7px; flex: none; color: #2ee6ff; }
.bk-live i { width: 7px; height: 7px; border-radius: 50%; background: #2ee6ff; box-shadow: 0 0 10px #2ee6ff; animation: bk-blink 1.6s ease-in-out infinite; }
.bk-tl { list-style: none; margin: 0; padding: 0 4px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); position: relative; }
.bk-tl::before { content: ''; position: absolute; left: 12.5%; right: 12.5%; top: 6px; height: 2px; background: linear-gradient(90deg, rgba(255,255,255,.1), rgba(46,230,255,.6)); }
.bk-tl li { display: grid; justify-items: center; gap: 4px; text-align: center; min-width: 0; }
.bk-tl i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(255,255,255,.22); background: #0b0e12; }
.bk-tl b { font: 600 11.5px/1 var(--f-mono); color: #aab2ba; }
.bk-tl span { font: 400 10.5px/1.2 var(--f-mono); color: #6c757e; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bk-tl li.now i { border-color: #2ee6ff; background: #2ee6ff; box-shadow: 0 0 0 4px rgba(46,230,255,.15), 0 0 16px #2ee6ff; animation: bk-ping 4s ease-out infinite; }
.bk-tl li.now b { color: #fff; }
.bk-tl li.now span { color: #2ee6ff; }
.bk-pack { justify-self: center; display: inline-flex; align-items: center; gap: 8px; max-width: 100%; padding: 8px 12px; border-radius: 10px; border: 1px solid rgba(46,230,255,.4); background: rgba(46,230,255,.07); box-shadow: 0 0 24px -8px rgba(46,230,255,.6); animation: bk-pack 4s var(--ease) infinite; min-width: 0; }
.bk-pack svg { width: 15px; height: 15px; flex: none; color: #c6ff3d; }
.bk-pack span { font-size: 11.5px; color: #e8ece6; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.bk-pack em { flex: none; font-style: normal; font-size: 9.5px; letter-spacing: .1em; color: #c6ff3d; padding: 3px 6px; border-radius: 99px; border: 1px solid rgba(198,255,61,.35); background: rgba(198,255,61,.08); }
.bk-wires { display: block; width: 100%; height: 46px; margin: -6px 0 -10px; overflow: visible; }
.bk-wires path { fill: none; stroke: rgba(46,230,255,.6); stroke-width: 1.5; vector-effect: non-scaling-stroke; stroke-dasharray: 5 7; animation: bk-flow 1s linear infinite; }
.bk-dests { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.bk-d { display: grid; justify-items: center; gap: 4px; padding: 12px 6px 10px; border-radius: 12px; border: 1px solid rgba(255,255,255,.09); background: rgba(10,13,17,.8); text-align: center; min-width: 0; }
.bk-di { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: #2ee6ff; background: rgba(46,230,255,.08); border: 1px solid rgba(46,230,255,.28); }
.bk-di svg { width: 18px; height: 18px; }
.bk-d b { font: 600 12.5px/1.2 var(--f-display); color: #eef2f5; }
.bk-d small { font: 400 10px/1.3 var(--f-mono); color: #7d858e; }
.bk-ok { font: 600 10px/1 var(--f-mono); font-style: normal; color: #c6ff3d; padding: 4px 7px; border-radius: 99px; background: rgba(198,255,61,.08); border: 1px solid rgba(198,255,61,.3); opacity: .2; animation: bk-ok 4s steps(1) infinite; }
.bk-d:nth-child(2) .bk-ok { animation-delay: .25s; } .bk-d:nth-child(3) .bk-ok { animation-delay: .5s; } .bk-d:nth-child(4) .bk-ok { animation-delay: .75s; }
.bk-vis-foot { display: flex; justify-content: space-between; gap: 8px 14px; flex-wrap: wrap; margin: 0; font-size: 10.5px; color: #6c757e; }
.bk-nope { color: #8a919a; }
.bk-nope::before { content: '⊘ '; color: #ffb547; }
@keyframes bk-flow { to { stroke-dashoffset: -24; } }
@keyframes bk-blink { 50% { opacity: .35; } }
@keyframes bk-ping { 0%, 100% { box-shadow: 0 0 0 4px rgba(46,230,255,.15), 0 0 16px #2ee6ff; } 10% { box-shadow: 0 0 0 10px rgba(46,230,255,0), 0 0 22px #2ee6ff; } }
@keyframes bk-pack { 0% { opacity: 0; transform: translateY(-8px) scale(.96); } 12%, 88% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(4px); } }
@keyframes bk-ok { 0%, 34% { opacity: .2; } 35%, 96% { opacity: 1; } }
:root[data-theme="light"] .bk-vis { border-color: rgba(0,0,0,.1); }

/* customize-path teaser */
.sp-teaser-bk { display: flex; flex-wrap: wrap; gap: 6px; }
.bk-chip { font: 500 11.5px/1 var(--f-mono); padding: 7px 10px; border-radius: 99px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--muted); }
.bk-chip.on { color: var(--lime-ink); border-color: color-mix(in srgb, var(--lime-ink) 40%, transparent); background: var(--lime-soft); }

/* editor */
.bk-dests-list { display: grid; gap: 10px; padding: 4px 0 2px; }
.bk-dest { display: grid; gap: 10px; padding: 12px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--bg-2); min-width: 0; }
.bk-dest-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.bk-dest-i { flex: none; width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; color: var(--cyan-ink, #2ee6ff); background: color-mix(in srgb, var(--cyan) 9%, transparent); border: 1px solid color-mix(in srgb, var(--cyan) 30%, transparent); }
.bk-dest-i svg { width: 17px; height: 17px; }
.bk-name { flex: 1 1 120px; min-width: 0; }
.bk-name input { width: 100%; height: 34px; font-size: 13.5px; font-weight: 600; }
.bk-seg { flex-wrap: wrap; max-width: 100%; }
.bk-seg button { padding: 7px 10px; font-size: 12px; }
.bk-seg button:disabled { opacity: .35; cursor: not-allowed; }
.bk-sub .bk-seg { display: flex; }
.bk-rm { flex: none; width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; border: 1px solid var(--line-2); background: none; color: var(--muted); cursor: pointer; }
.bk-rm:hover { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 50%, transparent); }
.bk-rm svg { width: 14px; height: 14px; }
.bk-note { margin: 0; font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.bk-note code, .bk-f small code { font-size: 11.5px; }
.bk-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; }
.bk-f { display: grid; gap: 5px; align-content: start; min-width: 0; }
.bk-f.wide { grid-column: 1 / -1; }
.bk-f > span { font-size: 12.5px; font-weight: 600; color: var(--text); display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.bk-f > span small { font-weight: 400; color: var(--dim); font-size: 11.5px; }
.bk-f .sp-in { flex: none; width: 100%; height: 36px; font-size: 13px; }
.bk-f.bk-tg { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.bk-f.bk-tg > span { display: grid; gap: 2px; }
.sp-in[aria-invalid="true"], .bk-name input[aria-invalid="true"] { border-color: color-mix(in srgb, var(--danger) 70%, transparent); }
.bk-err { font: 500 11.5px/1.35 var(--f-ui); font-style: normal; color: var(--amber, #ffb547); }
.bk-err[hidden], .bk-err:empty { display: none; }
.bk-where { margin: 0; padding: 8px 10px; border-radius: 9px; background: var(--code-bg); color: #dfe5dc; font-size: 11.5px; line-height: 1.6; overflow-wrap: anywhere; }
.bk-where b { color: #2ee6ff; font-weight: 600; }
.bk-where .t-dim { display: inline-block; min-width: 7.5ch; }
.bk-add { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding-top: 12px; }
.bk-add > span { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; margin-right: 4px; }
.bk-add .btn { gap: 6px; }
.bk-add .btn svg { width: 13px; height: 13px; color: var(--cyan); }
.bk-rec { margin-left: 6px; font: 600 9.5px/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--lime-ink); padding: 3px 6px; border-radius: 99px; background: var(--lime-soft); vertical-align: 2px; }
.bk-num { display: grid; gap: 5px; justify-items: end; flex: 0 1 240px; min-width: 0; }
.bk-num .sp-in { width: 100%; }
.bk-num:not(.bk-shots) { flex-basis: 110px; }
.bk-shots { flex: 1 1 260px; justify-items: stretch; }

/* preview terminal */
.bk-term { box-shadow: 0 40px 80px -40px rgba(0,0,0,.9), 0 0 60px -30px rgba(46,230,255,.45); }
.bk-term-body { max-height: min(70vh, 620px); overflow-y: auto; font-size: 11.5px; }
.bk-term-body .bk-cmd { color: #2ee6ff; overflow-wrap: anywhere; }
.bk-term-body .ln { padding-left: 2ch; text-indent: -2ch; }

/* output + the acknowledgement gate */
.bk-ack { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 14px; padding: 14px 16px; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--amber, #ffb547) 45%, transparent); background: color-mix(in srgb, var(--amber, #ffb547) 7%, transparent); cursor: pointer; }
.bk-ack input { flex: none; width: 20px; height: 20px; margin: 1px 0 0; accent-color: #c6ff3d; cursor: pointer; }
.bk-ack span { display: grid; gap: 4px; min-width: 0; }
.bk-ack b { font: 600 14.5px/1.35 var(--f-display); color: var(--text); }
.bk-ack small { font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.bk-ack:has(input:checked) { border-color: color-mix(in srgb, var(--lime-ink) 45%, transparent); background: color-mix(in srgb, var(--lime) 6%, transparent); }
.bk-ack:has(input:focus-visible) { outline: 2px solid var(--lime-ink); outline-offset: 2px; }
.bk-locked [data-out] .cz-ai, .bk-locked [data-out] .sp-out-rows, .bk-locked [data-out] .sp-out-extra, .bk-locked .bk-env { opacity: .4; filter: saturate(.4); }
.bk-locked [data-out] button { cursor: not-allowed; }
.bk-locked [data-out] .sp-pill:hover { border-color: var(--line-2); }
.bk-env { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.bk-env-h { margin: 0; display: flex; justify-content: space-between; align-items: baseline; gap: 6px 14px; flex-wrap: wrap; font-size: 12px; }
.bk-env ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.bk-env li { display: flex; align-items: center; justify-content: space-between; gap: 6px 14px; flex-wrap: wrap; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-2); font-size: 12.5px; }
.bk-env li label { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; min-width: 0; }
.bk-env li input { accent-color: #c6ff3d; width: 16px; height: 16px; }
.bk-env li code { font-size: 12.5px; overflow-wrap: anywhere; }
.bk-env li:has(input:checked) code { text-decoration: line-through; opacity: .6; }
.bk-env-f { margin: 0; font-size: 12px; }

/* secondary */
.bk-more { display: grid; gap: 14px; }
.bk-drill .sp-ctrl .code-line { height: auto; min-height: 42px; padding-block: 7px; }
.bk-drill .sp-ctrl .code-line .cl-text { white-space: normal; overflow-wrap: anywhere; }

@media (max-width: 640px) {
  .bk-vis { padding: 14px; }
  .bk-dests { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bk-wires { display: none; }
  .bk-fields { grid-template-columns: minmax(0, 1fr); }
  .bk-dest { padding: 10px; }
  .bk-seg button { padding: 7px 8px; font-size: 11.5px; }
  .bk-num, .bk-num:not(.bk-shots) { flex: 1 1 100%; justify-items: stretch; }
  .bk-term-body { max-height: 420px; }
}
@media (prefers-reduced-motion: reduce) {
  .bk-live i, .bk-tl li.now i, .bk-pack, .bk-wires path, .bk-ok { animation: none; }
  .bk-ok { opacity: 1; }
}
.bk-out-wrap .sp-pill { align-items: start; } .bk-out-wrap .sp-pill .cl-pill { margin-top: 2px; }
@media (max-width: 640px) {
  .bk-dest-top > .bk-seg { order: 3; flex: 1 1 100%; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .bk-dest-top > .bk-seg button { padding: 8px 4px; }
  .bk-sub .bk-seg button { flex: 1 1 auto; }
}
@media (max-width: 640px) { .bk-dest-top .bk-long { display: none; } }

/* Try Vibe Accounts demo */
.sp-visual-id .pdiag { padding-bottom: 92px; }
.id-try { position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 2; display: grid; justify-items: center; gap: 2px; padding: 12px 26px; line-height: 1.1; box-shadow: 0 0 0 1px var(--lime-glow), 0 12px 34px -8px var(--lime-glow); }
.id-try small { font: 500 10.5px/1.3 var(--f-mono); margin-top: 2px; letter-spacing: .04em; opacity: .65; text-transform: none; }
.id-try[aria-busy=true] { opacity: .7; pointer-events: none; }
.id-demo-chip { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 4px 12px 4px 4px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--lime) 40%, var(--line-2)); background: var(--surface); color: var(--text); font: 600 13px var(--f-ui); cursor: pointer; box-shadow: 0 0 22px -8px var(--lime-glow); }
.idc-av { width: 30px; height: 30px; border-radius: 50%; overflow: hidden; display: block; }
.idc-av svg { width: 100%; height: 100%; display: block; }
.idc-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 8px var(--lime); }
@media (max-width: 640px) { .idc-nm { display: none; } .id-demo-chip { padding-right: 4px; } .idc-dot { display: none; } }
.id-demo-menu { position: absolute; z-index: 60; padding: 8px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line-2); box-shadow: 0 30px 80px rgba(0,0,0,.55); color: var(--text); font: 13.5px var(--f-ui); animation: idm-in .2s cubic-bezier(.2,1.3,.4,1); }
@keyframes idm-in { from { opacity: 0; transform: translateY(-6px) scale(.96); } }
.idm-head { display: flex; gap: 12px; align-items: center; padding: 10px 10px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.idm-av svg { width: 52px; height: 52px; border-radius: 14px; display: block; }
.idm-head b { display: block; font-size: 15px; }
.idm-head small { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); margin-top: 2px; }
.idm-head small i { width: 7px; height: 7px; border-radius: 50%; background: var(--lime); }
.idm-i { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border-radius: 10px; background: none; border: 0; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.idm-i:hover { background: color-mix(in srgb, var(--text) 6%, transparent); }
.idm-i[aria-disabled=true] { opacity: .45; cursor: not-allowed; }
.idm-i em { margin-left: auto; font: 500 10px var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--dim); font-style: normal; }
.idm-go { color: var(--lime-ink); font-weight: 600; }
.idm-out { color: #ff9b6b; }
.idm-sep { height: 1px; background: var(--line); margin: 6px 10px; }
.idm-note { margin: 8px 10px 4px; font-size: 11.5px; color: var(--dim); line-height: 1.4; }
