/* ToolsMotive front end. Every rule is scoped to .tm-root (playbook §5.3). Colours come from CSS variables set in
   admin settings (Design tab); the fallbacks below are the final brand values. */
.tm-root{--tm-ink:#0B0F19;--tm-spark:#2A62F5;--tm-spark-deep:#1F4FD6;--tm-spark-tint:#EAF0FF;--tm-paper:#F6F7F9;--tm-ok:#0E7A3A;--tm-radius:16px;--tm-font:inherit;
  --tm-border:#E1E6F0;--tm-border-strong:#D5DBE8;--tm-body:#3B4558;--tm-muted:#5B6577;--tm-warn:#B45309;--tm-ok-tint:#E8F6EE;
  font-family:var(--tm-font);color:var(--tm-ink);line-height:1.5;-webkit-font-smoothing:antialiased;container-type:inline-size}
/* theme shield: themes often restyle buttons, lists, labels and inputs globally */
.tm-root *,.tm-root *::before,.tm-root *::after{box-sizing:border-box}
.tm-root button,.tm-root input,.tm-root select{font-family:inherit;font-size:inherit;letter-spacing:normal;text-transform:none;line-height:1.3;margin:0}
.tm-root button{background:none;border:0;padding:0;color:inherit;box-shadow:none;cursor:pointer;min-height:0;width:auto}
/* only neutralise decoration themes add on hover/focus; our own button colours (higher specificity) stay */
.tm-root button:hover,.tm-root button:focus{box-shadow:none;text-decoration:none}
.tm-root ul,.tm-root ol{list-style:none;margin:0;padding:0}
.tm-root li{margin:0;padding:0}
.tm-root h2{margin:0;padding:0;border:0;font-family:inherit;letter-spacing:-.01em;line-height:1.25;text-transform:none}
.tm-root p{margin:0}
.tm-root a{text-decoration:none;box-shadow:none}
.tm-root img{max-width:100%;height:auto;border:0;box-shadow:none}
.tm-root :focus-visible{outline:2.5px solid var(--tm-spark);outline-offset:2px;border-radius:6px}
.tm-root [hidden]{display:none!important}

/* chips */
.tm-root .tm-chips{display:flex;gap:8px;justify-content:center;flex-wrap:wrap;margin:0 0 18px}
.tm-chips li{display:inline-flex;align-items:center;gap:6px;font-size:13px;font-weight:700;color:var(--tm-body);background:#fff;border:1px solid var(--tm-border);border-radius:999px;padding:6px 12px}
.tm-chips li::before{content:"✓";color:var(--tm-ok);font-weight:800}

/* tool card */
.tm-tool{border:1px solid var(--tm-border);border-radius:calc(var(--tm-radius) + 4px);box-shadow:0 1px 2px rgba(11,15,25,.05),0 8px 24px rgba(11,15,25,.06);overflow:hidden;background:#fff;max-width:980px;margin:0 auto}
.tm-drop{margin:14px;border:2px dashed var(--tm-border-strong);border-radius:var(--tm-radius);padding:32px 18px;text-align:center;background:linear-gradient(180deg,#FBFCFE,#F6F8FC)}
.tm-drop.is-over{border-color:var(--tm-spark);background:var(--tm-spark-tint)}
.tm-upic{width:58px;height:58px;border-radius:18px;background:#fff;border:1px solid var(--tm-border);display:inline-flex;align-items:center;justify-content:center;box-shadow:0 6px 18px rgba(42,98,245,.12);margin-bottom:12px;color:var(--tm-spark-deep)}
.tm-root .tm-drop-h{font-size:20px;font-weight:800;color:var(--tm-ink)}
.tm-drop-p{color:var(--tm-muted);font-size:14px;margin:4px 0 14px!important}
.tm-target{display:inline-flex;align-items:center;gap:8px;border:1.5px solid var(--tm-spark);background:var(--tm-spark-tint);color:var(--tm-spark-deep);border-radius:12px;padding:8px 12px;font-weight:800;font-size:13.5px;margin-bottom:12px!important}
.tm-quick{display:flex;gap:6px;justify-content:center;flex-wrap:wrap;margin:0 0 14px}
.tm-root .tm-quick button{font-size:12.5px;font-weight:700;color:var(--tm-muted);border:1px solid var(--tm-border);border-radius:999px;padding:4px 10px;background:#fff}
.tm-root .tm-quick button[aria-pressed="true"]{background:var(--tm-ink);border-color:var(--tm-ink);color:#fff}
.tm-note{margin:0 0 12px!important;font-size:13px;font-weight:700;color:var(--tm-warn)}
.tm-cta{display:flex;justify-content:center}
.tm-root .tm-bigbtn{display:inline-flex;align-items:center;justify-content:center;gap:12px;font-size:19px;font-weight:800;color:#fff;background:linear-gradient(180deg,#1B2232,var(--tm-ink));border-radius:var(--tm-radius);padding:0 34px;min-height:64px;min-width:300px;box-shadow:0 10px 26px rgba(11,15,25,.22);white-space:nowrap;transition:transform .15s ease,box-shadow .15s ease}
.tm-root .tm-bigbtn:hover{transform:translateY(-1px);color:#fff;background:linear-gradient(180deg,#1B2232,var(--tm-ink));box-shadow:0 14px 32px rgba(11,15,25,.28)}
.tm-orline{font-size:13px;color:var(--tm-muted);margin-top:10px!important}
.tm-mini{display:flex;justify-content:center;gap:22px;flex-wrap:wrap;margin-top:16px!important;font-size:13px;color:var(--tm-muted);font-weight:600;counter-reset:tmstep}
.tm-mini li{display:inline-flex;align-items:center;gap:8px;counter-increment:tmstep}
.tm-mini li::before{content:counter(tmstep);width:22px;height:22px;border-radius:7px;background:var(--tm-spark-tint);color:var(--tm-spark-deep);font-size:12px;font-weight:800;display:inline-flex;align-items:center;justify-content:center}
.tm-tool.has-files .tm-drop{padding:16px 14px}
.tm-tool.has-files .tm-upic,.tm-tool.has-files .tm-mini,.tm-tool.has-files .tm-drop-p,.tm-tool.has-files .tm-orline{display:none}
.tm-root .tm-tool.has-files .tm-drop-h{font-size:16px;margin-bottom:10px}

/* file panel */
.tm-panel{border-top:1px solid var(--tm-border);padding:16px;background:#fff}
.tm-panel-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px;font-size:14px}
.tm-root .tm-link{font-weight:800;color:var(--tm-spark-deep);padding:6px 4px}
.tm-list{display:grid;grid-template-columns:minmax(0,1fr);gap:8px;max-height:316px;overflow:auto;padding:2px!important}
.tm-list li{display:flex;align-items:center;gap:12px;border:1px solid var(--tm-border);border-radius:12px;padding:8px 10px!important;background:#FBFCFE}
.tm-list img{width:44px;height:44px;object-fit:cover;border-radius:8px;border:1px solid var(--tm-border);background:#fff;flex:none}
.tm-nm{flex:1;min-width:0;display:flex;flex-direction:column}
.tm-nm b{font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tm-nm small{font-size:12px;color:var(--tm-muted)}
.tm-act{display:flex;gap:4px;flex:none}
.tm-root .tm-act button{width:34px;height:34px;border-radius:9px;border:1px solid var(--tm-border);background:#fff;font-size:14px;color:var(--tm-ink)}
.tm-root .tm-act button:disabled{opacity:.35;cursor:default}
.tm-bar{display:flex;flex-wrap:wrap;gap:10px;align-items:flex-end;margin-top:14px}
.tm-bar label{display:flex;flex-direction:column;gap:4px;font-size:12px;font-weight:800;color:var(--tm-muted);text-transform:uppercase;letter-spacing:.04em;margin:0}
.tm-root .tm-bar select{font-size:14px;font-weight:600;color:var(--tm-ink);border:1.5px solid var(--tm-border-strong);border-radius:10px;padding:9px 10px;background:#fff;min-width:130px;height:auto;text-transform:none;letter-spacing:0}
.tm-root .tm-btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;font-weight:800;font-size:15px;border-radius:12px;min-height:44px;padding:10px 20px}
.tm-root .tm-btn-ai{background:var(--tm-spark);color:#fff;margin-left:auto}
.tm-root .tm-btn-ai:hover{background:var(--tm-spark-deep);color:#fff}
.tm-root .tm-btn-ai:disabled{opacity:.6;cursor:wait}
.tm-root .tm-btn-dark{background:var(--tm-ink);color:#fff;flex:none}
.tm-res{margin-top:14px;display:flex;align-items:center;gap:12px;border-radius:14px;padding:12px 14px;border:1px solid var(--tm-border);background:var(--tm-paper);font-size:14px}
.tm-txt{flex:1;min-width:0;display:flex;flex-direction:column}.tm-txt small{color:var(--tm-body);font-size:12.5px;line-height:1.5}
.tm-tick{width:30px;height:30px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-weight:800;color:#fff;background:var(--tm-ok);flex:none}
.tm-res.is-warn .tm-tick,.tm-res.is-err .tm-tick{background:var(--tm-warn)}
.tm-res.is-ok{background:var(--tm-ok-tint);border-color:#BFE3CC}
.tm-spin{width:20px;height:20px;border-radius:50%;border:3px solid var(--tm-spark-tint);border-top-color:var(--tm-spark);animation:tmspin .8s linear infinite;flex:none}
@keyframes tmspin{to{transform:rotate(360deg)}}

/* merge rows */
.tm-pdfic{width:44px;height:44px;border-radius:8px;border:1px solid var(--tm-border);background:#fff;flex:none;display:flex;align-items:center;justify-content:center;font-size:11px;font-weight:800;color:#B42318;letter-spacing:.04em}
.tm-list li[draggable="true"]{cursor:grab}
.tm-list li.is-drag{opacity:.5}
.tm-list li.is-target{border-color:var(--tm-spark);box-shadow:0 0 0 2px var(--tm-spark-tint)}
.tm-list li.is-bad{background:#FFF8EC}
.tm-err{color:var(--tm-warn);font-weight:700}
.tm-root .tm-bar input[type=text]{font-size:14px;font-weight:600;color:var(--tm-ink);border:1.5px solid var(--tm-border-strong);border-radius:10px;padding:9px 10px;background:#fff;min-width:220px;height:auto;box-shadow:none;text-transform:none;letter-spacing:0}
.tm-root .tm-btn-ai:disabled{opacity:.45;cursor:not-allowed}
/* "Or just ask" */
.tm-ask{border-top:1px solid var(--tm-border);padding:16px;background:linear-gradient(180deg,#F3F7FF,#fff)}
.tm-ask-lbl{display:flex;align-items:center;justify-content:center;gap:8px;font-size:13px;font-weight:800;color:var(--tm-spark-deep);margin-bottom:10px}
.tm-ask-lbl svg{color:var(--tm-spark)}
.tm-ask-box{display:flex;gap:8px;align-items:center;max-width:760px;margin:0 auto;border:1.5px solid transparent;border-radius:16px;padding:6px 6px 6px 16px;background:linear-gradient(#fff,#fff) padding-box,linear-gradient(90deg,var(--tm-spark),#7EA2FF) border-box;box-shadow:0 8px 24px rgba(42,98,245,.12)}
.tm-root .tm-ask-box input[type=text]{flex:1;border:0;outline:0;font-size:15.5px;color:var(--tm-ink);min-width:0;background:transparent;box-shadow:none;padding:8px 0;height:auto}
.tm-root .tm-ask-box button{width:44px;height:44px;border-radius:13px;background:var(--tm-spark);color:#fff;display:flex;align-items:center;justify-content:center;flex:none}
.tm-root .tm-ask-box button:hover{background:var(--tm-spark-deep);color:#fff}
.tm-ask-soon{text-align:center;font-size:13px;font-weight:700;color:var(--tm-spark-deep);margin-top:10px!important}

/* pricing */
.tm-pricing{max-width:1180px;margin:0 auto}
.tm-soon{text-align:center;font-weight:700;color:var(--tm-spark-deep);background:var(--tm-spark-tint);border-radius:12px;padding:12px 16px;margin:0 0 18px!important}
.tm-plans{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:16px;align-items:stretch}
.tm-plan{display:flex;flex-direction:column;border:1px solid var(--tm-border);border-radius:var(--tm-radius);padding:22px 20px;background:#fff;box-shadow:0 1px 2px rgba(11,15,25,.04)}
.tm-plan.is-featured{border:2px solid var(--tm-spark);box-shadow:0 12px 32px rgba(42,98,245,.14)}
.tm-root .tm-plan h3{font-size:18px;font-weight:800;margin:0 0 8px;color:var(--tm-ink)}
.tm-price{margin:0 0 14px!important}.tm-price b{display:block;font-size:34px;line-height:1.1;letter-spacing:-.02em}.tm-price small{display:block;font-size:12.5px;color:var(--tm-muted);margin-top:4px}
.tm-feats{flex:1;display:grid;gap:8px;align-content:start;margin:0 0 18px!important;font-size:14px;color:var(--tm-body)}
.tm-feats li{display:flex;gap:8px}.tm-feats li::before{content:"✓";color:var(--tm-ok);font-weight:800}
.tm-plan-cta{display:flex;flex-direction:column;gap:8px}
.tm-root .tm-plan-cta .tm-btn{width:100%;margin-left:0}
.tm-root .tm-btn-line{border:1.5px solid var(--tm-border-strong);color:var(--tm-ink);background:#fff}
.tm-root .tm-btn-line:hover{border-color:var(--tm-spark);color:var(--tm-spark-deep)}
.tm-root .tm-plan .tm-btn-ai{margin-left:0}
.tm-current{font-weight:800;color:var(--tm-ok)}
.tm-mor{text-align:center;font-size:13px;color:var(--tm-muted);margin-top:12px!important}
/* legal pages: readable prose */
.tm-legal{max-width:760px;font-size:16px;line-height:1.7;color:var(--tm-body)}
.tm-root .tm-legal h2{font-size:20px;font-weight:800;color:var(--tm-ink);margin:28px 0 8px}
.tm-legal p{margin:0 0 12px!important}
.tm-root .tm-legal ul,.tm-root .tm-legal ol{margin:0 0 12px!important;padding-left:22px!important}
.tm-root .tm-legal ul li{list-style:disc;margin-bottom:6px}.tm-root .tm-legal ol li{list-style:decimal;margin-bottom:6px}
.tm-legal a{color:var(--tm-spark-deep);text-decoration:underline}
.tm-legal-updated{font-size:13px;color:var(--tm-muted)}
.tm-legal table{width:100%;border-collapse:collapse;margin:8px 0 16px;font-size:14.5px}
.tm-legal th,.tm-legal td{border:1px solid var(--tm-border);padding:10px 12px;text-align:left;vertical-align:top;overflow-wrap:anywhere}
.tm-legal th{background:var(--tm-paper);color:var(--tm-ink)}
/* ads: reserved height, never moves the page */
.tm-ad{display:flex;flex-direction:column;min-height:var(--tm-ad-h,120px);border:1px dashed var(--tm-border-strong);border-radius:12px;background:var(--tm-paper);margin:24px 0;overflow:hidden}
.tm-ad-label{font-size:10.5px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:var(--tm-muted);padding:6px 10px}
.tm-ad-test{flex:1;display:flex;align-items:center;justify-content:center;font-size:13px;font-weight:700;color:var(--tm-muted)}
.tm-ad-rail{max-width:300px}
.tm-admin-note{border:1px dashed var(--tm-warn);border-radius:12px;padding:12px 14px;color:var(--tm-warn);font-weight:700;background:#FFF8EC}

@media (max-width:560px){
  .tm-root .tm-bigbtn{min-width:0;width:100%;font-size:16px;padding:0 16px;gap:8px}
  .tm-panel{padding:12px}.tm-list li{gap:8px;padding:7px 8px!important}.tm-list img{width:38px;height:38px}.tm-root .tm-act button{width:30px;height:30px}
  .tm-bar label{flex:1 1 40%}.tm-root .tm-bar select,.tm-root .tm-bar input[type=text]{min-width:0;width:100%}.tm-list img,.tm-pdfic{width:38px;height:38px}.tm-root .tm-btn-ai{width:100%;margin-left:0}
  .tm-res{flex-wrap:wrap}.tm-root .tm-btn-dark{width:100%}
  .tm-chips li:nth-child(n+3){display:none}.tm-mini{gap:12px}
  .tm-ad{min-height:var(--tm-ad-h-phone,100px)}
}
/* narrower theme columns: keep 4 chips on one line */
@container (max-width:720px){.tm-chips{gap:6px}.tm-chips li{font-size:12px;padding:5px 9px;gap:4px}}
@media (prefers-reduced-motion:reduce){.tm-spin{animation:none}.tm-root .tm-bigbtn{transition:none}}
/* ---- Library button, sample files link, Library picker (approved preview) ---- */
.tm-cta{gap:10px;align-items:center}
.tm-root .tm-iconbtn{width:64px;height:64px;flex:none;border-radius:var(--tm-radius);background:#fff;border:1.5px solid var(--tm-border);display:inline-flex;align-items:center;justify-content:center;color:var(--tm-ink);cursor:pointer;box-shadow:0 4px 12px rgba(11,15,25,.06);transition:border-color .15s,color .15s}
.tm-root .tm-iconbtn:hover{border-color:var(--tm-spark);color:var(--tm-spark-deep)}
.tm-root .tm-linkbtn{font:inherit;font-weight:700;color:var(--tm-spark-deep);background:none;border:0;padding:0;cursor:pointer;text-decoration:underline;text-underline-offset:3px}
.tm-root .tm-linkbtn:hover{color:var(--tm-ink)}
.tm-root .tm-linkbtn[disabled]{opacity:.6;cursor:progress}
.tm-libpick{position:fixed;inset:0;z-index:100000;background:rgba(11,15,25,.45);display:flex;align-items:center;justify-content:center;padding:16px}
.tm-libpick-box{width:min(520px,100%);max-height:min(640px,calc(100vh - 32px));display:flex;flex-direction:column;background:#fff;border-radius:18px;box-shadow:0 24px 64px rgba(11,15,25,.3);overflow:hidden}
.tm-libpick-h{display:flex;align-items:center;justify-content:space-between;padding:16px 18px;border-bottom:1px solid var(--tm-border)}
.tm-libpick-h b{font-size:17px}
.tm-root .tm-libpick-x{width:36px;height:36px;border-radius:10px;color:var(--tm-muted)}
.tm-root .tm-libpick-x:hover{background:var(--tm-paper);color:var(--tm-ink)}
.tm-libpick-b{flex:1;min-height:0;overflow:auto;padding:8px 18px;scrollbar-width:thin}
.tm-root .tm-libpick-msg{color:var(--tm-body);font-size:14.5px;line-height:1.55;margin:12px 0}
.tm-root .tm-libpick-msg.is-error{color:var(--tm-danger,#B42318)}
.tm-root .tm-libpick-l{list-style:none;margin:0;padding:0}
.tm-root .tm-libpick-l label{display:flex;align-items:center;gap:12px;padding:10px 4px;border-bottom:1px solid var(--tm-border);cursor:pointer}
.tm-root .tm-libpick-l input{width:18px;height:18px;flex:none}
.tm-root .tm-libpick-l b{display:block;font-size:14.5px;word-break:break-all}
.tm-root .tm-libpick-l small{font-size:12.5px;color:var(--tm-muted)}
.tm-libpick-f{padding:14px 18px;border-top:1px solid var(--tm-border);display:flex;justify-content:flex-end}
.tm-root .tm-libpick-go{display:inline-flex;align-items:center;min-height:44px;padding:0 20px;border-radius:12px;background:var(--tm-ink);color:#fff;font-weight:800;font-size:15px;text-decoration:none}
.tm-root .tm-libpick-go[disabled]{opacity:.5;cursor:not-allowed}
@media (max-width:560px){.tm-root .tm-iconbtn{width:56px;height:56px}}
