:root {
  --bg: #f6f7fb;
  --panel: #ffffff;
  --text: #111827;
  --muted: #5d6470;  /* 4.5:1 even on the tinted panels */
  --line: #e5e7eb;
  --brand: #1b736d;  /* Rilly teal: 5.6:1 with white, 4.5:1+ on the soft tints */
  --brand-logo: #2ba39a; /* the logo tile */
  --ink: #14282B;    /* the wordmark’s dark background */
  --brand-soft: #e6f4f2;
  --danger: #dc2626;
  --ok: #16a34a;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--brand); }
h1 { font-size: 1.5rem; margin: 0; }
h2 { font-size: 1.1rem; margin: 0 0 12px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.boot { display: grid; place-items: center; height: 100vh; color: var(--muted); }

/* Layout */
.shell { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; background: linear-gradient(to right, var(--ink) 232px, transparent 232px); }
.sidebar { background: var(--ink); color: #d1d5db; padding: 20px 14px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; }
.logo { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; font-size: 1.1rem; padding: 4px 10px 18px; }
.logo svg { width: 28px; height: 28px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px; color: #d1d5db; text-decoration: none; }
.nav a:hover { background: #1f3236; color: #fff; }
.nav a.active { background: var(--brand); color: #fff; }
.nav .ico { width: 20px; display: grid; place-items: center; font-size: 1.15rem; opacity: .85; }
.nav a.active .ico { opacity: 1; }
/* Line icons (icons.js): sit on the text baseline and take its colour. */
svg.i { display: inline-block; vertical-align: -0.16em; flex: none; }
.btn svg.i { font-size: 1.05em; }
.btn.icon svg.i, .btn.sm.icon svg.i { font-size: 1.1em; }
.sidebar .foot { margin-top: auto; padding: 10px 12px; font-size: .85rem; border-top: 1px solid #1f3236; }
.sidebar .foot button { background: none; border: 0; color: #9ca3af; padding: 0; cursor: pointer; font: inherit; }
.main { padding: 28px 32px 60px; max-width: 1200px; width: 100%; }
.head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* Components */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.grid { display: grid; gap: 16px; }
.stats { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin-bottom: 16px; }
.stat .label { color: var(--muted); font-size: .85rem; }
.stat .value { font-size: 1.9rem; font-weight: 700; margin-top: 4px; }
.stat .sub { font-size: .8rem; color: var(--muted); }
.two { grid-template-columns: 2fr 1fr; }
.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: #fff; color: var(--text); padding: 8px 14px; border-radius: 8px; font: 500 .9rem system-ui, sans-serif; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { background: #f9fafb; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--danger); }
.btn.sm { padding: 5px 10px; font-size: .82rem; }
.btn.icon { padding: 5px 8px; }
.btn:disabled { opacity: .5; cursor: default; }
input, select, textarea { width: 100%; padding: 9px 11px; border: 1px solid #d1d5db; border-radius: 8px; font: inherit; background: #fff; color: var(--text); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand-soft); border-color: var(--brand); }
input[type=checkbox] { width: auto; }
input[type=color] { padding: 2px; height: 38px; }
textarea { resize: vertical; min-height: 70px; }
label.f { display: block; margin-bottom: 12px; font-size: .85rem; font-weight: 500; }
label.f > input, label.f > select, label.f > textarea { margin-top: 4px; font-weight: 400; }
label.check { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; font-size: .9rem; }
.hint { font-size: .78rem; color: var(--muted); font-weight: 400; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; }
tr.click { cursor: pointer; }
tr.click:hover td { background: #fafafa; }
.table-wrap { overflow-x: auto; padding: 0; }
.tag { display: inline-block; background: var(--brand-soft); color: var(--brand); padding: 1px 8px; border-radius: 99px; font-size: .78rem; margin: 1px 2px 1px 0; }
.pill { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: .78rem; font-weight: 600; background: #f3f4f6; color: var(--muted); }
.pill.ok { background: #dcfce7; color: #15803d; }
.pill.warn { background: #fef3c7; color: #854d0e; }
.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty .big { font-size: 2.2rem; color: var(--brand); width: 64px; height: 64px; margin: 0 auto 6px; display: grid; place-items: center; background: var(--brand-soft); border-radius: 18px; }
.copy { display: flex; gap: 6px; }
.copy input { font-family: ui-monospace, monospace; font-size: .85rem; background: #f9fafb; }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 120px; padding-top: 8px; }
.bars div { flex: 1; background: var(--brand); border-radius: 4px 4px 0 0; min-height: 3px; opacity: .85; position: relative; }
.bars div:hover::after { content: attr(data-tip); position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 2px 6px; border-radius: 4px; font-size: .75rem; white-space: nowrap; margin-bottom: 4px; }
.checklist li { margin: 8px 0; }
.checklist .done { color: var(--muted); text-decoration: line-through; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.tabs a { padding: 8px 14px; text-decoration: none; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a.active { color: var(--brand); border-color: var(--brand); font-weight: 600; }
.banner { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; border-radius: 10px; padding: 10px 14px; margin-bottom: 16px; font-size: .9rem; }
pre.mail { white-space: pre-wrap; font: .85rem/1.5 ui-monospace, monospace; background: #f9fafb; padding: 12px; border-radius: 8px; max-height: 260px; overflow: auto; }

/* Auth */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: linear-gradient(135deg, #e6f4f2, #f6f7fb); }
.auth .card { width: 100%; max-width: 400px; padding: 32px; }
.auth h1 { margin-bottom: 4px; }
.auth .logo { color: var(--text); padding: 0 0 4px; }
.auth .tagline { margin: 0 0 18px; color: var(--muted); font-size: .9rem; }
.err { color: var(--danger); font-size: .88rem; min-height: 1.2em; margin: 4px 0 10px; }

/* Modal */
.modal-bg { position: fixed; inset: 0; background: rgba(17, 24, 39, .45); display: grid; place-items: center; padding: 20px; z-index: 50; }
.modal { background: #fff; border-radius: 14px; width: 100%; max-width: 520px; max-height: 90vh; overflow: auto; padding: 24px; box-shadow: 0 20px 50px rgba(0, 0, 0, .25); }
.modal h2 { font-size: 1.2rem; }
.modal .actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }

#toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 10px; opacity: 0; transition: .2s; pointer-events: none; z-index: 60; }
#toast.show { opacity: 1; transform: translateX(-50%); }
#toast.bad { background: var(--danger); }

/* Page builder */
.editor { display: grid; grid-template-columns: 380px 1fr; grid-template-rows: auto 1fr; height: 100vh; }
.editor .bar { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: #fff; border-bottom: 1px solid var(--line); }
.editor .bar .title { font-weight: 600; flex: 1; min-width: 0; display: flex; gap: 8px; align-items: center; }
.editor .bar .title input { max-width: 260px; font-weight: 600; border-color: transparent; }
.editor .bar .title input:hover { border-color: var(--line); }
.saved { font-size: .82rem; color: var(--muted); }
.side { overflow-y: auto; border-right: 1px solid var(--line); background: #fbfbfd; padding: 14px; }
.side h3 { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 18px 0 8px; }
.side h3:first-child { margin-top: 0; }
.palette { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.palette button { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 8px 4px; cursor: pointer; font-size: .75rem; color: var(--text); display: flex; flex-direction: column; align-items: center; gap: 2px; }
.palette button:hover { border-color: var(--brand); color: var(--brand); }
.palette .ico { font-size: 1.35rem; height: 26px; display: grid; place-items: center; color: #374151; }
.palette button:hover .ico { color: var(--brand); }
.palette button { cursor: grab; }
.palette button:active { cursor: grabbing; }
.editor .bh[draggable] { cursor: grab; }
.editor .block.drop-before { box-shadow: 0 -3px 0 var(--brand); }
.editor .block.drop-after { box-shadow: 0 3px 0 var(--brand); }
/* While dragging a block, the preview frame is highlighted as a drop target. */
.dragging-block .editor .stage iframe { outline: 2px dashed var(--brand); outline-offset: -2px; }
.block { background: #fff; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; }
.block.open { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.block .bh { display: flex; align-items: center; gap: 6px; padding: 8px 10px; cursor: pointer; }
.block .bh .name { flex: 1; font-weight: 500; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.block .bh .name span { color: var(--muted); font-weight: 400; }
.block .bb { padding: 4px 12px 10px; border-top: 1px solid var(--line); }
.block .bh .btn { padding: 2px 7px; font-size: .8rem; }
.aligns { display: flex; gap: 4px; margin-top: 4px; }
.aligns button { flex: 1; border: 1px solid var(--line); background: #fff; padding: 5px; border-radius: 6px; cursor: pointer; }
.aligns button.on { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); }
.colors { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stage { background: #e5e7eb; overflow: auto; display: flex; justify-content: center; padding: 20px; }
.stage iframe { background: #fff; border: 0; width: 100%; height: 100%; min-height: 600px; border-radius: 8px; box-shadow: 0 10px 30px rgba(0, 0, 0, .1); transition: width .2s; }
.stage.mobile iframe { width: 390px; }

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; background: none; }
  /* Phones: the sidebar becomes a compact top bar that scrolls sideways. */
  .sidebar { position: sticky; top: 0; z-index: 30; height: auto; flex-direction: row; align-items: center; flex-wrap: nowrap; padding: 8px 10px; gap: 6px; overflow-x: auto; scrollbar-width: none; }
  .sidebar::-webkit-scrollbar { display: none; }
  .sidebar .logo { padding: 2px 6px; font-size: 0; gap: 0; flex: none; }
  .sidebar .logo svg { width: 26px; height: 26px; }
  .sidebar .logo .lockup { display: none; }
  .sidebar .logo .mark { display: block; width: 26px; height: 26px; }
  .nav { display: flex; gap: 2px; }
  .nav a { white-space: nowrap; padding: 7px 10px; font-size: .88rem; gap: 6px; }
  .sidebar .foot { display: none; }
  .main { padding: 20px 16px 40px; }
  .two { grid-template-columns: 1fr; }
  .editor { grid-template-columns: 1fr; grid-template-rows: auto auto 70vh; height: auto; }
  .side { border-right: 0; max-height: none; }
}

/* Funnel map (visual tree) */
.map { position: relative; height: calc(100vh - 170px); min-height: 480px; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; cursor: grab; touch-action: none; outline: none;
  background: #fbfbfd radial-gradient(circle, #d4d7e1 1px, transparent 1.2px) 0 0 / 22px 22px; }
.map.panning { cursor: grabbing; }
.world { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.edges { position: absolute; left: 0; top: 0; width: 1px; height: 1px; overflow: visible; pointer-events: none; }
.edge { fill: none; stroke-width: 2.5; }
.edge.yes { stroke: #16a34a; }
.edge.no { stroke: #9ca3af; stroke-dasharray: 7 5; }
.edge.temp { stroke-width: 2; opacity: .8; }
.arrow.yes { fill: #16a34a; } .arrow.no { fill: #9ca3af; }
.edge-x { position: absolute; transform: translate(-50%, -50%); width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line);
  background: #fff; color: var(--muted); font-size: 11px; cursor: pointer; opacity: .55; padding: 0; line-height: 1; }
.edge-x:hover { opacity: 1; color: var(--danger); border-color: var(--danger); }
.node { position: absolute; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 4px 14px rgba(16, 24, 40, .08);
  cursor: move; user-select: none; }
.node:hover { border-color: #a9dcd6; }
.node.dragging { box-shadow: 0 14px 34px rgba(16, 24, 40, .2); z-index: 5; }
.node.drop { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.node.start { border: 2px solid var(--brand); }
.startpill { position: absolute; top: -12px; left: 12px; background: var(--brand); color: #fff; font-size: .68rem; font-weight: 700;
  padding: 2px 8px; border-radius: 99px; letter-spacing: .04em; }
.node-in { position: absolute; top: -6px; left: 50%; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: #fff; border: 2px solid #c7cbd6; }
.nhead { display: flex; gap: 10px; align-items: center; padding: 14px 12px 6px; }
.nicon { font-size: 1.25rem; color: var(--brand); width: 38px; height: 38px; display: grid; place-items: center; background: var(--brand-soft); border-radius: 10px; flex: none; }
.nname { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nkind { font-size: .75rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nmenu { margin-left: auto; border: 0; background: none; font-size: 1.1rem; cursor: pointer; color: var(--muted); padding: 2px 6px; border-radius: 6px; flex: none; }
.nmenu:hover { background: #f3f4f6; }
.nstats { display: flex; gap: 10px; padding: 2px 12px 8px; font-size: .75rem; color: var(--muted); }
.nstats b { color: var(--text); }
.nact { display: flex; gap: 6px; padding: 0 12px 12px; }
.ports { display: flex; border-top: 1px solid var(--line); }
.port { flex: 1; text-align: center; font-size: .75rem; font-weight: 600; padding: 7px 4px; cursor: crosshair; }
.port.yes { color: #15803d; border-radius: 0 0 0 12px; }
.port.no { color: var(--muted); border-left: 1px solid var(--line); border-radius: 0 0 12px 0; }
.port:hover { background: #f0fdf4; } .port.no:hover { background: #f3f4f6; }
.port:not(.linked)::after { content: " +"; opacity: .7; }
.nodemenu { position: absolute; top: 44px; right: 8px; background: #fff; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .15); padding: 4px; z-index: 10; min-width: 210px; cursor: default; }
.nodemenu button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 8px 10px; border-radius: 6px; cursor: pointer; font: inherit; font-size: .88rem; }
.nodemenu button:hover { background: #f3f4f6; } .nodemenu .danger { color: var(--danger); }
.map-tools { position: absolute; top: 12px; left: 12px; z-index: 20; display: flex; gap: 6px; align-items: center; background: #fff;
  padding: 6px; border-radius: 10px; border: 1px solid var(--line); box-shadow: var(--shadow); cursor: default; }
.map-tools .sep { width: 1px; height: 22px; background: var(--line); margin: 0 4px; }
.zoomlbl { font-size: .8rem; color: var(--muted); min-width: 40px; text-align: center; }
.map-help { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); z-index: 20; background: rgba(17, 24, 39, .82); color: #e5e7eb;
  font-size: .78rem; padding: 6px 14px; border-radius: 99px; white-space: nowrap; pointer-events: none; }
.map-help .y { color: #4ade80; } .map-help .n { color: #d1d5db; }
.map-empty { position: absolute; left: 260px; top: 120px; width: 300px; text-align: center; color: var(--muted); cursor: default; }
.map-empty .big { font-size: 2.4rem; color: var(--brand); }
@media (max-width: 900px) { .map { height: 70vh; } .map-help { display: none; } }

/* Pipelines */
[hidden] { display: none !important; }
.main { min-width: 0; }
.pipe-switch { font-size: 1.3rem; font-weight: 700; border-color: transparent; padding: 2px 6px; margin-left: -6px; width: auto; max-width: 100%; background: transparent; }
.pipe-switch:hover { border-color: var(--line); }
.board { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 8px; align-items: flex-start; min-height: 320px; }
.col { flex: 0 0 272px; background: #eef0f5; border-radius: var(--radius); padding: 10px; display: flex; flex-direction: column; max-height: calc(100vh - 230px); border: 2px solid transparent; }
.col.over { border-color: var(--brand); background: var(--brand-soft); }
.col header { padding: 2px 4px 10px; }
.col header .name { font-weight: 600; display: flex; align-items: center; gap: 6px; }
.col .count { background: #fff; color: var(--muted); border-radius: 99px; padding: 0 8px; font-size: .78rem; font-weight: 600; }
.col .cards { display: flex; flex-direction: column; gap: 8px; overflow-y: auto; min-height: 40px; }
.col .add { margin-top: 8px; background: none; border: 1px dashed #c7cad6; border-radius: 8px; padding: 7px; color: var(--muted); cursor: pointer; font: inherit; font-size: .85rem; }
.col .add:hover { border-color: var(--brand); color: var(--brand); background: #fff; }
.deal { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; box-shadow: var(--shadow); cursor: grab; }
.deal:hover { border-color: #a9dcd6; }
.deal .title { font-weight: 600; font-size: .92rem; margin-bottom: 2px; overflow-wrap: anywhere; }
.deal .foot { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; font-size: .88rem; }
.deal.dragging { opacity: .35; }
.deal-gap { border: 2px dashed var(--brand); border-radius: 10px; background: #fff; opacity: .7; }
.btn.won { color: var(--ok); }
.stage-row { display: flex; gap: 6px; align-items: center; margin-bottom: 6px; }
.stage-row input { flex: 1; }
.cdeal { display: flex; justify-content: space-between; gap: 10px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 6px; text-decoration: none; color: var(--text); }
.cdeal:hover { border-color: var(--brand); }
.stage-row .n { width: 52px; text-align: right; flex: none; }

/* People */
:root { --lead: #0369a1; --conversion: #6d28d9; --upsell: #b45309; --continuity: #047857; --audience: #94a3b8; }
.stage { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: .78rem; font-weight: 600; background: #f1f5f9; color: #475569; }
.stage.lead { background: #e0f2fe; color: #0369a1; }
.stage.customer { background: #ede9fe; color: #6d28d9; }
.stage.regular { background: #d1fae5; color: #047857; }
.stagebar { display: flex; align-items: stretch; gap: 6px; flex-wrap: wrap; }
.stagebar a { flex: 1; min-width: 110px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; text-decoration: none; color: var(--muted); font-size: .85rem; border-top: 4px solid var(--audience); }
.stagebar a b { display: block; color: var(--text); font-size: 1.4rem; }
.stagebar a.lead { border-top-color: var(--lead); } .stagebar a.customer { border-top-color: var(--conversion); } .stagebar a.regular { border-top-color: var(--continuity); }
.stagebar a:first-child { border-top-color: var(--text); }
.stagebar a.active { outline: 2px solid var(--brand); }
.stagebar .arrow { align-self: center; color: var(--muted); }
.flowline { display: flex; gap: 4px; margin: -8px 0 18px; }
.flowline div { flex: 1; text-align: center; font-size: .78rem; font-weight: 600; padding: 5px; border-radius: 6px; background: #eef0f5; color: var(--muted); }
.flowline div.on.audience { background: #e2e8f0; color: #334155; } .flowline div.on.lead { background: #e0f2fe; color: #0369a1; }
.flowline div.on.customer { background: #ede9fe; color: #6d28d9; } .flowline div.on.regular { background: #d1fae5; color: #047857; }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { display: grid; grid-template-columns: 30px 1fr auto; gap: 8px; padding: 9px 0; border-bottom: 1px solid var(--line); align-items: start; }
.timeline li:last-child { border-bottom: 0; }
.timeline .ico { font-size: 1.1rem; display: grid; place-items: center; color: var(--muted); }
.timeline time { white-space: nowrap; }
.li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); align-items: center; flex-wrap: wrap; }
.li:last-child { border-bottom: 0; }
.modal.wide { max-width: 760px; }
.mapgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; max-height: 300px; overflow: auto; }
.mapgrid .m { display: grid; grid-template-columns: 1fr; gap: 2px; border: 1px solid var(--line); border-radius: 8px; padding: 8px; }
.mapgrid .m > span:first-child { font-weight: 600; font-size: .85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
table.mini th, table.mini td { padding: 6px 8px; font-size: .82rem; white-space: nowrap; }
@media (max-width: 700px) { .mapgrid { grid-template-columns: 1fr; } .stagebar .arrow { display: none; } }

/* Lever dashboard */
.leverbar { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.leverbar button { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: 7px 14px; font: 500 .9rem system-ui, sans-serif; cursor: pointer; color: var(--text); }
.leverbar .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.leverbar button.on .dot { background: #fff; }
.leverbar button:focus-visible, .btn:focus-visible, .hcard:focus-visible, .chip:focus-visible { outline: 3px solid #7cc8bf; outline-offset: 2px; }
.leverbar button.on { background: var(--c); color: #fff; border-color: var(--c); }
.leverbar .sc { font-size: .75rem; font-weight: 700; background: rgba(0,0,0,.07); border-radius: 99px; padding: 0 7px; }
.leverbar button.on .sc { background: rgba(255,255,255,.25); }
.focus-dot { color: #ef4444; font-size: .7rem; }
.leverbar button.on .focus-dot { color: #fff; }
.tray { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; background: #fff; border: 1px dashed #c7cad6; border-radius: 10px; padding: 10px 12px; margin-bottom: 14px; }
.chip { border: 1px solid var(--line); background: #f9fafb; border-radius: 99px; padding: 5px 12px; cursor: pointer; font: inherit; font-size: .85rem; }
.chip:hover { border-color: var(--brand); color: var(--brand); }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; min-width: 0; }
.tile.full { grid-column: 1 / -1; }
.tile header { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.tile header h2 { margin: 0; font-size: 1rem; }
.tiles.editing .tile { border: 2px dashed #7cc8bf; }
.tiles .tile.dragging { opacity: .5; outline: 2px solid var(--brand); }
.tctl { display: flex; gap: 4px; }
.tctl button { border: 1px solid var(--line); background: #fff; border-radius: 6px; min-width: 30px; height: 28px; cursor: pointer; font-size: .85rem; }
.tctl .handle { cursor: grab; touch-action: none; font-size: 1rem; }
.skeleton { height: 70px; border-radius: 8px; background: linear-gradient(90deg, #f3f4f6, #e5e7eb, #f3f4f6); background-size: 200% 100%; animation: sk 1.2s infinite; }
@keyframes sk { to { background-position: -200% 0; } }
.empty-line { color: var(--muted); margin: 6px 0; }
.big-n { font-size: 2rem; font-weight: 700; line-height: 1.1; }
.chg { font-size: .82rem; margin-top: 4px; color: var(--muted); }
.chg.up { color: var(--ok); } .chg.down { color: var(--danger); }
.nb { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: end; }
.cbars { display: flex; align-items: flex-end; gap: 4px; height: 64px; }
.cbars div { flex: 1; background: var(--lever, var(--brand)); opacity: .8; border-radius: 3px 3px 0 0; }
.rbars { display: grid; gap: 6px; margin-top: 4px; }
.rb { display: grid; grid-template-columns: minmax(70px, 30%) 1fr auto; gap: 8px; align-items: center; font-size: .85rem; color: var(--text); text-decoration: none; }
.rb .l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rb .track { height: 10px; background: #f1f5f9; border-radius: 99px; overflow: hidden; }
.rb .track span { display: block; height: 100%; background: var(--lever, var(--brand)); border-radius: 99px; min-width: 3px; }
.rb .v { color: var(--muted); font-size: .8rem; white-space: nowrap; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; margin-bottom: 10px; }
.seg button { border: 0; background: #fff; padding: 5px 12px; font: inherit; font-size: .82rem; cursor: pointer; color: var(--muted); }
.seg button.on { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.flow { display: flex; align-items: stretch; gap: 6px; }
.fstage { flex: 1; border-radius: 10px; padding: 12px; background: #f1f5f9; text-align: center; font-size: .85rem; color: var(--muted); position: relative; transition: opacity .2s; border-top: 4px solid var(--audience); }
.fstage b { display: block; font-size: 1.6rem; color: var(--text); }
.fstage.lead { border-top-color: var(--lead); } .fstage.customer { border-top-color: var(--conversion); } .fstage.regular { border-top-color: var(--continuity); }
.fstage.dim { opacity: .35; }
.fstage .loop { display: block; font-size: .72rem; margin-top: 4px; color: #b45309; opacity: .4; }
.fstage .loop.on { opacity: 1; font-weight: 600; }
.farrow { display: flex; flex-direction: column; justify-content: center; align-items: center; font-size: 1.3rem; color: #cbd5e1; min-width: 64px; }
.farrow span { font-size: .68rem; font-weight: 600; }
.farrow.on { color: var(--c); }
.health { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.hcard { text-align: left; border: 1px solid var(--line); border-radius: 10px; padding: 12px; background: #fff; cursor: pointer; font: inherit; color: var(--text); display: grid; gap: 6px; border-top: 4px solid var(--c); }
.hcard:hover { box-shadow: var(--shadow); }
.hcard.focus { outline: 2px solid var(--c); }
.hcard .badge { background: #fee2e2; color: #b91c1c; font-size: .7rem; font-weight: 700; padding: 1px 8px; border-radius: 99px; }
.hbar { height: 10px; background: #f1f5f9; border-radius: 99px; overflow: hidden; }
.hbar span { display: block; height: 100%; background: var(--c); border-radius: 99px; }
.score { font-size: 1.4rem; font-weight: 700; } .score small { font-size: .75rem; color: var(--muted); font-weight: 400; }
.move { display: flex; gap: 16px; justify-content: space-between; align-items: center; border-left: 4px solid var(--c); padding-left: 14px; flex-wrap: wrap; }
.move h3 { margin: 6px 0 4px; font-size: 1.15rem; }
.move p { margin: 4px 0; }
.move .mr { display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
.lever-tag { display: inline-block; background: var(--c); color: #fff; font-size: .72rem; font-weight: 700; padding: 1px 9px; border-radius: 99px; }
a.li { text-decoration: none; color: var(--text); }
@media (max-width: 900px) {
  .tiles { grid-template-columns: 1fr; } .tile.full { grid-column: auto; }
  .health { grid-template-columns: 1fr 1fr; }
  .flow { flex-direction: column; } .farrow { flex-direction: row; gap: 6px; min-width: 0; } .farrow { transform: none; }
  .nb { grid-template-columns: 1fr; }
}

/* Sub-account switcher */
.acct-wrap { position: relative; margin: 0 0 12px; }
.acct { display: flex; align-items: center; gap: 9px; width: 100%; background: #1f3236; border: 1px solid #374151; color: #fff; border-radius: 10px; padding: 8px 10px; cursor: pointer; font: inherit; text-align: left; }
.acct:hover { border-color: var(--muted); }
.acct .av { width: 28px; height: 28px; border-radius: 8px; background: var(--brand); display: grid; place-items: center; font-size: .75rem; font-weight: 700; flex: none; }
.acct .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: .9rem; }
.acct .car { color: #9ca3af; font-size: .8rem; }
.acct-menu { position: absolute; left: 0; right: 0; top: calc(100% + 6px); background: #fff; color: var(--text); border-radius: 10px; box-shadow: 0 12px 30px rgba(0,0,0,.25); padding: 6px; z-index: 60; min-width: 220px; }
.acct-menu button { display: flex; justify-content: space-between; width: 100%; border: 0; background: none; padding: 8px 10px; border-radius: 7px; cursor: pointer; font: inherit; font-size: .9rem; text-align: left; color: var(--text); }
.acct-menu button:hover, .acct-menu button:focus-visible { background: var(--brand-soft); outline: none; }
.acct-menu button.on { font-weight: 600; color: var(--brand); }
.acct-menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }
.mobile-only { display: none !important; }
@media (max-width: 900px) {
  .acct-wrap { margin: 0; flex: none; position: static; }
  .acct { padding: 5px 8px; max-width: 150px; }
  .acct .av { width: 24px; height: 24px; }
  .acct-menu { position: fixed; left: 10px; right: 10px; top: 54px; }
  .acct-menu .mobile-only { display: flex !important; }
}

/* Workflows: list */
.wf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.wf-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; cursor: pointer; display: flex; flex-direction: column; gap: 6px; }
.wf-card:hover, .wf-card:focus-visible { border-color: #a9dcd6; outline: none; box-shadow: 0 4px 14px rgba(31,127,120,.14); }
.wf-card h3 { margin: 0; font-size: 1.05rem; }
.wf-card p { margin: 0; }
.wf-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: .8rem; color: var(--muted); margin-top: auto; padding-top: 8px; border-top: 1px solid var(--line); }
.switch { position: relative; width: 42px; height: 24px; flex: none; cursor: pointer; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.switch span { position: absolute; inset: 0; background: #d1d5db; border-radius: 99px; transition: .15s; }
.switch span::after { content: ''; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; background: #fff; border-radius: 50%; transition: .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + span { background: var(--ok); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 3px solid #7cc8bf; outline-offset: 2px; }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; max-height: 60vh; overflow: auto; padding: 2px; }
.tpl { display: flex; flex-direction: column; gap: 6px; text-align: left; border: 1px solid var(--line); border-radius: 10px; padding: 12px; background: #fff; cursor: pointer; font: inherit; color: var(--text); }
.tpl:hover, .tpl:focus-visible { border-color: var(--brand); outline: none; background: var(--brand-soft); }

/* Workflows: builder */
.wfb { display: grid; grid-template-columns: 230px 1fr 340px; grid-template-rows: auto 1fr; height: 100vh; }
.wfb .bar { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: #fff; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.wfb .bar .title { flex: 1; min-width: 160px; }
.wfb .bar .title input { font-weight: 600; font-size: 1.05rem; border-color: transparent; max-width: 380px; }
.wfb .bar .title input:hover, .wfb .bar .title input:focus { border-color: var(--line); }
.sm-select { width: auto; padding: 5px 8px; font-size: .85rem; }
.palette-col { background: #fbfbfd; border-right: 1px solid var(--line); padding: 14px; overflow-y: auto; }
.palette-col h3 { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 0 0 4px; }
.pchip { display: flex; gap: 10px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 9px 10px; margin-bottom: 8px; cursor: grab; user-select: none; }
.pchip:hover { box-shadow: var(--shadow); }
.pchip .pi { font-size: 1.2rem; color: var(--c); display: grid; place-items: center; }
.pchip b { display: block; font-size: .88rem; } .pchip small { display: block; color: var(--muted); font-size: .74rem; line-height: 1.3; }
.canvas { overflow: auto; padding: 24px 24px 80px; background: radial-gradient(#e5e7eb 1px, transparent 1px) 0 0 / 18px 18px, var(--bg); }
.tree { display: flex; flex-direction: column; align-items: center; min-width: min-content; }
.wnode { width: 290px; display: flex; gap: 10px; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; box-shadow: var(--shadow); cursor: pointer; position: relative; }
.wnode:hover { border-color: #a9dcd6; }
.wnode.sel { outline: 2px solid var(--brand); outline-offset: 2px; }
.wnode:focus-visible { outline: 3px solid #7cc8bf; outline-offset: 2px; }
.wnode.t-trigger { background: var(--brand-soft); border-color: #a9dcd6; }
.wnode .ni { font-size: 1.2rem; line-height: 1; color: var(--c); display: grid; place-items: center; }
.wnode .nbody { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.wnode .nt { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: #64748b; }
.wnode.t-trigger .nt { color: var(--brand); }
.wnode .ns { font-size: .9rem; overflow-wrap: anywhere; }
.nstat { margin-top: 4px; font-size: .75rem; color: #047857; background: #ecfdf5; border-radius: 6px; padding: 1px 7px; align-self: flex-start; }
.slot { height: 44px; width: 2px; background: #cbd5e1; position: relative; display: flex; align-items: center; justify-content: center; }
.slot .plus { position: absolute; width: 24px; height: 24px; border-radius: 50%; border: 1px solid #cbd5e1; background: #fff; color: var(--muted); cursor: pointer; font-size: .9rem; line-height: 1; padding: 0; display: grid; place-items: center; }
.slot .plus:hover, .slot .plus:focus-visible { border-color: var(--brand); color: var(--brand); outline: none; transform: scale(1.1); }
.tree.dragging .slot .plus { border: 2px dashed var(--brand); color: var(--brand); width: 30px; height: 30px; }
.slot.over .plus { background: var(--brand); color: #fff; transform: scale(1.25); }
.end { font-size: .75rem; color: var(--muted); background: #fff; border: 1px dashed #cbd5e1; border-radius: 99px; padding: 2px 12px; }
.branches { display: flex; gap: 28px; position: relative; padding-top: 18px; align-items: flex-start; }
.branches::before { content: ''; position: absolute; top: 0; left: 25%; right: 25%; height: 18px; border: 2px solid #cbd5e1; border-bottom: 0; border-radius: 10px 10px 0 0; }
.branch { display: flex; flex-direction: column; align-items: center; min-width: 290px; }
.blabel { font-size: .72rem; font-weight: 700; padding: 2px 10px; border-radius: 99px; }
.branch.yes .blabel { background: #dcfce7; color: #15803d; } .branch.no .blabel { background: #fee2e2; color: #b91c1c; }
.plus-menu { position: absolute; top: 30px; left: 50%; transform: translateX(-50%); z-index: 20; background: #fff; border-radius: 10px; box-shadow: 0 12px 30px rgba(0,0,0,.2); padding: 6px; width: 190px; }
.plus-menu button { display: flex; gap: 8px; width: 100%; border: 0; background: none; padding: 7px 9px; border-radius: 7px; cursor: pointer; font: inherit; font-size: .88rem; text-align: left; }
.plus-menu button:hover, .plus-menu button:focus-visible { background: var(--brand-soft); outline: none; }
.inspector { border-left: 1px solid var(--line); background: #fff; padding: 16px; overflow-y: auto; }
.ihead { display: flex; gap: 8px; align-items: center; font-size: 1.05rem; padding-bottom: 10px; margin-bottom: 12px; border-bottom: 1px solid var(--line); }
@media (max-width: 1100px) { .wfb { grid-template-columns: 200px 1fr 300px; } }
@media (max-width: 860px) {
  .wfb { grid-template-columns: 1fr; grid-template-rows: auto auto auto auto; height: auto; }
  .palette-col { border-right: 0; border-bottom: 1px solid var(--line); display: flex; gap: 8px; overflow-x: auto; padding: 10px; }
  .palette-col h3, .palette-col .hint { display: none; }
  .pchip { flex: none; margin: 0; } .pchip small { display: none; }
  .canvas { min-height: 60vh; padding: 16px 8px 40px; }
  .wnode, .branch { width: 260px; min-width: 260px; }
  .inspector { border-left: 0; border-top: 1px solid var(--line); }
}
.tpl.on { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 1px var(--brand); }
.sr { position: absolute; opacity: 0; width: 1px; height: 1px; }
label.tpl { position: relative; }
label.tpl:focus-within { outline: 3px solid #7cc8bf; outline-offset: 2px; }
.wf-strip { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; margin: -6px 0 14px; }
.wf-strip .chip { text-decoration: none; color: var(--text); display: inline-flex; gap: 6px; align-items: center; }
.why { border-left: 4px solid var(--brand); background: var(--brand-soft); }
.qrrow { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); margin-top: 10px; flex-wrap: wrap; }
.qrrow img { border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.rpcard pre.mail { white-space: pre-wrap; margin: 10px 0 0; }
.edge-lbl { position: absolute; transform: translate(-50%, -50%); background: #fff; border: 1px solid var(--line); border-radius: 99px; padding: 1px 8px; font-size: .72rem; color: #15803d; white-space: nowrap; pointer-events: none; }
.edge-lbl.no { color: #b91c1c; }
.node.leaky { box-shadow: 0 0 0 3px #fecaca, var(--shadow); }
.leakpill { position: absolute; top: -12px; right: 10px; background: #fee2e2; color: #b91c1c; font-size: .7rem; font-weight: 700; border-radius: 99px; padding: 2px 8px; }
.banner.leak { background: #fef2f2; border-color: #fecaca; color: #7f1d1d; }
.describe { background: var(--brand-soft); border-radius: 10px; padding: 12px; margin-bottom: 4px; }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .8rem; margin: 12px 0; }
.or::before, .or::after { content: ''; flex: 1; border-top: 1px solid var(--line); }
.abpill { position: absolute; top: -12px; left: 10px; background: #ede9fe; color: #6d28d9; font-size: .7rem; font-weight: 700; border-radius: 99px; padding: 2px 8px; }
.editor .bar .seg { display: inline-flex; gap: 2px; }
.tpl .swatch { width: 100%; height: 6px; border-radius: 99px; }

/* Photo drop zone in the page builder */
.dropzone { display: flex; align-items: center; gap: 12px; margin-top: 6px; padding: 14px; border: 1.5px dashed #a9dcd6; border-radius: 12px; background: #f5fbfa; cursor: pointer; transition: background .15s, border-color .15s; }
.dropzone:hover, .dropzone:focus-visible, .dropzone.over { border-color: var(--brand); background: var(--brand-soft); outline: none; }
.dropzone .dz-ico { font-size: 1.6rem; color: var(--brand); display: grid; place-items: center; width: 44px; height: 44px; background: #fff; border-radius: 10px; flex: none; }
.dropzone img { width: 56px; height: 44px; object-fit: cover; border-radius: 8px; flex: none; }
.dropzone .dz-text { display: flex; flex-direction: column; font-size: .85rem; line-height: 1.3; }
.dropzone .dz-text span { color: var(--muted, #6b7280); font-size: .78rem; }

/* Add leads: three ways in */
.choices { display: grid; gap: 8px; }
.choice { display: flex; gap: 12px; align-items: flex-start; text-align: left; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; font: inherit; color: inherit; }
.choice:hover, .choice:focus-visible { border-color: var(--brand); background: var(--brand-soft); outline: none; }
.choice .ci { font-size: 1.3rem; color: var(--brand); width: 38px; height: 38px; display: grid; place-items: center; background: var(--brand-soft); border-radius: 10px; flex: none; }
.choice b { display: block; margin-bottom: 2px; }
.choice small { color: var(--muted); line-height: 1.35; display: block; }
table.leads input { border: 1px solid transparent; background: transparent; padding: 4px 6px; min-width: 90px; font: inherit; border-radius: 6px; }
table.leads input:hover, table.leads input:focus { border-color: var(--line); background: #fff; }

.notify-to { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; background: #f8fafc; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin: 0 0 10px; }

/* Rilly lockup images (public/brand). */
.logo .lockup { height: 33px; width: auto; display: block; }
.logo .mark { display: none; }
.auth .logo .lockup { height: 36px; }

/* Undo button inside a toast */
#toast .toast-undo { margin-left: 10px; background: none; border: 0; color: #7fd6cc; font: inherit; font-weight: 700; cursor: pointer; padding: 0; text-decoration: underline; }
#toast { pointer-events: auto; }

/* Bin under the page-content list while a block is dragged */
.list-bin { display: none; align-items: center; justify-content: center; gap: 8px; margin: 8px 0 4px; padding: 12px; border: 2px dashed #fca5a5; border-radius: 10px; color: #b91c1c; font-weight: 600; font-size: .9rem; }
.list-bin.on { display: flex; }
.list-bin.over { background: #dc2626; color: #fff; border-color: #dc2626; }

/* Page picture inside a funnel-map card: the page at 1200px wide, scaled to fit. */
.nthumb { display: block; margin: 2px 12px 8px; height: 128px; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: #fff; position: relative; cursor: pointer; }
.nthumb iframe { position: absolute; top: 0; left: 0; width: 760px; height: 480px; border: 0; transform: scale(.268); transform-origin: 0 0; pointer-events: none; }
.nthumb:hover { border-color: var(--brand); }

/* Pages: each funnel or website as a strip of page pictures */
.pgroup { margin-bottom: 16px; padding: 16px 18px; }
.pg-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.pg-head > div:first-child { display: flex; flex-direction: column; margin-right: 4px; }
.pg-name { font-weight: 700; font-size: 1.05rem; color: var(--text); text-decoration: none; }
.pg-name:hover { color: var(--brand); }
.pg-stats { display: flex; gap: 14px; align-items: baseline; margin-left: auto; font-size: .85rem; color: var(--muted); flex-wrap: wrap; }
.pg-stats b { color: var(--text); font-size: 1rem; }
.pg-strip { display: flex; align-items: center; gap: 10px; overflow-x: auto; padding: 4px 2px 8px; scroll-snap-type: x proximity; }
.pg-page { margin: 0; flex: none; width: 200px; scroll-snap-align: start; }
.pg-thumb { display: block; position: relative; height: 136px; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: #fff; box-shadow: 0 1px 2px rgba(16,24,40,.05); }
.pg-thumb:hover { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.pg-thumb iframe { position: absolute; top: 0; left: 0; width: 760px; height: 520px; border: 0; transform: scale(.263); transform-origin: 0 0; pointer-events: none; }
.pg-start, .pg-ab { position: absolute; top: 6px; left: 6px; background: var(--brand); color: #fff; font-size: .65rem; font-weight: 700; padding: 2px 7px; border-radius: 99px; letter-spacing: .04em; text-transform: uppercase; }
.pg-ab { left: auto; right: 6px; background: var(--ink); }
.pg-page figcaption { display: flex; flex-direction: column; gap: 1px; padding: 8px 2px 0; font-size: .88rem; }
.pg-page figcaption b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pg-links { font-size: .8rem; }
.pg-links a { color: var(--brand); }
.pg-arrow { flex: none; color: #9aa9ad; font-size: 1.3rem; margin-top: -44px; }

/* Funnel statistics strip */
.fstats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 0 0 12px; }
.fstat { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.fs-v { font-size: 1.5rem; font-weight: 700; color: var(--text); line-height: 1.1; }
.fs-l { font-size: .85rem; font-weight: 600; color: var(--text); }
.fs-s { font-size: .78rem; color: var(--muted); }
/* Follow-ups panel on the funnel map */
.fu { margin: 0 0 12px; padding: 0; }
.fu > summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 16px; cursor: pointer; }
.fu > summary::-webkit-details-marker { display: none; }
.fu > summary::after { content: ''; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); margin-left: 4px; transition: transform .15s; }
.fu[open] > summary::after { transform: rotate(-135deg); }
.fu [data-fulist] { padding: 0 16px 14px; }
.fu-wf { border-top: 1px solid var(--line); padding: 12px 0; }
.fu-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.fu-strip { display: flex; align-items: stretch; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
.fu-step { flex: none; width: 168px; display: grid; grid-template-columns: auto 1fr; column-gap: 8px; align-content: start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--text); text-decoration: none; }
.fu-step:hover { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.fu-step.t-trigger { background: var(--brand-soft); border-color: #a9dcd6; }
.fu-ico { grid-row: span 3; color: var(--brand); font-size: 1.15rem; padding-top: 1px; }
.fu-t { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #64748b; }
.fu-d { font-size: .88rem; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.fu-n { font-size: .75rem; color: var(--muted); margin-top: 2px; }
.fu-add { flex: none; align-self: center; width: 28px; height: 28px; border-radius: 50%; border: 1px dashed #a9dcd6; background: #fff; color: var(--brand); display: grid; place-items: center; cursor: pointer; padding: 0; }
.fu-add:hover { background: var(--brand); color: #fff; border-style: solid; }
.fu-add.end { width: auto; border-radius: 10px; padding: 0 12px; display: flex; gap: 4px; align-items: center; height: auto; align-self: stretch; }
.choice input:checked ~ .ci { background: var(--brand); color: #fff; }
label.choice:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }

/* Purpose tag on funnels and websites: tap to change */
.purpose { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 99px; border: 1px solid #a9dcd6; background: var(--brand-soft); color: var(--brand); font-family: inherit; font-weight: 600; font-size: .8rem; line-height: 1.4; cursor: pointer; white-space: nowrap; }
.purpose:hover { background: var(--brand); color: #fff; border-color: var(--brand); }
.purpose.unset { background: #fff; border-style: dashed; color: var(--muted); }
h1 .purpose { font-size: .8rem; }

/* Email list */
.bc-list { display: grid; gap: 10px; }
.bc { display: flex; align-items: center; gap: 16px; padding: 14px 16px; }
.bc-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; color: inherit; text-decoration: none; }
.bc-main .pill { align-self: flex-start; }
.bc-subj { font-size: 1.02rem; }
.bc-pre { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bc-main:hover .bc-subj { color: var(--brand); }
.bc-stats { display: flex; gap: 18px; }
.bc-stats span { display: flex; flex-direction: column; align-items: center; font-size: .78rem; color: var(--muted); }
.bc-stats b { font-size: 1.15rem; color: var(--text); }
.bc-actions { display: flex; gap: 6px; }
@media (max-width: 700px) { .bc { flex-direction: column; align-items: stretch; } }
/* Email designer */
.compose { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.cmp-bar { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.cmp-actions { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
svg.rot90 { transform: rotate(90deg); }
.cmp-form { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.cmp-form textarea { font: 15px/1.6 -apple-system, system-ui, sans-serif; min-height: 320px; }
.cmp-tools { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0; }
.cmp-tools button { border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: 4px 11px; font: inherit; font-size: .8rem; cursor: pointer; display: inline-flex; gap: 4px; align-items: center; }
.cmp-tools button:hover { border-color: var(--brand); color: var(--brand); }
.cmp-preview { position: sticky; top: 16px; display: grid; gap: 10px; }
.cmp-device { justify-self: start; }
.cmp-inbox { display: grid; grid-template-columns: 10px 1fr auto; gap: 10px; align-items: start; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; font-size: .9rem; }
.cmp-inbox > div { min-width: 0; } .cmp-inbox > div > div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ib-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); margin-top: 6px; }
.cmp-frame { background: #eef2f1; border-radius: 14px; padding: 18px; transition: padding .2s; }
.cmp-frame.phone { padding: 18px calc(50% - 190px); }
.cmp-mail { background: #fff; border-radius: 10px; padding: 22px 24px; box-shadow: 0 1px 3px rgba(16,24,40,.08); font: 16px/1.55 -apple-system, system-ui, sans-serif; color: #111827; overflow-wrap: anywhere; max-height: 70vh; overflow-y: auto; }
.cmp-frame.phone .cmp-mail { padding: 18px 16px; font-size: 15px; }
.cmp-head { display: flex; flex-direction: column; border-bottom: 1px solid var(--line); padding-bottom: 10px; margin-bottom: 12px; }
.cmp-mail h3 { margin: 0 0 12px; font-size: 1.15rem; }
.cmp-mail p { margin: 0 0 14px; }
.cmp-mail a { color: var(--brand); }
.cmp-foot { color: #9ca3af; font-size: .8rem; }
@media (max-width: 1000px) { .compose { grid-template-columns: 1fr; } .cmp-preview { position: static; } }

/* Fill-in fields: drop-down and "{{" suggestions */
.lbl-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lbl-row .ins-field { margin-left: auto; }
.ins-field { width: auto; padding: 4px 10px; border-radius: 99px; border: 1px solid #a9dcd6; background: var(--brand-soft); color: var(--brand); font: inherit; font-size: .8rem; font-weight: 600; cursor: pointer; }
.cmp-form .f, .modal .f { position: relative; }
.ins-pop { position: absolute; z-index: 50; min-width: 220px; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 28px rgba(16,24,40,.16); padding: 4px; display: grid; }
.ins-pop button { all: unset; display: flex; justify-content: space-between; gap: 12px; padding: 8px 10px; border-radius: 7px; cursor: pointer; font-size: .9rem; }
.ins-pop button span { color: var(--muted); font-size: .78rem; }
.ins-pop button.on, .ins-pop button:hover { background: var(--brand-soft); color: var(--brand); }

/* People: active behaviour segment */
.seg-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; margin: -4px 0 14px; background: var(--brand-soft); border-color: #a9dcd6; }
.seg-bar svg { color: var(--brand); }

/* Calendar */
.cal-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.cal-day h3 { font-size: .95rem; margin: 16px 0 8px; color: var(--muted); font-weight: 600; }
.cal-bk { display: flex; gap: 16px; align-items: flex-start; padding: 12px 16px; margin-bottom: 8px; }
.cal-bk.cancelled { opacity: .6; }
.cal-time { display: flex; flex-direction: column; min-width: 84px; }
.cal-time b { font-size: 1.05rem; color: var(--brand); }
.cal-who { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cal-who a { color: var(--text); text-decoration: none; } .cal-who a:hover b { color: var(--brand); }
.cal-note { margin: 4px 0 0; font-style: italic; }
.cal-hours h2 { margin-top: 0; }
.cal-days { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.cal-dchip input { display: none; }
.cal-dchip span { display: inline-block; padding: 6px 11px; border: 1px solid var(--line); border-radius: 99px; cursor: pointer; font-size: .85rem; }
.cal-dchip input:checked + span { background: var(--brand); border-color: var(--brand); color: #fff; }
@media (max-width: 1000px) { .cal-grid { grid-template-columns: 1fr; } }

.cal-side { display: grid; gap: 16px; }
.cal-busy h2 { margin-top: 0; }
.cal-busy-form { border-top: 1px solid var(--line); margin-top: 10px; padding-top: 12px; }

/* Funnel: where visitors came from */
.src-body { padding: 0 16px 14px; }
.src-tip { background: var(--brand-soft); border-radius: 10px; padding: 8px 12px; margin: 0 0 10px; }
.src-card table.mini { width: 100%; }
.src-card code { font-size: .8rem; background: #f1f5f4; padding: 1px 5px; border-radius: 5px; }

/* Faces */
.av-c { position: relative; flex: none; display: inline-grid; place-items: center; border-radius: 50%; color: #fff; font-weight: 700; letter-spacing: .02em; overflow: hidden; line-height: 1; }
.av-c img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.av-btn { position: relative; border: 0; background: none; padding: 0; cursor: pointer; border-radius: 50%; }
.av-btn .av-edit { position: absolute; right: -2px; bottom: -2px; width: 24px; height: 24px; border-radius: 50%; background: #fff; color: var(--brand); display: grid; place-items: center; box-shadow: 0 1px 4px rgba(0,0,0,.2); font-size: 14px; }
.av-btn.over .av-c, .av-btn:hover .av-c { outline: 3px solid var(--brand-soft); }
/* People as cards */
.pcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.pcard { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 18px 12px 14px; background: #fff; border: 1px solid var(--line); border-radius: 14px; color: var(--text); text-decoration: none; min-width: 0; }
.pcard:hover, .pcard:focus-visible { border-color: #a9dcd6; box-shadow: 0 4px 14px rgba(16,24,40,.08); outline: none; }
.pcard .av-c { margin-bottom: 6px; }
.pc-name { font-size: .98rem; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-sub { font-size: .8rem; color: var(--muted); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-row { display: flex; gap: 4px; flex-wrap: wrap; justify-content: center; margin-top: 4px; }
.pc-meta { font-size: .75rem; color: var(--muted); }
.pv-toggle { margin: 0; }
@media (max-width: 520px) { .pcards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } }

/* Calendar: open times per weekday */
.wk { display: grid; gap: 8px; margin-top: 6px; }
.wk-day { display: grid; grid-template-columns: 70px 1fr; gap: 8px; align-items: start; padding: 6px 0; border-top: 1px solid var(--line); }
.wk-on { display: flex; gap: 6px; align-items: center; padding-top: 6px; cursor: pointer; }
.wk-ranges { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.wk-r { display: inline-flex; gap: 4px; align-items: center; }
.wk-r input { width: 124px; padding: 6px 6px; font-size: .88rem; }
.wk-day { grid-template-columns: 62px 1fr; }
.wk-closed { display: none; padding-top: 6px; }
.wk-day.off .wk-r, .wk-day.off [data-addr] { display: none; }
.wk-day.off .wk-closed { display: inline; }

/* Email: starters, checklist, send options */
.starters { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.starter { display: inline-flex; gap: 6px; align-items: center; padding: 8px 13px; border: 1px solid var(--line); border-radius: 99px; background: #fff; font: inherit; font-size: .88rem; cursor: pointer; color: var(--text); min-height: 36px; }
.starter:hover, .starter.on { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.cmp-sched { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cmp-check { padding: 12px 14px; display: grid; gap: 6px; font-size: .88rem; }
.ck { display: flex; gap: 8px; align-items: flex-start; }
.ck svg { flex: none; margin-top: 3px; }
.ck.ok svg { color: var(--brand); } .ck.meh { color: var(--muted); } .ck.bad { color: #b45309; }
.pill-opt { display: inline-block; padding: 7px 14px; border: 1px solid var(--line); border-radius: 99px; cursor: pointer; }
input[name=when]:checked + .pill-opt { background: var(--brand); color: #fff; border-color: var(--brand); }
.modal:has(input[name=when][value=now]:checked) [data-later] { display: none; }

/* Invoices & payment links */
.section-h { font-size: 1rem; margin: 22px 0 10px; }
.stat-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin: 14px 0 4px; }
.stat-strip > div { background: #fff; border: 1px solid var(--line, #E3E9E8); border-radius: 12px; padding: 14px 16px; }
.stat-strip b { display: block; font-size: 1.35rem; color: var(--ink); }
.stat-strip span { color: var(--muted, #5B6B70); font-size: .85rem; }
.card.list { padding: 4px 0; }
.inv-row { display: grid; grid-template-columns: 1fr auto auto; gap: 8px 14px; align-items: center; padding: 12px 18px; border-top: 1px solid var(--line, #E3E9E8); }
.inv-row:first-child { border-top: 0; }
.inv-amt { font-weight: 700; white-space: nowrap; }
.inv-acts { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; }
@media (min-width: 900px) { .inv-row { grid-template-columns: 1fr auto 90px auto; } .inv-acts { grid-column: auto; justify-content: flex-end; } }
.inv-line { display: grid; grid-template-columns: 1fr 64px 100px 36px; gap: 6px; margin-bottom: 6px; }
.inv-line input { margin: 0; min-height: 40px; }
.inv-total { display: flex; justify-content: space-between; padding: 10px 0; border-top: 1px solid var(--line, #E3E9E8); margin: 8px 0 12px; }
.inv-total b { font-size: 1.15rem; }
.card.empty.slim { padding: 18px; text-align: left; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.sm { min-height: 32px; }

/* First-run setup */
.setup { min-height: 100vh; display: grid; place-items: start center; padding: 32px 16px; background: linear-gradient(135deg, #e6f4f2, #f6f7fb); }
.setup-card { width: 100%; max-width: 640px; padding: 28px; }
.setup-card h1 { font-size: 1.5rem; margin: 6px 0 4px; }
.setup-top { display: flex; justify-content: space-between; align-items: center; min-height: 32px; }
.setup-top [data-back] svg { transform: scaleX(-1); }
.dots { display: flex; gap: 6px; }
.dots i { width: 28px; height: 4px; border-radius: 2px; background: var(--line); }
.dots i.on { background: var(--brand); }
.choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; margin: 18px 0; }
.choice { text-align: left; background: #fff; border: 1.5px solid var(--line); border-radius: 12px; padding: 14px 16px; cursor: pointer; font: inherit; color: var(--text); display: grid; gap: 2px; min-height: 64px; }
.choice:hover { border-color: var(--brand); }
.choice.on { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 1px var(--brand) inset; }
.choice span { color: var(--muted); font-size: .88rem; }
.choice .ic { color: var(--brand); }
.choice .ic svg { width: 22px; height: 22px; }
.btn.big { width: 100%; justify-content: center; padding: 12px; font-size: 1rem; margin-top: 6px; }
.setup-extra { background: #f8faf9; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 14px; }
.day-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.chip { min-width: 48px; min-height: 36px; border-radius: 18px; border: 1.5px solid var(--line); background: #fff; font: inherit; cursor: pointer; }
.chip.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.skel-page { margin: 20px 0 6px; display: grid; gap: 12px; padding: 24px; border: 1px solid var(--line); border-radius: 12px; }
.skel-page i { height: 14px; border-radius: 7px; background: linear-gradient(90deg, #eef2f1 25%, #e2e8e7 50%, #eef2f1 75%); background-size: 200% 100%; animation: skel 1.2s infinite linear; }
.skel-page i.h { height: 26px; width: 70%; margin: 0 auto 6px; }
.skel-page i.b { height: 42px; width: 50%; margin: 8px auto 0; border-radius: 10px; }
@keyframes skel { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .skel-page i { animation: none; } }
.setup-preview { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin: 16px 0; background: #fff; }
.setup-preview .bar { display: flex; gap: 5px; align-items: center; padding: 8px 12px; background: #f3f5f5; border-bottom: 1px solid var(--line); font-size: .8rem; color: var(--muted); }
.setup-preview .bar i { width: 9px; height: 9px; border-radius: 50%; background: #d4dad9; }
.setup-preview .bar span { margin-left: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.setup-preview iframe { width: 100%; height: 380px; border: 0; display: block; }
.su-fu-list { display: grid; gap: 8px; }
.su-fu { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.su-fu input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--brand); }
.su-fu > span { display: grid; gap: 2px; }
.su-fu.off { opacity: .75; cursor: default; }
.setup-actions { display: flex; gap: 10px; align-items: center; margin-top: 18px; }
.setup-actions .btn.big { margin: 0; flex: 1; }
.setup-done { text-align: center; padding: 12px 0; }
.big-ok { width: 56px; height: 56px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; margin: 8px auto; }
.big-ok svg { width: 28px; height: 28px; }
.copy-row { display: flex; gap: 8px; margin: 18px 0 10px; }
.copy-row input { flex: 1; margin: 0; }
@media (max-width: 560px) { .setup-card { padding: 20px; } .setup-actions { flex-direction: column-reverse; align-items: stretch; } .choice-grid { grid-template-columns: 1fr; } }
.setup-nudge { display: flex; gap: 14px; align-items: center; justify-content: space-between; padding: 16px 18px; margin-bottom: 14px; border-color: var(--brand); background: var(--brand-soft); }
@media (max-width: 560px) { .setup-nudge { flex-direction: column; align-items: stretch; } }
.su-fu.on { cursor: default; }
.su-fu.on > svg { width: 20px; height: 20px; color: var(--brand); flex: none; margin-top: 2px; }
.setup-extra .colors { grid-template-columns: 1fr 1fr; }
.setup-extra .colors > label:nth-child(3) { grid-column: 1 / -1; }
.choice:hover:not(.on) { background: #fff; }
.card.week { padding: 16px 20px; margin-bottom: 14px; }
.card.week h2 { font-size: 1rem; margin: 0 0 8px; }
.card.week ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; line-height: 1.5; }

/* Tap targets: at least 24px (WCAG 2.2, 2.5.8) */
input[type=checkbox], input[type=radio] { width: 20px; height: 20px; padding: 0; margin: 2px; accent-color: var(--brand); flex: none; }
.pg-links a { display: inline-block; padding: 5px 4px; min-width: 24px; }
.banner a { display: inline-block; padding: 4px 0; }
summary { min-height: 24px; padding: 2px 0; cursor: pointer; }
a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible, .choice:focus-visible, .su-fu:focus-within { outline: 3px solid #7cc8bf; outline-offset: 2px; }

/* Funnel map: left to right, with follow-up emails on the links between pages */
.node-in { top: 144px; left: -6px; margin: 0; }
.fu-chip { position: absolute; transform: translate(-50%, -50%); z-index: 3; display: grid; gap: 6px; width: 236px; }
.fu-chip.end { transform: translate(0, -50%); }
.fu-card { display: grid; gap: 3px; text-align: left; background: #fff; border: 1.5px solid #b9e0db; border-radius: 10px; padding: 8px 10px; font: inherit; cursor: pointer; box-shadow: 0 2px 8px rgba(20,40,43,.08); color: var(--text); }
.fu-card:hover { border-color: var(--brand); }
.fu-card.off { border-style: dashed; border-color: var(--line); }
.fc-t { display: flex; align-items: center; gap: 5px; font-size: .78rem; font-weight: 700; color: var(--brand); }
.fc-t svg { width: 14px; height: 14px; }
.fc-t i { font-style: normal; font-weight: 600; color: var(--muted); background: #f1f3f4; border-radius: 6px; padding: 0 5px; }
.fc-r { font-size: .74rem; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fc-r b { color: var(--muted); font-weight: 600; margin-right: 3px; }
.fu-wf.flash { box-shadow: 0 0 0 3px #7cc8bf; border-radius: 12px; transition: box-shadow .3s; }

/* Inbox */
.nav-badge { margin-left: auto; background: #e8590c; color: #fff; font-size: .7rem; font-weight: 700; border-radius: 99px; min-width: 20px; height: 20px; display: inline-grid; place-items: center; padding: 0 6px; }
.inbox { display: grid; grid-template-columns: 320px 1fr; gap: 14px; min-height: 60vh; }
.ib-list { padding: 4px 0; overflow: auto; max-height: calc(100vh - 220px); }
.ib-conv { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 10px 14px; color: var(--text); text-decoration: none; border-top: 1px solid var(--line); }
.ib-conv:first-child { border-top: 0; }
.ib-conv:hover, .ib-conv.on { background: var(--brand-soft); }
.ib-conv .nm { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ib-conv .pv { font-size: .85rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ib-conv .when { font-size: .75rem; color: var(--muted); text-align: right; display: grid; gap: 4px; justify-items: end; }
.ib-conv.unread .nm::after { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #e8590c; margin-left: 6px; vertical-align: middle; }
.ib-thread { display: grid; grid-template-rows: auto 1fr auto; padding: 0; overflow: hidden; }
.ib-head { display: flex; gap: 12px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.ib-head .who { flex: 1; min-width: 0; }
.ib-msgs { padding: 16px; display: flex; flex-direction: column; gap: 10px; overflow: auto; max-height: calc(100vh - 360px); background: #fafbfb; }
.ib-m { max-width: 78%; padding: 9px 12px; border-radius: 14px; white-space: pre-wrap; line-height: 1.45; font-size: .95rem; }
.ib-m.in { align-self: flex-start; background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.ib-m.out { align-self: flex-end; background: var(--brand); color: #fff; border-bottom-right-radius: 4px; }
.ib-m .meta { display: block; font-size: .72rem; opacity: .75; margin-top: 4px; }
.ib-m.event { align-self: center; background: none; color: var(--muted); font-size: .82rem; padding: 2px; }
.ib-m .subj { display: block; font-weight: 700; margin-bottom: 2px; }
.ib-reply { border-top: 1px solid var(--line); padding: 10px 12px; display: grid; gap: 8px; }
.ib-reply textarea { margin: 0; resize: vertical; min-height: 64px; }
.ib-reply .row { justify-content: space-between; align-items: center; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.seg button { border: 0; background: #fff; padding: 6px 12px; font: inherit; font-size: .85rem; cursor: pointer; min-height: 32px; display: inline-flex; gap: 5px; align-items: center; }
.seg button[aria-pressed=true] { background: var(--brand); color: #fff; }
.seg button:disabled { color: #9aa1a8; cursor: not-allowed; }
.ch-ico { color: var(--muted); display: inline-grid; }
.ch-ico svg { width: 16px; height: 16px; }
@media (max-width: 860px) {
  .inbox { grid-template-columns: 1fr; }
  .inbox.has-thread .ib-list-wrap { display: none; }
  .inbox:not(.has-thread) .ib-thread { display: none; }
  .ib-msgs { max-height: none; min-height: 40vh; }
}
.av-c svg { width: 55%; height: 55%; color: #fff; }

/* Members areas */
.mem-list { display: grid; margin-top: 12px; }
.mem { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.mem .who { flex: 1; min-width: 180px; }
.prod-picks { display: grid; gap: 4px; }

.edge-add { position: absolute; transform: translate(-50%, -50%); z-index: 4; width: 28px; height: 28px; border-radius: 50%; border: 1.5px dashed #9fd2cc; background: #fff; color: var(--brand); display: grid; place-items: center; cursor: pointer; padding: 0; box-shadow: 0 1px 4px rgba(20,40,43,.08); }
.edge-add svg { width: 15px; height: 15px; }
.edge-add:hover, .edge-add:focus-visible { background: var(--brand); color: #fff; border-style: solid; }

.fu-card { cursor: default; gap: 0; padding: 0; overflow: hidden; }
.fc-t { border: 0; background: none; font: inherit; cursor: pointer; padding: 9px 12px 7px; width: 100%; text-align: left; display: flex; align-items: center; gap: 5px; font-size: .8rem; font-weight: 700; color: var(--brand); }
.fc-t i.live { color: #14532d; background: #dcfce7; }
.fc-r { display: grid; gap: 2px; padding: 8px 12px 9px; border-top: 1px solid var(--line); white-space: normal; position: relative; }
.fc-when { font-size: .7rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.fc-subj { font-size: .84rem; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fc-pre { font-size: .78rem; color: var(--muted); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fc-edit { justify-self: start; margin-top: 3px; border: 0; background: none; padding: 3px 0; min-height: 24px; font: inherit; font-size: .78rem; font-weight: 600; color: var(--brand); cursor: pointer; display: inline-flex; gap: 4px; align-items: center; }
.fc-edit svg { width: 13px; height: 13px; }
.fc-edit:hover { text-decoration: underline; }
.fc-more { border: 0; border-top: 1px solid var(--line); background: #f8faf9; font: inherit; font-size: .78rem; color: var(--brand); padding: 6px 12px; cursor: pointer; text-align: left; }

/* Colour palettes in the page editor */
.pal-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 4px 0 8px; }
.pal { border: 1.5px solid var(--line); background: #fff; border-radius: 10px; padding: 6px 6px 4px; cursor: pointer; display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; min-height: 44px; }
.pal span { height: 16px; border-radius: 4px; border: 1px solid rgba(0,0,0,.08); }
.pal small { grid-column: 1 / -1; font-size: .7rem; color: var(--muted); text-align: center; }
.pal:hover { border-color: #9fd2cc; }
.pal.on { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); }

.fc-top { display: flex; align-items: center; gap: 8px; padding: 8px 12px 6px; }
.fc-top .fc-t { padding: 0; flex: 1; width: auto; }
.fc-state { font-size: .72rem; font-weight: 600; color: var(--muted); }
.switch.sm { transform: scale(.8); transform-origin: right center; }
a.fc-more { display: block; text-decoration: none; }

.fc-split .fc-yes, .fc-split .fc-no { display: grid; grid-template-columns: 34px 1fr; column-gap: 6px; font-size: .8rem; line-height: 1.35; padding-top: 4px; }
.fc-split .fc-yes b { color: #15803d; } .fc-split .fc-no b { color: var(--muted); }
.fc-split .fc-edit { grid-column: 2; }
.split-b { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px 10px; margin: 0 0 10px; display: grid; gap: 6px; }
.split-b legend { font-weight: 600; padding: 0 4px; }
.split-b .seg label { display: inline-flex; gap: 4px; align-items: center; padding: 4px 10px; font-size: .85rem; cursor: pointer; }
.split-b [data-b] { display: grid; gap: 6px; }
.split-b input:not([type=radio]), .split-b textarea { margin: 0; }

/* Address suggestions */
.addr-list { position: absolute; left: 0; right: 0; top: 100%; z-index: 30; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(20,40,43,.12); margin-top: 4px; overflow: hidden; }
.addr-opt { display: flex; gap: 8px; align-items: center; padding: 10px 12px; cursor: pointer; font-size: .92rem; min-height: 24px; }
.addr-opt svg { width: 15px; height: 15px; color: var(--muted); flex: none; }
.addr-opt:hover, .addr-opt.on { background: var(--brand-soft); }
.addr-src { font-size: .7rem; color: var(--muted); padding: 4px 12px 6px; text-align: right; }

.wf-twin { display: flex; gap: 6px; align-items: flex-start; font-size: .82rem; color: #854d0e; background: #fef9e7; border-radius: 8px; padding: 6px 8px; margin: 4px 0 8px; }
.wf-twin svg { width: 15px; height: 15px; flex: none; margin-top: 2px; }

/* Business at a glance */
.range-row { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; margin: 0 0 14px; }
.range-row button { border: 0; background: none; padding: 8px 14px; font: inherit; font-size: .9rem; cursor: pointer; min-height: 36px; color: var(--text); border-left: 1px solid var(--line); }
.range-row button:first-child { border-left: 0; }
.range-row button.on { background: var(--brand); color: #fff; font-weight: 600; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
@media (max-width: 1100px) { .kpis { grid-template-columns: repeat(2, 1fr); } }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; display: grid; gap: 2px; }
.kpi .kl { font-size: .82rem; color: var(--muted); font-weight: 600; }
.kpi .kv { font-size: 1.55rem; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.kpi .kd { font-size: .78rem; color: var(--muted); }
.kpi .kd.up { color: #15803d; } .kpi .kd.down { color: #b91c1c; }
.chart-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.chart-grid .chart.wide { grid-column: 1 / -1; }
@media (max-width: 860px) { .chart-grid { grid-template-columns: 1fr; } }
.chart { padding: 14px 16px 10px; position: relative; }
.chart header { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.chart h2 { font-size: 1rem; margin: 0; }
.legend { display: flex; gap: 14px; font-size: .8rem; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.lg-rect { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.lg-line { width: 16px; height: 2px; display: inline-block; border-radius: 1px; }
.lg-dash { width: 16px; height: 0; border-top: 2px dashed #8a9296; display: inline-block; }
.viz { outline: none; }
.viz:focus-visible { box-shadow: 0 0 0 3px #7cc8bf; border-radius: 8px; }
.viz svg { display: block; overflow: visible; }
.viz .gl { stroke: #e7ebea; stroke-width: 1; }
.viz .ax { font-size: 11px; fill: var(--muted); font-variant-numeric: tabular-nums; }
.viz .ax.empty { font-size: 13px; }
.viz .xh { stroke: #9aa3a6; stroke-width: 1; }
.viz .bar.lift { filter: brightness(1.15); }
.viz-tip { position: absolute; pointer-events: none; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 6px 18px rgba(20,40,43,.12); padding: 8px 10px; font-size: .8rem; z-index: 5; min-width: 150px; }
.viz-tip .tt { color: var(--muted); margin-bottom: 4px; }
.viz-tip .tr { display: grid; grid-template-columns: 14px auto 1fr; gap: 6px; align-items: center; }
.viz-tip .tr b { color: var(--text); font-variant-numeric: tabular-nums; }
.viz-tip .tr span { color: var(--muted); }
.viz-tip .tk { width: 12px; height: 2px; border-radius: 1px; }
.viz-tip .tk.dash { border-top: 2px dashed #8a9296; height: 0; }
.src-bars { display: grid; gap: 10px; padding: 6px 0; }
.src-row { display: grid; grid-template-columns: minmax(80px, 30%) 1fr auto; gap: 10px; align-items: center; font-size: .88rem; }
.src-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.src-track { height: 12px; }
.src-track i { display: block; height: 100%; border-radius: 0 4px 4px 0; }
.src-row b { font-variant-numeric: tabular-nums; }
.viz-table { margin: 10px 0 4px; font-size: .88rem; }
.viz-table summary { color: var(--brand); }
.viz-table table { margin-top: 8px; }

/* Flows */
.ff-strip { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 4px 2px 2px; }
.ff-chip { display: inline-flex; gap: 6px; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 7px 10px; font-size: .84rem; background: #fff; max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ff-chip svg { width: 15px; height: 15px; color: var(--brand); flex: none; }
.ff-chip.start { background: var(--brand-soft); border-color: #a9dcd6; font-weight: 600; }
.ff-chip b { font-weight: 600; }
.ff-canvas { padding: 18px; overflow-x: auto; background-image: radial-gradient(#d8dedd 1px, transparent 1px); background-size: 18px 18px; }
.ff-row { display: flex; align-items: center; gap: 10px; min-width: max-content; padding: 6px 4px 10px; }
.ff-step { width: 220px; background: #fff; border: 1.5px solid #b9e0db; border-radius: 12px; padding: 10px 12px; display: grid; gap: 4px; text-align: left; font: inherit; color: var(--text); box-shadow: 0 2px 8px rgba(20,40,43,.06); align-self: center; }
.ff-step.start { background: var(--brand-soft); cursor: pointer; }
.ff-step.wait { width: 150px; border-style: dashed; }
.ff-step.split { width: 260px; }
.ffs-top { display: flex; gap: 6px; align-items: center; font-size: .72rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.ffs-top svg { width: 15px; height: 15px; color: var(--brand); }
.ffs-top span { flex: 1; }
.ffs-x { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 2px; min-width: 24px; min-height: 24px; border-radius: 6px; }
.ffs-x:hover { background: #f1f3f4; color: var(--danger); }
.ffs-x svg { width: 14px; height: 14px; }
.ffs-side { display: grid; grid-template-columns: 34px 1fr; gap: 2px 6px; font-size: .82rem; padding: 6px 0; border-top: 1px solid var(--line); }
.ffs-side b { grid-row: span 2; } .ffs-side.yes b { color: #15803d; } .ffs-side.no b { color: var(--muted); }
.ffs-side .fc-edit, .ffs-side .muted { grid-column: 2; }
.ff-plus { position: static; transform: none; flex: none; }
.banner.shared { display: flex; gap: 8px; align-items: flex-start; background: #f2faf8; border-color: #c4e6e1; color: var(--text); }
.banner.shared svg { width: 16px; height: 16px; color: var(--brand); flex: none; margin-top: 3px; }

/* Signature maker */
.sig-maker { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
@media (max-width: 760px) { .sig-maker { grid-template-columns: 1fr; } .sig-live { order: -1; } }
.sig-styles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 4px; }
.sig-style { border: 1.5px solid var(--line); border-radius: 10px; padding: 8px 4px; text-align: center; font-size: .85rem; cursor: pointer; position: relative; }
.sig-style input { position: absolute; opacity: 0; }
.sig-style:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); font-weight: 600; }
.sig-style:has(input:focus-visible) { outline: 3px solid #7cc8bf; }
.sig-colors { display: flex; gap: 8px; align-items: center; margin-top: 4px; flex-wrap: wrap; }
.sig-color { position: relative; width: 30px; height: 30px; cursor: pointer; }
.sig-color input[type=radio] { position: absolute; opacity: 0; }
.sig-color span { display: block; width: 30px; height: 30px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 2px rgba(255,255,255,.6); }
.sig-color:has(input:checked) span { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--c); }
.sig-color.custom input { width: 30px; height: 30px; padding: 0; border: 1px dashed var(--line); border-radius: 50%; margin: 0; background: none; }
.sig-photo { display: flex; gap: 8px; align-items: center; margin-top: 4px; }
.sig-photo [data-sigphoto] { width: 48px; height: 48px; border-radius: 50%; background: #f1f3f4; display: grid; place-items: center; overflow: hidden; color: var(--muted); }
.sig-photo img { width: 100%; height: 100%; object-fit: cover; }
.sig-live { position: sticky; top: 0; }
.sig-paper { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 18px; margin-top: 6px; font-size: .95rem; box-shadow: 0 4px 16px rgba(20,40,43,.06); }
.sig-paper p { margin: 0 0 10px; }
.sig-menu { position: absolute; z-index: 20; top: 100%; left: 0; right: auto; margin-top: 4px; min-width: 220px; }
.sig-list { display: grid; gap: 10px; margin-bottom: 12px; }
.sig-item { border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: grid; gap: 8px; }
.sig-mini { background: #fff; border-radius: 8px; padding: 4px 0; overflow-x: auto; }

.one-person { display: flex; gap: 6px; align-items: center; margin-top: -4px; }
.one-person input { flex: 1; margin: 0; }

.map.site .ports, .map.site .node-in { display: none; }
.map.site .node { padding-bottom: 6px; }

.pc-tags { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; margin-top: 2px; }
.pc-tags .tag { font-size: .72rem; }

/* Simplify: one calm stats line, rare actions under ⋯ */
.fline { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: baseline; margin: -4px 0 12px; color: var(--muted); font-size: .92rem; }
.fline b { color: var(--text); font-size: 1.05rem; }
.fline .sep { color: #c3cacc; }
.more-wrap { position: relative; display: inline-flex; }
.more-menu { position: absolute; top: calc(100% + 4px); right: 0; left: auto; z-index: 30; min-width: 210px; }
.more-menu[hidden] { display: none; }
.more-menu a { text-decoration: none; color: inherit; }
.more-menu a { display: flex; gap: 8px; align-items: center; padding: 8px 10px; border-radius: 6px; font-size: .88rem; }
.more-menu a:hover { background: #f3f4f6; }
.more-menu button { display: flex; gap: 8px; align-items: center; }
.more-menu svg { width: 16px; height: 16px; flex: none; }
.email-more { margin-top: 14px; }
.head .more-wrap .more-menu { min-width: 260px; }

/* Settings: sections with an index */
.set-layout { display: grid; grid-template-columns: 200px minmax(0, 620px); gap: 28px; align-items: start; }
.set-index { position: sticky; top: 16px; display: grid; gap: 2px; }
.set-index a { padding: 8px 12px; border-radius: 8px; color: var(--text); text-decoration: none; font-weight: 500; }
.set-index a:hover { background: #eef2f1; }
.set-index a.on { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.set-sec { scroll-margin-top: 12px; margin-bottom: 26px; display: grid; gap: 14px; }
.set-sec .card { max-width: none !important; margin: 0 !important; }
.set-h { font-size: 1.15rem; margin: 6px 0 0; }
@media (max-width: 860px) {
  .set-layout { grid-template-columns: 1fr; gap: 12px; }
  .set-index { position: static; display: flex; overflow-x: auto; gap: 6px; padding-bottom: 4px; }
  .set-index a { white-space: nowrap; border: 1px solid var(--line); background: #fff; }
}

/* Dashboard: where to grow next, in one card */
.card.grow { padding: 16px 18px; display: grid; gap: 14px; }
.grow-areas { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px 18px; border-top: 1px solid var(--line); padding-top: 12px; }
@media (max-width: 760px) { .grow-areas { grid-template-columns: 1fr; } }
.grow-row { display: grid; grid-template-columns: auto auto auto 1fr; grid-template-rows: auto auto; gap: 2px 8px; align-items: center; text-align: left; border: 0; background: none; padding: 8px 6px; border-radius: 8px; cursor: pointer; font: inherit; color: var(--text); }
.grow-row:hover { background: #f3f6f5; }
.grow-row .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.grow-row .gbar { height: 6px; background: #eef1f0; border-radius: 3px; overflow: hidden; min-width: 60px; }
.grow-row .gbar i { display: block; height: 100%; background: var(--c); border-radius: 3px; }
.grow-row .gbar .muted { white-space: nowrap; }
.grow-row > .muted { grid-column: 2 / -1; }
.grow-row:has(.gbar .muted) .gbar { background: none; height: auto; }
.grow-more { margin-top: 12px; }
.grow-more > summary { color: var(--brand); font-weight: 600; padding: 6px 0; }
.more-page { margin-top: 6px; border-top: 1px solid var(--line); padding-top: 8px; }
.more-page > summary { font-weight: 600; color: var(--brand); padding: 6px 0; }
