/* ==========================================================================
   Flo — dark, Discord-native.
   Near-black ground, graphite surfaces, Discord's own role colours as the
   only colour: blurple acts, green completes, amber is premium, red is danger.
   ========================================================================== */

:root {
  --bg: #0a0b0e;
  --bg-1: #0f1015;
  --surface: #15171c;
  --surface-2: #1c1e25;
  --surface-3: #252832;
  --line: #272a33;
  --line-strong: #383c47;

  --text: #f2f3f5;
  --muted: #9ba1ae;
  --faint: #8a90a0;

  --blurple: #5865f2;
  --blurple-hover: #4752c4;
  --blurple-text: #9aa4ff;
  --blurple-soft: rgba(88, 101, 242, 0.16);
  --green: #23a55a;
  --green-text: #3fd07c;
  --amber: #f0b232;
  --red: #f23f43;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);

  --gutter: clamp(20px, 4.2vw, 64px);
  --max: 1320px;
  --nav-h: 64px;
  --radius: 10px;
}

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

html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--line-strong) var(--bg); scrollbar-width: thin; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Archivo", system-ui, sans-serif;
  font-stretch: 100%;
  font-weight: 450;
  font-size: 1.0625rem;
  line-height: 1.6;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--blurple); color: #fff; }
:focus-visible { outline: 2px solid var(--blurple-text); outline-offset: 3px; border-radius: 4px; }
[hidden] { display: none !important; }
img { max-width: 100%; display: block; }
a { color: inherit; text-underline-offset: 0.22em; text-decoration-thickness: 1px; }
button { font: inherit; color: inherit; }
code, .mono { font-family: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace; font-variant-ligatures: none; }

.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: var(--gutter); top: -80px; z-index: 100; background: var(--blurple); color: #fff; padding: 0.7em 1em; font-weight: 700; border-radius: 6px; }
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }

/* ---- type ---- */
.display { font-stretch: 112%; font-weight: 800; letter-spacing: -0.03em; line-height: 1; text-wrap: balance; margin: 0; }
h1.display { font-size: clamp(2.5rem, 4.3vw, 4.2rem); }
h2.display { font-size: clamp(2.1rem, 3.8vw, 3.5rem); }
h3.display { font-size: clamp(1.8rem, 2.8vw, 2.6rem); }
.lede { font-size: clamp(1.05rem, 1.35vw, 1.2rem); line-height: 1.55; color: var(--muted); max-width: 52ch; text-wrap: pretty; margin: 0; }
.note { font-size: 0.92rem; line-height: 1.45; color: var(--faint); margin: 0; }
.caps { font-stretch: 108%; font-weight: 650; font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; }

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.7em;
  padding: 0.95em 1.45em; border: 0; border-radius: 8px; cursor: pointer; text-decoration: none;
  font-stretch: 106%; font-weight: 700; font-size: 1rem; line-height: 1; white-space: nowrap;
  transition: transform 160ms var(--ease-out), background-color 160ms ease, box-shadow 160ms ease;
}
.btn:active { transform: scale(0.97); }
.btn img { width: 20px; height: auto; flex: none; }
.btn-primary { background: var(--blurple); color: #fff; box-shadow: 0 1px 0 rgba(255, 255, 255, 0.18) inset, 0 10px 24px -12px rgba(88, 101, 242, 0.7); }
.btn-ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1px var(--line-strong); }
.btn-quiet { background: var(--surface-2); color: var(--text); }
.btn-white { background: #fff; color: #000; }
.btn-white img { filter: invert(1); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; box-shadow: none; }
@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover { background: var(--blurple-hover); transform: translateY(-1px); }
  .btn-ghost:hover { box-shadow: inset 0 0 0 1px var(--muted); }
  .btn-quiet:hover { background: var(--surface-3); }
  .btn-white:hover { background: #e6e7ea; transform: translateY(-1px); }
  .btn:active { transform: scale(0.97); }
}
.link-quiet { font-stretch: 104%; font-weight: 650; text-decoration: underline; text-decoration-color: var(--line-strong); padding-block: 0.4em; transition: text-decoration-color 160ms; }
@media (hover: hover) and (pointer: fine) { .link-quiet:hover { text-decoration-color: var(--blurple-text); } }

/* ==========================================================================
   Used by: servers that run Flo, injected under the hero by server.js.
   Items share one grid cell and fade between each other; js/showcase.js moves .is-on.
   Without JS the first one shows. Reduced motion shows all of them in a row.
   ========================================================================== */
.used-by { border-top: 1px solid var(--line); padding-block: clamp(28px, 4vw, 44px); background: var(--bg); }
.used-by .wrap { display: grid; justify-items: center; gap: 16px; text-align: center; }
.used-label { margin: 0; color: var(--faint); }
.used-list { list-style: none; margin: 0; padding: 0; display: grid; justify-items: center; }
.used-item { grid-area: 1 / 1; display: flex; align-items: center; gap: 12px; max-width: 100%; opacity: 0; visibility: hidden; transition: opacity 400ms var(--ease-out), visibility 0s linear 400ms; }
.used-item.is-on { opacity: 1; visibility: visible; transition-delay: 0s; }
.used-ico { position: relative; flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; overflow: hidden; background: var(--surface-3); color: var(--muted); font-stretch: 112%; font-weight: 800; font-size: 1.05rem; line-height: 1; }
.used-ico img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.used-ico.has-img .used-ini { display: none; }
.used-ico.is-broken .used-ini { display: block; }
.used-ico.is-broken img { display: none; }
.used-text { min-width: 0; text-align: left; font-stretch: 106%; font-size: 1.05rem; line-height: 1.3; color: var(--muted); overflow-wrap: anywhere; }
.used-name { font-weight: 700; color: var(--text); }
.used-total { margin: 0; }
.used-total strong { color: var(--muted); font-weight: 650; }
@media (prefers-reduced-motion: reduce) {
  .used-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px 40px; }
  .used-item { opacity: 1; visibility: visible; transition: none; }
}

/* ==========================================================================
   Nav
   ========================================================================== */
.nav { position: relative; z-index: 20; border-bottom: 1px solid var(--line); background: var(--bg); }
.nav-in { display: flex; align-items: center; gap: clamp(20px, 3vw, 44px); min-height: var(--nav-h); max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.nav-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.nav-brand img { width: 34px; height: 34px; border-radius: 9px; }
.nav-brand span { font-stretch: 118%; font-weight: 900; font-size: 1.35rem; letter-spacing: -0.02em; }
.nav-links { display: flex; gap: 4px; }
.nav-links a { padding: 0.55em 0.9em; border-radius: 6px; text-decoration: none; font-stretch: 104%; font-weight: 600; font-size: 0.95rem; color: var(--muted); transition: color 160ms ease, background-color 160ms ease; }
.nav-links a[aria-current="page"] { color: var(--text); background: var(--surface-2); }
@media (hover: hover) and (pointer: fine) { .nav-links a:hover { color: var(--text); background: var(--surface); } }
.nav-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.nav-actions .btn { padding: 0.72em 1.1em; font-size: 0.9rem; }
.nav-actions .btn img { width: 18px; }
.nav-premium { display: inline-flex; align-items: center; gap: 8px; padding: 0.6em 0.9em; text-decoration: none; font-stretch: 104%; font-weight: 700; font-size: 0.9rem; color: var(--amber); border-radius: 6px; transition: background-color 160ms ease; }
.nav-premium svg { width: 16px; height: 16px; }
@media (hover: hover) and (pointer: fine) { .nav-premium:hover { background: rgba(240, 178, 50, 0.1); } }
.nav-burger { display: none; align-items: center; justify-content: center; width: 46px; height: 46px; margin-left: auto; background: transparent; border: 1px solid var(--line-strong); border-radius: 8px; cursor: pointer; }
.nav-burger svg { width: 22px; height: 22px; }
.nav-sheet { display: none; border-top: 1px solid var(--line); padding: 8px var(--gutter) 22px; background: var(--bg); }
.nav-sheet a:not(.btn) { display: block; padding: 0.9em 0; text-decoration: none; font-stretch: 106%; font-weight: 650; border-bottom: 1px solid var(--line); }
.nav-sheet .btn { margin-top: 14px; width: 100%; }

/* ==========================================================================
   Hero + the live server window
   ========================================================================== */
.hero { background: linear-gradient(180deg, #0d0f1b 0%, var(--bg) 70%); }
.hero-in { display: grid; grid-template-columns: minmax(0, 4.4fr) minmax(0, 6.6fr); gap: clamp(32px, 4.5vw, 72px); align-items: center; min-height: calc(100svh - var(--nav-h)); padding-block: clamp(24px, 4vh, 56px); }
.hero-copy { display: grid; gap: 24px; align-content: center; }
.hero-copy .cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-top: 4px; }

.demo { width: 100%; max-width: 720px; justify-self: end; }
.win { background: var(--surface); border: 1px solid var(--line-strong); border-radius: 14px; overflow: hidden; box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.9), 0 1px 0 rgba(255, 255, 255, 0.05) inset; }
.win-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 16px; height: 44px; background: var(--bg-1); border-bottom: 1px solid var(--line); }
.win-top .where { display: flex; align-items: center; gap: 10px; font-stretch: 106%; font-weight: 700; font-size: 0.92rem; }
.win-top .where i { width: 22px; height: 22px; border-radius: 7px; background: linear-gradient(135deg, #5865f2, #3b46b8); display: inline-block; }
.win-top .tag { color: var(--blurple-text); background: var(--blurple-soft); padding: 0.3em 0.65em; border-radius: 5px; }

/* sidebar rows (categories, channels) */
.cat { display: flex; align-items: center; gap: 5px; padding: 10px 8px 3px; color: var(--faint); font-stretch: 106%; font-weight: 700; font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; }
.cat svg { width: 10px; height: 10px; flex: none; }
.ch { display: flex; align-items: center; gap: 7px; padding: 0.3em 0.55em; border-radius: 5px; font-stretch: 104%; font-weight: 550; font-size: 0.9rem; line-height: 1.35; }
.ch .lock { width: 12px; height: 12px; flex: none; margin-left: auto; color: var(--faint); }
.flash { animation: flash 1.4s ease-out; }
@keyframes flash { 0% { background: rgba(35, 165, 90, 0.28); } 100% { background: transparent; } }

/* ---- the AI builder window: start screen -> full window, one stage attribute drives both ---- */
.bw {
  --pane-w: 188px;
  --demo-h: clamp(540px, calc(100svh - var(--nav-h) - 132px), 660px);
  --in: cubic-bezier(0.215, 0.61, 0.355, 1);
  display: flex; flex-direction: column; height: var(--demo-h); container: bw / inline-size;
}
.win-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 0px minmax(0, 1fr); transition: grid-template-columns 1000ms var(--ease-out) 200ms; }
.bw[data-pane="open"] .win-body { grid-template-columns: var(--pane-w) minmax(0, 1fr); }

@keyframes dw-in { from { opacity: 0; transform: translateY(8px); } }
@keyframes sweep { from { background-position: 150% 0; } to { background-position: -50% 0; } }

/* left pane: the proposed server. Children keep their width while the pane opens, so nothing reflows. */
.pane { position: relative; min-width: 0; overflow: hidden; background: var(--bg-1); border-right: 1px solid transparent; transition: border-color 600ms ease 300ms; }
.bw[data-pane="open"] .pane { border-right-color: var(--line); }
.pane-in { display: flex; flex-direction: column; height: 100%; min-width: calc(var(--pane-w) - 1px); opacity: 0; transition: opacity 250ms ease; }
.bw[data-pane="open"] .pane-in { opacity: 1; transition: opacity 650ms ease 650ms; }
.side-head { flex: none; display: flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px; border-bottom: 1px solid var(--line); font-stretch: 106%; font-weight: 750; font-size: 0.92rem; }
.side-head svg { width: 10px; height: 10px; color: var(--faint); }
.side-state { flex: none; display: flex; align-items: center; gap: 7px; padding: 10px 14px 4px; font-stretch: 106%; font-weight: 650; font-size: 0.78rem; color: var(--faint); white-space: nowrap; }
.sdot { width: 7px; height: 7px; border-radius: 50%; background: var(--blurple-text); }
.side-count { margin-left: auto; font-weight: 550; font-size: 0.74rem; }
.side-body { position: relative; flex: 1; min-height: 0; overflow-y: auto; padding: 2px 8px 14px; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }

.skel { display: grid; gap: 10px; padding: 10px 6px; }
.bar-s { height: 12px; border-radius: 4px; background-color: var(--surface-3); background-image: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.05) 50%, transparent 70%); background-size: 200% 100%; animation: sweep 1.8s linear infinite; }

.blk { margin-top: 6px; }
.rise { animation: dw-in 650ms var(--ease-out) backwards; animation-delay: calc(var(--g, 0) * 90ms); }
.cat .cname { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat { transition: color 240ms ease; }
.blk[data-state="running"] .cat { color: var(--blurple-text); }
.blk[data-state="done"] .cat { color: var(--muted); }
.staff-chip { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; flex: none; padding: 0.1em 0.5em; border-radius: 4px; background: var(--surface-3); color: var(--faint); font-weight: 650; font-size: 0.66rem; letter-spacing: 0; text-transform: none; white-space: nowrap; opacity: 0.55; transition: opacity 240ms ease; }
.staff-chip i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.blk[data-state="done"] .staff-chip { opacity: 1; }
.ch { transition: color 240ms ease calc(var(--i, 0) * 70ms); color: var(--faint); }
.ch .gl { width: 15px; height: 15px; flex: none; }
.ch .nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch .lock { opacity: 0.45; transform: none; transition: opacity 260ms ease calc(var(--i, 0) * 70ms); }
.blk[data-state="done"] .ch { color: var(--text); }
.blk[data-state="done"] .ch .lock { opacity: 1; }
.role { display: flex; align-items: center; gap: 9px; padding: 0.3em 0.55em; border-radius: 5px; font-stretch: 104%; font-weight: 550; font-size: 0.9rem; line-height: 1.35; color: var(--faint); transition: color 240ms ease calc(var(--i, 0) * 70ms); }
.role i { width: 10px; height: 10px; flex: none; border-radius: 50%; border: 1.5px solid var(--line-strong); transition: background-color 240ms ease calc(var(--i, 0) * 70ms), border-color 240ms ease calc(var(--i, 0) * 70ms); }
.blk[data-state="done"] .role { color: var(--text); }
.blk[data-state="done"] .role i { background: var(--role); border-color: var(--role); }
.blk.fresh .cat, .blk.fresh .ch, .blk.fresh .role { animation: flash 1.4s ease-out backwards; animation-delay: calc(var(--i, 0) * 70ms); }

/* right: the channel. The head, the start screen and the cards swap on data-stage. */
.chat { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; background: var(--surface); }
.chat-head { flex: none; display: flex; align-items: center; gap: 8px; height: 0; padding: 0 12px 0 16px; overflow: hidden; opacity: 0; border-bottom: 1px solid transparent; font-stretch: 106%; font-weight: 700; font-size: 0.92rem; transition: height 650ms var(--ease-out) 200ms, opacity 500ms ease 450ms, border-color 500ms ease 200ms; }
.bw[data-stage="window"] .chat-head { height: 40px; opacity: 1; border-bottom-color: var(--line); }
.chat-head svg { width: 17px; height: 17px; color: var(--faint); flex: none; }
.btn-new { margin-left: auto; appearance: none; border: 0; background: transparent; padding: 0.4em 0.7em; border-radius: 6px; cursor: pointer; color: var(--muted); font-stretch: 104%; font-weight: 650; font-size: 0.82rem; transition: background-color 160ms ease, color 160ms ease, transform 160ms var(--ease-out); }
.btn-new:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) { .btn-new:hover { background: var(--surface-3); color: var(--text); } }

.bw[data-stage="start"] .chat { justify-content: center; }
.bw[data-stage="start"] .feed { display: none; }
.bw[data-stage="window"] .start:not(.ghost), .bw[data-stage="window"] .cards:not(.ghost) { display: none; }
.start { flex: none; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 0 20px 18px; text-align: center; }
.start-mark { width: 40px; height: 40px; border-radius: 11px; }
.start-h { margin: 0; font-stretch: 110%; font-weight: 800; font-size: clamp(1.25rem, 4.6cqw, 1.55rem); letter-spacing: -0.02em; line-height: 1.15; text-wrap: balance; }
.bw[data-stage="start"] .start-mark { animation: dw-in 700ms var(--ease-out) backwards; }
.bw[data-stage="start"] .start-h { animation: dw-in 700ms var(--ease-out) 90ms backwards; }
.bw[data-stage="start"] .composer-wrap { animation: dw-in 700ms var(--ease-out) 260ms backwards; }
.bw[data-stage="start"] .cards { animation: dw-in 700ms var(--ease-out) 380ms backwards; }

.feed { flex: 1; min-height: 0; padding: 14px 16px 6px; display: flex; flex-direction: column; gap: 14px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 22px); mask-image: linear-gradient(to bottom, transparent 0, #000 22px); }
.msg { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 10px; align-items: start; }
.msg.dw-in, .dw-in { animation: dw-in 350ms var(--in) backwards; }
.msg .avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 0.8rem; color: #fff; background: #be2f86; overflow: hidden; }
.msg .avatar.is-flo { background: var(--surface-3); }
.msg .avatar img { width: 100%; height: 100%; object-fit: cover; }
.msg .who { display: flex; align-items: center; gap: 7px; font-stretch: 104%; font-weight: 700; font-size: 0.92rem; line-height: 1.2; }
.msg .who time { font-weight: 450; font-size: 0.72rem; color: var(--faint); }
.app-tag { font-size: 0.7rem; font-weight: 800; letter-spacing: 0.04em; padding: 0.2em 0.45em; border-radius: 4px; background: var(--blurple); color: #fff; }
.msg p { margin: 3px 0 0; font-size: 0.95rem; line-height: 1.45; overflow-wrap: anywhere; }
.msg > div { min-width: 0; }
.mention { background: var(--blurple-soft); color: var(--blurple-text); padding: 0 0.28em; border-radius: 4px; font-weight: 600; }
.msg .btn { margin-top: 12px; padding: 0.8em 1.2em; font-size: 0.9rem; }

.typing { display: inline-flex; gap: 4px; padding: 9px 0 5px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--faint); animation: bob 1s infinite ease-in-out; }
.typing i:nth-child(2) { animation-delay: 0.15s; }
.typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes bob { 0%, 80%, 100% { transform: translateY(0); opacity: 0.5; } 40% { transform: translateY(-3px); opacity: 1; } }

.embed { margin-top: 4px; background: var(--bg-1); border: 1px solid var(--line); border-radius: 10px; padding: 11px 14px 12px; }
.embed-head span:nth-child(2) { white-space: nowrap; }
.embed-meta { margin-left: auto; white-space: nowrap; font-stretch: 100%; font-weight: 550; font-size: 0.74rem; color: var(--faint); }
.embed.ghost-embed { margin-top: 2px; }
.embed-head { display: flex; align-items: center; gap: 8px; font-stretch: 106%; font-weight: 750; font-size: 0.95rem; }
.embed-head .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--blurple); transition: background-color 300ms ease; }
.embed.is-done .embed-head .dot { background: var(--green); }
.tasks { list-style: none; margin: 9px 0 0; padding: 0; display: grid; gap: 5px; }
.task { display: grid; grid-template-columns: 18px minmax(0, 1fr); align-items: start; gap: 8px; font-size: 0.84rem; line-height: 1.35; animation: dw-in 300ms var(--in) backwards; animation-delay: calc(50ms + var(--i, 0) * 70ms); }
.task .st { width: 16px; height: 16px; margin-top: 1px; border-radius: 50%; border: 1.5px solid var(--line-strong); position: relative; transition: border-color 200ms ease, background-color 200ms ease; }
.task .st::after { content: ""; position: absolute; left: 4px; top: 2px; width: 4px; height: 7px; border-right: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(45deg) scale(0); transition: transform 240ms var(--ease-out); }
.task[data-state="running"] .st { border-color: var(--blurple-text) var(--blurple-text) transparent transparent; animation: spin 700ms linear infinite; }
.task[data-state="done"] .st { background: var(--green); border-color: var(--green); }
.task[data-state="done"] .st::after { transform: rotate(45deg) scale(1); }
@keyframes spin { to { transform: rotate(360deg); } }
.task .tx { color: var(--text); text-wrap: pretty; overflow-wrap: anywhere; }
.embed-foot { display: grid; gap: 6px; margin-top: 8px; }
.srow { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 26px; }
.srow-extra { flex: none; }
.btn-again { display: inline-flex; align-items: center; gap: 6px; appearance: none; border: 0; background: transparent; padding: 0.4em 0.6em; margin-right: -0.6em; border-radius: 6px; cursor: pointer; color: var(--muted); font-stretch: 104%; font-weight: 650; font-size: 0.8rem; transition: color 160ms ease, background-color 160ms ease, transform 160ms var(--ease-out); }
.btn-again:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) { .btn-again:hover { color: var(--text); background: var(--surface-3); } }
.embed-foot .status { margin: 0; font-size: 0.8rem; line-height: 1.3; color: var(--faint); }
.embed.is-done .embed-foot .status { color: var(--green-text); }
.acts { display: flex; flex-wrap: wrap; gap: 8px; min-height: 38px; }
.btn-run { padding: 0 1.1em; height: 38px; font-size: 0.86rem; border-radius: 8px; flex: none; }
.btn-spin { width: 13px; height: 13px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.35); border-top-color: #fff; animation: spin 700ms linear infinite; flex: none; }
.btn-arrow { display: inline-block; transition: transform 200ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .btn:hover .btn-arrow { transform: translateX(2px); } }
.embed.skel-embed { animation: dw-in 350ms var(--in) 600ms backwards; }
.embed.skel-embed .skel { padding: 2px 0; gap: 11px; }

/* composer */
.composer-wrap { flex: none; width: 100%; margin-inline: auto; padding: 0 16px 10px; transition: max-width 1000ms var(--ease-out) 200ms; }
.bw[data-stage="start"] .composer-wrap { max-width: 560px; }
.composer { display: flex; align-items: flex-start; gap: 8px; padding: 10px 10px 10px 12px; border-radius: 14px; background: var(--surface-3); border: 1px solid var(--line-strong); transition: border-color 150ms ease; }
.bw[data-stage="start"] .composer { box-shadow: 0 18px 40px -24px rgba(0, 0, 0, 0.7); }
.bw[data-stage="window"] .composer textarea { min-height: 1.5em; }
.composer:focus-within { border-color: var(--blurple-text); box-shadow: 0 0 0 1px var(--blurple-text); }
.composer .mention { flex: none; margin-top: 1px; line-height: 1.5; font-size: 0.95rem; white-space: nowrap; }
.composer textarea { flex: 1; min-width: 0; align-self: stretch; max-height: 240px; min-height: 3em; scrollbar-width: thin; margin: 0; padding: 0; border: 0; outline: 0; background: transparent; resize: none; color: var(--text); font: inherit; font-size: 0.95rem; font-stretch: 100%; line-height: 1.5; }
.composer textarea::placeholder { color: var(--faint); opacity: 1; }
.count { align-self: flex-end; font-size: 0.72rem; color: var(--faint); padding-bottom: 8px; }
.count.is-over { color: var(--red); }
.send { flex: none; align-self: flex-end; width: 34px; height: 34px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: #fff; color: #0a0b0e; cursor: pointer; transition: opacity 160ms ease, transform 160ms var(--ease-out); }
.send svg { width: 16px; height: 16px; }
.send:active { transform: scale(0.94); }
.send:disabled { opacity: 0.3; cursor: not-allowed; }
.usage-note { margin: 8px 0 0; text-align: center; font-size: 0.72rem; line-height: 1.4; color: var(--faint); text-wrap: balance; }
.bw[data-stage="window"] .usage-note { display: none; }

.cards { flex: none; width: 100%; max-width: 560px; margin-inline: auto; padding: 4px 16px 18px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.card { display: flex; align-items: center; gap: 11px; padding: 10px 12px 10px 10px; border: 1px solid var(--line-strong); border-radius: 12px; background: transparent; cursor: pointer; text-align: left; font-stretch: 104%; font-weight: 600; font-size: 0.84rem; line-height: 1.3; transition: border-color 160ms ease, background-color 160ms ease, transform 160ms var(--ease-out), opacity 160ms ease; }
.card .card-ico { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 9px; background: var(--surface-3); color: var(--blurple-text); }
.card .card-ico svg { width: 17px; height: 17px; }
.card-t { min-width: 0; text-wrap: pretty; }
.card:active { transform: scale(0.985); }
.card:disabled { opacity: 0.45; cursor: default; }
@media (hover: hover) and (pointer: fine) { .card:hover:not(:disabled) { border-color: var(--muted); background: var(--surface-2); } }
@container bw (max-width: 470px) { .cards { grid-template-columns: minmax(0, 1fr); } .embed-meta { display: none; } }
.ghost { position: absolute; z-index: 5; margin: 0; pointer-events: none; }
.demo .disclaimer { margin-top: 12px; }


/* ==========================================================================
   Features: Flo's channels
   ========================================================================== */
.book { border-top: 1px solid var(--line); padding-block: clamp(72px, 11vw, 150px) clamp(48px, 7vw, 96px); background: var(--bg); }
.book-head { display: grid; gap: 18px; max-width: 760px; margin-bottom: clamp(48px, 7vw, 100px); }
.book-grid { display: grid; grid-template-columns: minmax(0, 3.4fr) minmax(0, 8.6fr); gap: clamp(32px, 6vw, 96px); align-items: start; }

.rail { position: sticky; top: calc(var(--nav-h) + 28px); background: var(--bg-1); border: 1px solid var(--line); border-radius: 14px; padding: 14px 10px 16px; }
.rail .srv { display: flex; align-items: center; gap: 8px; padding: 4px 8px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; font-stretch: 106%; font-weight: 800; font-size: 1rem; }
.rail .srv img { width: 26px; height: 26px; border-radius: 8px; }
.rail ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.rail li { position: relative; display: flex; align-items: center; gap: 9px; padding: 0.55em 0.7em; border-radius: 7px; color: var(--faint); font-stretch: 104%; font-weight: 600; font-size: 0.97rem; transition: color 200ms ease, background-color 200ms ease; }
.rail li svg { width: 17px; height: 17px; flex: none; }
.rail li.is-unread { color: var(--text); font-weight: 750; }
.rail li.is-unread::before { content: ""; position: absolute; left: -7px; top: 50%; width: 5px; height: 9px; border-radius: 0 5px 5px 0; background: var(--text); transform: translateY(-50%); }
.rail li.is-read { color: var(--muted); }
.rail li.is-active { color: var(--text); background: var(--surface-3); font-weight: 750; }

.dispatches { display: grid; gap: clamp(72px, 14vh, 160px); }
.dispatch { display: grid; gap: 24px; align-content: start; min-height: min(78svh, 760px); }
.dispatch .mini-rail { display: none; align-items: center; gap: 8px; width: fit-content; padding: 0.4em 0.8em; border-radius: 6px; background: var(--surface-3); font-stretch: 104%; font-weight: 700; font-size: 0.9rem; }
.dispatch .mini-rail svg { width: 16px; height: 16px; color: var(--faint); }
.dispatch-copy { display: grid; gap: 16px; max-width: 58ch; }
.dispatch-copy p { margin: 0; color: var(--muted); text-wrap: pretty; }
.dispatch-copy p strong { color: var(--text); font-weight: 650; }
.plate { margin: 0; }
.plate .frame { background: #0b0d12; border: 1px solid var(--line-strong); border-radius: 14px; overflow: hidden; box-shadow: 0 30px 60px -36px rgba(0, 0, 0, 0.9); }
.plate img { width: 100%; height: auto; }
.plate figcaption { margin-top: 14px; }

/* ==========================================================================
   Ledger
   ========================================================================== */
.ledger { padding-block: clamp(72px, 10vw, 140px); background: var(--bg-1); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.ledger-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.ledger-head { display: grid; gap: 18px; position: sticky; top: calc(var(--nav-h) + 32px); }
.ledger-head .cta-row { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; margin-top: 10px; }
.rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-strong); }
.row { display: grid; grid-template-columns: auto 1fr auto; align-items: end; gap: 0 14px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.row b { font-stretch: 108%; font-weight: 700; font-size: clamp(1.05rem, 1.5vw, 1.28rem); line-height: 1.25; text-wrap: balance; }
.row .leader { margin-bottom: 0.42em; border-bottom: 2px dotted var(--line-strong); min-width: 28px; }
.row span { padding-bottom: 0.1em; font-size: 0.95rem; color: var(--muted); text-align: right; }

/* ==========================================================================
   Finale: one slash away
   ========================================================================== */
.finale { padding-block: clamp(72px, 10vw, 140px); background: var(--bg); }
.finale-grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.finale-copy { display: grid; gap: 22px; }
.finale-copy .cta-row { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; margin-top: 8px; }
.palette { background: var(--surface); border: 1px solid var(--line-strong); border-radius: 14px; padding: 8px; box-shadow: 0 40px 80px -44px rgba(0, 0, 0, 0.9); }
.palette .head { display: flex; justify-content: space-between; padding: 10px 12px 8px; color: var(--faint); }
.palette ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.palette li { display: grid; grid-template-columns: 34px minmax(0, 1fr); align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px; transition: background-color 160ms ease; }
.palette li .ico { width: 34px; height: 34px; border-radius: 8px; background: var(--surface-3); display: grid; place-items: center; color: var(--blurple-text); }
.palette li .ico svg { width: 18px; height: 18px; }
.palette li.is-sel { background: var(--surface-3); }
.palette code { display: block; font-weight: 600; font-size: 0.95rem; color: var(--text); }
.palette small { display: block; font-size: 0.82rem; color: var(--muted); line-height: 1.3; }

/* ==========================================================================
   Footer
   ========================================================================== */
.foot { background: var(--bg); border-top: 1px solid var(--line); }
.foot-in { display: flex; align-items: center; gap: 20px 40px; flex-wrap: wrap; max-width: var(--max); margin-inline: auto; padding: 26px var(--gutter); }
.foot-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; }
.foot-brand img { width: 30px; height: 30px; border-radius: 8px; }
.foot-brand span { font-stretch: 118%; font-weight: 900; font-size: 1.15rem; letter-spacing: -0.02em; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 26px; font-stretch: 104%; font-weight: 600; font-size: 0.92rem; }
.foot-links a { text-decoration: none; color: var(--muted); }
@media (hover: hover) and (pointer: fine) { .foot-links a:hover { color: var(--text); text-decoration: underline; } }
.foot-meta { color: var(--faint); font-size: 0.86rem; }

/* ==========================================================================
   Pricing
   ========================================================================== */
.p-head { padding-block: clamp(56px, 8vw, 110px) clamp(36px, 5vw, 64px); background: linear-gradient(180deg, #0d0f1b 0%, var(--bg) 100%); }
.p-head-in { display: grid; gap: 22px; max-width: 880px; }
.toggle { display: inline-flex; width: fit-content; margin-top: 8px; border: 1px solid var(--line-strong); border-radius: 10px; padding: 3px; gap: 3px; background: var(--bg-1); }
.toggle button { appearance: none; border: 0; background: transparent; cursor: pointer; padding: 0.65em 1.2em; border-radius: 7px; font-stretch: 106%; font-weight: 700; font-size: 0.92rem; color: var(--muted); display: inline-flex; gap: 0.6em; align-items: center; transition: background-color 160ms ease, color 160ms ease, transform 160ms var(--ease-out); }
.toggle button:active { transform: scale(0.97); }
.toggle button.is-on { background: var(--surface-3); color: var(--text); }
.save-tag { font-size: 0.72rem; letter-spacing: 0.05em; text-transform: uppercase; padding: 0.25em 0.55em; border-radius: 4px; background: rgba(35, 165, 90, 0.18); color: var(--green-text); }

.tariff { padding-block: clamp(24px, 4vw, 48px) clamp(64px, 9vw, 120px); }
.tariff-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.tier { position: relative; display: flex; flex-direction: column; padding: 32px clamp(22px, 2.6vw, 34px) 34px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.tier.is-pro { background: #14162c; border-color: var(--blurple); box-shadow: 0 0 0 1px var(--blurple) inset, 0 40px 80px -48px rgba(88, 101, 242, 0.6); }
.tier-name { display: flex; align-items: center; gap: 12px; margin: 0; }
.tier-name .role-dot { width: 14px; height: 14px; border-radius: 50%; flex: none; }
.tier-name .tier-crown { width: 18px; height: 14px; flex: none; color: #fff; }
.tier-name .tier-crown-royal { width: 28px; height: 21px; flex: none; filter: drop-shadow(0 0 6px rgba(240, 178, 50, 0.45)); }
.tier-title { font-stretch: 114%; font-weight: 800; font-size: 1.9rem; letter-spacing: -0.02em; line-height: 1; }
.tag-pop, .tag-deal { margin-left: auto; font-stretch: 108%; font-weight: 700; font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; padding: 0.4em 0.7em; border-radius: 5px; white-space: nowrap; }
.tag-pop { background: var(--blurple); color: #fff; }
.tag-deal { background: rgba(240, 178, 50, 0.16); color: var(--amber); }
.price { display: flex; align-items: baseline; gap: 10px; margin: 26px 0 4px; white-space: nowrap; min-height: 4rem; }
.price .amt { font-stretch: 114%; font-weight: 800; font-size: clamp(2.6rem, 3.8vw, 3.4rem); letter-spacing: -0.04em; line-height: 1; }
.price .was { font-stretch: 104%; font-weight: 650; font-size: 1.2rem; color: var(--faint); text-decoration: line-through; text-decoration-thickness: 2px; }
.price .was:empty { display: none; }
.price .per { font-size: 0.98rem; color: var(--muted); }
#tier-ultra .price { gap: 8px; }
#tier-ultra .price .amt { font-size: clamp(2.3rem, 3.2vw, 3rem); }
.bill { margin: 0; min-height: 1.5em; font-size: 0.9rem; color: var(--muted); }
#tier-free .bill { margin-bottom: calc(12px + 1.6rem); }
.save-line { display: flex; align-items: center; width: fit-content; height: 1.6rem; margin: 12px 0 0; padding: 0 0.65em; line-height: 1; border-radius: 5px; font-stretch: 106%; font-weight: 700; font-size: 0.8rem; background: rgba(35, 165, 90, 0.18); color: var(--green-text); }
.tier-blurb { margin: 20px 0 24px; text-wrap: pretty; color: var(--muted); }
.tier-blurb strong { color: var(--text); font-weight: 700; }
.tier .btn { width: 100%; }
.tier-list { list-style: none; margin: 28px 0 0; padding: 24px 0 0; border-top: 1px solid var(--line); display: grid; gap: 13px; font-size: 0.95rem; line-height: 1.45; color: var(--muted); }
.tier-list li { display: grid; grid-template-columns: 1.2rem 1fr; gap: 8px; }
.tier-list li::before { content: ""; width: 0.65rem; height: 0.36rem; margin-top: 0.4em; border-left: 2.5px solid var(--green-text); border-bottom: 2.5px solid var(--green-text); transform: rotate(-45deg); }
.tier-list li.inherit { color: var(--text); font-weight: 700; }
.tier-list li.inherit::before { width: 0.7rem; height: 0.7rem; margin-top: 0.3em; border: 0; transform: none; background: linear-gradient(var(--blurple-text), var(--blurple-text)) center/100% 2.5px no-repeat, linear-gradient(var(--blurple-text), var(--blurple-text)) center/2.5px 100% no-repeat; }

.tier.is-pro { background: linear-gradient(180deg, #1c2046 0%, #14162c 42%); box-shadow: 0 0 0 1px var(--blurple) inset, 0 0 0 5px rgba(88, 101, 242, 0.16), 0 56px 100px -44px rgba(88, 101, 242, 0.75); }
.tier.is-pro .tier-title { color: #fff; }
.tier-list li.lead { color: var(--text); font-weight: 700; font-size: 1.02rem; }
.tier-list li.lead::before { border-color: var(--blurple-text); }
.tier-list-no { margin-top: 18px; padding-top: 18px; border-top: 1px dashed var(--line-strong); }
.tier-list-no li { color: var(--faint); }
.tier-list-no li::before { width: 0.7rem; height: 0.7rem; margin-top: 0.3em; border: 0; transform: rotate(45deg); background: linear-gradient(#ff8a8d, #ff8a8d) center/100% 2.5px no-repeat, linear-gradient(#ff8a8d, #ff8a8d) center/2.5px 100% no-repeat; opacity: 0.7; }
@media (min-width: 1041px) {
  .tier.is-pro { margin-block: -18px; padding-block: 50px 46px; }
}

.plans { padding-block: clamp(56px, 8vw, 110px); background: var(--bg-1); }
.plans-head { display: grid; gap: 14px; max-width: 62ch; margin-bottom: clamp(24px, 4vw, 44px); }
.plans-table { border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.plans-table table { width: 100%; min-width: 40rem; border-collapse: collapse; font-size: 0.97rem; line-height: 1.4; }
.plans-table th, .plans-table td { padding: 0.8em 1em; text-align: center; vertical-align: middle; border-bottom: 1px solid var(--line); }
.plans-table thead th { background: var(--surface); color: var(--text); font-stretch: 108%; font-weight: 800; white-space: nowrap; }
.plans-table thead th:first-child, .plans-table tbody th[scope="row"] { text-align: left; }
.plans-table tbody th[scope="row"] { color: var(--text); font-weight: 600; position: sticky; left: 0; background: var(--bg); }
.plans-table thead th:first-child { position: sticky; left: 0; z-index: 1; }
.plans-table td { color: var(--muted); }
.plans-table td .ico { margin: 0; }
.plans-table thead th:nth-child(3) { color: var(--blurple-text); background: rgba(88, 101, 242, 0.18); }
.plans-table td:nth-child(3) { background: rgba(88, 101, 242, 0.07); color: var(--text); }
.plans-table .grp th { padding-block: 0.7em; text-align: left; font-stretch: 100%; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); background: var(--bg-1); }
.plans-table tr:last-child th, .plans-table tr:last-child td { border-bottom: 0; }

.uses { padding-block: clamp(56px, 8vw, 110px); border-top: 1px solid var(--line); background: var(--bg-1); }
.uses-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.uses-head { display: grid; gap: 16px; }
.bars { display: grid; gap: 22px; margin: 0; padding: 0; list-style: none; }
.bar { display: grid; grid-template-columns: 4.4rem minmax(0, 1fr) 4.6rem; align-items: center; gap: 16px; }
.bar b { font-stretch: 108%; font-weight: 700; font-size: 1rem; }
.bar .track { position: relative; height: 34px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.bar .fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 7px; transform-origin: 0 50%; }
.bar .num { text-align: right; font-stretch: 114%; font-weight: 800; font-size: 1.7rem; letter-spacing: -0.03em; }

.included { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg); }
.included-in { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 38px; padding-block: 22px; font-stretch: 104%; font-weight: 650; font-size: 0.95rem; color: var(--muted); }
.included-in span { display: inline-flex; align-items: center; gap: 10px; }
.included-in span::before { content: ""; width: 0.75rem; height: 0.4rem; border-left: 2.5px solid var(--green-text); border-bottom: 2.5px solid var(--green-text); transform: rotate(-45deg) translateY(-2px); }

.faq { padding-block: clamp(64px, 9vw, 130px); }
.faq-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.faq-list { border-top: 1px solid var(--line-strong); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 22px 0; font-stretch: 108%; font-weight: 700; font-size: 1.1rem; line-height: 1.3; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-stretch: 100%; font-weight: 400; font-size: 1.7rem; line-height: 1; flex: none; color: var(--muted); transition: transform 200ms var(--ease-out); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0; padding: 0 3rem 24px 0; color: var(--muted); max-width: 62ch; text-wrap: pretty; }
.faq details p a { color: var(--blurple-text); font-weight: 650; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1040px) {
  .hero-in { grid-template-columns: 1fr; min-height: 0; padding-block: 40px 56px; }
  .demo { justify-self: stretch; max-width: 680px; }
  .tariff-grid { grid-template-columns: 1fr; max-width: 560px; }
  #tier-free .bill { margin-bottom: 0; }
  .uses-grid, .faq-grid, .ledger-grid, .finale-grid { grid-template-columns: 1fr; }
  .ledger-head { position: static; }
}
@media (max-width: 900px) {
  .book-grid { grid-template-columns: 1fr; }
  .rail { display: none; }
  .dispatch { min-height: 0; }
  .dispatch .mini-rail { display: inline-flex; }
  .dispatches { gap: 72px; }
}
@media (max-width: 760px) {
  .nav-links, .nav-actions { display: none; }
  .nav-burger { display: flex; }
  .nav-sheet.is-open { display: block; }
  .foot-in { flex-direction: column; align-items: flex-start; }
  .row { grid-template-columns: 1fr; gap: 6px; }
  .row .leader { display: none; }
  .row span { text-align: left; }
  .bar { grid-template-columns: 3.2rem minmax(0, 1fr) 3.6rem; gap: 10px; }
  .bw { --pane-w: 100%; --pane-h: 232px; --demo-h: 760px; }
  .win-body, .bw[data-pane="open"] .win-body { grid-template-columns: minmax(0, 1fr); }
  .win-body { grid-template-rows: 0px minmax(0, 1fr); transition-property: grid-template-rows; }
  .bw[data-pane="open"] .win-body { grid-template-rows: var(--pane-h) minmax(0, 1fr); }
  .pane { border-right: 0; border-bottom: 1px solid transparent; }
  .bw[data-pane="open"] .pane { border-right-color: transparent; border-bottom-color: var(--line); }
  .pane-in { min-width: 0; min-height: calc(var(--pane-h) - 1px); }
  .composer textarea, .composer .mention { font-size: 16px; }
}
@media (max-width: 480px) {
  .hero-copy .cta-row .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .typing i, .btn-spin, .task[data-state="running"] .st, .flash, .blk.fresh .cat, .blk.fresh .ch, .blk.fresh .role { animation: none; }
  .msg, .task, .rise, .embed.skel-embed, .bw[data-stage="start"] .start-mark, .bw[data-stage="start"] .start-h, .bw[data-stage="start"] .composer-wrap, .bw[data-stage="start"] .cards { animation: none; }
  .bar-s { animation-duration: 3s; }
  html { scroll-behavior: auto; }
  .btn, .card, .btn-new, .send, .toggle button, .faq summary::after { transition-duration: 0.01ms; }
  .win-body, .pane, .pane-in, .bw[data-pane="open"] .pane-in, .chat-head, .composer-wrap, .composer, .ch, .ch .lock, .role, .role i, .cat, .staff-chip, .task .st, .task .st::after, .embed-head .dot, .btn-arrow { transition-duration: 0.01ms; transition-delay: 0s; }
}

/* ---- values that used to be inline styles (kept in CSS so the page can run a strict CSP) ---- */
.av-1 { background: #be2f86; } .av-2 { background: #e67e22; } .av-3 { background: #1abc9c; }
.av-4 { background: #9b59b6; } .av-5 { background: #3498db; } .av-6 { background: #e74c3c; }
.rd-free { background: #9ba1ae; } .rd-pro { background: var(--blurple); } .rd-ultra { background: var(--amber); }
.fill-free { width: max(6px, 1.667%); background: #9ba1ae; } .fill-pro { width: 25%; background: var(--blurple); } .fill-ultra { width: 100%; background: var(--amber); }
.finale-solo { border-top: 1px solid var(--line); }
.finale-solo .finale-copy { max-width: 640px; }

/* ==========================================================================
   Dashboard window (features: dashboard). Example data only.
   ========================================================================== */
.dispatch-copy .link-quiet { justify-self: start; }
.dash .win-top .where { gap: 8px; font-weight: 600; font-size: 0.85rem; color: var(--muted); }
.lockico { width: 13px; height: 13px; color: var(--green-text); }
.dash-body { display: grid; grid-template-columns: 168px minmax(0, 1fr); }
.dash-nav { display: flex; flex-direction: column; gap: 2px; padding: 12px 10px; background: var(--bg-1); border-right: 1px solid var(--line); }
.dash-srv { display: flex; align-items: center; gap: 9px; padding: 4px 8px 12px; margin-bottom: 8px; border-bottom: 1px solid var(--line); font-stretch: 106%; font-weight: 800; font-size: 0.98rem; }
.dash-srv img { width: 24px; height: 24px; border-radius: 7px; }
.dash-tab { display: flex; align-items: center; gap: 9px; width: 100%; padding: 0.6em 0.7em; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-stretch: 104%; font-weight: 650; font-size: 0.92rem; text-align: left; cursor: pointer; transition: background-color 160ms ease, color 160ms ease, transform 160ms var(--ease-out); }
.dash-tab svg { width: 16px; height: 16px; flex: none; }
.dash-tab:active { transform: scale(0.98); }
.dash-tab.is-on { background: var(--surface-3); color: var(--text); }
@media (hover: hover) and (pointer: fine) { .dash-tab:hover:not(.is-on) { background: var(--surface); color: var(--text); } }

.dash-main { display: grid; min-width: 0; padding: 16px 18px 18px; }
.dash-panel { grid-area: 1 / 1; min-width: 0; display: flex; flex-direction: column; gap: 14px; opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity 200ms ease, transform 240ms var(--ease-out), visibility 200ms; }
.dash-panel.is-on { opacity: 1; visibility: visible; transform: none; }
.dash-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; }
.dash-head h4 { margin: 0; font-stretch: 110%; font-weight: 800; font-size: 1.15rem; letter-spacing: -0.01em; }
.live { display: inline-flex; align-items: center; gap: 6px; font-size: 0.78rem; font-weight: 650; color: var(--green-text); }
.live i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); animation: livepulse 2s infinite ease-in-out; }
@keyframes livepulse { 50% { opacity: 0.35; } }
.ranges { margin-left: auto; display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg-1); }
.ranges button { appearance: none; border: 0; background: transparent; padding: 0.35em 0.7em; border-radius: 6px; font-stretch: 106%; font-weight: 700; font-size: 0.8rem; color: var(--muted); cursor: pointer; transition: background-color 160ms ease, color 160ms ease, transform 160ms var(--ease-out); }
.ranges button:active { transform: scale(0.96); }
.ranges button[aria-pressed="true"] { background: var(--blurple-soft); color: var(--blurple-text); }
@media (hover: hover) and (pointer: fine) { .ranges button:hover:not([aria-pressed="true"]) { color: var(--text); } }

.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.tiles-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tile { display: grid; gap: 2px; padding: 11px 12px; background: var(--bg-1); border: 1px solid var(--line); border-radius: 10px; min-width: 0; }
.t-label { font-stretch: 106%; font-weight: 650; font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); }
.t-val { font-stretch: 114%; font-weight: 800; font-size: 1.6rem; letter-spacing: -0.03em; line-height: 1.15; }
.t-delta { min-height: 1.2em; font-size: 0.78rem; font-weight: 650; color: var(--muted); }
.t-delta.up { color: var(--green-text); }

.chart { padding: 12px 14px 10px; background: var(--bg-1); border: 1px solid var(--line); border-radius: 10px; }
.chart-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.readout { font-size: 0.82rem; color: var(--muted); text-align: right; }
.bars { display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); align-items: end; gap: 3px; height: 112px; margin-top: 10px; }
.bar-col { position: relative; height: 100%; display: flex; align-items: flex-end; }
.bar-fill { display: block; width: 100%; height: 100%; border-radius: 3px 3px 1px 1px; background: var(--blurple); opacity: 0.55; transform-origin: bottom; transform: scaleY(0); transition: opacity 140ms ease, background-color 140ms ease; }
.bar-col.is-peak .bar-fill { opacity: 0.95; }
@media (hover: hover) and (pointer: fine) { .bar-col:hover .bar-fill { opacity: 1; background: var(--blurple-text); } }
.axis { display: flex; justify-content: space-between; margin-top: 6px; font-size: 0.72rem; color: var(--faint); }

.chans { display: grid; gap: 8px; }
.chan { display: grid; grid-template-columns: 7.2rem minmax(0, 1fr) 3.6rem; align-items: center; gap: 10px; font-size: 0.86rem; }
.chan .nm { color: var(--muted); font-weight: 550; }
.chan .track { height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.chan .fill { display: block; height: 100%; width: 100%; border-radius: 4px; background: var(--blurple); transform-origin: 0 50%; transform: scaleX(0); }
.chan b { text-align: right; font-stretch: 106%; font-weight: 700; }

.feed-list { display: grid; gap: 6px; }
.frow { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto auto; align-items: center; gap: 10px; padding: 9px 10px; background: var(--bg-1); border: 1px solid var(--line); border-radius: 10px; }
.frow .av { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 0.72rem; font-weight: 800; color: #fff; }
.fmain { min-width: 0; }
.fmain b { display: block; font-stretch: 104%; font-weight: 650; font-size: 0.88rem; line-height: 1.25; }
.fmain small { display: block; font-size: 0.78rem; color: var(--faint); line-height: 1.3; }
.frow time { min-width: 4.2rem; text-align: right; font-size: 0.76rem; color: var(--faint); white-space: nowrap; }
.sev, .st-chip { padding: 0.2em 0.6em; border-radius: 5px; font-size: 0.72rem; font-weight: 700; white-space: nowrap; }
.sev-high { background: rgba(242, 63, 67, 0.16); color: #ff8a8d; }
.sev-med { background: var(--surface-3); color: var(--muted); }
.st-open { background: rgba(35, 165, 90, 0.16); color: var(--green-text); }
.st-wait { background: var(--blurple-soft); color: var(--blurple-text); }
.st-closed { background: var(--surface-3); color: var(--faint); }

@media (max-width: 760px) {
  .dash-body { grid-template-columns: 1fr; }
  .dash-nav { flex-direction: row; border-right: 0; border-bottom: 1px solid var(--line); padding: 8px; }
  .dash-srv { display: none; }
  .dash-tab { flex: 1; justify-content: center; padding: 0.6em 0.3em; font-size: 0.88rem; }
  .dash-tab svg { display: none; }
  .dash-main { padding: 14px 12px 16px; }
  .ranges { margin-left: 0; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tiles-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tiles-3 .t-val { font-size: 1.3rem; }
  .tiles-3 .t-label { font-size: 0.66rem; letter-spacing: 0.03em; }
  .frow { grid-template-columns: 30px minmax(0, 1fr) auto; }
  .frow time { display: none; }
  .chan { grid-template-columns: 6rem minmax(0, 1fr) 3.2rem; }
}
@media (prefers-reduced-motion: reduce) { .live i { animation: none; } .dash-panel, .dash-tab, .ranges button { transition-duration: 0.01ms; } }

/* ==========================================================================
   Mobile polish. Everything below sits inside a phone-width query, so nothing
   here reaches the desktop layout. Verified at 320, 360, 390, 430 and 600.
   ========================================================================== */

/* feature "Add to Server" row (used on every channel of the Features section) */
.dispatch-copy .cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-top: 6px; }

/* stacked layouts: a bare 1fr track can't shrink below its content, so use minmax(0, 1fr) */
@media (max-width: 1040px) {
  .hero-in, .uses-grid, .faq-grid, .ledger-grid, .finale-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .book-grid, .dispatches, .dispatch { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 760px) {
  html { -webkit-tap-highlight-color: transparent; }
  .btn, .card, .send, .btn-new, .toggle button, .ranges button, .dash-tab, .nav-burger, .faq summary { touch-action: manipulation; }

  /* grid items must be allowed to shrink below their content, or one wide row stretches the page */
  .tariff-grid { grid-template-columns: minmax(0, 1fr); }
  .nav-sheet a:not(.btn) { padding: 1em 0; }

  /* hero demo: the pane stacks above the chat; a definite height keeps the feed scrolling inside it */
  .card { padding-block: 11px; }

  /* dashboard demo */
  .ranges button { padding: 0.55em 0.8em; min-height: 36px; }
  .tile { align-content: start; }
  .chan { grid-template-columns: 6.7rem minmax(0, 1fr) 3.8rem; font-size: 0.82rem; }
  .chan .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .chart-head { flex-wrap: wrap; gap: 2px 12px; }
  .readout { text-align: left; }

  .foot-links a { display: inline-block; padding-block: 0.3em; }
  .faq details p { padding-right: 0; }
  .faq summary { padding: 20px 0; gap: 16px; }
}

@media (max-width: 480px) {
  .dispatch-copy .cta-row { gap: 14px; }
  .dispatch-copy .cta-row .btn { width: 100%; }

  .toggle { width: 100%; }
  .toggle button { flex: 1; justify-content: center; padding: 0.75em 0.5em; }
  .toggle button:first-child { flex: 0 0 auto; padding-inline: 1.1em; }
  .save-tag { font-size: 0.64rem; padding: 0.25em 0.45em; letter-spacing: 0.04em; }

  .tier { padding: 28px 22px 30px; }
  .tier-title { font-size: 1.7rem; }
  .tag-pop, .tag-deal { font-size: 0.66rem; letter-spacing: 0.06em; padding: 0.4em 0.6em; }
  .bar { grid-template-columns: 3rem minmax(0, 1fr) 3.2rem; gap: 8px; }
  .bar .num { font-size: 1.45rem; }
  .row b { font-size: 1.08rem; }
  .included-in { gap: 10px 26px; padding-block: 20px; }
}

@media (max-width: 400px) {
  .bw { --demo-h: 780px; }
  h1.display { font-size: clamp(2.2rem, 11vw, 2.5rem); }

  /* tighter chat chrome so the plan fits */
  .win-top { padding: 0 12px; }
  .feed { padding: 10px 12px 4px; gap: 8px; }
  .msg { grid-template-columns: 28px minmax(0, 1fr); gap: 8px; }
  .msg .avatar { width: 28px; height: 28px; font-size: 0.72rem; }
  .embed { padding: 12px 12px; }
  .composer-wrap { padding: 0 12px 10px; }
  .cards { padding-inline: 12px; }
  .chat-head { padding: 0 8px 0 12px; }

  /* dashboard demo */
  .dash-main { padding: 12px 10px 14px; }
  .t-val { font-size: 1.35rem; }
  .tile { padding: 10px; }
  .t-delta { font-size: 0.72rem; }
  .chan { grid-template-columns: 6.5rem minmax(0, 1fr) 3.6rem; gap: 6px; }
  .dash-tab { font-size: 0.82rem; }
  .ranges button { padding: 0.55em 0.65em; }

  #tier-pro .price .amt, #tier-ultra .price .amt { font-size: 2.2rem; }
  .price .amt { font-size: 2.4rem; }
  .price { gap: 8px; }
  .price .per { font-size: 0.9rem; }
  .price .was { font-size: 1rem; }
}

@media (max-width: 359px) {
  .tier { padding: 26px 18px 28px; }
  .tier-name { gap: 8px; }
  .tier-title { font-size: 1.55rem; }
  #tier-pro .price .amt, #tier-ultra .price .amt { font-size: 2rem; }
  .nav-brand span { font-size: 1.25rem; }
}

/* ==========================================================================
   Content pages: landing pages, FAQ, comparisons and the blog.
   Same tokens and type as the rest of the site; long-form text gets a
   narrower measure and calmer rhythm.
   ========================================================================== */
.doc-head { max-width: var(--max); }
.doc-head > * { max-width: 880px; }
.p-head .cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; font-size: 0.9rem; color: var(--faint); }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--line-strong); }
.crumbs a { color: var(--muted); text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .crumbs a:hover { color: var(--text); text-decoration: underline; } }

.doc { padding-block: clamp(48px, 7vw, 96px); border-top: 1px solid var(--line); }
.doc-alt { background: var(--bg-1); }
.doc-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.doc-grid > .display { position: sticky; top: calc(var(--nav-h) + 24px); }

.prose { max-width: 68ch; color: var(--muted); }
.prose > * + * { margin-top: 1.1em; }
.prose > :first-child { margin-top: 0; }
.prose h2 { margin-top: 2.2em; color: var(--text); font-stretch: 110%; font-weight: 800; font-size: clamp(1.45rem, 2.2vw, 1.85rem); line-height: 1.15; letter-spacing: -0.02em; text-wrap: balance; }
.prose h3 { margin-top: 1.8em; color: var(--text); font-stretch: 108%; font-weight: 750; font-size: 1.18rem; line-height: 1.3; }
.prose h2 + *, .prose h3 + * { margin-top: 0.6em; }
.prose p, .prose ul, .prose ol { margin-bottom: 0; text-wrap: pretty; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: 0.45em; }
.prose li::marker { color: var(--faint); }
.prose strong { color: var(--text); font-weight: 650; }
.prose a { color: var(--blurple-text); font-weight: 600; }
.prose code { font-size: 0.9em; color: var(--text); background: var(--surface-2); padding: 0.1em 0.4em; border-radius: 5px; }
.prose pre { overflow-x: auto; padding: 16px 18px; background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--radius); }
.prose pre code { background: none; padding: 0; }
.prose blockquote { margin-inline: 0; padding: 4px 0 4px 18px; border-left: 3px solid var(--blurple); color: var(--text); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin-block: 2.2em; }
.prose img { height: auto; border-radius: var(--radius); border: 1px solid var(--line-strong); }
.prose figure { margin: 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 12px 14px 12px 0; border-bottom: 1px solid var(--line); }
.prose th { color: var(--text); font-stretch: 106%; font-weight: 700; }
.table-scroll { overflow-x: auto; }

/* example requests, styled like a message to Flo */
.asks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.asks li { padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; color: var(--text); line-height: 1.45; }
.asks li small { display: block; margin-top: 6px; color: var(--faint); font-size: 0.86rem; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; counter-reset: step; }
.steps li { position: relative; padding: 20px 20px 20px 64px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; counter-increment: step; }
.steps li::before { content: counter(step); position: absolute; left: 20px; top: 18px; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--blurple-soft); color: var(--blurple-text); font-weight: 800; }
.steps b { display: block; color: var(--text); font-stretch: 106%; font-size: 1.05rem; }
.steps p { margin: 6px 0 0; }

/* questions and answers, open on the page so they read without JavaScript */
.qa { display: grid; border-top: 1px solid var(--line-strong); }
.qa-item { padding: 24px 0; border-bottom: 1px solid var(--line); }
.qa-item h2, .qa-item h3 { margin: 0 0 8px; color: var(--text); font-stretch: 108%; font-weight: 700; font-size: 1.15rem; line-height: 1.3; }
.qa-item p { margin: 0; color: var(--muted); max-width: 66ch; text-wrap: pretty; }
.qa-item p + p { margin-top: 0.7em; }
.qa-item a { color: var(--blurple-text); font-weight: 600; }

/* related pages */
.related { padding-block: clamp(48px, 7vw, 88px); border-top: 1px solid var(--line); }
.related h2 { margin-bottom: 24px; }
.related-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.related-grid a { display: grid; gap: 6px; height: 100%; padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; text-decoration: none; transition: border-color 160ms ease, background-color 160ms ease; }
.related-grid b { font-stretch: 106%; font-weight: 700; }
.related-grid span { color: var(--muted); font-size: 0.92rem; line-height: 1.45; }
@media (hover: hover) and (pointer: fine) { .related-grid a:hover { border-color: var(--muted); background: var(--surface-2); } }

/* call to action box (blog posts, comparison pages) */
.cta-box { display: grid; gap: 14px; padding: clamp(22px, 3vw, 32px); background: #14162c; border: 1px solid var(--blurple); border-radius: 16px; }
.cta-box h2 { margin: 0; color: var(--text); font-stretch: 110%; font-weight: 800; font-size: 1.45rem; letter-spacing: -0.02em; }
.cta-box p { margin: 0; color: var(--muted); }
.cta-box .cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }

/* blog */
.post-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0; color: var(--faint); font-size: 0.95rem; }
.post-head > * { max-width: 780px; }
.post-body { padding-block: clamp(40px, 6vw, 80px); border-top: 1px solid var(--line); }
.post-body .wrap { display: grid; gap: clamp(40px, 6vw, 64px); }
.post-body .prose { font-size: 1.1rem; line-height: 1.7; }
.post-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-strong); }
.post-list li { padding: 26px 0; border-bottom: 1px solid var(--line); display: grid; gap: 8px; }
.post-list h2 { margin: 0; font-stretch: 110%; font-weight: 800; font-size: clamp(1.3rem, 2vw, 1.6rem); line-height: 1.2; letter-spacing: -0.02em; }
.post-list h2 a { text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .post-list h2 a:hover { text-decoration: underline; text-decoration-color: var(--blurple-text); } }
.post-list p { margin: 0; color: var(--muted); max-width: 68ch; }
.draft-flag { display: inline-block; padding: 0.2em 0.6em; border-radius: 5px; background: rgba(240, 178, 50, 0.14); color: var(--amber); font-size: 0.78rem; font-weight: 700; }
.empty-note { padding: 26px 0; color: var(--muted); }

/* the hero demo needs JavaScript; this describes it when there is none */
.demo-noscript { margin-top: 12px; color: var(--muted); font-size: 0.95rem; }

/* footer site map */
.foot-map { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; max-width: var(--max); margin-inline: auto; padding: 40px var(--gutter) 8px; }
.foot-map p { margin: 0 0 12px; color: var(--faint); }
.foot-map ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 0.92rem; }
.foot-map a { color: var(--muted); text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .foot-map a:hover { color: var(--text); text-decoration: underline; } }

@media (max-width: 1040px) {
  .doc-grid { grid-template-columns: minmax(0, 1fr); }
  .doc-grid > .display { position: static; }
  .related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot-map { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .related-grid { grid-template-columns: minmax(0, 1fr); }
  .steps li { padding-left: 58px; }
  .cta-box .btn { width: 100%; }
}

/* ==========================================================================
   Merged additions: home builder section, compare tables (status icons, Flo
   column), the compare hub note and the features page plan lines.
   ========================================================================== */
.ledger-builder + .book { border-top: 0; }

.ico { display: inline-block; position: relative; width: 1.15em; height: 1.15em; margin-right: 0.45em; border-radius: 50%; vertical-align: -0.2em; flex: none; }
.ico::before, .ico::after { content: ""; position: absolute; }
.ico-yes { background: rgba(35, 165, 90, 0.2); box-shadow: inset 0 0 0 1.5px var(--green); }
.ico-yes::after { left: 0.36em; top: 0.18em; width: 0.26em; height: 0.5em; border-right: 2px solid var(--green-text); border-bottom: 2px solid var(--green-text); transform: rotate(45deg); }
.ico-no { background: rgba(242, 63, 67, 0.16); box-shadow: inset 0 0 0 1.5px var(--red); }
.ico-no::before, .ico-no::after { left: 50%; top: 50%; width: 0.6em; height: 2px; margin: -1px 0 0 -0.3em; background: #ff8a8d; border-radius: 1px; }
.ico-no::before { transform: rotate(45deg); }
.ico-no::after { transform: rotate(-45deg); }
.ico-part { background: rgba(240, 178, 50, 0.18); box-shadow: inset 0 0 0 1.5px var(--amber); }
.ico-part::before { left: 50%; top: 0.2em; width: 2px; height: 0.45em; margin-left: -1px; background: var(--amber); border-radius: 1px; }
.ico-part::after { left: 50%; bottom: 0.2em; width: 3px; height: 3px; margin-left: -1.5px; background: var(--amber); border-radius: 50%; }

.table-scroll { -webkit-overflow-scrolling: touch; }
.table-scroll:focus-visible { outline-offset: 0; }
.table-scroll.is-compare { border: 1px solid var(--line); border-radius: 10px; background: var(--bg-1); }
.is-compare table { min-width: 34rem; line-height: 1.45; }
.is-compare th, .is-compare td { padding: 0.7em 0.9em; }
.is-compare th { background: var(--surface); white-space: nowrap; }
.is-compare td { min-width: 9rem; }
.is-compare tr:last-child td { border-bottom: 0; }
.is-compare th:nth-child(2) { color: var(--blurple-text); font-weight: 800; background: rgba(88, 101, 242, 0.16); }
.is-compare td:nth-child(2) { background: rgba(88, 101, 242, 0.07); color: var(--text); }
.is-compare td:first-child { color: var(--text); font-weight: 600; }

.how-we-compare { margin-top: clamp(40px, 6vw, 72px); max-width: 62ch; }
.how-we-compare h2 { margin: 0 0 12px; font-stretch: 112%; font-weight: 800; font-size: clamp(1.4rem, 2.4vw, 1.8rem); letter-spacing: -0.02em; }
.how-we-compare p { margin: 0 0 12px; color: var(--muted); text-wrap: pretty; }
.how-we-compare a { color: var(--blurple-text); font-weight: 600; }

.feat-plan { margin: 0; font-size: 0.95rem; line-height: 1.45; color: var(--faint); text-wrap: pretty; }
.feat-plan strong { color: var(--muted); font-weight: 650; }

/* long tables must scroll inside their own box, not stretch the post column */
.post-body .wrap { grid-template-columns: minmax(0, 1fr); }
.prose { min-width: 0; overflow-wrap: break-word; }
.toc { padding: 18px 22px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; max-width: 68ch; }
.toc h2 { margin: 0 0 10px; }
.toc ol { display: grid; gap: 8px; margin: 0; padding-left: 1.2em; font-size: 0.97rem; line-height: 1.4; color: var(--faint); }
.toc a { color: var(--muted); }
@media (hover: hover) and (pointer: fine) { .toc a:hover { color: var(--text); } }

/* ==========================================================================
   Feature demos (js/demos.js, markup from scripts/demos-html.js).
   Each demo ships in its finished state: .on / .lit are baked into the HTML,
   so crawlers, no-JS visitors and reduced-motion visitors see the end result.
   The script rewinds to step 0 and plays when the demo scrolls into view.
   ========================================================================== */
.demo { --d-h: 400px; container: demo / inline-size; }
.demo .d-tools { display: flex; align-items: center; gap: 10px; }
.d-replay { appearance: none; border: 0; background: transparent; padding: 0.35em 0.65em; border-radius: 6px; cursor: pointer; color: var(--muted); font-stretch: 104%; font-weight: 650; font-size: 0.8rem; transition: background-color 160ms ease, color 160ms ease, transform 160ms var(--ease-out); }
.d-replay:active { transform: scale(0.97); }
.d-replay[hidden] { display: none; }
@media (hover: hover) and (pointer: fine) { .d-replay:hover { background: var(--surface-3); color: var(--text); } }

.d-body { display: grid; grid-template-columns: 188px minmax(0, 1fr); height: var(--d-h); }
.d-body.no-side { grid-template-columns: minmax(0, 1fr); }
.d-side { min-width: 0; overflow: hidden; padding: 6px 8px 10px; background: var(--bg-1); border-right: 1px solid var(--line); }
.d-side .cat { padding-top: 12px; }
.d-side .ch { color: var(--faint); min-width: 0; white-space: nowrap; transition: background-color 240ms ease, color 240ms ease; }
.d-side .ch svg { width: 15px; height: 15px; flex: none; }
.d-side .ch.lit { background: var(--surface-3); color: var(--text); }
.d-side .ch.is-new { color: var(--text); }
.dm.on .ch.is-new { animation: flash 1.4s ease-out; }

.d-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--surface); }
.d-head { flex: none; display: grid; align-items: center; height: 40px; padding: 0 16px; border-bottom: 1px solid var(--line); font-stretch: 106%; font-weight: 700; font-size: 0.92rem; }
.d-head > span { display: flex; align-items: center; gap: 8px; }
.d-head svg { width: 17px; height: 17px; color: var(--faint); flex: none; }
.d-views { flex: 1; min-height: 0; display: grid; }
.d-views > * { grid-area: 1 / 1; min-height: 0; }
.d-view { display: flex; flex-direction: column; min-height: 0; }
.d-feed { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; padding: 0 16px; -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 26px); mask-image: linear-gradient(to bottom, transparent 0, #000 26px); }
.d-feed.top { justify-content: flex-start; padding-top: 8px; -webkit-mask-image: none; mask-image: none; }
.d-comp { flex: none; margin: 4px 16px 14px; padding: 0.7em 0.95em; background: var(--surface-2); border-radius: 8px; color: var(--faint); font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* the two visibility kinds: .dm collapses its box (a message arriving or going), .fx fades in place */
.dm { display: grid; grid-template-rows: 1fr; opacity: 1; transition: grid-template-rows 420ms var(--ease-out), opacity 300ms var(--ease-out); }
.dm > .dm-in { min-height: 0; overflow: hidden; padding-block: 5px; transition: transform 420ms var(--ease-out); }
.dm:not(.on) { grid-template-rows: 0fr; opacity: 0; visibility: hidden; transition: grid-template-rows 360ms var(--ease-out), opacity 220ms ease, visibility 0s linear 360ms; }
.dm:not(.on) > .dm-in { transform: translateY(10px); padding-block: 0; }
.dm.d2 { transition-delay: 140ms; } .dm.d3 { transition-delay: 280ms; }
.stack { display: grid; }
.stack > * { grid-area: 1 / 1; }
.is-snap .dm, .is-snap .dm > .dm-in, .is-snap .fx, .is-snap .msg, .is-snap .d-embed, .is-snap .dt .st, .is-snap .dt .st::after, .is-snap .d-btn, .is-snap .d-act, .is-snap .ch { transition: none !important; }
.fx { opacity: 1; transition: opacity 280ms var(--ease-out) 120ms; }
.fx:not(.on) { opacity: 0; visibility: hidden; transition: opacity 200ms ease, visibility 0s linear 200ms; }

.demo .msg { padding: 2px 0; border-radius: 6px; transition: background-color 260ms ease, box-shadow 260ms ease; }
.demo .msg.cont .avatar { visibility: hidden; height: 0; }
.demo .msg.cont p { margin: 0; }
.demo .typing { padding: 12px 0 6px; }
.dm.lit .msg { background: rgba(242, 63, 67, 0.1); box-shadow: inset 3px 0 0 var(--red); }
.d-chip { display: inline-flex; align-items: center; padding: 0.15em 0.5em; border-radius: 4px; font-size: 0.68rem; font-weight: 750; letter-spacing: 0.02em; background: rgba(242, 63, 67, 0.16); color: #ff8a8d; }
.d-chip.ok { background: rgba(35, 165, 90, 0.16); color: var(--green-text); }
.d-link { color: var(--blurple-text); text-decoration: underline; text-decoration-color: rgba(154, 164, 255, 0.4); overflow-wrap: anywhere; }
.d-meta { display: flex; align-items: center; gap: 8px; padding-left: 42px; font-size: 0.8rem; color: #ff8a8d; }
.d-sys { display: flex; align-items: center; gap: 10px; padding: 4px 2px; font-size: 0.92rem; color: var(--muted); }
.d-sys svg { width: 18px; height: 18px; flex: none; color: var(--green-text); }
.d-sys b { color: var(--text); font-weight: 700; }

.d-embed { margin-top: 6px; padding: 10px 14px 12px; background: var(--bg-1); border: 1px solid var(--line); border-left: 3px solid var(--blurple); border-radius: 6px; transition: border-left-color 300ms ease; }
.d-embed.lit { border-left-color: var(--green); }
.d-et { display: grid; font-stretch: 106%; font-weight: 750; font-size: 0.95rem; }
.d-et > span { grid-area: 1 / 1; display: flex; align-items: center; gap: 8px; }
.d-et .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--blurple); flex: none; transition: background-color 300ms ease; }
.d-et .dot.ok { background: var(--green); }
.d-ed { margin: 6px 0 0; font-size: 0.9rem; line-height: 1.45; color: var(--muted); }
.d-ed b { color: var(--text); font-weight: 650; }
.d-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px 16px; margin-top: 10px; }
.d-f b { display: block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--faint); }
.d-f span { display: block; margin-top: 2px; font-size: 0.88rem; line-height: 1.35; color: var(--text); text-wrap: pretty; }
.d-sev { color: #ff8a8d; font-weight: 700; }
.d-tasks { display: grid; gap: 6px; margin: 10px 0 0; padding: 0; list-style: none; }
.dt { display: grid; grid-template-columns: 18px minmax(0, 1fr); align-items: start; gap: 8px; font-size: 0.86rem; line-height: 1.35; color: var(--text); }
.dt .st { position: relative; width: 16px; height: 16px; margin-top: 1px; border-radius: 50%; border: 1.5px solid var(--line-strong); transition: border-color 200ms ease, background-color 200ms ease; }
.dt .st::after { content: ""; position: absolute; left: 4px; top: 2px; width: 4px; height: 7px; border-right: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(45deg) scale(0); transition: transform 240ms var(--ease-out); }
.dt.lit .st { background: var(--green); border-color: var(--green); }
.dt.lit .st::after { transform: rotate(45deg) scale(1); }
.dt.t2 .st, .dt.t2 .st::after { transition-delay: 160ms; }
.d-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.d-note { font-size: 0.78rem; color: var(--faint); }

.d-btn { appearance: none; border: 0; display: inline-flex; align-items: center; gap: 7px; padding: 0.55em 1em; border-radius: 6px; background: var(--blurple); color: #fff; font: inherit; font-stretch: 104%; font-weight: 650; font-size: 0.84rem; line-height: 1.2; cursor: default; transition: transform 160ms var(--ease-out), filter 160ms ease; }
.d-btn svg { width: 15px; height: 15px; flex: none; }
.d-btn.grey { background: var(--surface-3); color: var(--text); }
button.d-btn { cursor: pointer; }
.d-btn.lit { transform: scale(0.94); filter: brightness(0.82); }
.d-act { appearance: none; display: inline-flex; align-items: center; gap: 7px; margin-top: 8px; padding: 0.4em 0.8em; border: 1px solid var(--line-strong); border-radius: 6px; background: transparent; color: var(--muted); font: inherit; font-stretch: 104%; font-weight: 650; font-size: 0.8rem; cursor: pointer; transition: transform 160ms var(--ease-out), background-color 160ms ease, color 160ms ease, border-color 160ms ease; }
.d-act svg { width: 14px; height: 14px; flex: none; }
.d-act.lit { background: var(--surface-3); color: var(--text); transform: scale(0.95); }
@media (hover: hover) and (pointer: fine) { .d-act:hover { color: var(--text); border-color: var(--muted); } }
.d-act:active, button.d-btn:active { transform: scale(0.95); }
.is-waiting [data-trigger] { animation: d-pulse 1.7s ease-out infinite; }
@keyframes d-pulse { 0% { box-shadow: 0 0 0 0 rgba(154, 164, 255, 0.5); } 70%, 100% { box-shadow: 0 0 0 9px rgba(154, 164, 255, 0); } }

.d-ref { display: flex; align-items: center; gap: 6px; min-width: 0; margin-bottom: 3px; font-size: 0.78rem; color: var(--muted); }
.d-ref img { width: 16px; height: 16px; flex: none; border-radius: 50%; background: var(--surface-3); }
.d-ref b { color: var(--text); font-weight: 700; flex: none; }
.d-ref span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.d-ref .arrow { width: 14px; height: 14px; flex: none; color: var(--faint); }

.d-sticky { margin-top: 2px; padding-bottom: 6px; }
.d-sticky.bump .d-embed { animation: d-bump 700ms var(--ease-out); }
@keyframes d-bump { 0% { opacity: 0.2; transform: translateY(-6px); } 100% { opacity: 1; transform: none; } }
.d-pin { display: inline-flex; align-items: center; gap: 4px; padding: 0.15em 0.5em; border-radius: 4px; background: var(--blurple-soft); color: var(--blurple-text); font-size: 0.68rem; font-weight: 750; letter-spacing: 0.04em; text-transform: uppercase; }
.d-pin svg { width: 10px; height: 10px; }

/* voice: the sidebar is the star, the log sits beside it */
.vc-join { appearance: none; width: 100%; border: 0; background: transparent; text-align: left; font: inherit; cursor: pointer; }
.vc-join, .vc-room { display: flex; align-items: center; gap: 7px; padding: 0.3em 0.55em; border-radius: 5px; font-stretch: 104%; font-weight: 550; font-size: 0.9rem; line-height: 1.35; color: var(--faint); white-space: nowrap; }
.vc-room { color: var(--text); }
.vc-join svg, .vc-room svg { width: 15px; height: 15px; flex: none; }
.vc-user { display: flex; align-items: center; gap: 8px; margin-left: 22px; padding: 0.15em 0.4em; font-size: 0.84rem; color: var(--muted); }
.vc-user .avatar { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 0.62rem; font-weight: 800; color: #fff; }
.d-ev { display: flex; align-items: flex-start; gap: 10px; font-size: 0.9rem; line-height: 1.4; color: var(--muted); }
.d-ev i { flex: none; width: 8px; height: 8px; margin-top: 0.5em; border-radius: 50%; background: var(--blurple-text); }
.d-ev b { color: var(--text); font-weight: 650; }

/* narrow window: the channel list gives way to the chat (voice keeps it, stacked above) */
@container demo (max-width: 560px) {
  .d-body { grid-template-columns: minmax(0, 1fr); }
  .d-side:not(.keep) { display: none; }
  .d-body.vc { grid-template-rows: auto minmax(0, 1fr); }
  .d-body.vc .d-side { border-right: 0; border-bottom: 1px solid var(--line); }
  .d-feed { padding-inline: 12px; }
  .d-head { padding-inline: 12px; }
  .d-comp { margin-inline: 12px; }
  .d-meta { padding-left: 38px; }
}
@container demo (max-width: 380px) {
  .demo .msg { grid-template-columns: 28px minmax(0, 1fr); gap: 8px; }
  .demo .msg .avatar { width: 28px; height: 28px; font-size: 0.72rem; }
  .d-meta { padding-left: 36px; }
  .d-embed { padding: 10px 11px 12px; }
}
.demo.is-tall { --d-h: 480px; }
@media (max-width: 760px) { .demo { --d-h: 440px; } .demo.is-tall { --d-h: 480px; } }

@media (prefers-reduced-motion: reduce) {
  .dm, .dm > .dm-in, .fx, .d-btn, .d-act, .d-side .ch, .demo .msg, .d-embed, .d-et .dot, .dt .st, .dt .st::after { transition-duration: 0.01ms; transition-delay: 0s; }
  .dm.d2, .dm.d3 { transition-delay: 0s; }
  .is-waiting [data-trigger], .dm.on .ch.is-new, .d-sticky.bump .d-embed { animation: none; }
}

/* the demos inside long-form pages */
.prose .demo-fig { margin: 8px 0 0; }
.prose .demo .msg p, .prose .demo .d-ed { margin: 0; }
.prose .demo .msg p { margin-top: 3px; }

.demo-fig figcaption { margin-top: 12px; }
.dm .d-row { margin-top: 0; }

/* voice demo: a stage of seats that fill as people join the room */
.demo[data-demo="vc"] { --d-h: 450px; }
.vc-stage { flex: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; padding: 14px 16px 6px; }
.vc-slot { position: relative; min-height: 104px; border: 1.5px dashed var(--line-strong); border-radius: 10px; }
.vc-tile { position: absolute; inset: -1.5px; display: grid; align-content: center; justify-items: center; gap: 8px; min-width: 0; background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: 10px; }
.vc-tile .avatar { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 1rem; color: #fff; }
.vc-tile .avatar.is-speaking { box-shadow: 0 0 0 3px var(--surface-2), 0 0 0 5px var(--green); }
.vc-tile b { max-width: 100%; padding-inline: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-stretch: 104%; font-weight: 650; font-size: 0.82rem; }
.vc-count { margin-left: 4px; font-style: normal; font-weight: 550; font-size: 0.8rem; color: var(--faint); }
.d-body.vc .d-feed.top { padding-top: 6px; }
@container demo (max-width: 560px) {
  .d-hide-sm { display: none; }
  .vc-stage { gap: 6px; padding: 10px 12px 4px; }
  .vc-slot { min-height: 84px; }
  .vc-tile .avatar { width: 38px; height: 38px; font-size: 0.9rem; }
  .vc-tile b { font-size: 0.74rem; }
  .d-body.vc .d-feed.top { justify-content: flex-end; }
}
@media (max-width: 760px) { .demo[data-demo="vc"] { --d-h: 600px; } }
.d-side .dm > .dm-in { padding-block: 0; }
.vc-note { flex: none; margin: auto 16px 14px; padding: 10px 14px; display: grid; gap: 2px; background: var(--bg-1); border: 1px solid var(--line); border-radius: 10px; font-size: 0.84rem; line-height: 1.4; color: var(--muted); }
.vc-note b { color: var(--text); font-stretch: 106%; font-weight: 700; font-size: 0.86rem; }
@container demo (max-width: 560px) { .vc-note { display: none; } }
