/* help.protocolcrm.com — light docs theme ("Paper": Stripe-docs bones, Protocol skin).
   Fixed left rail, breadcrumb, on-this-page TOC. Paper white, single green accent,
   Fraunces page titles, Instrument Sans body, IBM Plex Mono chrome.
   Ported from internal.protocolcrm.com/assets/internal.css (same skin family). */

:root {
  --paper:      #ffffff;
  --rail:       #f7f8f9;
  --wash:       #f3f5f6;
  --ink:        #1a212e;
  --muted:      #5b6472;
  --faint:      #8a93a2;
  --line:       #e7eaee;
  --line-2:     #d5dae1;
  --green:      #0c7a4e;
  --green-ink:  #0a6b45;
  --green-wash: #e9f5ef;
  --green-line: #bfe3d2;
  --amber:      #9a6306;
  --amber-wash: #fdf4e3;
  --amber-line: #f0d9a8;
  --gray-wash:  #f1f2f4;
  --sans: "Instrument Sans", -apple-system, "Segoe UI", sans-serif;
  --serif: "Fraunces", Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, monospace;
  --rail-w: 268px;
  --shadow-card: 0 1px 2px rgba(26,33,46,.05), 0 4px 16px -8px rgba(26,33,46,.08);
  --shadow-hover: 0 2px 4px rgba(26,33,46,.06), 0 10px 28px -10px rgba(26,33,46,.14);
}

* { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior:smooth; }
body { background:var(--paper); color:var(--ink); font-family:var(--sans); font-size:15px;
  line-height:1.65; -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility; }

/* ── shell ─────────────────────────────────────────────────────────────── */
.shell { display:flex; min-height:100vh; }
.main { flex:1; min-width:0; margin-left:var(--rail-w); }
.layout { display:grid; grid-template-columns:minmax(0, 740px) 200px; gap:56px;
  padding:0 56px 96px; max-width:1100px; }
.layout.no-toc { grid-template-columns:minmax(0, 860px); }

/* ── sidebar rail ──────────────────────────────────────────────────────── */
.rail { position:fixed; inset:0 auto 0 0; width:var(--rail-w); background:var(--rail);
  border-right:1px solid var(--line); overflow-y:auto; padding:22px 14px 32px; z-index:40;
  scrollbar-width:thin; scrollbar-color:var(--line-2) transparent; }
.rail::-webkit-scrollbar { width:5px; }
.rail::-webkit-scrollbar-thumb { background:var(--line-2); border-radius:3px; }

.rail-brand { display:flex; align-items:center; gap:10px; text-decoration:none; color:var(--ink);
  padding:6px 10px 16px; }
.rail-brand .pulse { width:8px; height:8px; border-radius:50%; background:var(--green); flex:none;
  animation:pulse 2.6s ease-in-out infinite; }
@keyframes pulse { 0%,100%{box-shadow:0 0 0 0 rgba(12,122,78,.35)} 50%{box-shadow:0 0 0 7px rgba(12,122,78,0)} }
.rail-brand b { font-family:var(--mono); font-size:11.5px; font-weight:600; letter-spacing:.22em; }
.rail-brand span { font-family:var(--mono); font-size:9px; letter-spacing:.14em; color:var(--faint);
  display:block; margin-top:2px; }

.rail-filter { position:relative; margin:0 6px 18px; }
.rail-filter input { width:100%; font-family:var(--sans); font-size:13px; color:var(--ink);
  background:var(--paper); border:1px solid var(--line); border-radius:8px; padding:7px 10px 7px 30px;
  outline:none; transition:border-color .15s, box-shadow .15s; }
.rail-filter input:focus { border-color:var(--green); box-shadow:0 0 0 3px rgba(12,122,78,.1); }
.rail-filter input::placeholder { color:var(--faint); }
.rail-filter::before { content:"⌕"; position:absolute; left:10px; top:50%; transform:translateY(-54%);
  color:var(--faint); font-size:15px; }

.nav-group { margin-bottom:6px; }
.nav-group > summary, .nav-label { font-family:var(--mono); font-size:10px; font-weight:600;
  letter-spacing:.16em; text-transform:uppercase; color:var(--faint); padding:12px 10px 6px;
  display:block; cursor:default; }
details.nav-group > summary { cursor:pointer; list-style:none; position:relative; }
details.nav-group > summary::-webkit-details-marker { display:none; }
details.nav-group > summary::after { content:"›"; position:absolute; right:12px; top:11px;
  font-size:13px; color:var(--faint); transform:rotate(0deg); transition:transform .18s ease; }
details.nav-group[open] > summary::after { transform:rotate(90deg); }

.nav-item { display:flex; align-items:center; gap:8px; text-decoration:none; color:var(--muted);
  font-size:13.5px; line-height:1.35; padding:5.5px 10px; border-radius:7px; position:relative;
  transition:color .12s, background .12s; }
.nav-item:hover { color:var(--ink); background:var(--wash); }
.nav-item.active { color:var(--green-ink); background:var(--green-wash); font-weight:600; }
.nav-item.active::before { content:""; position:absolute; left:-14px; top:6px; bottom:6px; width:3px;
  border-radius:0 3px 3px 0; background:var(--green); }
.nav-item .dot { width:6px; height:6px; border-radius:50%; flex:none; }
.nav-item .dot.ok { background:var(--green); }
.nav-item .dot.todo { background:#dca54c; }
.nav-item .dot.soon { background:var(--line-2); }
.nav-item .nv-num { font-family:var(--mono); font-size:10px; color:var(--faint); width:18px; flex:none; }
.nav-item.active .nv-num { color:var(--green-ink); }
.nav-item.hidden-by-filter { display:none; }
.nav-group.hidden-by-filter { display:none; }

/* ── topbar / breadcrumb ───────────────────────────────────────────────── */
.topbar { display:flex; align-items:center; justify-content:space-between; gap:16px;
  padding:18px 56px; border-bottom:1px solid var(--line); margin-bottom:40px;
  position:sticky; top:0; background:rgba(255,255,255,.86); backdrop-filter:blur(8px); z-index:30; }
.crumbs { font-size:12.5px; color:var(--faint); display:flex; align-items:center; gap:8px; min-width:0; }
.crumbs b { color:var(--muted); font-weight:500; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.crumbs .sep { color:var(--line-2); }
.topbar .snap { font-family:var(--mono); font-size:10.5px; letter-spacing:.06em; color:var(--faint);
  white-space:nowrap; }
.topbar .snap b { color:var(--muted); font-weight:500; }

/* ── article ───────────────────────────────────────────────────────────── */
.doc-head { padding:8px 0 26px; border-bottom:1px solid var(--line); margin-bottom:34px; }
.doc-head .eyebrow { font-family:var(--mono); font-size:10.5px; font-weight:600; letter-spacing:.2em;
  text-transform:uppercase; color:var(--green); display:block; margin-bottom:14px; }
h1.doc-title { font-family:var(--serif); font-weight:500; font-size:clamp(28px, 3.4vw, 40px);
  line-height:1.12; letter-spacing:-.012em; margin-bottom:16px; }
.doc-head .lede { color:var(--muted); font-size:16px; max-width:620px; }

/* ── stub (coming-soon) ────────────────────────────────────────────────── */
.badge-soon { font-family:var(--mono); font-size:9.5px; letter-spacing:.14em; text-transform:uppercase;
  color:var(--amber); border:1px solid var(--amber-line); background:var(--amber-wash);
  border-radius:99px; padding:3px 9px; display:inline-block; }
.stub { border:1px dashed var(--line-2); background:var(--wash); border-radius:14px;
  padding:40px 32px; text-align:center; color:var(--muted); margin-top:8px; }
.stub b { color:var(--ink); }

/* prose */
.prose { animation:rise .5s cubic-bezier(.2,.7,.2,1) both; }
@keyframes rise { from{opacity:0; transform:translateY(10px)} to{opacity:1; transform:none} }
.prose h1 { font-family:var(--sans); font-weight:650; font-size:24px; letter-spacing:-.01em; margin:44px 0 12px; }
.prose h2 { font-family:var(--sans); font-weight:650; font-size:19.5px; letter-spacing:-.01em;
  margin:42px 0 12px; padding-top:6px; scroll-margin-top:84px; }
.prose h3 { font-weight:600; font-size:16px; margin:30px 0 8px; scroll-margin-top:84px; }
.prose h4 { font-family:var(--mono); font-size:11px; font-weight:600; letter-spacing:.12em;
  text-transform:uppercase; color:var(--muted); margin:26px 0 8px; }
.prose p { margin:0 0 13px; }
.prose p, .prose li { font-size:15px; color:#333b49; }
.prose ul, .prose ol { margin:0 0 16px 24px; }
.prose li { margin:5px 0; }
.prose li::marker { color:var(--faint); }
.prose strong { color:var(--ink); font-weight:600; }
.prose em { color:var(--muted); }
.prose a { color:var(--green-ink); text-decoration:none; border-bottom:1px solid var(--green-line);
  transition:border-color .12s; }
.prose a:hover { border-bottom-color:var(--green-ink); }
.prose a.lnk-dropped { color:var(--faint); border-bottom:1px dashed var(--line-2); cursor:not-allowed; }
.prose blockquote { border-left:3px solid var(--green-line); background:#f7faf8; border-radius:0 10px 10px 0;
  padding:14px 20px; margin:0 0 18px; }
.prose blockquote p { color:var(--muted); }
.prose blockquote p:last-child { margin-bottom:0; }
.prose code { font-family:var(--mono); font-size:12.5px; background:var(--wash); border:1px solid var(--line);
  padding:1px 6px; border-radius:5px; color:var(--ink); }
.prose pre { background:#fafbfc; border:1px solid var(--line); border-radius:10px; padding:16px 18px;
  overflow-x:auto; margin:0 0 18px; }
.prose pre code { background:none; border:none; padding:0; font-size:12.5px; line-height:1.7; }
.prose hr { border:none; border-top:1px solid var(--line); margin:34px 0; }
.prose table { width:100%; border-collapse:separate; border-spacing:0; font-size:13.5px; margin:0 0 22px;
  border:1px solid var(--line); border-radius:10px; overflow:hidden; }
.prose th { font-family:var(--mono); font-size:10px; font-weight:600; letter-spacing:.1em;
  text-transform:uppercase; color:var(--muted); text-align:left; padding:10px 14px;
  background:var(--rail); border-bottom:1px solid var(--line); }
.prose td { padding:10px 14px; border-bottom:1px solid var(--line); color:#333b49; vertical-align:top; }
.prose tr:last-child td { border-bottom:none; }
.prose td strong, .prose td b { color:var(--ink); }
.prose input[type="checkbox"] { accent-color:var(--green); margin-right:6px; }
.prose img { max-width:100%; border-radius:10px; border:1px solid var(--line); }

/* ── on-this-page TOC ──────────────────────────────────────────────────── */
.toc { position:sticky; top:84px; align-self:start; font-size:12.5px; padding-top:8px; }
.toc .toc-label { font-family:var(--mono); font-size:9.5px; font-weight:600; letter-spacing:.16em;
  text-transform:uppercase; color:var(--faint); margin-bottom:10px; }
.toc a { display:block; color:var(--muted); text-decoration:none; padding:4px 0 4px 12px;
  border-left:2px solid var(--line); line-height:1.4; transition:color .12s, border-color .12s; }
.toc a:hover { color:var(--ink); }
.toc a.now { color:var(--green-ink); border-left-color:var(--green); font-weight:600; }

/* ── home ──────────────────────────────────────────────────────────────── */
.home-hero { padding:18px 0 8px; max-width:680px; }
.home-hero .eyebrow { font-family:var(--mono); font-size:10.5px; font-weight:600; letter-spacing:.2em;
  text-transform:uppercase; color:var(--green); display:block; margin-bottom:16px; }
.home-hero h1 { font-family:var(--serif); font-weight:500; font-size:clamp(34px, 4.2vw, 50px);
  line-height:1.08; letter-spacing:-.014em; }
.home-hero h1 em { font-style:italic; color:var(--green); }
.home-hero p { margin-top:18px; color:var(--muted); font-size:15.5px; max-width:560px; }
.home-hero p b { color:var(--ink); font-weight:600; }

.cta-row { display:grid; grid-template-columns:1fr 1fr; gap:14px; margin:30px 0 14px; }
@media (max-width:860px){ .cta-row{grid-template-columns:1fr} }
.cta { display:block; text-decoration:none; border:1px solid var(--line); border-radius:14px;
  background:var(--paper); padding:22px 24px; box-shadow:var(--shadow-card);
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.cta:hover { transform:translateY(-2px); box-shadow:var(--shadow-hover); border-color:var(--green-line); }
.cta .t { font-family:var(--serif); font-weight:500; font-size:20px; color:var(--ink); margin-bottom:6px; }
.cta .d { font-size:13px; color:var(--muted); }
.cta .d b { color:var(--green-ink); font-weight:600; }

section.group { margin-top:46px; }
.sec-head { display:flex; align-items:baseline; gap:14px; margin-bottom:4px; }
.sec-head .num { font-family:var(--mono); font-size:11px; color:var(--faint); }
.sec-head h2 { font-family:var(--sans); font-weight:650; font-size:20px; letter-spacing:-.01em; }
.sec-sub { color:var(--muted); max-width:640px; margin-bottom:18px; font-size:13.5px; }
.cards { display:grid; grid-template-columns:repeat(auto-fill, minmax(280px, 1fr)); gap:12px; }
.card { border:1px solid var(--line); border-radius:12px; background:var(--paper); padding:18px 20px;
  text-decoration:none; display:block; box-shadow:var(--shadow-card);
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.card:hover { transform:translateY(-2px); box-shadow:var(--shadow-hover); border-color:var(--green-line); }
.card h3 { font-weight:600; font-size:15px; color:var(--ink); margin-bottom:6px; letter-spacing:-.005em;
  display:flex; align-items:center; gap:8px; }
.card .desc { font-size:12.5px; color:var(--muted); }

/* ── footer ────────────────────────────────────────────────────────────── */
footer.site { margin-top:72px; padding-top:22px; border-top:1px solid var(--line);
  display:flex; justify-content:space-between; gap:16px; flex-wrap:wrap;
  font-family:var(--mono); font-size:10px; color:var(--faint); }
footer.site a { color:var(--muted); text-decoration:none; }
footer.site a:hover { color:var(--green-ink); }

/* ── mobile ────────────────────────────────────────────────────────────── */
.rail-toggle { display:none; }
@media (max-width:980px) {
  .layout, .layout.no-toc { grid-template-columns:1fr; padding:0 24px 72px; }
  .toc { display:none; }
  .topbar { padding:14px 24px; }
  .main { margin-left:0; }
  .rail { transform:translateX(-100%); transition:transform .22s ease; box-shadow:none; }
  body.rail-open .rail { transform:none; box-shadow:0 0 40px rgba(26,33,46,.18); }
  .rail-toggle { display:inline-flex; align-items:center; gap:7px; font-family:var(--mono);
    font-size:10.5px; letter-spacing:.1em; color:var(--muted); background:var(--paper);
    border:1px solid var(--line); border-radius:8px; padding:6px 12px; cursor:pointer; }
}

/* ── doc kit: level badges, key caps, figures, media placeholders, chat demos ──
   Reusable across guides (introduced for the Messaging section). All on-palette. */
.lvl { display:inline-block; font-family:var(--mono); font-size:9px; letter-spacing:.14em;
  text-transform:uppercase; padding:2px 8px; border-radius:999px; vertical-align:middle;
  position:relative; top:-1px; }
.lvl-basic { background:var(--green-wash); color:var(--green-ink); border:1px solid var(--green-line); }
.lvl-adv   { background:var(--amber-wash); color:var(--amber);     border:1px solid var(--amber-line); }

.kbd { font-family:var(--mono); font-size:11px; line-height:1; display:inline-block;
  padding:3px 6px; border:1px solid var(--line-2); border-bottom-width:2px; border-radius:5px;
  background:var(--rail); color:var(--ink); white-space:nowrap; }

/* figure frame for inline SVG diagrams */
.fig { border:1px solid var(--line); border-radius:14px; background:var(--rail);
  padding:24px 22px; margin:26px 0; }
.fig svg { display:block; width:100%; height:auto; overflow:visible; }
.fig figcaption, .shot figcaption { margin-top:14px; font-size:12.5px; color:var(--muted);
  text-align:center; font-style:italic; }

/* screenshot / video placeholders for the founder to drop real media into */
.shot { margin:26px 0; }
.shot .ph { border:1.5px dashed var(--line-2); border-radius:14px; min-height:210px;
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:10px;
  text-align:center; padding:30px 28px; color:var(--muted);
  background:repeating-linear-gradient(135deg, var(--rail), var(--rail) 11px, var(--wash) 11px, var(--wash) 22px); }
.shot .ph .tag { font-family:var(--mono); font-size:10px; letter-spacing:.16em; text-transform:uppercase;
  color:var(--faint); border:1px solid var(--line-2); border-radius:999px; padding:3px 11px; background:var(--paper); }
.shot .ph .what { font-size:14px; color:var(--ink); max-width:46ch; line-height:1.55; }
.shot .ph .where { font-size:12px; color:var(--faint); }
.shot.video .ph { min-height:240px; }
.shot.video .ph .tag::before { content:"\25B6\00A0"; }

/* lightweight rendered-chat demos (no images needed) */
.chatdemo { display:flex; flex-direction:column; gap:9px; max-width:430px; margin:22px auto;
  padding:18px; border:1px solid var(--line); border-radius:16px; background:var(--wash); }
.chatdemo .b { padding:9px 13px; border-radius:15px; font-size:13.5px; line-height:1.5; max-width:82%;
  position:relative; }
.chatdemo .them { align-self:flex-start; background:var(--paper); border:1px solid var(--line);
  border-bottom-left-radius:5px; color:var(--ink); }
.chatdemo .me { align-self:flex-end; background:var(--green); color:#fff; border-bottom-right-radius:5px; }
.chatdemo .b .meta { display:block; font-size:10px; margin-top:4px; opacity:.7; }
.chatdemo .mention { font-weight:600; color:var(--green-ink); }
.chatdemo .me .mention { color:#fff; text-decoration:underline; }    /* the contrast-aware rule, shown live */
.chatdemo .b a { color:inherit; }
.chatdemo code { font-family:var(--mono); font-size:.86em; background:rgba(26,33,46,.07);
  padding:1px 5px; border-radius:5px; }
.chatdemo .me code { background:rgba(255,255,255,.2); }
.chatdemo pre { font-family:var(--mono); font-size:11.5px; background:rgba(26,33,46,.07);
  border-radius:8px; padding:8px 10px; margin:3px 0 0; white-space:pre-wrap; }
.chatdemo .me pre { background:rgba(255,255,255,.16); }

/* ── faithful low-fi wireframes (brand-agnostic component sketches) ──────────
   Neutral monochrome "blueprint" look: real layout + real labels, no brand
   colour — so the sketch stays true as a tenant's theme/branding changes.
   Mirrors the actual React components, just unstyled. */
.wire { margin:26px 0; }
.wire .frame { background:#fff; border:1px solid #d7dce2; border-radius:12px;
  box-shadow:0 1px 2px rgba(26,33,46,.04), 0 12px 32px -18px rgba(26,33,46,.22);
  overflow:hidden; font-family:var(--sans); color:#39414e; }
.wire figcaption { margin-top:13px; font-size:12.5px; color:var(--muted); text-align:center; font-style:italic; }
.wire .col { display:flex; flex-direction:column; line-height:1.3; min-width:0; }

/* dialog / panel chrome */
.wire .wtitle { display:flex; align-items:center; gap:9px; padding:14px 16px;
  border-bottom:1px solid #eef1f4; font-weight:600; font-size:14px; color:#2b313c; }
.wire .wtitle .ic { width:20px; height:20px; border:1.5px solid #b8c0ca; border-radius:50%; flex:none; }
.wire .wbody { padding:16px; display:flex; flex-direction:column; gap:14px; }
.wire .wlabel { font-size:11px; font-weight:600; letter-spacing:.02em; color:#6b7480; margin-bottom:6px; }
.wire .wactions { display:flex; justify-content:flex-end; gap:10px; padding:13px 16px; border-top:1px solid #eef1f4; }
.wire .wbtn { font-size:12.5px; padding:7px 15px; border-radius:8px; border:1px solid #cdd4dc; background:#fff; color:#4b5563; }
.wire .wbtn.primary { background:#3a4150; border-color:#3a4150; color:#fff; }

/* inputs, chips, avatars, dropdown options */
.wire .winput { border:1px solid #cdd4dc; border-radius:8px; padding:7px 10px; min-height:40px;
  display:flex; align-items:center; gap:8px; flex-wrap:wrap; background:#fcfcfd; }
.wire .winput .ph { color:#9aa3af; font-size:13px; }
.wire .winput .caret { margin-left:auto; color:#b8c0ca; font-size:11px; }
.wire .wchip { display:inline-flex; align-items:center; gap:6px; background:#eef1f4; border:1px solid #dde2e8;
  border-radius:999px; padding:2px 9px 2px 2px; font-size:12px; color:#39414e; }
.wire .wchip .x { color:#9aa3af; font-size:12px; margin-left:1px; }
.wire .wav { border-radius:50%; background:#dfe4ea; color:#6b7480; font-weight:600;
  display:inline-flex; align-items:center; justify-content:center; flex:none; width:24px; height:24px; font-size:9px; }
.wire .wpop { border:1px solid #d7dce2; border-radius:10px; box-shadow:0 10px 26px -12px rgba(26,33,46,.24); overflow:hidden; }
.wire .wopt { display:flex; align-items:center; gap:11px; padding:9px 12px; border-bottom:1px solid #f1f3f6; }
.wire .wopt:last-child { border-bottom:none; }
.wire .wopt.hi { background:#f3f6f9; }
.wire .wopt .wav { width:30px; height:30px; font-size:11px; }
.wire .wopt .nm { font-size:13px; color:#2b313c; }
.wire .wopt .em { font-size:11px; color:#8a93a2; }

/* message bubble + reply quoted-preview */
.wire .stage { background:#f4f6f8; padding:18px; }
.wire .wmsg { max-width:330px; }
.wire .wbubble { border:1px solid #dce1e7; border-radius:14px; border-bottom-left-radius:5px;
  padding:9px 12px; background:#fff; font-size:13.5px; color:#39414e; }
.wire .wquote { border-left:3px solid #aab3bf; background:#f1f3f6; border-radius:0 8px 8px 0; padding:6px 10px; margin-bottom:7px; }
.wire .wquote .lab { font-size:10.5px; color:#7c8593; display:block; margin-bottom:1px; }
.wire .wquote .qt { font-size:12.5px; color:#4b5563; display:block; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.wire .wmeta { font-size:10px; color:#9aa3af; margin-top:5px; text-align:right; }

/* @mention flow wireframe (two steps: type → pick) */
.wire .wflow { display:flex; align-items:stretch; gap:16px; flex-wrap:wrap; justify-content:center; }
.wire .wstep { flex:1 1 280px; min-width:240px; display:flex; flex-direction:column; }
.wire .wstep-cap { font-size:10.5px; font-weight:600; letter-spacing:.04em; color:#7c8593;
  margin-bottom:10px; text-transform:uppercase; }
.wire .wmenu { align-self:flex-start; background:#fff; border:1px solid #d7dce2; border-radius:9px;
  box-shadow:0 10px 26px -12px rgba(26,33,46,.28); padding:4px; margin:0 0 -6px 16px; min-width:160px;
  position:relative; z-index:2; }
.wire .wmenu .mi { font-size:13px; color:#39414e; padding:7px 12px; border-radius:6px; }
.wire .wmenu .mi.sel { background:#eef1f4; font-weight:500; }
.wire .wcomposer { margin-top:auto; border:1px solid #cdd4dc; border-radius:9px; background:#fcfcfd;
  padding:11px 12px; font-size:13.5px; color:#39414e; line-height:1.5; }
.wire .wtok { color:#6b7480; }
.wire .wmention { background:#e9edf2; color:#2b313c; font-weight:600; border-radius:5px; padding:0 5px; }
.wire .wcar { display:inline-block; width:1.5px; height:15px; background:#6b7480; vertical-align:-2px;
  margin-left:1px; animation:wfBlink 1.1s step-end infinite; }
.wire .warrow { align-self:center; color:#aab3bf; font-size:22px; flex:none; }
@keyframes wfBlink { 50% { opacity:0; } }
@media (prefers-reduced-motion: reduce){ .wire .wcar { animation:none; } }

/* action menu / long-press sheet (web message menu + mobile long-press) */
.wire .wsheet { background:#fff; border:1px solid #d7dce2; border-radius:11px;
  box-shadow:0 14px 34px -14px rgba(26,33,46,.3); padding:5px; min-width:188px; align-self:flex-start; }
.wire .wsheet .row { display:flex; align-items:center; gap:11px; padding:9px 11px; border-radius:7px;
  font-size:13.5px; color:#39414e; }
.wire .wsheet .row.sel { background:#eef1f4; font-weight:500; }
.wire .wsheet .row.danger { color:#b4452f; }
.wire .wsheet .row svg { width:16px; height:16px; flex:none; stroke:currentColor; fill:none;
  stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; opacity:.8; }
.wire .wsheet .row.sel svg, .wire .wsheet .row.danger svg { opacity:1; }
.wire .wsheet .div { height:1px; background:#e9edf1; margin:4px 6px; }

/* "Editing message" banner + composer selection */
.wire .wedit { display:flex; align-items:flex-start; gap:10px; background:#fdf7ec; border:1px solid #f0e0bd;
  border-left:3px solid #d8a24a; border-radius:0 8px 8px 0; padding:8px 10px; margin-bottom:8px; }
.wire .wedit-cap { font-size:10.5px; font-weight:600; color:#9a6306; }
.wire .wedit-orig { font-size:12.5px; color:#6b7480; }
.wire .wedit-x { margin-left:auto; color:#bda35c; font-size:13px; }
.wire .wsel { background:#dcebdc; border-radius:3px; padding:0 2px; }

/* own (outgoing) bubble variant for wireframes */
.wire .wbubble.me { margin-left:auto; background:#eef1f4; border-bottom-left-radius:14px; border-bottom-right-radius:5px; }
.wire .wbubble .edited { color:#9aa3af; font-style:normal; }

/* staged media thumbnails in the composer */
.wire .wthumbs { display:flex; gap:10px; margin-bottom:10px; }
.wire .wthumb { position:relative; width:74px; height:74px; border-radius:9px; border:1px solid #d7dce2;
  background:#eef1f4; display:flex; align-items:center; justify-content:center; }
.wire .wthumb svg { width:26px; height:26px; stroke:#9aa3af; fill:none; stroke-width:1.5; }
.wire .wthumb .rm { position:absolute; top:-7px; right:-7px; width:18px; height:18px; border-radius:50%;
  background:#fff; border:1px solid #d7dce2; color:#6b7480; font-size:10px; display:flex; align-items:center;
  justify-content:center; box-shadow:0 1px 3px rgba(26,33,46,.16); }

/* voice recorder bar */
.wire .wvoice { display:flex; align-items:center; gap:12px; border:1px solid #cdd4dc; border-radius:10px;
  background:#fcfcfd; padding:10px 12px; }
.wire .wvoice .vdot { width:10px; height:10px; border-radius:50%; background:#c0473a; flex:none;
  animation:hcFade 1.3s ease-in-out infinite; }
.wire .wvoice .vtime { font-family:var(--mono); font-size:12.5px; color:#39414e; }
.wire .wvoice .vwave { flex:1; display:flex; align-items:center; gap:2.5px; height:26px; }
.wire .wvoice .vwave i { flex:1; background:#c2cad3; border-radius:2px; }
.wire .wvoice .vbtn { width:30px; height:30px; border-radius:50%; background:#3a4150; color:#fff; flex:none;
  display:flex; align-items:center; justify-content:center; }
.wire .wvoice .vbtn.ghost { background:#fff; border:1px solid #cdd4dc; color:#8a93a2; }
.wire .wvoice .vbtn svg { width:14px; height:14px; stroke:currentColor; fill:none; stroke-width:1.8; }

/* popover card with header + search + list (templates) */
.wire .wcard { background:#fff; border:1px solid #d7dce2; border-radius:12px;
  box-shadow:0 16px 40px -16px rgba(26,33,46,.3); width:300px; overflow:hidden; }
.wire .wcard .hd { display:flex; align-items:center; justify-content:space-between; padding:11px 13px; border-bottom:1px solid #eef1f4; }
.wire .wcard .hd .t { font-weight:600; font-size:13.5px; color:#2b313c; }
.wire .wcard .hd .mg { color:#8a93a2; font-size:16px; line-height:1; }
.wire .wcard .search { margin:10px 13px; border:1px solid #cdd4dc; border-radius:8px; padding:7px 10px; font-size:12.5px; color:#9aa3af; }
.wire .wcard .ti { padding:9px 13px; border-top:1px solid #f4f6f8; }
.wire .wcard .ti.first { border-top:none; }
.wire .wcard .ti .tt { font-size:13px; font-weight:600; color:#2b313c; }
.wire .wcard .ti .tc { font-size:11.5px; color:#8a93a2; line-height:1.4; }

/* participant / member list */
.wire .wlist { border:1px solid #d7dce2; border-radius:11px; overflow:hidden; max-width:420px; margin:0 auto; }
.wire .wlist .lhd { display:flex; align-items:center; justify-content:space-between; padding:11px 14px;
  border-bottom:1px solid #eef1f4; font-size:11.5px; font-weight:600; color:#6b7480; letter-spacing:.02em; }
.wire .wlist .lrow { display:flex; align-items:center; gap:11px; padding:9px 14px; border-top:1px solid #f4f6f8; }
.wire .wlist .lrow.first { border-top:none; }
.wire .wlist .lrow .nm { font-size:13.5px; color:#2b313c; flex:1; min-width:0; }
.wire .wlist .lrow .tag2 { font-size:9px; font-family:var(--mono); letter-spacing:.06em; color:#8a93a2;
  border:1px solid #e2e6ec; border-radius:999px; padding:2px 7px; }
.wire .wlist .lrow .ictl { width:28px; height:28px; border-radius:7px; border:1px solid #dde2e8; flex:none;
  display:inline-flex; align-items:center; justify-content:center; color:#6b7480; }
.wire .wlist .lrow .ictl svg { width:15px; height:15px; stroke:currentColor; fill:none; stroke-width:1.7; }
.wire .wlist .lrow .ictl.on { background:#f1f3f6; color:#39414e; }
.wire .wlist .lrow .ictl.danger { color:#b4452f; border-color:#ecd4ce; }

/* phone frame + lock-screen push */
.wire .wphone { width:288px; margin:0 auto; border:1px solid #d7dce2; border-radius:28px; background:#eef1f4;
  padding:14px 12px 20px; box-shadow:0 18px 44px -20px rgba(26,33,46,.34); }
.wire .wphone .pstat { display:flex; justify-content:space-between; font-size:10.5px; color:#6b7480; font-family:var(--mono); padding:2px 8px 16px; }
.wire .wphone .ptime { text-align:center; font-size:42px; font-weight:300; color:#2b313c; letter-spacing:-.02em; line-height:1; }
.wire .wphone .pdate { text-align:center; font-size:12px; color:#7c8593; margin:4px 0 20px; }
.wire .wpush { background:#fff; border:1px solid #e3e7ec; border-radius:15px; padding:11px 12px;
  box-shadow:0 6px 18px -8px rgba(26,33,46,.18); display:flex; gap:11px; align-items:flex-start; }
.wire .wpush .pico { width:34px; height:34px; border-radius:9px; background:#dfe4ea; flex:none;
  display:flex; align-items:center; justify-content:center; font-size:13px; font-weight:600; color:#6b7480; }
.wire .wpush .ptl { font-size:12.5px; font-weight:600; color:#2b313c; }
.wire .wpush .pbody { font-size:12.5px; color:#5b6472; line-height:1.45; }
.wire .wpush .pwhen { margin-left:auto; font-size:9.5px; color:#9aa3af; flex:none; }

/* mini mobile thread */
.wire .wthread { width:288px; margin:0 auto; border:1px solid #d7dce2; border-radius:20px; background:#f4f6f8;
  padding:16px 14px; display:flex; flex-direction:column; gap:9px; }
.wire .wthread .sender { font-size:10.5px; color:#7c8593; margin:0 0 -4px 4px; }

/* option / type cards grid */
.wire .tcards { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.wire .tcard { border:1px solid #d7dce2; border-radius:10px; padding:12px 13px; background:#fff; }
.wire .tcard.sel { border-color:#9aa7b6; background:#f6f8fb; box-shadow:inset 0 0 0 1px #9aa7b6; }
.wire .tcard .tt { font-size:13px; font-weight:600; color:#2b313c; margin-bottom:3px; }
.wire .tcard .ts { font-size:11.5px; color:#8a93a2; line-height:1.4; }

/* toggle + labelled field row */
.wire .wtoggle { width:34px; height:20px; border-radius:999px; background:#cdd4dc; position:relative; flex:none; }
.wire .wtoggle.on { background:#7c8aa0; }
.wire .wtoggle::after { content:""; position:absolute; top:2px; left:2px; width:16px; height:16px; border-radius:50%; background:#fff; }
.wire .wtoggle.on::after { left:16px; }
.wire .wfield { display:flex; align-items:center; gap:10px; }
.wire .wfield .fl { font-size:13px; color:#39414e; flex:1; min-width:0; }

/* vertical tab rail (e.g. profile tracking subtabs) */
.wire .wtabs { display:flex; flex-direction:column; gap:2px; min-width:148px; }
.wire .wtabs .tb { font-size:12.5px; color:#5b6472; padding:7px 10px; border-radius:7px; }
.wire .wtabs .tb.sel { background:#eef1f4; color:#2b313c; font-weight:600; }

/* metric card: old→new + change badge + sparkline */
.wire .wmetric { border:1px solid #d7dce2; border-radius:10px; padding:11px 14px; background:#fff; display:flex; align-items:center; gap:14px; }
.wire .wmetric .ml { flex:1; min-width:0; }
.wire .wmetric .mname { font-size:11px; color:#7c8593; text-transform:uppercase; letter-spacing:.04em; }
.wire .wmetric .mval { font-size:18px; font-weight:600; color:#2b313c; }
.wire .wmetric .mval .old { color:#aab3bf; font-weight:400; font-size:14px; }
.wire .wmetric .badge2 { font-size:11px; font-weight:600; padding:2px 8px; border-radius:999px; flex:none; }
.wire .wmetric .badge2.good { background:#e9f3ec; color:#2f7d4f; }
.wire .wmetric .spark { width:88px; height:32px; flex:none; }
.wire .wmetric .spark path { fill:none; stroke:#7c8aa0; stroke-width:1.8; }

/* before / after photo comparison */
.wire .wba { display:flex; gap:12px; max-width:360px; margin:0 auto; }
.wire .wba .ph2 { flex:1; border:1px solid #d7dce2; border-radius:10px; aspect-ratio:3/4; display:flex;
  flex-direction:column; align-items:center; justify-content:center; gap:5px;
  background:repeating-linear-gradient(135deg,#eef1f4,#eef1f4 8px,#e7ebf0 8px,#e7ebf0 16px); }
.wire .wba .ph2 .lab2 { font-size:10.5px; font-weight:600; letter-spacing:.06em; text-transform:uppercase; color:#7c8593; }
.wire .wba .ph2 .dt { font-size:10px; color:#9aa3af; }

/* AI report editor */
.wire .wreport { border:1px solid #d7dce2; border-radius:12px; overflow:hidden; background:#fff; max-width:460px; margin:0 auto; }
.wire .wreport .rhd { display:flex; align-items:center; gap:8px; padding:11px 14px; border-bottom:1px solid #eef1f4; }
.wire .wreport .rhd .rt { font-weight:600; font-size:13.5px; color:#2b313c; flex:1; }
.wire .wreport .chip { font-size:9px; font-family:var(--mono); letter-spacing:.08em; text-transform:uppercase; padding:2px 8px; border-radius:999px; }
.wire .wreport .chip.draft { background:#eef1f4; color:#6b7480; }
.wire .wreport .chip.urgent { background:#fdecea; color:#b4452f; }
.wire .wreport .rbody { padding:14px; display:flex; flex-direction:column; gap:13px; }
.wire .wreport .rl { font-size:10px; font-weight:600; letter-spacing:.04em; text-transform:uppercase; color:#7c8593; margin-bottom:5px; }
.wire .wreport .rbody p { font-size:12.5px; color:#4b5563; line-height:1.5; margin:0; }
.wire .wreport .rbody ul { margin:0; padding-left:16px; font-size:12.5px; color:#4b5563; line-height:1.6; }
.wire .wreport .ract { display:flex; gap:10px; padding:12px 14px; border-top:1px solid #eef1f4; }

/* workout builder: sections, groups, exercise rows + stat cells */
.wire .wsection { font-size:10.5px; font-weight:600; letter-spacing:.08em; text-transform:uppercase; color:#7c8593; margin:14px 0 7px; }
.wire .wsection.first { margin-top:0; }
.wire .wex { display:flex; align-items:center; gap:10px; border:1px solid #d7dce2; border-radius:9px; padding:8px 10px; background:#fff; }
.wire .wex .ax { font-family:var(--mono); font-size:11px; color:#9aa3af; width:16px; flex:none; text-align:center; }
.wire .wex .thumb { width:30px; height:30px; border-radius:6px; background:#e7ebf0; flex:none; display:flex; align-items:center; justify-content:center; }
.wire .wex .thumb svg { width:16px; height:16px; stroke:#9aa3af; fill:none; stroke-width:1.6; }
.wire .wex .exn { font-size:13px; color:#2b313c; font-weight:500; flex:1; min-width:0; }
.wire .wstats { display:flex; gap:6px; flex:none; }
.wire .wstat { text-align:center; min-width:40px; }
.wire .wstat .sl { font-size:8px; color:#9aa3af; text-transform:uppercase; letter-spacing:.03em; display:block; }
.wire .wstat .sv { font-size:12px; color:#39414e; font-weight:600; }
.wire .wgroup { border:1px solid #cfd6de; border-left:3px solid #9aa7b6; border-radius:9px; padding:8px; background:#f7f9fb; display:flex; flex-direction:column; gap:7px; }
.wire .wgroup .gh { display:flex; align-items:center; gap:8px; }
.wire .wgroup .gtag { font-size:9px; font-family:var(--mono); letter-spacing:.06em; text-transform:uppercase; color:#5b6472; background:#eef1f4; border:1px solid #dde2e8; border-radius:999px; padding:2px 8px; }
.wire .wgroup .gmeta { font-size:10.5px; color:#7c8593; }

/* set / intensity builder rows + preview */
.wire .wsets { display:flex; flex-direction:column; gap:7px; }
.wire .wsetrow { display:flex; align-items:center; gap:8px; }
.wire .wsetrow .sn { font-size:11px; color:#7c8593; width:42px; flex:none; }
.wire .wsetrow .sv2 { border:1px solid #cdd4dc; border-radius:7px; padding:5px 8px; font-size:12px; color:#39414e; background:#fcfcfd; min-width:50px; text-align:center; }
.wire .wsetrow .x { color:#aab3bf; font-size:12px; }
.wire .wsetrow .un { font-size:11px; color:#7c8593; border:1px solid #e2e6ec; border-radius:6px; padding:4px 7px; background:#fff; }
.wire .wpreview { font-family:var(--mono); font-size:11.5px; color:#39414e; background:#f1f3f6; border-radius:7px; padding:8px 10px; }

/* exercise library cards */
.wire .wexgrid { display:grid; grid-template-columns:1fr 1fr 1fr; gap:9px; }
.wire .wexcard { border:1px solid #d7dce2; border-radius:9px; overflow:hidden; background:#fff; }
.wire .wexcard .vid { aspect-ratio:4/3; background:#e7ebf0; display:flex; align-items:center; justify-content:center; }
.wire .wexcard .vid .tri { width:0; height:0; border-left:11px solid #fff; border-top:7px solid transparent; border-bottom:7px solid transparent; filter:drop-shadow(0 0 3px rgba(0,0,0,.3)); margin-left:2px; }
.wire .wexcard .cap { padding:7px 9px; font-size:11.5px; color:#2b313c; }

/* mobile log: sets table */
.wire .wlog { display:flex; flex-direction:column; gap:4px; }
.wire .wlog .lh, .wire .wlog .lr { display:grid; grid-template-columns:26px 1fr 1fr 38px 26px; gap:6px; align-items:center; }
.wire .wlog .lh span { font-size:8.5px; color:#9aa3af; text-transform:uppercase; letter-spacing:.03em; text-align:center; }
.wire .wlog .lr .cell { border:1px solid #d7dce2; border-radius:6px; padding:5px; font-size:12px; text-align:center; color:#39414e; background:#fff; }
.wire .wlog .lr .sn { font-size:11px; color:#7c8593; text-align:center; }
.wire .wlog .lr .chk { width:18px; height:18px; border-radius:50%; border:1.5px solid #cdd4dc; justify-self:center; }
.wire .wlog .lr.done .chk { background:#0c7a4e; border-color:#0c7a4e; }
.wire .wlog .lr.done .cell { color:#9aa3af; }

/* video-guided player bits */
.wire .wvid { aspect-ratio:16/9; background:#1a212e; border-radius:10px; display:flex; align-items:center; justify-content:center; }
.wire .wvid .tri { width:0; height:0; border-left:16px solid rgba(255,255,255,.85); border-top:11px solid transparent; border-bottom:11px solid transparent; }
.wire .wpills { display:flex; gap:6px; flex-wrap:wrap; margin-top:9px; }
.wire .wpill { font-size:10.5px; color:#5b6472; background:#eef1f4; border-radius:999px; padding:3px 9px; }
.wire .wrest { width:72px; height:72px; border-radius:50%; border:4px solid #bfe3d2; border-top-color:#0c7a4e; display:flex; align-items:center; justify-content:center; font-size:18px; font-weight:600; color:#2b313c; margin:4px auto; }

/* animated bits used by the diagrams */
@keyframes hcDash { to { stroke-dashoffset:0; } }
@keyframes hcFade { 0%,100%{opacity:.25} 50%{opacity:1} }
@keyframes hcType { 0%{opacity:.3;transform:translateY(0)} 30%{opacity:1;transform:translateY(-3px)} 60%,100%{opacity:.3;transform:translateY(0)} }
@media (prefers-reduced-motion: reduce) {
  .fig svg [class^="hc-anim"], .fig svg [class*=" hc-anim"] { animation:none !important; }
}

/* ── Release notes ───────────────────────────────────────────── */
/* version + date line under a release title */
.rn-meta { display:flex; flex-wrap:wrap; align-items:center; gap:12px; margin:-6px 0 22px; }
.rn-ver { font-family:var(--mono); font-size:12px; font-weight:500; color:var(--green-ink);
  background:var(--green-wash); border:1px solid var(--green-line); border-radius:999px; padding:5px 12px; }
.rn-date { font-family:var(--mono); font-size:12px; color:var(--muted); }
/* New / Improved / Fixed chips — mirror .lvl, lead each changelog item */
.rn-tag { display:inline-block; font-family:var(--mono); font-size:9px; letter-spacing:.14em;
  text-transform:uppercase; padding:2px 8px; border-radius:999px; vertical-align:middle;
  position:relative; top:-1px; margin-right:6px; }
.rn-new      { background:var(--green-wash); color:var(--green-ink); border:1px solid var(--green-line); }
.rn-improved { background:#eaf1fb; color:#2c5aa6; border:1px solid #c5d8f2; }
.rn-fixed    { background:var(--gray-wash); color:var(--muted); border:1px solid var(--line-2); }
