/* ==========================================================================
   Onethread: single blog post 2026 (ot-blog.css)
   Load on single posts only (Elementor → Custom Code, or wp_enqueue_style
   with is_singular('post')). Requires fonts: Plus Jakarta Sans 500/600/700/800,
   Inter 400/500/600/700.
   Breakpoints: desktop ≥1200 · laptop 900–1199 · tablet 768–899 · mobile ≤767
   ========================================================================== */

:root{
  --ot-primary:#5B3FF6; --ot-primary-hover:#4328E0;
  --ot-ink:#14112B; --ot-body:#2A2840; --ot-text-2:#3B3950; --ot-muted:#5F5D70; --ot-muted-2:#6B6880;
  --ot-border:#E8E6F0; --ot-row:#EFEEF4; --ot-thead:#F5F4FF; --ot-cardhead:#F7F6FC; --ot-tint:#EFECFF;
  --ot-tip:#F0EEFF; --ot-ex-bg:#FFFAE8; --ot-ex-bd:#F4E6B4; --ot-ex-label:#7A4F00;
  --ot-pros:#13804F; --ot-cons:#C23A1F; --ot-hl:#F7F5FF;
  --ot-head-h:66px;            /* global header height; JS overrides */
  --ot-offset:90px;            /* scroll-margin for H2; JS overrides */
  --ot-display:'Plus Jakarta Sans',system-ui,sans-serif;
  --ot-sans:Inter,system-ui,sans-serif;
}

/* ---------- Layout shell (classes set in Elementor; see ELEMENTOR_MAP.md) ---------- */
.ot-post-grid{max-width:1200px;margin:0 auto;padding:40px 32px 72px;display:grid;grid-template-columns:240px minmax(0,1fr);gap:48px;align-items:start}
.ot-sidebar{position:sticky;top:calc(var(--ot-head-h) + 14px);display:flex;flex-direction:column;gap:20px}
.ot-article{min-width:0;font-family:var(--ot-sans);font-size:15px;line-height:1.65;color:var(--ot-body)}
.ot-article > * + *{margin-top:18px}
.ot-contents-bar{display:none}
.ot-hero-meta--mobile{display:none}

/* ---------- Sidebar TOC ---------- */
.ot-toc__title{background:#F4F3F8;border-radius:6px;padding:8px 10px;font:600 13px/1.4 var(--ot-sans);color:var(--ot-ink);margin:0 0 4px}
.ot-toc__list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column}
.ot-toc__list a{display:block;padding:7px 10px;border-left:2px solid transparent;border-radius:6px;font:400 13px/1.4 var(--ot-sans);color:var(--ot-text-2);text-decoration:none}
.ot-toc__list a:hover{color:var(--ot-primary)}
.ot-toc__list a.is-active{color:var(--ot-primary);font-weight:600;border-left-color:var(--ot-primary)}

/* ---------- Typography ---------- */
.ot-article h2{font:700 22px/1.3 var(--ot-display);letter-spacing:-.025em;color:var(--ot-ink);margin:40px 0 0;scroll-margin-top:var(--ot-offset)}
.ot-article h2#faqs{font-size:24px}
.ot-article p{margin:0}
.ot-article strong{color:var(--ot-ink)}
.ot-article a{color:var(--ot-primary);text-decoration:none}
.ot-article a:hover{color:var(--ot-primary-hover);text-decoration:underline}
.ot-article ul{margin:0;padding-left:20px;display:flex;flex-direction:column;gap:8px;font-size:14.5px}
.ot-lead{font-size:17px!important;font-weight:500;color:var(--ot-ink)}
.ot-source{font-size:13px!important;color:var(--ot-muted)}

/* ---------- Key points ---------- */
.ot-keypoints{border:1px solid var(--ot-border);border-radius:12px;padding:20px 22px}
.ot-keypoints__title{display:flex;align-items:center;gap:8px;font:600 14px/1.4 var(--ot-sans);color:var(--ot-ink);margin:0 0 12px!important}
.ot-keypoints__title::before{content:"";width:16px;height:16px;background:var(--ot-primary);-webkit-mask:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2" stroke-linejoin="round"><path d="m12 3 2.7 5.6 6.1.9-4.4 4.3 1 6.1L12 17l-5.4 2.9 1-6.1-4.4-4.3 6.1-.9z"/></svg>') center/contain no-repeat;mask:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2" stroke-linejoin="round"><path d="m12 3 2.7 5.6 6.1.9-4.4 4.3 1 6.1L12 17l-5.4 2.9 1-6.1-4.4-4.3 6.1-.9z"/></svg>') center/contain no-repeat}
.ot-keypoints ol{list-style:none;counter-reset:kp;margin:0;padding:0;display:flex;flex-direction:column;gap:12px;font-size:14px;line-height:1.6}
.ot-keypoints li{counter-increment:kp;display:grid;grid-template-columns:18px 1fr;gap:10px}
.ot-keypoints li::before{content:counter(kp);width:18px;height:18px;border-radius:50%;background:var(--ot-primary);color:#fff;font:700 10px/18px var(--ot-sans);text-align:center;margin-top:3px}

/* ---------- Figures ---------- */
.ot-figure{margin:0}
.ot-figure img{display:block;width:100%;height:auto;border-radius:12px;border:1px solid var(--ot-border)}
.ot-figure figcaption{margin-top:8px;font:italic 12px/1.5 var(--ot-sans);color:var(--ot-muted-2)}

/* ---------- Tables ---------- */
.ot-table{margin:0;border:1px solid var(--ot-border);border-radius:10px;overflow:auto;-webkit-overflow-scrolling:touch}
.ot-table table{width:100%;min-width:560px;border-collapse:collapse;font:400 13px/1.5 var(--ot-sans)}
.ot-table th{background:var(--ot-thead);color:var(--ot-ink);font-weight:600;text-align:left;padding:11px 16px}
.ot-table td{padding:11px 16px;border-top:1px solid var(--ot-row);vertical-align:top}
.ot-table td:first-child{font-weight:600;color:var(--ot-ink)}
.ot-table tr.is-highlight td{background:var(--ot-hl)}
.ot-table tr.is-highlight td:last-child strong,.ot-table--pairs tr.is-highlight strong{color:var(--ot-primary)}
.ot-table--pairs table{min-width:0}

/* ---------- Inline CTA ---------- */
.ot-cta-inline{background:var(--ot-tint);border-radius:12px;padding:18px 20px;display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap}
.ot-cta-inline__title{font:500 14px/1.4 var(--ot-sans);color:var(--ot-ink)}
.ot-cta-inline__sub{display:none}
.ot-cta-inline__btn{display:inline-flex;align-items:center;gap:8px;font:600 14px/1 var(--ot-sans);color:var(--ot-primary)!important;text-decoration:none!important}
.ot-cta-inline__btn span{width:18px;height:18px;border-radius:50%;background:var(--ot-primary);color:#fff;display:grid;place-items:center;font-size:11px}

/* ---------- Plan card ---------- */
.ot-plan-card{border:1px solid var(--ot-border);border-radius:12px;overflow:hidden;font-size:13.5px;line-height:1.5}
.ot-plan-card__head{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;background:var(--ot-cardhead);padding:12px 16px;border-bottom:1px solid var(--ot-row)}
.ot-chip{font:600 11px/1.3 var(--ot-sans);color:var(--ot-primary);background:var(--ot-tint);padding:4px 10px;border-radius:999px}
.ot-plan-card__body{display:grid;grid-template-columns:1fr 1fr}
.ot-pros,.ot-cons{padding:14px 16px}
.ot-cons{border-left:1px solid var(--ot-row)}
.ot-pros > p,.ot-cons > p{font:700 10px/1 var(--ot-sans)!important;letter-spacing:.08em;margin:0 0 10px!important}
.ot-pros > p{color:var(--ot-pros)} .ot-cons > p{color:var(--ot-cons)}
.ot-pros ul,.ot-cons ul{list-style:none;padding:0;font-size:13.5px}
.ot-pros li::before{content:"✓ ";color:var(--ot-pros);font-weight:700}
.ot-cons li::before{content:"✕ ";color:var(--ot-cons);font-weight:700}

/* ---------- Two cards / Example / Tip ---------- */
.ot-two-cards{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.ot-two-cards > div{border:1px solid var(--ot-border);border-radius:12px;padding:16px 18px;font-size:13.5px;line-height:1.55}
.ot-two-cards__title{font:700 16px/1.3 var(--ot-display)!important;color:var(--ot-ink);margin:0 0 6px!important}
.ot-example{background:var(--ot-ex-bg);border:1px solid var(--ot-ex-bd);border-radius:12px;padding:16px 18px;font-size:14px}
.ot-example__label{font:700 11px/1 var(--ot-sans)!important;letter-spacing:.06em;color:var(--ot-ex-label);margin:0 0 6px!important}
.ot-tip{background:var(--ot-tip);border-radius:12px;padding:16px 18px 16px 44px;font-size:14px;color:#2A2D7A;position:relative}
.ot-tip::before{content:"";position:absolute;left:18px;top:19px;width:16px;height:16px;background:var(--ot-primary);-webkit-mask:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2" stroke-linecap="round"><path d="M9 18h6M10 21h4M12 3a6 6 0 0 0-3.5 10.9c.6.5 1 1.2 1 2V16h5v-.1c0-.8.4-1.5 1-2A6 6 0 0 0 12 3z"/></svg>') center/contain no-repeat;mask:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2" stroke-linecap="round"><path d="M9 18h6M10 21h4M12 3a6 6 0 0 0-3.5 10.9c.6.5 1 1.2 1 2V16h5v-.1c0-.8.4-1.5 1-2A6 6 0 0 0 12 3z"/></svg>') center/contain no-repeat}

/* ---------- FAQ ---------- */
.ot-faq{display:flex;flex-direction:column;gap:10px}
.ot-faq details{border:1px solid var(--ot-border);border-radius:10px;overflow:hidden}
.ot-faq summary{list-style:none;cursor:pointer;display:flex;justify-content:space-between;align-items:center;gap:12px;padding:14px 16px;font:600 14px/1.4 var(--ot-sans);color:var(--ot-ink)}
.ot-faq summary::-webkit-details-marker{display:none}
.ot-faq summary::after{content:"";flex:none;width:14px;height:14px;background:var(--ot-muted-2);transition:transform .2s;-webkit-mask:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2" stroke-linecap="round"><path d="m6 9 6 6 6-6"/></svg>') center/contain no-repeat;mask:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2" stroke-linecap="round"><path d="m6 9 6 6 6-6"/></svg>') center/contain no-repeat}
.ot-faq details[open] summary::after{transform:rotate(180deg)}
.ot-faq details p{padding:0 16px 16px;font-size:13.5px;line-height:1.6;color:var(--ot-text-2)}

/* ---------- Share buttons (sidebar + mobile hero) ---------- */
.ot-share{display:flex;align-items:center;gap:8px;font:400 12px/1 var(--ot-sans);color:var(--ot-muted)}
.ot-share__btn{width:32px;height:32px;border:1px solid var(--ot-border);border-radius:7px;display:grid;place-items:center;color:var(--ot-ink);background:#fff;cursor:pointer;padding:0;font:700 12px/1 var(--ot-sans);text-decoration:none}
.ot-share__btn:hover{border-color:var(--ot-primary);color:var(--ot-primary)}
.ot-share__toast{font:600 11px/1 var(--ot-sans);color:var(--ot-pros);opacity:0;transition:opacity .2s}
.ot-share__toast.is-visible{opacity:1}

/* ---------- Related posts (Elementor Loop Grid with class .ot-related) ---------- */
.ot-related .elementor-loop-container{gap:16px}

/* ---------- Focus ---------- */
.ot-article a:focus-visible,.ot-sidebar a:focus-visible,.ot-contents-bar button:focus-visible,.ot-faq summary:focus-visible,.ot-share__btn:focus-visible{outline:2px solid var(--ot-primary);outline-offset:2px}

/* ==========================================================================
   LAPTOP 900–1199
   ========================================================================== */
@media (max-width:1199px){
  .ot-post-grid{grid-template-columns:200px minmax(0,1fr);gap:32px}
}

/* ==========================================================================
   TABLET + MOBILE ≤899: sidebar → contents bar
   ========================================================================== */
@media (max-width:899px){
  .ot-post-grid{display:block;max-width:680px;padding:8px 24px 48px}
  .ot-sidebar{display:none}
  .ot-contents-bar{display:block;position:sticky;top:var(--ot-head-h);z-index:25;background:#fff;border-bottom:1px solid #EEECF5}
  .ot-contents-bar__toggle{all:unset;box-sizing:border-box;cursor:pointer;width:100%;min-height:48px;padding:0 16px;display:flex;align-items:center;gap:10px;font:400 13px/1.3 var(--ot-sans)}
  .ot-contents-bar__icon{flex:none;width:16px;height:16px;color:var(--ot-primary)}
  .ot-contents-bar__label{flex:none;color:var(--ot-muted-2)}
  .ot-contents-bar__current{flex:1;min-width:0;font-weight:600;color:var(--ot-ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .ot-contents-bar__chev{flex:none;width:14px;height:14px;color:var(--ot-muted-2);transition:transform .2s}
  .ot-contents-bar[data-open="true"] .ot-contents-bar__chev{transform:rotate(180deg)}
  .ot-contents-bar__progress{height:2px;background:var(--ot-row)}
  .ot-contents-bar__progress span{display:block;height:2px;width:0;background:var(--ot-primary);transition:width .1s linear}
  .ot-contents-bar__panel{position:absolute;left:0;right:0;top:100%;background:#fff;border-bottom:1px solid #EEECF5;box-shadow:0 24px 40px -20px rgba(20,17,43,.3);max-height:60vh;overflow:auto;padding:6px 8px 10px;opacity:0;transform:translateY(-6px);pointer-events:none;transition:opacity .2s,transform .2s}
  .ot-contents-bar[data-open="true"] .ot-contents-bar__panel{opacity:1;transform:none;pointer-events:auto}
  .ot-contents-bar__panel ol{list-style:none;margin:0;padding:0;counter-reset:toc}
  .ot-contents-bar__panel a{counter-increment:toc;min-height:44px;display:flex;align-items:center;gap:10px;padding:0 10px;border-radius:8px;font:400 14px/1.3 var(--ot-sans);color:var(--ot-ink);text-decoration:none}
  .ot-contents-bar__panel a::before{content:counter(toc,decimal-leading-zero);width:20px;font-size:11px;color:#9C98B5}
  .ot-contents-bar__panel a.is-active{background:#F4F1FF;color:var(--ot-primary);font-weight:600}
}

/* ==========================================================================
   MOBILE ≤767
   ========================================================================== */
@media (max-width:767px){
  .ot-post-grid{padding:8px 16px 40px}
  .ot-article{font-size:16px;line-height:1.65}
  .ot-article > * + *{margin-top:16px}
  .ot-article h2{font-size:21px;letter-spacing:-.02em;margin-top:32px}
  .ot-article h2#faqs{font-size:22px}
  .ot-article ul{font-size:15px}
  .ot-lead{font-size:18px!important;line-height:1.55}

  /* hero */
  .ot-hero-meta--desktop{display:none!important}
  .ot-hero-meta--mobile{display:flex;align-items:center;gap:10px}
  .ot-hero-meta--mobile .ot-share__btn{width:40px;height:40px;border-color:#E1DEEC;border-radius:8px}
  .ot-crumb-back__long{display:none} .ot-crumb-back__short{display:inline}

  .ot-keypoints{padding:16px}
  .ot-keypoints ol{font-size:15px;line-height:1.55}
  .ot-keypoints li{grid-template-columns:20px 1fr}
  .ot-keypoints li::before{width:20px;height:20px;line-height:20px;font-size:11px;margin-top:2px}

  /* generic table: allow scroll */
  .ot-table table{min-width:0}

  /* --stack: pricing overview → cards (td order: plan, fee, credits, extra user) */
  .ot-table--stack{border:0;border-radius:0;overflow:visible}
  .ot-table--stack thead{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
  .ot-table--stack table,.ot-table--stack tbody{display:block}
  .ot-table--stack tr{display:grid;grid-template-columns:1fr auto;gap:4px 12px;border:1px solid var(--ot-border);border-radius:10px;padding:12px 14px;margin-bottom:8px}
  .ot-table--stack td{padding:0;border:0;font-size:13px;color:var(--ot-muted)}
  .ot-table--stack td:nth-child(1),.ot-table--stack td:nth-child(2){font-size:14px;font-weight:700;color:var(--ot-ink)}
  .ot-table--stack td:nth-child(2),.ot-table--stack td:nth-child(4){text-align:right}
  .ot-table--stack::after{content:"Fee per year · Credits · Extra user per year. Buyer-reported quotes, not list prices.";display:block;font:400 12px/1.5 var(--ot-sans);color:var(--ot-muted-2)}

  /* --team: hide 4th column (RocketReach) */
  .ot-table--team th:nth-child(4),.ot-table--team td:nth-child(4){display:none}
  .ot-table--team th,.ot-table--team td{padding:11px 12px}

  /* --swipe: alternatives → horizontal cards */
  .ot-table--swipe{border:0;border-radius:0;overflow:visible;margin-left:-16px!important;margin-right:-16px!important}
  .ot-table--swipe table,.ot-table--swipe tbody{display:block}
  .ot-table--swipe thead{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
  .ot-table--swipe tbody{display:flex;gap:10px;overflow-x:auto;scroll-snap-type:x mandatory;padding:0 16px 4px;-webkit-overflow-scrolling:touch}
  .ot-table--swipe tr{flex:none;width:220px;scroll-snap-align:start;display:flex;flex-direction:column;gap:4px;border:1px solid var(--ot-border);border-radius:12px;padding:14px}
  .ot-table--swipe td{padding:0;border:0;font-size:13px;line-height:1.45;color:var(--ot-muted)}
  .ot-table--swipe td:nth-child(1){font-size:15px;font-weight:700;color:var(--ot-ink)}
  .ot-table--swipe td:nth-child(2){font-weight:600;color:var(--ot-primary)}
  .ot-table--swipe td:nth-child(4){color:var(--ot-body)}
  .ot-table--swipe td:nth-child(4)::before{content:"Best for: "}
  .ot-table--swipe::after{content:"Swipe to compare →";display:block;padding:6px 16px 0;font:400 12px/1 var(--ot-sans);color:var(--ot-muted-2)}

  /* --pairs: fit table → stacked pairs */
  .ot-table--pairs thead{display:none}
  .ot-table--pairs table,.ot-table--pairs tbody,.ot-table--pairs tr{display:block}
  .ot-table--pairs tr{padding:11px 14px;border-top:1px solid var(--ot-row)}
  .ot-table--pairs tr:first-child{border-top:0}
  .ot-table--pairs td{display:block;padding:0;border:0}
  .ot-table--pairs td:first-child{font-weight:400;font-size:13px;color:var(--ot-muted)}
  .ot-table--pairs td:last-child{font-size:14px}

  /* inline CTA → card with full-width button */
  .ot-cta-inline{flex-direction:column;align-items:stretch;gap:10px;padding:16px}
  .ot-cta-inline__title{font:700 16px/1.3 var(--ot-display)}
  .ot-cta-inline__sub{display:block;font-size:13px!important;line-height:1.5;color:var(--ot-text-2)}
  .ot-cta-inline__btn{justify-content:center;min-height:44px;border-radius:8px;background:var(--ot-primary);color:#fff!important}
  .ot-cta-inline__btn span{background:none;width:auto;height:auto;font-size:14px}

  /* plan card */
  .ot-plan-card{font-size:14px}
  .ot-plan-card__head{flex-direction:column;align-items:flex-start;gap:8px;padding:12px 14px}
  .ot-chip{font-size:12px}
  .ot-plan-card__body{grid-template-columns:1fr}
  .ot-pros,.ot-cons{padding:12px 14px}
  .ot-cons{border-left:0;border-top:1px solid var(--ot-row)}
  .ot-pros > p,.ot-cons > p{font-size:11px!important}
  .ot-pros ul,.ot-cons ul{font-size:14px;gap:6px}

  .ot-two-cards{grid-template-columns:1fr}
  .ot-two-cards > div{padding:14px;font-size:14px}
  .ot-example,.ot-tip{font-size:15px;line-height:1.55}
  .ot-example{padding:14px} .ot-tip{padding:14px 14px 14px 40px} .ot-tip::before{left:14px;top:18px}

  .ot-faq{gap:8px}
  .ot-faq summary{min-height:52px;padding:12px 14px;font-size:15px;line-height:1.35}
  .ot-faq details p{padding:0 14px 14px;font-size:14px}

  /* author card (Elementor container .ot-author) */
  .ot-author{flex-direction:column!important;align-items:flex-start!important;padding:18px 16px!important;border-radius:12px!important}
  .ot-author .ot-author__linkedin{min-height:40px;display:inline-flex;align-items:center}

  /* related posts swipe (Loop Grid .ot-related) */
  .ot-related .elementor-loop-container{display:flex!important;gap:12px;overflow-x:auto;scroll-snap-type:x mandatory;padding:0 16px 4px;margin:0 -16px;-webkit-overflow-scrolling:touch}
  .ot-related .e-loop-item{flex:none;width:280px;scroll-snap-align:start}
}

@media (prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}
