/* ============================================================
   BranditScan — Brandit Labs articles (public SEO pages)
   Loaded together with free-tools.css (breadcrumbs, hero, byline,
   article typography, callouts, CTA panel, FAQ, buttons, scan UI
   all come from there). This file adds the article-only components.
   ============================================================ */

/* ---------- Layout guard ----------
   The LP page wrapper (.ui-c251) is a flex column: without an explicit width
   the article's min-content size (tables with min-width) stretches the whole
   column past the viewport on mobile. Scoped to labs pages via this file. */
.ft-article, .ft-faq, .ft-related { width: 100%; min-width: 0; box-sizing: border-box; }

/* ---------- Article column flex fix ----------
   The LP shell renders the page inside a centered flex column; a flex item's
   automatic minimum size is its min-content width, so the table's min-width
   would force the whole article wider than a phone viewport (clipping both
   edges). min-width: 0 lets the column shrink; the table then scrolls inside
   its own wrapper as designed. */
.ft-article { min-width: 0; width: 100%; max-width: 100%; box-sizing: border-box; }

/* ---------- Hero meta row (category · date · reading time) ---------- */
.lba-meta { display: flex; justify-content: center; align-items: center; gap: 9px; flex-wrap: wrap; margin-top: 20px; }
.lba-meta-chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 13px; border-radius: 100px; background: #fff; border: 1px solid rgba(7,16,12,0.08); font-family: "Matter Medium", sans-serif; font-size: 12.5px; color: #4a524d; box-shadow: 0 1px 6px rgba(7,16,12,0.04); }
.lba-meta-chip i { font-size: 11px; color: #7f42fd; }

/* ---------- Quick answer (AI-overview / featured-snippet block) ---------- */
.lba-answer { position: relative; margin: 26px 0; padding: 22px 24px 20px; border-radius: 16px; background: linear-gradient(135deg, rgba(127,66,253,0.06) 0%, rgba(167,139,250,0.09) 100%); border: 1px solid rgba(127,66,253,0.2); }
.lba-answer__label { display: inline-flex; align-items: center; gap: 7px; font-family: "Matter Medium", sans-serif; font-size: 11.5px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: #7f42fd; margin-bottom: 10px; }
.lba-answer__label i { font-size: 12px; }
.lba-answer p { font-family: "Matter Regular", sans-serif; font-size: 16px; color: #2f3733; line-height: 1.75; margin: 0; }
.lba-answer p b { font-family: "Matter Medium", sans-serif; font-weight: 500; color: #07100c; }

/* ---------- Tables (restricted words, revenue splits…) ---------- */
.lba-table-wrap { margin: 22px 0; border: 1px solid rgba(7,16,12,0.08); border-radius: 16px; overflow: hidden; background: #fff; box-shadow: 0 2px 14px rgba(7,16,12,0.04); }
.lba-table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.lba-table { width: 100%; border-collapse: collapse; min-width: 480px; }
.lba-table th { font-family: "Matter Medium", sans-serif; font-size: 12.5px; font-weight: 600; letter-spacing: 0.6px; text-transform: uppercase; color: #fff; text-align: left; padding: 13px 18px; background: linear-gradient(180deg, #7f42fd 0%, #6114ff 100%); }
.lba-table td { font-family: "Matter Regular", sans-serif; font-size: 14.5px; color: #4a524d; line-height: 1.6; padding: 13px 18px; border-top: 1px solid rgba(7,16,12,0.06); vertical-align: top; }
.lba-table tr:nth-child(even) td { background: #fbfcfb; }
.lba-table td:first-child { font-family: "Matter Medium", sans-serif; color: #07100c; white-space: nowrap; }
.lba-table td b { font-family: "Matter Medium", sans-serif; font-weight: 500; color: #07100c; }
.lba-table-caption { display: block; padding: 10px 18px 12px; font-family: "Matter Regular", sans-serif; font-size: 12.5px; color: #8a918d; border-top: 1px solid rgba(7,16,12,0.06); background: #fff; }

/* ---------- Checklist (pre-post checklist, red flags) ---------- */
.ft-article ul.lba-checklist { margin: 20px 0 24px; }
.ft-article ul.lba-checklist li { padding: 9px 0 9px 36px; border-bottom: 1px dashed rgba(7,16,12,0.07); }
.ft-article ul.lba-checklist li:last-child { border-bottom: none; }
.ft-article ul.lba-checklist li::before { content: '\2713'; top: 9px; width: 22px; height: 22px; border-radius: 7px; background: rgba(70,206,132,0.12); color: #46CE84; font-size: 12px; font-family: "Matter Medium", sans-serif; display: flex; align-items: center; justify-content: center; }
.ft-article ul.lba-checklist--danger li::before { content: '\2715'; background: rgba(239,68,68,0.09); color: #dc2626; }

/* ---------- Article images ----------
   free-tools.css sets width:100% on .ft-article-img but the <img> height
   ATTRIBUTE (kept for CLS-free pre-layout) acts as a presentational hint —
   without height:auto the image renders at a fixed height and distorts.
   Labs articles also render them smaller and centered. */
.ft-article .ft-article-img { display: block; width: 100%; max-width: 640px; height: auto; margin: 26px auto 8px; }
.ft-article .ft-article-caption { max-width: 640px; margin-left: auto; margin-right: auto; }

/* ---------- Pull-quote ---------- */
.lba-quote { margin: 26px 0; padding: 4px 0 4px 22px; border-left: 3px solid #7f42fd; }
.lba-quote p { font-family: "Matter Medium", sans-serif; font-size: 18.5px; color: #07100c; line-height: 1.6; margin: 0; }

/* ---------- "Read next" article cross-link ---------- */
.lba-next { display: flex; align-items: center; gap: 16px; margin: 30px 0; padding: 18px 20px; border-radius: 16px; background: #fff; border: 1px solid rgba(7,16,12,0.08); text-decoration: none; transition: transform 0.15s, box-shadow 0.15s; }
.lba-next:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(127,66,253,0.12); text-decoration: none; }
.lba-next__thumb { width: 92px; height: 60px; border-radius: 10px; object-fit: cover; flex-shrink: 0; border: 1px solid rgba(7,16,12,0.07); }
.lba-next__text { min-width: 0; flex: 1; }
.lba-next__eyebrow { display: block; font-family: "Matter Medium", sans-serif; font-size: 10.5px; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase; color: #7f42fd; margin-bottom: 3px; }
.lba-next__title { display: block; font-family: "Matter Medium", sans-serif; font-size: 15.5px; color: #07100c; line-height: 1.35; }
.lba-next__go { flex-shrink: 0; color: #7f42fd; font-size: 14px; }
.ft-article a.lba-next, .ft-article a.lba-next:hover { text-decoration: none; }
@media (max-width: 540px) { .lba-next__thumb { width: 64px; height: 46px; } }

/* ---------- Embedded Leak Scan widget ---------- */
.lba-scan { margin: 30px 0; border-radius: 20px; border: 1px solid rgba(127,66,253,0.22); background: linear-gradient(180deg, #faf7ff 0%, #fff 30%); box-shadow: 0 10px 36px rgba(127,66,253,0.1); overflow: hidden; }
.lba-scan__head { padding: 26px 26px 4px; text-align: center; }
.lba-scan__eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 5px 13px; border-radius: 100px; background: linear-gradient(180deg, rgba(127,66,253,0.08) 0%, rgba(97,20,255,0.08) 100%); box-shadow: inset 0 1px 0 0 #fff, 0 0 0 1px rgba(127,66,253,0.18); font-family: "Matter Medium", sans-serif; font-size: 12px; color: #7f42fd; margin-bottom: 12px; }
.lba-scan__head h3 { font-family: "Matter Medium", sans-serif; font-size: clamp(21px, 2.6vw, 26px); font-weight: 500; color: #07100c; margin: 0 0 8px; line-height: 1.25; }
.lba-scan__head p { font-family: "Matter Regular", sans-serif; font-size: 14.5px; color: #666d69; line-height: 1.65; max-width: 560px; margin: 0 auto; }
.lba-scan__body { padding: 0 26px 26px; }
.lba-scan__body .ft-scanbox { max-width: 100%; margin-top: 18px; }
.lba-scan__body .ft-scanning, .lba-scan__body .ft-scan-error { max-width: 100%; }
.lba-scan__results { display: none; margin-top: 22px; }
.lba-scan__results.is-visible { display: block; }
.lba-scan__query { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.lba-scan__query .ft-googlebar { flex: 1; min-width: 220px; max-width: none; }
.lba-scan__freshness { font-family: "Matter Regular", sans-serif; font-size: 12px; color: #8a918d; }
.lba-scan__body .ft-metrics { grid-template-columns: repeat(4, 1fr); margin-bottom: 16px; }
@media (max-width: 860px) { .lba-scan__body .ft-metrics { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .lba-scan__body .ft-metrics { grid-template-columns: 1fr; } }
.lba-scan__serp-label { display: flex; align-items: center; gap: 8px; font-family: "Matter Medium", sans-serif; font-size: 12px; letter-spacing: 0.8px; text-transform: uppercase; color: #b91c1c; margin: 0 0 8px; }
.lba-scan__serp { background: #fff; border: 1px solid rgba(7,16,12,0.08); border-radius: 16px; padding: 4px 0 6px; margin-bottom: 6px; }
.lba-scan__more { font-family: "Matter Regular", sans-serif; font-size: 12.5px; color: #8a918d; margin: 8px 2px 0; }
.lba-scan__actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 18px; }
.ft-article .lba-scan__actions a.ft-btn--primary, .ft-article .lba-scan__actions a.ft-btn--primary:hover { color: #fff; text-decoration: none; }
.lba-scan__foot { padding: 12px 26px; border-top: 1px solid rgba(127,66,253,0.12); background: rgba(127,66,253,0.03); text-align: center; font-family: "Matter Regular", sans-serif; font-size: 12px; color: #8a918d; }
.lba-scan__foot a { color: #7f42fd; text-decoration: none; font-family: "Matter Medium", sans-serif; }
.lba-scan__foot a:hover { text-decoration: underline; }

/* ---------- In-text CTA button row ---------- */
.lba-cta-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 24px 0; }
.ft-article .lba-cta-row a.ft-btn--primary, .ft-article .lba-cta-row a.ft-btn--primary:hover { color: #fff; text-decoration: none; }
.ft-article .lba-cta-row a.ft-btn--ghost { text-decoration: none; }

/* ---------- Article footer spacing before related tools ---------- */
.lba-article-end { margin-bottom: 12px; }

/* ---------- Floating conversion widget (bottom-right, desktop) ----------
   Pink case-study-card palette (mirrors .ft-case-card): Astro proof card +
   stagename input that hands off to the in-article Leak Scan widget. */
.lba-float {
    position: fixed; bottom: 24px; right: 24px; z-index: 9999;
    width: 316px; padding: 18px 18px 14px; border-radius: 20px;
    background: linear-gradient(135deg, #fdf2f8 0%, #fce7f3 40%, #ede9fe 100%);
    border: 1px solid rgba(127,66,253,0.18);
    box-shadow: 0 14px 44px rgba(127,66,253,0.22), 0 4px 14px rgba(7,16,12,0.1);
    opacity: 0; transform: translateY(18px); pointer-events: none;
    transition: opacity 0.35s ease, transform 0.35s ease;
}
.lba-float.is-visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.lba-float::before {
    content: ''; position: absolute; top: -35%; right: -20%; width: 70%; height: 90%;
    border-radius: 50%; pointer-events: none;
    background: radial-gradient(circle, rgba(127,66,253,0.14) 0%, transparent 60%);
}
.lba-float > * { position: relative; z-index: 1; }

.lba-float__close {
    position: absolute; top: 10px; right: 10px; z-index: 2;
    width: 24px; height: 24px; border-radius: 8px; border: 1px solid rgba(7,16,12,0.08); cursor: pointer;
    background: rgba(255,255,255,0.75); color: #8a8f8b; font-size: 12px;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.15s, color 0.15s;
}
.lba-float__close:hover { background: #fff; color: #07100c; }

.lba-float__case {
    display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin-bottom: 12px;
    border-radius: 14px; background: rgba(255,255,255,0.75);
    border: 1px solid rgba(127,66,253,0.14); text-decoration: none;
    box-shadow: 0 2px 10px rgba(127,66,253,0.08);
    transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
}
.lba-float__case:hover { background: #fff; transform: translateY(-1px); box-shadow: 0 6px 16px rgba(127,66,253,0.16); text-decoration: none; }
.lba-float__avatar { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; flex-shrink: 0; border: 2px solid #fff; box-shadow: 0 0 0 2px rgba(127,66,253,0.35); }
.lba-float__case-text { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 1px; }
.lba-float__case-name { display: flex; align-items: center; gap: 5px; font-family: "Matter Medium", sans-serif; font-size: 12.5px; color: #07100c; line-height: 1.2; }
.lba-float__case-name svg { width: 13px; height: 13px; flex-shrink: 0; }
.lba-float__case-num { font-family: "Matter Medium", sans-serif; font-size: 16px; font-weight: 700; letter-spacing: -0.4px; background: linear-gradient(180deg, #46ce84 0%, #2ea865 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; line-height: 1.15; }
.lba-float__case-num em { font-style: normal; font-family: "Matter Regular", sans-serif; font-size: 10px; font-weight: 400; letter-spacing: 0.4px; text-transform: uppercase; -webkit-text-fill-color: #8a8f8b; }
.lba-float__case-chip { flex-shrink: 0; padding: 4px 9px; border-radius: 100px; background: rgba(70,206,132,0.12); border: 1px solid rgba(70,206,132,0.3); color: #46CE84; font-family: "Matter Medium", sans-serif; font-size: 10.5px; white-space: nowrap; }

.lba-float__pitch { font-family: "Matter Regular", sans-serif; font-size: 12.5px; color: #5b5f6d; line-height: 1.55; margin: 0 0 12px; }
.lba-float__pitch b { color: #07100c; font-family: "Matter Medium", sans-serif; font-weight: 500; }

.lba-float__form { display: flex; gap: 7px; }
.lba-float__form input {
    flex: 1; min-width: 0; padding: 10px 13px; border-radius: 11px;
    border: 1px solid rgba(7,16,12,0.12); background: #fff;
    color: #07100c; font-family: "Matter Regular", sans-serif; font-size: 13px; outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.lba-float__form input::placeholder { color: #a7aeaa; }
.lba-float__form input:focus { border-color: rgba(127,66,253,0.5); box-shadow: 0 0 0 3px rgba(127,66,253,0.1); }
.lba-float__btn {
    flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px;
    padding: 10px 14px; border-radius: 11px; border: none; cursor: pointer;
    background: linear-gradient(180deg, #7f42fd 0%, #6114ff 100%); color: #fff;
    font-family: "Matter Medium", sans-serif; font-size: 13px; white-space: nowrap;
    box-shadow: 0 4px 14px rgba(127,66,253,0.35);
    transition: transform 0.15s, box-shadow 0.15s;
}
.lba-float__btn:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(127,66,253,0.5); }
.lba-float__btn i { font-size: 11px; }

.lba-float__trust { display: flex; align-items: center; justify-content: center; gap: 6px; font-family: "Matter Regular", sans-serif; font-size: 10.5px; color: #8a918d; margin: 10px 0 0; }
.lba-float__trust i { font-size: 9px; }

/* Hide on phones only (blog-FAB precedent); slightly slimmer on small laptops. */
@media (max-width: 1099px) { .lba-float { width: 288px; padding: 16px 16px 12px; } }
@media (max-width: 809px) { .lba-float { display: none; } }
