/* Brandito — app + splash
   Palette from the brand board: navy ink, indigo, sky, and the blue gradient (characters only).
   Text on sky is always navy; text on indigo is white or cyan. */
@font-face { font-family: "Cocogoose Pro"; src: url("/fonts/cocogoose-pro-bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Alan Sans"; src: url("/fonts/alan-sans.woff2") format("woff2"); font-weight: 300 900; font-style: normal; font-display: swap; }
/* Metric-matched fallbacks so text doesn't jump when the web fonts arrive */
@font-face { font-family: "Cocogoose Fallback"; src: local("Arial Black"), local("Arial Bold"), local("Arial"); size-adjust: 104%; ascent-override: 92%; descent-override: 24%; line-gap-override: 0%; }
@font-face { font-family: "Alan Sans Fallback"; src: local("Arial"), local("Helvetica"), local("Liberation Sans"); size-adjust: 100%; ascent-override: 96%; descent-override: 26%; line-gap-override: 0%; }

:root {
  --paper: #f3f7fb;
  --paper-hi: #ffffff;
  --ink: #072646;          /* brand navy */
  --ink-2: #2b4560;
  --stone: #57708a;        /* 4.8:1 on paper */
  --rule: #dce5ee;
  --rule-strong: #c2d0de;
  --forest: #171a43;       /* brand indigo: dark panels */
  --forest-2: #23286a;
  --lime: #2fdcff;         /* cyan: accents on indigo only */
  --mint: #ddf2fb;         /* sky tint */
  --mint-soft: #eef8fd;
  --sky: #29a7da;
  --blue: #253aea;
  --grad: linear-gradient(90deg, #253aea 0%, #2186f5 50%, #2fdcff 100%);
  --danger: #a3261b;

  --font: "Alan Sans", "Alan Sans Fallback", system-ui, sans-serif;
  --display: "Cocogoose Pro", "Cocogoose Fallback", "Arial Black", sans-serif;
  --green-text: #2449d8;   /* brand blue for links and highlights: 6.5:1 on paper */
  --r-1: 8px;
  --r-2: 12px;
  --r-3: 22px;
  --gutter: clamp(20px, 4vw, 48px);
  --max: 1240px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--paper); -webkit-text-size-adjust: 100%; scrollbar-gutter: stable; }
[hidden] { display: none !important; }
body {
  margin: 0; color: var(--ink); background: var(--paper);
  font: 400 16px/1.6 var(--font);
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent;
}
main { min-height: calc(100vh - 76px - 92px); outline: none; }
::selection { background: var(--mint); color: var(--ink); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 4px; }
img { max-width: 100%; }
.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; background: var(--ink); color: #fff; padding: 8px 12px; border-radius: var(--r-1); z-index: 20; }

/* ── Type scale (1.25, 16px base) ───────── */
h1, h2, h3, h4 { margin: 0; font-family: var(--display); font-weight: 700; text-wrap: balance; color: var(--ink); }
h1 { font-size: clamp(2.5rem, 5.6vw, 4.9rem); line-height: 1.02; letter-spacing: -0.035em; }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.8rem); line-height: 1.06; letter-spacing: -0.03em; }
h3 { font-size: 1.125rem; line-height: 1.3; letter-spacing: -0.01em; }
.hl { color: inherit; }
/* Lime-to-mint on forest: 10:1 at the darkest point, decorative gradient stays AA */
.hl-lime { color: var(--lime); background: linear-gradient(100deg, var(--lime) 10%, #d4ffc4 90%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
p { margin: 0; text-wrap: pretty; }
.lede { font-size: 1.125rem; line-height: 1.55; color: var(--ink-2); max-width: 38ch; letter-spacing: -0.01em; }
.quiet { color: var(--stone); }
.small { font-size: .875rem; }

/* ── Nav ─────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; height: 76px;
  border-radius: 0; background: transparent;
  transition: top .35s var(--ease), height .35s var(--ease), background-color .35s var(--ease), box-shadow .35s var(--ease), border-radius .35s var(--ease), width .35s var(--ease), padding .35s var(--ease);
}
/* Once scrolled, the bar lifts into a floating pill over the content */
.nav.is-scrolled {
  top: 10px; height: 58px; border-radius: 999px;
  /* grows by its own padding so the logo and links don't shift */
  width: min(100% - 2 * var(--gutter) + 36px, var(--max) + 36px); padding-inline: 18px;
  background: color-mix(in srgb, var(--paper-hi) 82%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px);
  box-shadow: 0 0 0 1px rgba(7,38,70,.07), 0 10px 30px -14px rgba(7,38,70,.28);
}
.nav__logo img { display: block; height: 30px; width: auto; }
.nav__links { display: flex; align-items: center; gap: 28px; font-size: .9375rem; }
.nav__links a:not(.btn), .nav__links button.link {
  color: var(--ink-2); text-decoration: none; background: none; border: 0; padding: 0; font: inherit; cursor: pointer;
}
.nav__links a:not(.btn):hover, .nav__links button.link:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.nav__user { color: var(--stone); }

/* ── Buttons ──────────────────────────── */
.btn {
  --spin: #fbfaf8;
  letter-spacing: -0.01em;
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center;
  height: 44px; padding: 0 18px; border-radius: var(--r-2);
  font: 700 .9375rem/1 var(--font);
  text-decoration: none; cursor: pointer; border: 0; white-space: nowrap; user-select: none;
  color: var(--paper-hi);
  background: linear-gradient(180deg, #123a63 0%, var(--ink) 60%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 0 0 1px var(--ink), 0 1px 2px rgba(7,38,70,.2);
  transition: box-shadow .2s var(--ease), transform .12s var(--ease), color .15s;
}
/* Hover is an overlay that fades, so the gradient never snaps */
.btn::before { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(255,255,255,.09); opacity: 0; transition: opacity .2s var(--ease); }
.btn:hover::before { opacity: 1; }
.btn:hover { box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 0 0 1px var(--ink), 0 4px 12px -4px rgba(7,38,70,.35); }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(1px); }
.btn--line { --spin: var(--ink); color: var(--ink); background: transparent; box-shadow: inset 0 0 0 1px var(--rule-strong); }
.btn--line::before { background: rgba(7,38,70,.045); }
.btn--line:hover { box-shadow: inset 0 0 0 1px var(--stone); }
.btn--lime { --spin: var(--ink); color: var(--ink); background: var(--lime); box-shadow: none; }
.btn--lime::before { background: rgba(255,255,255,.28); }
.btn--lime:hover { box-shadow: 0 8px 24px -8px rgba(47,220,255,.6); }
.btn--block { width: 100%; }
.btn[disabled] { cursor: default; opacity: .45; box-shadow: inset 0 0 0 1px var(--rule-strong); }
.btn[disabled]::before { display: none; }
.btn.is-loading[disabled] { opacity: 1; }
/* Loading: label hides, spinner takes its place, width stays put */
.btn.is-loading { color: transparent; pointer-events: none; }
.btn.is-loading::after {
  content: ""; position: absolute; inset: 0; margin: auto; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--spin) 28%, transparent); border-top-color: var(--spin);
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.nav .btn { height: 38px; padding: 0 14px; font-size: .875rem; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; }

/* ── Hero ─────────────────────────────── */
.hero { padding: clamp(48px, 9vw, 120px) 0 56px; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 40px; align-items: end; }
.hero h1 { max-width: 14ch; }
.hero__aside { display: grid; gap: 0; justify-items: start; }
.hero__note { margin-top: 20px; font-size: .875rem; color: var(--stone); }

/* ── Live example hubs (the real engine) ─────── */
.stage {
  position: relative; padding: clamp(16px, 3vw, 40px);
  border-radius: var(--r-3);
  background: radial-gradient(110% 130% at 100% 0%, #c9ecfb 0%, var(--mint) 30%, var(--mint-soft) 62%, var(--paper) 100%);
}
.stage__bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.switch { display: inline-flex; padding: 3px; border-radius: 999px; background: rgba(255,255,255,.7); box-shadow: inset 0 0 0 1px var(--rule); }
.switch button {
  border: 0; background: none; padding: 7px 14px; border-radius: 999px; cursor: pointer;
  font: 500 .875rem var(--font); color: var(--stone); transition: color .2s, background-color .2s;
}
.switch button[aria-pressed="true"] { background: var(--ink); color: var(--paper-hi); }
.switch button:not([aria-pressed="true"]):hover { color: var(--ink); }
.stage__hint { font-size: .875rem; color: var(--stone); }

/* ── Steps ────────────────────────────── */
.steps { padding: clamp(72px, 10vw, 128px) 0 24px; display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 40px; }
.steps ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 32px; counter-reset: step; }
.steps li { counter-increment: step; border-top: 1px solid var(--ink); padding-top: 16px; display: grid; gap: 8px; }
.steps li { position: relative; border-top-color: var(--rule-strong); align-content: start; }
.steps li::before { content: counter(step); font-size: .875rem; color: var(--stone); font-variant-numeric: tabular-nums; }
/* The rule draws across as each step arrives: a progress rail through the four steps */
.steps li::after { content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 2px; background: var(--green-text); transform: scaleX(0); transform-origin: left; transition: transform 1s calc(var(--d, 0) * .12s + .1s) var(--ease); }
.steps li.in::after { transform: scaleX(1); }
.steps li p { color: var(--ink-2); max-width: 38ch; }

/* ── Closing band ─────────────────────── */
.band {
  margin: clamp(72px, 10vw, 128px) 0 40px; border-radius: var(--r-3); overflow: hidden;
  color: #e3e8ff;
  background:
    radial-gradient(80% 120% at 100% 0%, rgba(47,220,255,.18), transparent 55%),
    linear-gradient(160deg, var(--forest-2), var(--forest) 62%);
  padding: clamp(40px, 7vw, 88px) clamp(24px, 6vw, 80px);
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px; align-items: end;
}
.band { position: relative; isolation: isolate; }
.band::before {
  content: ""; position: absolute; z-index: -1; width: 70%; aspect-ratio: 1; right: -15%; top: -40%;
  background: radial-gradient(closest-side, rgba(37,58,234,.45), transparent);
  pointer-events: none;
}
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .band::before { animation: drift linear both; animation-timeline: view(); }
    @keyframes drift { from { transform: translate3d(-18%, 30%, 0); } to { transform: translate3d(8%, -10%, 0); } }
    /* Specimen tips up into place as it scrolls into view */
    .stage .demo-wrap { transform-origin: 50% 100%; animation: settle linear both; animation-timeline: view(); animation-range: entry 0% entry 90%; }
    @keyframes settle { from { transform: perspective(1600px) rotateX(10deg) scale(.95) translateY(28px); } to { transform: none; } }
  }
}
.band h2 { color: #fff; max-width: 18ch; }
.band p { color: #b9c3ec; margin-top: 14px; max-width: 44ch; }

/* ── Auth ─────────────────────────────── */
.auth { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 6vw, 96px); padding: clamp(32px, 6vw, 72px) 0; align-items: stretch; min-height: calc(100vh - 160px); }
.auth__form { align-self: center; width: 100%; max-width: 400px; }
.auth__form h1 { font-size: clamp(2rem, 3.6vw, 2.75rem); letter-spacing: -0.03em; }
.auth__form .lede { font-size: 1rem; margin-top: 12px; color: var(--stone); }
.side {
  border-radius: var(--r-3); overflow: hidden; color: #e3e8ff; display: grid; grid-template-rows: auto 1fr;
  background:
    radial-gradient(90% 80% at 100% 0%, rgba(47,220,255,.16), transparent 60%),
    linear-gradient(160deg, var(--forest-2), var(--forest) 65%);
}
.side__top { padding: clamp(28px, 4vw, 44px); display: grid; gap: 28px; align-content: start; }
.side__top img { height: 30px; width: auto; }
.side__top p { font-size: 1.375rem; line-height: 1.35; letter-spacing: -0.015em; color: #fff; max-width: 22ch; font-family: var(--display); font-size: 1.5rem; line-height: 1.2; letter-spacing: -0.02em; }
.side__swatches { display: grid; grid-template-columns: repeat(4, 1fr); align-self: end; }
.side__swatches div { min-height: 180px; padding: 14px; display: flex; flex-direction: column; justify-content: end; font-size: .75rem; line-height: 1.4; font-variant-numeric: tabular-nums; }

/* ── Forms ────────────────────────────── */
form.stack { display: grid; gap: 18px; margin-top: 32px; }
label { display: grid; gap: 7px; font-size: .875rem; font-weight: 500; }
.hint { font-weight: 400; color: var(--stone); }
input {
  height: 46px; padding: 0 14px; width: 100%;
  border: 1px solid var(--rule-strong); border-radius: var(--r-2);
  font: 400 1rem var(--font); color: var(--ink); background: var(--paper-hi);
  transition: border-color .15s, box-shadow .15s, background-color .15s;
}
input:hover { border-color: var(--stone); }
input:-webkit-autofill { -webkit-box-shadow: 0 0 0 40px var(--paper-hi) inset; -webkit-text-fill-color: var(--ink); caret-color: var(--ink); }
input:-webkit-autofill:focus { -webkit-box-shadow: 0 0 0 40px #fff inset, 0 0 0 3px rgba(37,58,234,.22); }
input[aria-invalid="true"] { border-color: var(--danger); }
.field-error { font-size: .8125rem; font-weight: 400; color: var(--danger); animation: rise .2s var(--ease); }
.pw { position: relative; }
.pw input { padding-right: 64px; }
.pw button { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); height: 34px; padding: 0 10px; border: 0; border-radius: var(--r-1); background: none; font: 500 .8125rem var(--font); color: var(--stone); cursor: pointer; }
.pw button:hover { color: var(--ink); background: rgba(7,38,70,.05); }
input:focus { outline: none; background: #fff; border-color: var(--forest); box-shadow: 0 0 0 3px rgba(37,58,234,.22); }
.row-links { display: flex; justify-content: space-between; gap: 12px; font-size: .875rem; }
.row-links a, .text-link { color: var(--ink); text-underline-offset: 4px; text-decoration-thickness: 1px; text-decoration-color: var(--rule-strong); }
.row-links a:hover, .text-link:hover { text-decoration-color: var(--ink); }
.or { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; color: var(--stone); font-size: .8125rem; }
.or::before, .or::after { content: ""; height: 1px; background: var(--rule); }
.notice { animation: rise .25s var(--ease); margin-top: 20px; padding: 14px 16px; border-radius: var(--r-2); font-size: .9375rem; line-height: 1.5; }
.notice--ok { background: var(--mint-soft); box-shadow: inset 0 0 0 1px #bfe5f6; color: var(--ink); }
.notice--err { background: #f8ebe8; box-shadow: inset 0 0 0 1px #ecc9c1; color: var(--danger); }

/* ── Dashboard ────────────────────────── */
.dash { padding: clamp(32px, 6vw, 64px) 0 40px; }
.dash__head { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; padding-bottom: 28px; border-bottom: 1px solid var(--ink); }
.dash__head h1 { font-size: clamp(2.2rem, 4vw, 3.2rem); }
.ws { padding: 36px 0; border-bottom: 1px solid var(--rule); }
.ws__head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 16px; }
.ws__head h2 { font-size: 1.5rem; letter-spacing: -0.015em; }
.hubs { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.hubs th { text-align: left; font-weight: 400; color: var(--stone); font-size: .8125rem; padding: 0 12px 10px 0; border-bottom: 1px solid var(--rule); }
.hubs td { padding: 14px 12px 14px 0; border-bottom: 1px solid var(--rule); }
.hubs td:first-child { font-weight: 500; }
.hubs .url { color: var(--stone); }
.status { display: inline-flex; align-items: center; gap: 7px; font-size: .8125rem; color: var(--stone); }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--rule-strong); }
.status--published { color: #12663a; }
.status--published::before { background: #2fa84f; }
.empty { padding: 28px; border-radius: var(--r-2); background: var(--paper-hi); box-shadow: inset 0 0 0 1px var(--rule); color: var(--ink-2); max-width: 60ch; }
.empty strong { display: block; margin-bottom: 4px; color: var(--ink); font-weight: 500; }
.new-ws { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 40px; padding: 40px 0; }
.new-ws form.stack { margin-top: 0; max-width: 420px; }

.head-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ── Connect ──────────────────────────── */
.connect { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 40px; padding: 40px 0; }
.connect__body { max-width: 640px; }
.connect__body > label { margin-bottom: 8px; }
.urlbox { display: flex; gap: 8px; }
.urlbox input { background: #fff; }
.notice--soon { background: var(--paper-hi); box-shadow: inset 0 0 0 1px var(--rule); color: var(--ink-2); margin-top: 24px; }
.notice--soon strong { display: block; color: var(--ink); font-weight: 500; margin-bottom: 2px; }
.howto { list-style: none; counter-reset: s; padding: 0; margin: 24px 0 0; display: grid; gap: 0; }
.howto li { counter-increment: s; position: relative; padding: 14px 0 14px 36px; border-top: 1px solid var(--rule); color: var(--ink-2); line-height: 1.7; }
.howto li::before { content: counter(s); position: absolute; left: 0; top: 14px; color: var(--stone); font-variant-numeric: tabular-nums; }
.howto strong { font-weight: 500; color: var(--ink); }
.howto em { font-style: normal; color: var(--ink); background: var(--paper-hi); box-shadow: inset 0 0 0 1px var(--rule); padding: 1px 6px; border-radius: 5px; font-size: .9375em; white-space: nowrap; }
.fine { margin-top: 16px; font-size: .875rem; color: var(--stone); max-width: 62ch; }
.fine em { font-style: normal; color: var(--ink-2); }

/* ── New hub ──────────────────────────── */
select { height: 46px; padding: 0 12px; border: 1px solid var(--rule-strong); border-radius: var(--r-2); font: 400 1rem var(--font); background: var(--paper-hi); color: var(--ink); }
.suffix { display: flex; align-items: stretch; border: 1px solid var(--rule-strong); border-radius: var(--r-2); background: var(--paper-hi); overflow: hidden; transition: border-color .15s, box-shadow .15s; }
.suffix input { border: 0; border-radius: 0; background: transparent; min-width: 0; flex: 1; padding-right: 4px; }
.suffix input:focus { box-shadow: none; }
.suffix span { display: flex; align-items: center; padding: 0 14px 0 0; color: var(--stone); font-weight: 400; white-space: nowrap; }
.suffix:focus-within { border-color: var(--forest); box-shadow: 0 0 0 3px rgba(37,58,234,.22); background: #fff; }
.suffix:has(input[aria-invalid="true"]) { border-color: var(--danger); }
.tiers { border: 0; padding: 0; margin: 4px 0 0; display: grid; gap: 8px; }
.tiers legend { font-size: .875rem; font-weight: 500; margin-bottom: 8px; padding: 0; }
.tier { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 12px; align-items: start; padding: 14px 16px; border-radius: var(--r-2); box-shadow: inset 0 0 0 1px var(--rule); background: var(--paper-hi); cursor: pointer; font-weight: 400; transition: box-shadow .15s, background-color .15s; }
.tier:hover { box-shadow: inset 0 0 0 1px var(--stone); }
.tier:has(input:checked) { box-shadow: inset 0 0 0 1.5px var(--forest); background: #fff; }
.tier input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--forest); padding: 0; }
.tier > span { display: grid; gap: 2px; }
.tier strong { font-weight: 500; }
.tier > span > span { color: var(--stone); font-size: .875rem; }

/* ── Loading states ───────────────────── */
.sk { display: block; border-radius: 6px; background: linear-gradient(90deg, #e3eaf1 0%, #eef3f8 50%, #e3eaf1 100%); background-size: 200% 100%; animation: shimmer 1.3s ease-in-out infinite; }
.sk-wrap { animation: appear .2s .15s both; } /* only shows if loading takes >150ms */
.sk-row { display: grid; grid-template-columns: 2fr 3fr 1fr 1fr; gap: 24px; padding: 18px 0; border-bottom: 1px solid var(--rule); }
.sk-row .sk { height: 12px; }
.pending { display: grid; place-items: center; min-height: 50vh; color: var(--stone); font-size: .9375rem; gap: 16px; animation: appear .2s .2s both; }
.pending::before { content: ""; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--rule-strong); border-top-color: var(--forest); animation: spin .7s linear infinite; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
@keyframes appear { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* One orchestrated entrance, first load of the splash only */
.enter > * { animation: rise .6s var(--ease) both; }
.enter > h1.is-split { animation: none; }
h1.is-split .w { display: inline-block; overflow: clip; overflow-clip-margin: .12em; vertical-align: top; padding-bottom: .06em; margin-bottom: -.06em; }
h1.is-split .w > span { display: inline-block; animation: word .9s calc(var(--i) * .045s + .05s) cubic-bezier(.16, 1, .3, 1) both; }
@keyframes word { from { transform: translateY(105%); } }
/* Scroll reveals */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform .9s var(--ease); transition-delay: calc(var(--d, 0) * .09s); }
.reveal.in { opacity: 1; transform: none; }
.band.reveal { transform: translateY(32px) scale(.985); }
.band.reveal.in { transform: none; }
.enter > :nth-child(2) { animation-delay: .08s; }
.stage.enter-late { animation: rise .7s .16s var(--ease) both; }

/* Page-to-page crossfade (browsers with View Transitions) */
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .18s; animation-timing-function: var(--ease); }

/* ── Footer ───────────────────────────── */
.foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 28px 0 36px; border-top: 1px solid var(--rule); color: var(--stone); font-size: .8125rem; }
.foot img { height: 20px; width: auto; }

/* ── Responsive ───────────────────────── */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; align-items: start; }
  .steps, .new-ws, .connect { grid-template-columns: 1fr; }
  .band { grid-template-columns: 1fr; align-items: start; }
  .auth { grid-template-columns: 1fr; min-height: 0; }
  .side { order: 2; }
  .side__swatches div { min-height: 110px; }
}
@media (max-width: 560px) {
  .nav__links { gap: 16px; }
  .nav__links .hide-sm { display: none; }
  .steps ol { grid-template-columns: 1fr; }
  .hubs .url-col { display: none; }
  .foot { flex-direction: column; align-items: start; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; }
  .enter > *, .stage.enter-late, h1.is-split .w > span, .notice, .field-error, .sk-wrap, .pending, .sk { animation: none !important; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}

/* ── Dashboard rows ───────────────────── */
.hub-row { cursor: pointer; transition: background-color .15s; }
.hub-row:hover { background: var(--paper-hi); }
.hub-row td:first-child a { color: inherit; text-decoration: none; }
.hub-row:hover td:first-child a { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.row-go { float: right; color: var(--ink); font-size: .8125rem; opacity: 0; transform: translateX(-4px); transition: opacity .2s var(--ease), transform .2s var(--ease); }
.hub-row:hover .row-go, .hub-row:focus-within .row-go { opacity: 1; transform: none; }

/* ── Editor ───────────────────────────── */
body.editing .nav, body.editing .foot, body.editing .skip { display: none; }
body.editing main { min-height: 100vh; }
.ed { --panel: 420px; height: 100vh; display: grid; grid-template-rows: auto minmax(0, 1fr); background: #e6edf4; }
.ed__bar { display: flex; align-items: center; gap: 14px; height: 60px; padding: 0 14px 0 10px; background: var(--paper-hi); border-bottom: 1px solid var(--rule); }
.ed__back { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 8px; color: var(--ink); }
.ed__back:hover { background: rgba(7,38,70,.06); }
.ed__title { display: flex; align-items: baseline; gap: 10px; min-width: 0; flex: 1; }
.ed__title strong { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ed__status { font-size: .8125rem; color: var(--stone); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.ed__status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--rule-strong); }
.ed__status[data-state="live"]::before { background: #2fa84f; }
.ed__status[data-state="changed"]::before { background: #d98e04; }
.ed__menuwrap { position: relative; display: inline-flex; }
.ed__vis { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border: 0; border-radius: 999px; cursor: pointer; font: 500 .8125rem var(--font); white-space: nowrap; transition: background-color .2s var(--ease), color .2s var(--ease); }
.ed__vis[data-vis="private"] { background: #e9eff5; color: var(--ink-2); }
.ed__vis[data-vis="public"] { background: var(--mint); color: var(--ink); }
.ed__vis:hover { filter: brightness(.97); }
.ed__menu { position: absolute; top: calc(100% + 8px); left: 0; z-index: 30; width: 290px; padding: 6px; border-radius: 14px; background: #fff; box-shadow: 0 0 0 1px rgba(7,38,70,.08), 0 20px 50px -18px rgba(7,38,70,.35); transform-origin: top left; animation: menu-in .18s var(--ease); }
@keyframes menu-in { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
.ed__menu-label { font-size: .75rem; color: var(--stone); padding: 8px 10px 4px; }
.ed__menu button { display: grid; gap: 2px; width: 100%; text-align: left; border: 0; background: none; padding: 9px 10px 9px 32px; border-radius: 9px; cursor: pointer; font: inherit; position: relative; }
.ed__menu button:hover, .ed__menu button:focus-visible { background: #eef3f8; outline: none; }
.ed__menu button strong { font-weight: 500; font-size: .875rem; color: var(--ink); }
.ed__menu button span { font-size: .75rem; color: var(--stone); }
.ed__menu button[aria-checked="true"]::before { content: ""; position: absolute; left: 11px; top: 13px; width: 11px; height: 6px; border-left: 1.6px solid var(--forest); border-bottom: 1.6px solid var(--forest); transform: rotate(-45deg); }
.ed__menu hr { border: 0; border-top: 1px solid var(--rule); margin: 6px 4px; }
.ed__menu .ed__menu-danger strong { color: var(--danger); }
.ed__actions { display: flex; align-items: center; gap: 8px; }
.ed__actions .btn { height: 36px; padding: 0 14px; font-size: .875rem; }
.ed__save { font-size: .8125rem; color: var(--stone); white-space: nowrap; }
.ed__save[data-state="err"] { color: var(--danger); }
.ed__save a { color: var(--ink); }
.ed__stage { position: relative; display: grid; grid-template-rows: minmax(0, 1fr); grid-template-columns: minmax(0, 1fr) 0; min-height: 0; transition: grid-template-columns .45s var(--ease); overflow: hidden; }
.ed--open .ed__stage { grid-template-columns: minmax(0, 1fr) var(--panel); }
.ed__frames { position: relative; min-width: 0; }
.ed__frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #fff; transition: opacity .16s var(--ease); }
.ed__frame.is-next { opacity: 0; }
.ed__panel { min-height: 0; height: 100%; width: var(--panel); background: var(--paper-hi); border-left: 1px solid var(--rule); display: grid; grid-template-rows: auto minmax(0, 1fr); transform: translateX(0); transition: transform .45s var(--ease); }
.ed:not(.ed--open) .ed__panel { transform: translateX(24px); visibility: hidden; transition: transform .45s var(--ease), visibility 0s .45s; }
.ed__tabs { display: flex; gap: 4px; padding: 10px 14px 0; border-bottom: 1px solid var(--rule); }
.ed__tabs button { border: 0; background: none; padding: 10px 12px; font: 500 .9375rem var(--font); color: var(--stone); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.ed__tabs button[aria-selected="true"] { color: var(--ink); border-color: var(--ink); }
.ed__body { min-height: 0; overflow-y: auto; padding: 18px 18px 40px; overscroll-behavior: contain; }
.ed__hint { font-size: .8125rem; color: var(--stone); margin: 0 0 12px; }
.ed__loading { height: 100vh; }
.sl { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.sl__row { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 6px 6px 6px 8px; border-radius: 10px; background: #fff; box-shadow: inset 0 0 0 1px var(--rule); transition: box-shadow .15s, opacity .15s, transform .15s var(--ease); }
.sl__row:hover { box-shadow: inset 0 0 0 1px var(--rule-strong); }
.sl__row.is-hidden .sl__open strong { color: var(--stone); }
.sl__row.is-drag { opacity: .45; }
.sl__row.is-over { box-shadow: inset 0 0 0 1.5px var(--forest); transform: translateY(2px); }
.sl__grip { color: var(--rule-strong); cursor: grab; display: grid; place-items: center; }
.sl__open { border: 0; background: none; text-align: left; padding: 6px 4px; cursor: pointer; display: grid; gap: 1px; min-width: 0; font: inherit; color: var(--ink); }
.sl__open strong { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sl__open span { font-size: .75rem; color: var(--stone); }
.sl__tools { display: flex; gap: 2px; }
.icon-btn { width: 30px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 7px; background: none; color: var(--stone); cursor: pointer; font: 500 .875rem var(--font); }
.icon-btn:hover:not(:disabled) { background: rgba(7,38,70,.06); color: var(--ink); }
.icon-btn:disabled { opacity: .3; cursor: default; }
.icon-btn[aria-pressed="false"] { color: var(--rule-strong); }
.ed__add { display: flex; gap: 8px; margin-top: 14px; }
.ed__add select { flex: 1; min-width: 0; }
.ed__add .btn { height: 46px; }
.ed__tip { margin-top: 24px; padding: 14px; border-radius: 10px; background: var(--mint-soft); box-shadow: inset 0 0 0 1px #bfe5f6; font-size: .875rem; color: var(--ink); }
.ed__tip strong { font-weight: 600; }
.ed__tip a { color: var(--ink); }
.ed__crumb { display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; padding: 4px 6px 4px 0; margin-bottom: 10px; font: 500 .875rem var(--font); color: var(--stone); cursor: pointer; }
.ed__crumb:hover { color: var(--ink); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Editor forms */
.ef { display: grid; gap: 16px; }
.ef textarea { width: 100%; padding: 10px 14px; border: 1px solid var(--rule-strong); border-radius: var(--r-2); font: 400 .9375rem/1.5 var(--font); color: var(--ink); background: #fff; resize: vertical; }
.ef textarea:focus, .ef select:focus { outline: none; border-color: var(--forest); box-shadow: 0 0 0 3px rgba(37,58,234,.22); }
.ef input:not([type]), .ef input[type="text"], .ef input[type="email"], .ef input[type="number"] { background: #fff; height: 42px; }
.ef select { width: 100%; height: 42px; background: #fff; }
.ef .hint { display: block; font-size: .75rem; margin-top: -2px; }
.ef__group { border: 0; padding: 14px 0 0; margin: 0; display: grid; gap: 12px; border-top: 1px solid var(--rule); }
.ef__label { font-size: .8125rem; font-weight: 600; padding: 0; margin: 0; }
.ef__list { display: grid; gap: 10px; }
.ef__item { display: grid; gap: 10px; padding: 12px; border-radius: 10px; background: #fff; box-shadow: inset 0 0 0 1px var(--rule); }
.ef__item label { font-size: .8125rem; }
.ef__remove { justify-self: start; border: 0; background: none; padding: 2px 0; font: 500 .8125rem var(--font); color: var(--stone); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.ef__remove:hover { color: var(--danger); }
.ef__addbtn { justify-self: start; height: 36px; font-size: .875rem; }
.ef__color { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 8px; }
.ef__color input[type="color"] { width: 42px; height: 42px; padding: 3px; border: 1px solid var(--rule-strong); border-radius: var(--r-2); background: #fff; cursor: pointer; }
.ef__color input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.ef__color input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 6px; }
.ef__switch, .ef__check, .ef__radio { display: flex; align-items: center; gap: 10px; font-weight: 400; cursor: pointer; }
.ef__switch input, .ef__check input, .ef__radio input { width: 18px; height: 18px; accent-color: var(--forest); margin: 0; flex: none; }
.ef__checks { gap: 6px; }
.ef__check span { font-size: .875rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ef__radio { align-items: flex-start; padding: 10px 12px; border-radius: 10px; background: #fff; box-shadow: inset 0 0 0 1px var(--rule); }
.ef__radio:has(input:checked) { box-shadow: inset 0 0 0 1.5px var(--forest); }
.ef__radio input { margin-top: 2px; }
.ef__radio span { display: grid; gap: 2px; font-size: .8125rem; color: var(--stone); }
.ef__radio strong { color: var(--ink); font-weight: 500; font-size: .9375rem; }
.ef__danger { margin-top: 12px; padding-top: 16px; border-top: 1px solid var(--rule); display: grid; gap: 8px; justify-items: start; }
.btn--danger { color: var(--danger); box-shadow: inset 0 0 0 1px #e3bdb5; }
.btn--danger::before { background: rgba(143,42,27,.06); }
.btn--danger-solid { color: #fff; background: var(--danger); box-shadow: none; }
.btn--danger-solid::before { background: rgba(255,255,255,.12); }
.btn--danger-solid:disabled { opacity: .4; }
.confirm { border: 0; border-radius: 16px; padding: 0; width: min(440px, calc(100vw - 32px)); box-shadow: 0 30px 80px -20px rgba(0,0,0,.35); color: var(--ink); }
.confirm::backdrop { background: rgba(7,38,70,.4); backdrop-filter: blur(2px); }
.confirm[open] { animation: rise .25s var(--ease); }
.confirm__body { padding: 28px; display: grid; gap: 14px; }
.confirm__body h2 { font-size: 1.5rem; }
.confirm__body p { color: var(--stone); }
.confirm__actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }

@media (max-width: 900px) {
  .ed { --panel: 100vw; }
  .ed__stage, .ed--open .ed__stage { grid-template-columns: minmax(0, 1fr); }
  .ed__panel { position: absolute; inset: 0 0 0 auto; width: min(100vw, 440px); z-index: 2; box-shadow: -20px 0 60px -20px rgba(0,0,0,.25); }
  .ed__live, .ed__save { display: none; }
}
@media (max-width: 640px) { .ed__vis span { display: none; } .ed__vis { padding: 0 9px; } .ed__menu { left: auto; right: -60px; } }

/* ── People (members + invites) ───────── */
.btn--sm { height: 34px; padding: 0 12px; font-size: .8125rem; }
.ws__meta { display: inline-flex; align-items: center; gap: 14px; }
button.link { border: 0; background: none; padding: 0; font: inherit; color: var(--ink-2); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
button.link:hover { color: var(--ink); }
.people { width: min(620px, calc(100vw - 32px)); }
.people__head { display: flex; justify-content: space-between; align-items: start; gap: 16px; }
.people__head .icon-btn { flex: none; }
.people__invite { display: grid; grid-template-columns: minmax(0, 1fr) 130px auto; gap: 10px; align-items: end; margin-top: 6px; }
.people__invite label { display: grid; gap: 6px; font-size: .875rem; font-weight: 500; }
.people__invite .field-error { grid-column: 1 / -1; }
.people__invite .btn { height: 46px; }
.people__list { display: grid; gap: 8px; }
.people__rows { list-style: none; margin: 4px 0 0; padding: 0; border-top: 1px solid var(--rule); }
.people__rows li { display: grid; grid-template-columns: minmax(0, 1fr) auto 64px; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.people__rows li > :last-child { justify-self: end; }
.people__rows li.is-pending .people__who strong { color: var(--ink-2); }
.people__who { display: grid; gap: 2px; min-width: 0; }
.people__who strong { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.people__who > span { font-size: .8125rem; color: var(--stone); }
.people__rows select { height: 34px; padding: 0 28px 0 10px; font-size: .8125rem; }
@media (max-width: 560px) {
  .people__invite { grid-template-columns: 1fr; }
  .people__rows li { grid-template-columns: minmax(0, 1fr) auto; }
  .people__rows li > :last-child { grid-column: 1 / -1; justify-self: start; }
}
.ed--engine .ed__stage { grid-template-columns: minmax(0, 1fr); }
.ed--engine .ed__frame { opacity: 0; transition: opacity .35s var(--ease); }
.ed--engine .ed__frame.is-ready { opacity: 1; }
@media (max-width: 640px) { .ed--engine #ed-edit { padding: 0 10px; } }

/* ── Live example hubs ─────────────────── */
.demo { position: relative; border-radius: 14px; overflow: hidden; background: #fff; box-shadow: 0 0 0 1px rgba(7,38,70,.08), 0 30px 60px -30px rgba(7,38,70,.3); }
.demo__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 42px; padding: 0 12px 0 14px; background: var(--paper-hi); border-bottom: 1px solid var(--rule); }
.demo__url { font-size: .8125rem; color: var(--ink-2); background: var(--paper); border-radius: 999px; padding: 5px 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.demo__open { font-size: .8125rem; font-weight: 600; color: var(--ink); white-space: nowrap; text-underline-offset: 3px; }
.demo__view { position: relative; aspect-ratio: 16 / 10; max-height: min(78vh, 760px); width: 100%; overflow: hidden; background: var(--paper); }
.demo__frame { position: absolute; top: 0; left: 0; border: 0; transform-origin: 0 0; opacity: 0; transition: opacity .45s var(--ease); background: transparent; }
.demo__frame.is-on.is-loaded { opacity: 1; }
.demo__view::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.55) 50%, transparent 70%) var(--paper); background-size: 220% 100%; }
.demo__view.is-busy:not(:has(.is-on.is-loaded))::after { opacity: 1; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { from { background-position: 120% 0; } to { background-position: -120% 0; } }
.demo__fail { display: none; position: absolute; inset: 0; place-content: center; text-align: center; color: var(--stone); font-size: .9375rem; padding: 24px; }
.demo__view.is-failed .demo__fail { display: grid; }
@media (max-width: 700px) { .demo__view { aspect-ratio: 9 / 15; max-height: 72vh; } }
@media (prefers-reduced-motion: reduce) { .demo__frame { transition: none; } .demo__view::after { animation: none; } }

/* ── Custom domain dialog ─────────────── */
.domains { width: min(640px, calc(100vw - 32px)); }
.dom { border-top: 1px solid var(--rule); padding: 16px 0 4px; display: grid; gap: 10px; }
.dom__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.dom__head strong { font-weight: 600; overflow-wrap: anywhere; }
.dom__status { font-size: .8125rem; font-weight: 600; border-radius: 999px; padding: 4px 10px; white-space: nowrap; background: #fff1cc; color: #6b4a00; }
.dom__status[data-s="active"] { background: #dcf5e4; color: #12663a; }
.dom__status[data-s="failed"] { background: #fce1ea; color: #8a0f3c; }
.dom__actions { display: flex; align-items: center; gap: 14px; }
.dom__form { margin-top: 4px; }
.dns { width: 100%; border-collapse: collapse; font-size: .875rem; }
.dns th { text-align: left; font-weight: 500; color: var(--stone); font-size: .8125rem; padding: 0 8px 6px 0; border-bottom: 1px solid var(--rule); }
.dns td { padding: 10px 8px 10px 0; border-bottom: 1px solid var(--rule); vertical-align: middle; }
.dns code { font: 500 .875rem/1.3 ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--paper); border-radius: 6px; padding: 3px 6px; overflow-wrap: anywhere; }
.dns .btn--sm { height: 28px; padding: 0 9px; margin-left: 4px; }
.dns__long { display: inline-block; max-width: 220px; vertical-align: middle; }
.domains a { color: var(--ink); text-underline-offset: 3px; }

/* ── Product-wide polish ─────────────────────────────────────────── */
/* What's in a hub */
.feats { padding: clamp(72px, 10vw, 128px) 0 0; }
.feats h2 { max-width: 18ch; }
.feats__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 44px 40px; margin-top: clamp(32px, 4vw, 56px); }
.feats__grid h3 { font-size: 1.1875rem; letter-spacing: -0.02em; }
.feats__grid p { margin: 8px 0 0; color: var(--ink-2); max-width: 36ch; }
@media (max-width: 860px) { .feats__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .feats__grid { grid-template-columns: 1fr; gap: 28px; } }
/* Example brands switch stays on one line on phones */
.switch { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.switch button { white-space: nowrap; }
@media (max-width: 700px) { .stage__hint { display: none; } }
/* Sign-in screens: the decorative panel is for wide screens only */
@media (max-width: 860px) { .auth .side { display: none; } .auth { padding-top: 24px; } }
/* Dashboard */
.hub-live { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.hub-live:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.hub-live svg { opacity: .6; }
button.text-link { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; text-decoration: underline; }
.add-ws { display: inline-block; margin: 28px 0 8px; }
/* Editor bar on phones: name, visibility icon, Edit and Publish. Everything else lives in the menu. */
.ed__actions { flex: none; }
@media (max-width: 760px) {
  .ed__bar { gap: 8px; padding: 0 10px 0 6px; }
  .ed__status, .ed__save, .ed__live { display: none; }
  .ed__vis span { display: none; }
  .ed__vis { padding: 0 8px; }
  .ed__actions .btn { padding: 0 12px; }
  .ed__menu { left: auto; right: -80px; width: min(290px, calc(100vw - 24px)); }
}
.ed__title strong { min-width: 0; } .ed { width: 100%; overflow: hidden; } .ed__bar { min-width: 0; }

/* ── Plans and billing ───────────────────────────────────────────── */
.plan-chip { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; font-size: .75rem; font-weight: 600; background: #e9eff5; color: var(--ink-2); }
.plan-chip.is-pro { background: var(--forest); color: var(--lime); }
.plan { width: min(480px, calc(100vw - 32px)); }
.plan__list { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 0; border-top: 1px solid var(--rule); }
.plan__list li { display: grid; gap: 2px; padding: 12px 0 12px 30px; border-bottom: 1px solid var(--rule); position: relative; }
.plan__list li::before { content: ""; position: absolute; left: 4px; top: 17px; width: 12px; height: 7px; border-left: 2px solid var(--green-text); border-bottom: 2px solid var(--green-text); transform: rotate(-45deg); }
.plan__list strong { font-weight: 600; font-size: .9375rem; }
.plan__list span { font-size: .8125rem; color: var(--stone); }
.plan__state { display: flex; align-items: center; gap: 10px; color: var(--ink-2) !important; }
.plan__pill { display: inline-flex; height: 22px; align-items: center; padding: 0 9px; border-radius: 999px; font-size: .75rem; font-weight: 700; background: var(--forest); color: var(--lime); }
.plan__buy { display: grid; gap: 14px; margin-top: 6px; }
.plan__seg { display: flex; padding: 3px; border-radius: 999px; background: #e9eff5; }
.plan__seg label { flex: 1; position: relative; }
.plan__seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.plan__seg span { display: block; text-align: center; padding: 8px 10px; border-radius: 999px; font-size: .875rem; font-weight: 500; color: var(--ink-2); transition: background-color .2s var(--ease), color .2s var(--ease); }
.plan__seg span em { font-style: normal; font-size: .75rem; color: var(--green-text); margin-left: 4px; }
.plan__seg input:checked + span { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.plan__seg input:focus-visible + span { outline: 2px solid var(--forest); outline-offset: 2px; }
.plan__price { margin: 0; color: var(--ink-2) !important; }
.plan__price strong { font-size: 1.75rem; letter-spacing: -0.03em; color: var(--ink); margin-right: 4px; }
.plan__code { border-top: 1px solid var(--rule); padding-top: 12px; }
.plan__code summary { cursor: pointer; font-size: .875rem; color: var(--ink-2); width: max-content; }
.plan__codeform { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 10px; }
.plan__codeform input { text-transform: uppercase; letter-spacing: .04em; }
.notice.limit { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 0; }
.notice.limit .btn { flex: none; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 2147483647; background: var(--ink); color: var(--paper-hi); padding: 12px 18px; border-radius: 12px; font-size: .9375rem; box-shadow: 0 20px 40px -18px rgba(0,0,0,.5); max-width: calc(100vw - 32px); }
/* Admin: access codes */
.ac__row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 560px) { .ac__row { grid-template-columns: 1fr 1fr; } }
.code-chip { font: 600 .8125rem/1 ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .03em; background: #e9eff5; border: 0; border-radius: 6px; padding: 7px 9px; cursor: copy; color: var(--ink); }
.codes td { vertical-align: top; }
.ws__meta .btn--sm { height: 30px; }
.add-ws + .add-ws { margin-left: 28px; }
.ws__meta .plan-chip { margin-left: 4px; }
#limit .notice { margin: 0; }
/* Pricing on the landing page */
.pricing { padding: clamp(72px, 10vw, 128px) 0 0; }
.pricing__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: clamp(28px, 4vw, 48px); max-width: 920px; }
.price-card { border-radius: var(--r-3); padding: clamp(24px, 3vw, 36px); background: var(--paper-hi); box-shadow: inset 0 0 0 1px var(--rule); display: flex; flex-direction: column; gap: 14px; }
.price-card h3 { font-size: 1.25rem; }
.price-card__amount { margin: 0; color: var(--stone); }
.price-card__amount strong { font-size: 2.5rem; letter-spacing: -0.04em; color: var(--ink); margin-right: 6px; }
.price-card ul { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 8px; color: var(--ink-2); }
.price-card li { padding-left: 24px; position: relative; }
.price-card li::before { content: ""; position: absolute; left: 2px; top: .5em; width: 10px; height: 6px; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); opacity: .7; }
.price-card .btn { margin-top: auto; align-self: flex-start; }
.price-card.is-pro { background: var(--forest); box-shadow: none; color: #e3e8ff; }
.price-card.is-pro h3, .price-card.is-pro .price-card__amount strong { color: #fff; }
.price-card.is-pro .price-card__amount, .price-card.is-pro ul { color: #b9c3ec; }
.pricing__note { margin-top: 16px; font-size: .875rem; color: var(--stone); }
@media (max-width: 700px) { .pricing__grid { grid-template-columns: 1fr; } }
.hero__note a { color: var(--ink); text-underline-offset: 3px; }
/* ── Characters ───────────────────────── */
.bito { display: block; overflow: visible; }
.bito__all, .bito__bob, .bito__eyes, .bito__arm, .bito__look, .bito__cap, .bito__mouth { transform-box: view-box; }
.bito__eyes { transform-origin: var(--eye, 100px 26px); }
@media (prefers-reduced-motion: no-preference) {
  .bito--anim .bito__bob { animation: bito-bob 3.4s ease-in-out infinite; animation-delay: var(--delay, 0s); }
  .bito--anim .bito__eyes { animation: bito-blink 5.2s infinite; animation-delay: calc(var(--delay, 0s) + .8s); }
  .bito--anim .bito__arm--r { animation: bito-wave 2.6s ease-in-out infinite; animation-delay: var(--delay, 0s); }
  .bito--anim .bito__arm--l { animation: bito-sway 3.4s ease-in-out infinite; animation-delay: var(--delay, 0s); }
  .bito__look { transition: transform .25s cubic-bezier(.2,.7,.2,1); }
}
@keyframes bito-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes bito-blink { 0%, 90%, 96%, 100% { transform: scaleY(1); } 93% { transform: scaleY(.1); } }
@keyframes bito-wave { 0%, 55%, 100% { transform: rotate(0); } 15% { transform: rotate(-14deg); } 30% { transform: rotate(10deg); } 45% { transform: rotate(-8deg); } }
@keyframes bito-sway { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(6deg); } }
.bito--hop { width: 56px; height: auto; }
@media (prefers-reduced-motion: no-preference) {
  .bito--hop .bito__bob { animation: bito-hop .9s cubic-bezier(.3,.6,.4,1) infinite; transform-origin: 66px 133px; }
  .bito--hop .bito__eyes { animation: bito-blink 2.4s infinite; }
}
@keyframes bito-hop { 0%, 100% { transform: translateY(0) scale(1.06, .94); } 40% { transform: translateY(-22px) scale(.97, 1.03); } 60% { transform: translateY(-22px) scale(.98, 1.02); } }
.pending::before { content: none; }
.pending { gap: 10px; }

/* ── Landing: hero cast ─────────────────── */
.hero { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); align-items: center; gap: clamp(24px, 4vw, 64px); padding-bottom: clamp(32px, 5vw, 64px); }
.hero h1 { max-width: 15ch; font-size: clamp(2.5rem, 5vw, 4.4rem); }
.hero__copy .lede { margin-top: 24px; }
.cast { position: relative; aspect-ratio: 1 / .86; width: 100%; max-width: 560px; justify-self: end; }
.cast::before { content: ""; position: absolute; left: 0; right: 0; bottom: 9%; height: 9%; border-radius: 50%; background: radial-gradient(closest-side, rgba(7,38,70,.14), transparent); }
.cast__b { position: absolute; transition: transform .5s var(--spring); }
.cast__b .bito { width: 100%; height: auto; }
.cast__b1 { width: 36%; left: 3%; bottom: 6.8%; }
.cast__b2 { width: 62%; left: 31%; bottom: 6%; z-index: 2; --delay: -.6s; }
.cast__b3 { width: 30%; left: 44%; bottom: 45.4%; z-index: 1; }
.cast__b3 .bito { --delay: -.6s; }
.cast__b2 .bito { --delay: -.6s; }
.cast__b1 .bito { --delay: -1.7s; }
.cast__b:hover { transform: translateY(-8px) rotate(-2deg); }
@media (prefers-reduced-motion: no-preference) {
  .cast--enter .cast__b { animation: bito-pop .9s var(--spring) both; }
  .cast--enter .cast__b1 { animation-delay: .35s; }
  .cast--enter .cast__b2 { animation-delay: .5s; }
  .cast--enter .cast__b3 { animation-delay: .8s; }
}
@keyframes bito-pop { from { opacity: 0; transform: translateY(40px) scale(.7); } to { opacity: 1; transform: none; } }

/* A character peeking over the example hub */
.demo-wrap { position: relative; }
.peek { position: absolute; right: 6%; bottom: calc(100% - 46px); width: 112px; z-index: 0; }
.peek .bito { width: 100%; height: auto; }
.stage .demo { z-index: 1; }
.stage__bar { margin-bottom: 26px; }
.stage__hint { padding-right: 170px; }
@media (max-width: 700px) { .peek { width: 84px; bottom: calc(100% - 34px); } }

/* Pro card: a character sits on its top edge */
.price-card { position: relative; }
.perch { position: absolute; right: 30px; bottom: calc(100% - 18px); width: 124px; }
.price-card.is-pro .bito__arm { stroke: #0B1030; }
.perch .bito { width: 100%; height: auto; }
.pricing__grid { padding-top: 70px; margin-top: clamp(0px, 1vw, 8px); }

/* Closing band: the high five */
.band { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.band .actions { margin-top: 28px; }
.band .five { --s: clamp(200px, 26vw, 320px); margin-bottom: calc(-1 * clamp(40px, 7vw, 88px)); align-self: end; }
.five { position: relative; width: var(--s); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: end; }
.five .bito { width: 100%; height: auto; }
.five .bito--five-l { transform: translateX(-3%); }
.five .bito--five-r { transform: translateX(3%); }
.five__spark { position: absolute; left: 50%; top: 9%; width: 14%; translate: -50% 0; overflow: visible; }
.band .five__spark path { stroke: var(--lime); }
.band .five .bito__arm, .band .five .bito__hand { stroke: #e3e8ff; }
@media (prefers-reduced-motion: no-preference) {
  .five .bito--five-l .bito__all { animation: five-l 2.8s var(--ease) infinite; transform-origin: 70px 214px; }
  .five .bito--five-r .bito__all { animation: five-r 2.8s var(--ease) infinite; transform-origin: 70px 214px; }
  .five__spark { animation: five-spark 2.8s var(--ease) infinite; }
  .five .bito__eyes { animation: bito-blink 4s infinite; }
}
@keyframes five-l { 0%, 100% { rotate: -2deg; } 35%, 45% { rotate: 3deg; } }
@keyframes five-r { 0%, 100% { rotate: 2deg; } 35%, 45% { rotate: -3deg; } }
@keyframes five-spark { 0%, 30% { opacity: 0; scale: .4; } 40% { opacity: 1; scale: 1.15; } 60% { opacity: 1; scale: 1; } 75%, 100% { opacity: 0; scale: 1.2; } }
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; }
  .cast { max-width: 420px; justify-self: center; margin-top: 8px; }
  .band .five { justify-self: center; }
}

/* Sign-in panel */
.side__cast { position: relative; min-height: 300px; }
.side__cast .bito { position: absolute; height: auto; }
.side__b1 { width: 34%; left: 10%; bottom: -12%; --delay: -1.2s; }
.side__b2 { width: 58%; right: 4%; bottom: -10%; }
.side .bito__arm { stroke: #e3e8ff; }

/* Dashboard empty state */
.empty--cast { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 20px; align-items: center; max-width: 72ch; }
.empty__b { width: 112px; height: auto; }
@media (max-width: 560px) { .empty--cast { grid-template-columns: 1fr; } .empty__b { width: 88px; } }

/* Steps rail in the brand gradient */
.steps li::after { background: var(--grad); height: 3px; border-radius: 3px; }
.steps li::before { font-family: var(--display); font-size: 1rem; color: var(--blue); }
.plan-chip.is-pro, .plan__pill { background: var(--forest); color: var(--lime); }
@media (max-width: 960px) {
  .band { grid-template-columns: 1fr; }
  .band .five { --s: 240px; }
}
@media (max-width: 700px) { .pricing__grid { row-gap: 92px; } }

/* ── Legal pages ──────────────────────── */
.legal { padding: clamp(32px, 6vw, 72px) 0 clamp(56px, 8vw, 96px); max-width: 760px; margin-inline: max(var(--gutter), calc((100% - var(--max)) / 2)); }
.legal__tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 1px var(--rule); margin-bottom: 32px; }
.legal__tabs a { padding: 7px 14px; border-radius: 999px; color: var(--ink-2); text-decoration: none; font-size: .875rem; font-weight: 600; }
.legal__tabs a:hover { color: var(--ink); background: var(--paper); }
.legal__tabs a[aria-current="page"] { background: var(--ink); color: #fff; }
.legal h1 { font-size: clamp(2.2rem, 4.4vw, 3.4rem); }
.legal__meta { margin-top: 12px; font-size: .875rem; color: var(--stone); }
.legal__lede { margin-top: 20px; font-size: 1.1875rem; line-height: 1.55; color: var(--ink-2); max-width: 46ch; }
.legal__body { margin-top: 40px; border-top: 1px solid var(--rule); }
.legal__body h2 { font-size: 1.25rem; letter-spacing: -0.015em; margin: 36px 0 10px; }
.legal__body p, .legal__body li { color: var(--ink-2); max-width: 68ch; line-height: 1.7; }
.legal__body p + p, .legal__body ul + p, .legal__body p + ul { margin-top: 12px; }
.legal__body ul { margin: 12px 0 0; padding-left: 20px; display: grid; gap: 8px; }
.legal__body li::marker { color: var(--sky); }
.legal__body strong { color: var(--ink); font-weight: 650; }
.legal a { color: var(--green-text); text-underline-offset: 3px; text-decoration-thickness: 1px; }
.legal a:hover { color: var(--ink); }
.legal__tabs a { text-decoration: none; }
.foot__links { display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 0; }
.foot__links a { color: var(--stone); text-decoration: none; }
.foot__links a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.foot__right { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 28px; }
@media (max-width: 560px) { .legal__tabs { display: flex; width: max-content; max-width: 100%; } }
.pricing__note a, .plan__legal a { color: var(--ink); text-underline-offset: 3px; }
.plan__legal { font-size: .8125rem; color: var(--stone); margin: 0; }
.legal .legal__tabs a { color: var(--ink-2); } .legal .legal__tabs a[aria-current="page"] { color: #fff; }

/* ── Waitlist form dialog (join.js) ──── */
.sa { width: min(760px, calc(100vw - 32px)); height: min(900px, calc(100dvh - 32px)); max-height: none; padding: 0; border: 0; border-radius: 22px; background: #fff; color: var(--ink); box-shadow: 0 40px 100px -30px rgba(7,38,70,.55); overflow: hidden; }
.sa[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.sa::backdrop { background: rgba(7,38,70,.45); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
@media (prefers-reduced-motion: no-preference) {
.sa[open] { animation: sa-in .35s var(--spring); }
.sa[open]::backdrop { animation: sa-fade .25s ease; }
}
@keyframes sa-in { from { opacity: 0; transform: translateY(24px) scale(.97); } }
@keyframes sa-fade { from { opacity: 0; } }
.sa__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 14px 14px 22px; border-bottom: 1px solid var(--rule); }
.sa__bar img { height: 20px; width: auto; }
.sa__close { width: 38px; height: 38px; display: grid; place-items: center; border: 0; border-radius: 10px; background: var(--paper); color: var(--ink); cursor: pointer; }
.sa__close:hover { background: var(--mint); }
.sa__frame { position: relative; min-height: 0; }
.sa__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #fff; }
.sa__loading { position: absolute; inset: 0; display: grid; place-items: center; background: #fff; transition: opacity .3s; pointer-events: none; }
.sa__loading::before { content: ""; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--rule-strong); border-top-color: var(--blue); animation: spin .7s linear infinite; }
.sa.is-loaded .sa__loading { opacity: 0; }
.sa__done { margin: 0; padding: 14px 22px; background: #dcf5e4; color: #12663a; font-weight: 600; border-top: 1px solid #c3ebd0; }
.sa__done .link { color: #12663a; margin-left: 6px; }
@media (max-width: 600px) { .sa { width: 100vw; height: 100dvh; max-width: 100vw; border-radius: 0; margin: 0; } }
