/* =============================================================================
   CRM Connector — UI components (v3)
   Real brand logos, Zapier-style vertical flow, quieter surfaces.
   Loaded after app.css.
   ============================================================================= */

/* ---------- Brand logos ------------------------------------------------------
   Source SVGs are white monochrome wordmarks. Invert them on light grounds,
   leave them as-is on dark. Monochrome across the board keeps the UI calm.
   --------------------------------------------------------------------------- */
/* The source SVGs are full-colour wordmarks. They only read reliably on a light
   ground, so every mark sits on its own near-white tile in both themes. */
.brandmark {
  display: inline-flex; align-items: center; justify-content: center;
  height: 30px; padding: 0 10px; max-width: 100%; overflow: hidden;
  border-radius: var(--r-s); background: #fff; border: 1px solid var(--line);
  font-size: 12.5px; font-weight: 650; color: #141b2e; white-space: nowrap;
}
/* Both dimensions capped: the logos range from compact badges to very wide wordmarks (Housecall Pro), and a
   height-only rule let the wide ones balloon. Contain scales them down inside the tile instead. */
.brandmark img { max-height: 68%; max-width: 100%; width: auto; height: auto; display: block; object-fit: contain; }
.brandmark { max-width: 150px; }
:root[data-theme="dark"] .brandmark,
:root:not([data-theme="light"]) .brandmark { background: #f4f6fb; border-color: transparent; }
.brandmark.xs { height: 22px; padding: 0 7px;  font-size: 10.5px; max-width: 96px; }
.brandmark.sm { height: 26px; padding: 0 8px;  font-size: 11.5px; max-width: 116px; }
.brandmark.lg { height: 36px; padding: 0 12px; font-size: 14px; max-width: 190px; }
.brandmark.xl { height: 44px; padding: 0 14px; font-size: 16px; max-width: 230px; }
.brandmark.is-text { letter-spacing: -.01em; }
.brandmark.bare { background: transparent; border-color: transparent; padding: 0; }

/* Neutral tile that holds a wordmark, for dense lists */
.brandtile {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 5px 10px; border: 1px solid var(--line); border-radius: var(--r-s);
  background: var(--panel-2); min-width: 0;
}

/* ---------- Zapier-style vertical flow -------------------------------------- */
.zflow { max-width: 520px; margin: 0 auto; }

.znode {
  border: 1px solid var(--line); border-radius: var(--r-l);
  background: var(--panel); box-shadow: var(--sh-s);
  padding: 14px 16px; position: relative;
}
.znode:hover { border-color: var(--brand-line); }
.znode.sel { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.znode.ghost {
  display: block; width: 100%;
  border-style: dashed; background: transparent; box-shadow: none;
  text-align: center; color: var(--ink-3); cursor: pointer; padding: 18px 16px;
  font: inherit;
}
.znode.ghost:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }

.znode .zhead { display: flex; align-items: center; gap: 10px; }
.znode .zstep {
  width: 22px; height: 22px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-size: 11px; font-weight: 700;
  background: var(--panel-3); color: var(--ink-3);
}
.znode .zstep.done { background: var(--ok); color: #fff; }
.znode .zstep.now  { background: var(--brand); color: var(--on-brand); }
.znode .ztitle { font-size: 13.5px; font-weight: 650; }
.znode .zsub   { font-size: 11.5px; color: var(--ink-3); margin-top: 1px; }
.znode .zright { margin-left: auto; display: flex; align-items: center; gap: 7px; }
.znode .zbody  { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line-soft); }

/* Connector between nodes */
.zconn {
  height: 34px; display: flex; align-items: center; justify-content: center;
  position: relative;
}
.zconn::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: 50%;
  width: 1.5px; background: var(--line); transform: translateX(-50%);
}
.zconn .zadd {
  position: relative; z-index: 1;
  width: 22px; height: 22px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--panel);
  color: var(--ink-3); font-size: 13px; line-height: 1;
  display: grid; place-items: center; cursor: pointer; padding: 0;
}
.zconn .zadd:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.zconn.plain::before { background: var(--line); }
.zconn.plain .zadd { display: none; }

/* Mapping rows inside a node */
.zmap { display: grid; grid-template-columns: minmax(0,1fr) 92px minmax(0,1fr); gap: 8px; align-items: center; margin-bottom: 6px; }
.zmap:last-child { margin-bottom: 0; }
.zfield {
  border: 1px solid var(--line); border-radius: var(--r-s); background: var(--panel-2);
  padding: 6px 10px; font-family: var(--mono); font-size: 12px; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.zfield.empty { border-style: dashed; background: transparent; color: var(--ink-4); }
.zop {
  text-align: center; font-size: 10.5px; font-weight: 600; color: var(--ink-4);
  border: 1px solid var(--line); background: var(--panel); border-radius: var(--r-full);
  padding: 3px 6px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.zop.set { color: var(--accent); border-color: var(--accent-line); background: var(--accent-soft); }
@media (max-width: 640px) { .zmap { grid-template-columns: 1fr; } }

/* ---------- Stepper --------------------------------------------------------- */
.flow {
  display: flex; align-items: stretch;
  border: 1px solid var(--line); border-radius: var(--r-m) var(--r-m) 0 0;
  background: var(--panel); overflow: hidden; border-bottom: 0;
}
.flow .fs {
  flex: 1; min-width: 0; padding: 11px 10px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  border-right: 1px solid var(--line); background: transparent;
  text-align: left; cursor: pointer; color: inherit; font: inherit;
}
.flow .fs:last-child { border-right: 0; }
.flow .fs:hover:not(:disabled) { background: var(--panel-2); }
.flow .fs:disabled { cursor: not-allowed; opacity: .4; }
.flow .fs .n {
  width: 20px; height: 20px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-size: 10px; font-weight: 700;
  background: var(--panel-3); color: var(--ink-3);
}
.flow .fs .t { font-size: 12.5px; font-weight: 600; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.flow .fs.done .n { background: var(--ok); color: #fff; }
.flow .fs.done .t { color: var(--ink); }
.flow .fs.now { background: var(--brand-soft); box-shadow: inset 0 -2px 0 var(--brand); }
.flow .fs.now .n { background: var(--brand); color: var(--on-brand); }
.flow .fs.now .t { color: var(--ink); font-weight: 700; }

.flowbody {
  border: 1px solid var(--line); border-top: 0; background: var(--bg);
  padding: 30px 22px;
}
.flowbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 12px 20px; border: 1px solid var(--line); border-top: 0;
  background: var(--panel); border-radius: 0 0 var(--r-m) var(--r-m);
}
.flowbar .right { margin-left: auto; display: flex; gap: 8px; }
@media (max-width: 800px) {
  .flow { flex-wrap: wrap; }
  .flow .fs { flex: 1 1 45%; }
  .flowbody { padding: 22px 14px; }
  .flowbar { padding-left: 14px; padding-right: 14px; }
}

/* ---------- Manage sub-navigation ------------------------------------------- */
.subnav {
  display: inline-flex; gap: 2px; padding: 3px; background: var(--panel-2);
  border: 1px solid var(--line); border-radius: var(--r-s); overflow-x: auto; max-width: 100%;
}
.subnav a {
  padding: 6px 13px; border-radius: var(--r-xs); font-size: 13px;
  color: var(--ink-3); text-decoration: none; white-space: nowrap; font-weight: 550;
}
.subnav a:hover { color: var(--ink); text-decoration: none; }
.subnav a.on { background: var(--panel); color: var(--ink); font-weight: 650; box-shadow: var(--sh-s); }

/* ---------- Context + filter bars -------------------------------------------- */
.ctxbar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--r-m);
  background: var(--panel); margin-bottom: 16px;
}
.ctxbar .right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.ctxbar select.input, .ctxbar input.input { width: auto; padding: 6px 10px; font-size: 12.5px; }

.filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.filters select.input, .filters input.input { width: auto; padding: 6px 10px; font-size: 12.5px; }
.filters .clear { margin-left: auto; }

/* ---------- Integration card ------------------------------------------------- */
.icard {
  border: 1px solid var(--line); border-radius: var(--r-m); background: var(--panel);
  box-shadow: var(--sh-s); overflow: hidden;
}
.icard:hover { border-color: var(--brand-line); }
.icard .ih { padding: 14px 16px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.icard .ih .pairing { display: flex; align-items: center; gap: 10px; }
.icard .ih .arrow { color: var(--ink-4); font-size: 13px; }
.icard .ih .sb { font-size: 12px; color: var(--ink-3); }
.icard .ih .right { margin-left: auto; display: flex; gap: 7px; align-items: center; }
.icard .ist {
  display: grid; grid-template-columns: repeat(3, minmax(0,1fr));
  border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft);
}
.icard .ist > div { padding: 10px 16px; border-right: 1px solid var(--line-soft); min-width: 0; }
.icard .ist > div:last-child { border-right: 0; }
.icard .ist .k { font-size: 9.5px; text-transform: uppercase; letter-spacing: .09em; color: var(--ink-4); font-weight: 700; }
.icard .ist .v { margin-top: 4px; font-size: 12.5px; display: flex; align-items: center; gap: 6px; }
.icard .ia { padding: 11px 16px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.icard .ia .right { margin-left: auto; display: flex; gap: 8px; }
@media (max-width: 640px) {
  .icard .ist { grid-template-columns: 1fr; }
  .icard .ist > div { border-right: 0; border-bottom: 1px solid var(--line-soft); }
}

/* ---------- Site footer (mirrors crm-connector.com) --------------------------- */
.sitefoot { border-top: 1px solid var(--line); background: var(--panel); margin-top: auto; padding: 32px 26px 20px; }
.sitefoot-in { max-width: 1320px; margin: 0 auto; display: grid; grid-template-columns: 1.7fr repeat(4, 1fr); gap: 26px; }
.sitefoot .sf-brand { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; }
.sitefoot .sf-desc { font-size: 12.5px; color: var(--ink-3); line-height: 1.6; max-width: 36ch; margin: 0 0 14px; }
.sitefoot .sf-social { display: flex; gap: 7px; }
.sitefoot .sf-social a {
  width: 30px; height: 30px; border-radius: var(--r-s); border: 1px solid var(--line);
  display: grid; place-items: center; font-size: 10px; font-weight: 700;
  color: var(--ink-3); text-decoration: none; background: var(--panel-2);
}
.sitefoot .sf-social a:hover { border-color: var(--brand); color: var(--brand); text-decoration: none; }
.sitefoot h5 { font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-4); font-weight: 700; margin-bottom: 10px; }
.sitefoot ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.sitefoot ul a { font-size: 12.5px; color: var(--ink-2); }
.sitefoot-bottom {
  max-width: 1320px; margin: 24px auto 0; padding-top: 15px; border-top: 1px solid var(--line);
  display: flex; gap: 14px; align-items: center; flex-wrap: wrap; font-size: 12px; color: var(--ink-4);
}
.sitefoot-bottom .right { margin-left: auto; display: flex; gap: 14px; align-items: center; }
@media (max-width: 1080px) { .sitefoot-in { grid-template-columns: 1fr 1fr 1fr; } }
@media (max-width: 700px) { .sitefoot-in { grid-template-columns: 1fr 1fr; } }

/* ---------- Landing ----------------------------------------------------------- */
.lp-nav {
  display: flex; align-items: center; gap: 20px; padding: 0 26px; height: 62px;
  border-bottom: 1px solid var(--line); background: var(--panel);
  position: sticky; top: 0; z-index: 40;
}
.lp-nav .links { display: flex; gap: 16px; margin-left: 12px; }
.lp-nav .links a { font-size: 13.5px; color: var(--ink-2); }
.lp-nav .links a:hover { color: var(--ink); text-decoration: none; }
.lp-nav .right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
@media (max-width: 860px) { .lp-nav .links { display: none; } }

.lp-wrap { max-width: 1080px; margin: 0 auto; padding: 0 26px; }
.lp-hero { padding: 66px 0 48px; text-align: center; }
.lp-hero h1 {
  font-size: clamp(31px, 5vw, 52px); line-height: 1.07; letter-spacing: -.04em;
  margin: 0 auto 16px; max-width: 18ch; font-weight: 650;
  background-image: linear-gradient(135deg, var(--ink) 0%, #1e3a8a 52%, var(--brand) 100%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
}
.lp-sec h2 {
  background-image: linear-gradient(135deg, var(--ink) 0%, #1e3a8a 55%, var(--brand) 100%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
}
:root[data-theme="dark"] .lp-hero h1, :root[data-theme="dark"] .lp-sec h2 {
  background-image: linear-gradient(135deg, var(--ink) 0%, #c7d2fe 55%, var(--brand-3) 100%);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .lp-hero h1,
  :root:not([data-theme="light"]) .lp-sec h2 {
    background-image: linear-gradient(135deg, var(--ink) 0%, #c7d2fe 55%, var(--brand-3) 100%);
  }
}
.lp-hero .lede { font-size: 17px; color: var(--ink-2); max-width: 54ch; margin: 0 auto 24px; line-height: 1.6; }
.lp-sec { padding: 54px 0; border-top: 1px solid var(--line); }
.lp-sec h2 { font-size: clamp(21px,3vw,29px); letter-spacing: -.03em; margin-bottom: 10px; }
.lp-sec .sublede { color: var(--ink-3); font-size: 15px; max-width: 56ch; margin-bottom: 26px; }
.lp-shot { border: 1px solid var(--line); border-radius: var(--r-l); overflow: hidden; box-shadow: var(--sh-l); background: var(--panel); }
.lp-shot .bar { display: flex; align-items: center; gap: 7px; padding: 9px 13px; background: var(--panel-2); border-bottom: 1px solid var(--line); }
.lp-shot .bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--line); display: block; }
.lp-shot .bar .u { margin-left: 8px; font-family: var(--mono); font-size: 10.5px; color: var(--ink-3); background: var(--panel); padding: 3px 10px; border-radius: var(--r-full); border: 1px solid var(--line); }
.lp-shot .shotbody { padding: 18px; background: var(--bg); }

.logogrid {
  display: grid; grid-template-columns: repeat(6, minmax(0,1fr)); gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: var(--r-m); overflow: hidden;
}
.logogrid > div { background: var(--panel); padding: 20px 14px; display: grid; place-items: center; min-height: 68px; }
@media (max-width: 900px) { .logogrid { grid-template-columns: repeat(3, minmax(0,1fr)); } }
@media (max-width: 520px) { .logogrid { grid-template-columns: repeat(2, minmax(0,1fr)); } }

/* Pricing cards. The header block has a fixed height so the feature lists and
   the buttons line up across all three, whatever the price line says. */
.price-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; align-items: stretch; }
.price {
  position: relative; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--r-l); background: var(--panel);
  padding: 24px 22px 22px; display: flex; flex-direction: column;
  box-shadow: var(--sh-card);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
@media (hover: hover) and (pointer: fine) {
  .price:hover { transform: translateY(-2px); box-shadow: var(--sh-l); border-color: color-mix(in srgb, var(--brand) 26%, var(--line)); }
}
.price.hot {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 14%, transparent), var(--sh-m);
}
.price.hot::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--brand-grad);
}
.price .badge {
  position: absolute; top: 18px; right: 18px;
  font-size: 10.5px; font-weight: 700; letter-spacing: .02em;
  padding: 3px 9px; border-radius: var(--r-full);
  background: var(--brand); color: var(--on-brand);
}
.price .ph { min-height: 126px; }
.price .pn { font-weight: 700; font-size: 15px; letter-spacing: -.01em; }
.price .pp {
  font-size: 32px; font-weight: 780; letter-spacing: -.035em;
  font-variant-numeric: tabular-nums; line-height: 1.15; margin-top: 8px;
}
.price .pp span { font-size: 13px; font-weight: 500; color: var(--ink-3); letter-spacing: 0; margin-left: 2px; }
.price .pnote { font-size: 12px; color: var(--ink-3); margin-top: 6px; line-height: 1.45; }
.price ul {
  list-style: none; margin: 16px 0 0; padding: 16px 0 0; flex: 1;
  border-top: 1px solid var(--line-soft);
  display: flex; flex-direction: column; gap: 9px; font-size: 13px; color: var(--ink-2);
}
.price ul li { display: flex; gap: 9px; align-items: flex-start; line-height: 1.45; }
.price ul li::before { content: "\2713"; color: var(--ok); font-weight: 700; flex: none; }
.price .cta { margin-top: 20px; }
@media (max-width: 900px) { .price-grid { grid-template-columns: 1fr; } .price .ph { min-height: 0; } }

/* FAQ accordion, built on <details> so it works without any script */
details.card > summary {
  list-style: none; cursor: pointer; padding: 15px 18px;
  font-size: 14px; font-weight: 650; letter-spacing: -.01em; color: var(--ink);
  display: flex; align-items: center; gap: 12px;
}
details.card > summary::-webkit-details-marker { display: none; }
details.card > summary::after {
  content: "+"; margin-left: auto; flex: none;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--panel-2); border: 1px solid var(--line); color: var(--ink-3);
  display: grid; place-items: center; font-size: 14px; font-weight: 600;
  transition: transform .2s ease, background .2s ease, color .2s ease;
}
details.card[open] > summary::after {
  content: "\2212"; background: var(--brand); border-color: var(--brand); color: var(--on-brand);
}
details.card > summary:hover { color: var(--brand); }
details.card > p {
  margin: 0; padding: 0 18px 16px; font-size: 13.5px; line-height: 1.65; color: var(--ink-2);
  max-width: 72ch;
}
details.card[open] { border-color: color-mix(in srgb, var(--brand) 24%, var(--line)); }

/* The two axes of the price: plan plus accounts */
.paxis { display: grid; grid-template-columns: 1fr 40px 1fr; gap: 0; align-items: stretch; }
@media (max-width: 860px) { .paxis { grid-template-columns: 1fr; } .paxis .pax-plus { padding: 10px 0; } }
.pax {
  display: flex; gap: 15px; align-items: flex-start;
  border: 1px solid var(--line); border-radius: var(--r-l); background: var(--panel);
  box-shadow: var(--sh-card); padding: 20px;
}
.pax-n {
  width: 30px; height: 30px; flex: none; border-radius: 50%;
  background: var(--brand-grad); color: #fff; display: grid; place-items: center;
  font-size: 13px; font-weight: 750; box-shadow: var(--sh-brand);
}
.pax-t { font-size: 15px; font-weight: 700; letter-spacing: -.02em; }
.pax-s { font-size: 13px; color: var(--ink-3); margin-top: 5px; line-height: 1.55; }
.pax-p {
  font-size: 19px; font-weight: 750; letter-spacing: -.025em; margin-top: 11px;
  font-variant-numeric: tabular-nums;
}
.pax-p span { font-size: 12px; font-weight: 500; color: var(--ink-3); letter-spacing: 0; }
.pax-plus {
  display: grid; place-items: center; font-size: 22px; font-weight: 700; color: var(--ink-4);
}

/* Price calculator */
.calc {
  border: 1px solid var(--line); border-radius: var(--r-l); background: var(--panel);
  box-shadow: var(--sh-card); padding: 22px; margin-bottom: 18px;
  display: grid; grid-template-columns: minmax(0,1fr) 280px; gap: 28px; align-items: center;
}
@media (max-width: 860px) { .calc { grid-template-columns: 1fr; gap: 20px; } }
.calc .cl { font-size: 13.5px; font-weight: 650; margin-bottom: 4px; }
.calc .cs { font-size: 12.5px; color: var(--ink-3); margin-bottom: 16px; }
.calc input[type=range] {
  width: 100%; appearance: none; height: 6px; border-radius: var(--r-full);
  background: var(--panel-3); outline: none; margin: 8px 0 6px;
}
.calc input[type=range]::-webkit-slider-thumb {
  appearance: none; width: 22px; height: 22px; border-radius: 50%;
  background: var(--brand); border: 3px solid var(--panel);
  box-shadow: var(--sh-brand); cursor: pointer;
}
.calc input[type=range]::-moz-range-thumb {
  width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--panel);
  background: var(--brand); box-shadow: var(--sh-brand); cursor: pointer;
}
.calc .ticks { display: flex; justify-content: space-between; font-size: 11px; color: var(--ink-4); }
.calc .opts { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 16px; }
.calc .out {
  border-left: 1px solid var(--line); padding-left: 26px;
}
@media (max-width: 860px) { .calc .out { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 18px; } }
.calc .out .big {
  font-size: 38px; font-weight: 780; letter-spacing: -.04em; line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.calc .out .big span { font-size: 15px; font-weight: 500; color: var(--ink-3); letter-spacing: 0; }
.calc .out .lines { margin-top: 12px; display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: var(--ink-3); }
.calc .out .lines b { color: var(--ink); font-variant-numeric: tabular-nums; }
.calc .out .lines .row { display: flex; gap: 10px; }
.calc .out .lines .row b { margin-left: auto; }

/* Pair of wordmarks, e.g. "A to B" in a list row */
.logo-pair { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.logo-pair::after { content: ""; }

/* Small decorative chip, for non-system icons (email, calendar, community) */
.logo {
  width: 32px; height: 32px; border-radius: var(--r-s); flex: none;
  display: inline-grid; place-items: center;
  background: var(--panel-2); border: 1px solid var(--line);
  font-size: 13px; font-weight: 700; color: var(--ink-2);
}
.logo.sm { width: 22px; height: 22px; font-size: 10px; border-radius: var(--r-xs); }
.logo.t1 { color: var(--brand); border-color: var(--brand-line); background: var(--brand-soft); }
.logo.t2 { color: var(--accent); border-color: var(--accent-line); background: var(--accent-soft); }
.logo.t3 { color: var(--ink-2); }
