/* ============================================================================
   Bisdata Pro — shared design system (Harissa-ember dark, Hebrew-first RTL).
   RTL-native (logical properties only), mobile-native, motion per Emil rules.
   One stylesheet for every Pro page. Components below are composed by pages;
   page-specific bits go in a per-page <style> using these tokens — never edit
   this file per-page.
   ============================================================================ */

:root {
  /* ground + surfaces */
  --bg: #14100E;
  --surface: #1C1613;
  --raised: #241C18;
  --sunken: #0E0B09;
  /* ink */
  --ink: #EDE7E2;
  --ink-2: #C4BBB3;
  --muted: #9A9089;
  /* hairlines */
  --line: #302823;
  --line-2: #40352E;
  /* harissa accent (owned brand color, ember register for dark) */
  --accent: #E0764A;
  --accent-deep: #EFA07A;
  --accent-tint: #2A1D16;
  --on-accent: #14100E;
  /* semantic data roles */
  --warm: #E9A24A;
  --star: #E9A24A;
  --good: #C9A24A;      /* brass — positive / replied */
  --bad: #E0764A;       /* harissa — the problem metric (ghosting) */
  --sage: #93A98D;      /* replied / healthy */
  --slate: #7C8891;     /* quiet / neutral / cool anchor */
  /* radii — two-radius discipline (controls vs pills) */
  --r-ctl: 0px;
  --r-card: 0px;
  --r-pill: 999px;
  /* type — modern Hebrew "instrument" system: Heebo (geometric), one family, weight-driven */
  --serif: 'Heebo', 'Segoe UI', system-ui, sans-serif;   /* display: headline + wordmark, bold weights */
  --ui: 'Heebo', 'Segoe UI', system-ui, sans-serif;      /* body / UI */
  /* motion */
  --ease-out: cubic-bezier(.23, 1, .32, 1);
  --ease-spring: cubic-bezier(.34, 1.26, .5, 1);
  --ease-drawer: cubic-bezier(.32, .72, 0, 1);   /* iOS-like drawer curve (Emil) */
  /* spacing scale */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 24px; --sp-6: 32px; --sp-7: 48px;
  /* z-index scale */
  --z-nav: 20; --z-sticky: 30; --z-dropdown: 40; --z-modal: 60; --z-toast: 80;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
/* app-wide themed scrollbar (main pages + any overflow container) — matches the sidebar treatment */
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 99px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); background-clip: padding-box; }

/* section zone divider — bands a long page into labeled areas (boxless: heading + hairline) */
.zone { display: flex; align-items: baseline; gap: var(--sp-3); margin: var(--sp-7) 0 var(--sp-4); }
.zone-title { font-size: 15px; font-weight: 800; color: var(--ink); letter-spacing: -.01em; white-space: nowrap; }
.zone-sub { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.zone-line { flex: 1; height: 1px; background: var(--line-2); align-self: center; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--ui);
  font-size: 15px;                 /* RTL Hebrew reads 1px larger than the LTR 14 baseline */
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;              /* belt-and-braces against RTL horizontal leak */
}

/* Latin / numeric isolation — the #1 RTL bug guard. Every number, %, ₪, ratio,
   date, and Latin token must carry .num or .lat (or sit in <bdi>). */
.num { direction: ltr; unicode-bidi: isolate; font-variant-numeric: tabular-nums lining-nums; font-feature-settings: "tnum" 1, "lnum" 1; }
.lat { direction: ltr; unicode-bidi: isolate; }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
h1, h2, h3, p { margin: 0; }

a:focus-visible, button:focus-visible, [tabindex]:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--accent-deep);
  outline-offset: 2px;
  border-radius: var(--r-ctl);
}

/* ============ SHELL ============ */
.topbar-wrap { border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: var(--z-nav); background: color-mix(in oklab, var(--bg) 88%, transparent); backdrop-filter: blur(8px); }
.topbar-inner { max-width: 1360px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: var(--sp-5); width: 100%; padding: var(--sp-4) var(--sp-6); }
.brand-cluster { display: flex; align-items: center; gap: var(--sp-5); min-width: 0; }
.brand-mark { display: flex; align-items: center; gap: var(--sp-2); background: none; border: 0; padding: 0; cursor: pointer; transition: transform 140ms var(--ease-out); }
.brand-mark:active { transform: scale(.96); }
.brand-mark svg { width: 26px; height: 26px; flex: none; }
.brand-name { font-family: var(--serif); font-size: 20px; font-weight: 800; letter-spacing: -.01em; color: var(--ink); }
.brand-tag { font-size: 11px; font-weight: 700; color: var(--ink); align-self: flex-start; margin-top: 2px; }  /* small white "Pro" — no pill */

.main-nav { display: flex; align-items: center; flex-wrap: wrap; gap: var(--sp-1); }
.main-nav a { display: inline-flex; align-items: center; min-height: 40px; padding: 8px var(--sp-4); border-radius: var(--r-ctl); color: var(--muted); font-size: 14px; font-weight: 600; white-space: nowrap; transition: background-color .16s var(--ease-out), color .16s var(--ease-out); }
.main-nav a.active { color: var(--ink); background: var(--raised); border: 1px solid var(--line-2); }
@media (hover: hover) and (pointer: fine) { .main-nav a:not(.active):hover { color: var(--ink-2); background: var(--surface); } }

.context-line { display: flex; align-items: center; gap: var(--sp-2); font-size: 13px; color: var(--muted); white-space: nowrap; }
.context-line .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--good); flex-shrink: 0; box-shadow: 0 0 0 3px var(--accent-tint); }
.context-line strong { color: var(--ink-2); font-weight: 600; }

.shell { max-width: 1360px; margin: 0 auto; padding: 0 var(--sp-6) var(--sp-7); }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--sp-5); margin: var(--sp-6) 0; flex-wrap: wrap; }
.page-title { font-family: var(--serif); font-size: 31px; font-weight: 800; letter-spacing: -.02em; color: var(--ink); text-wrap: balance; }
.page-sub { margin-top: var(--sp-1); color: var(--muted); font-size: 14px; }
.head-actions { display: flex; gap: var(--sp-3); flex-wrap: wrap; }

/* ============ BUTTONS ============ */
.btn-ghost { display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2); min-height: 40px; padding: 9px var(--sp-4); border-radius: var(--r-ctl); border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); font-size: 14px; font-weight: 600; cursor: pointer; transition: transform .12s var(--ease-out), border-color .16s var(--ease-out), background-color .16s var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .btn-ghost:hover { border-color: var(--muted); background: var(--raised); } }
.btn-ghost:active { transform: scale(.97); }

.btn-primary { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2); min-height: 46px; padding: 13px 22px; border-radius: var(--r-ctl); border: none; background: var(--accent); color: var(--on-accent); font-size: 15px; font-weight: 700; cursor: pointer; white-space: nowrap; overflow: hidden; transition: transform .12s var(--ease-out), background-color .16s var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .btn-primary:hover { background: var(--accent-deep); } }
.btn-primary:active { transform: scale(.97); }
.btn-primary .count { background: rgba(20, 16, 14, .22); padding: 1px 7px; border-radius: var(--r-pill); font-size: 13px; }
/* signature sheen — reserved for the ONE hero CTA per page. RTL-safe: sweeps
   toward the inline direction via a keyframe that runs once on load + hover. */
.btn-primary.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(110deg, transparent 34%, rgba(255, 236, 214, .30) 50%, transparent 66%);
  transform: translateX(-140%);
  pointer-events: none;
}
.btn-primary.hero::after { animation: sheen 1.1s var(--ease-out) .6s 1 both; }
@media (hover: hover) and (pointer: fine) { .btn-primary.hero:hover::after { animation: sheen .9s var(--ease-out); } }
@keyframes sheen { to { transform: translateX(140%); } }

/* ============ KPI ROW ============ */
.kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-6); margin-bottom: var(--sp-7); }
.kpi-card { background: none; border: 0; border-top: 1px solid var(--line-2); border-radius: 0; padding: var(--sp-4) 0 0; display: flex; flex-direction: column; gap: var(--sp-2); }
.kpi-label { font-size: 13px; font-weight: 600; color: var(--muted); }
.kpi-value-row { display: flex; align-items: baseline; gap: var(--sp-3); flex-wrap: wrap; }
.kpi-value { font-size: 38px; font-weight: 800; color: var(--ink); letter-spacing: -.02em; }
.kpi-value .unit { font-size: 20px; font-weight: 600; color: var(--ink-2); }
.kpi-delta { display: inline-flex; align-items: center; gap: 3px; font-size: 13px; font-weight: 700; padding: 2px 7px; border-radius: var(--r-pill); }
.kpi-delta.bad { color: var(--bad); background: var(--accent-tint); }
.kpi-delta.good { color: var(--good); background: rgba(201, 162, 74, .13); }
.kpi-delta.flat { color: var(--muted); background: var(--surface); }
.kpi-foot { font-size: 12.5px; color: var(--muted); }

/* ============ PANELS ============ */
.below-grid { display: grid; grid-template-columns: 1.65fr 1fr; gap: var(--sp-7); align-items: start; margin-bottom: var(--sp-7); }
.col-stack { display: flex; flex-direction: column; gap: var(--sp-6); }
.panel { background: transparent; border: 0; border-radius: 0; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); padding: var(--sp-3) 0; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.panel-title { font-size: 15px; font-weight: 700; color: var(--ink); display: flex; align-items: center; gap: var(--sp-2); }
.panel-title .sub { font-size: 12.5px; font-weight: 500; color: var(--muted); }
.panel-meta { font-size: 12px; color: var(--muted); }
.panel-body { padding: var(--sp-4) 0; }

/* ============ TABLES (with mobile card fallback) ============ */
.table-scroll { overflow-x: auto; }
table.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table thead th { text-align: start; padding: var(--sp-3) var(--sp-5); font-size: 12px; font-weight: 700; color: var(--muted); border-bottom: 1px solid var(--line); white-space: nowrap; }
.data-table thead th.sorted { color: var(--ink-2); }
.data-table thead th .sort-arrow { font-size: 10px; color: var(--accent); }   /* vertical caret — never mirrored */
.data-table tbody td { padding: var(--sp-4) var(--sp-5); border-bottom: 1px solid var(--line); color: var(--ink-2); vertical-align: middle; text-align: start; }
.data-table tbody tr:last-child td { border-bottom: none; }
/* boxless: tables sit flush on the page grid */
.data-table thead th:first-child, .data-table tbody td:first-child { padding-inline-start: 0; }
.data-table thead th:last-child, .data-table tbody td:last-child { padding-inline-end: 0; }
.data-table tbody tr.is-self td { color: var(--ink); background: var(--accent-tint); }
@media (hover: hover) and (pointer: fine) { .data-table tbody tr:not(.is-self):hover { background: var(--raised); } }
.rank-cell { font-weight: 700; color: var(--muted); }
.name-cell { display: flex; align-items: center; gap: var(--sp-2); font-weight: 600; color: var(--ink); }
.self-chip { font-size: 10px; font-weight: 700; color: var(--on-accent); background: var(--accent); padding: 1px 6px; border-radius: var(--r-pill); }

/* score / tier badges */
.score-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; padding: 3px 8px; border-radius: var(--r-ctl); font-weight: 700; font-size: 13px; }
.score-badge.tier-a { color: var(--good); background: rgba(201, 162, 74, .14); }
.score-badge.tier-b { color: var(--accent-deep); background: rgba(224, 118, 74, .12); }
.score-badge.tier-c { color: var(--muted); background: var(--raised); }
.ignore-value { font-weight: 600; }
.ignore-value.hi { color: var(--bad); }
.ignore-value.mid { color: var(--warm); }
.ignore-value.lo { color: var(--good); }
.trend-cell { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; }  /* ▲▼ vertical — do NOT mirror */
.trend-cell.up { color: var(--good); }
.trend-cell.down { color: var(--bad); }
.trend-cell.flat { color: var(--muted); }

/* ============ PILLS / CHIPS / TAGS ============ */
.pill { display: inline-flex; align-items: center; gap: 5px; min-height: 34px; padding: 6px 12px; border-radius: var(--r-pill); border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); font-size: 13px; font-weight: 600; cursor: pointer; transition: transform .12s var(--ease-out), background-color .16s var(--ease-out), border-color .16s var(--ease-out), color .16s var(--ease-out); }
.pill.active { background: var(--accent-tint); border-color: var(--accent); color: var(--ink); }
@media (hover: hover) and (pointer: fine) { .pill:not(.active):hover { border-color: var(--muted); } }
.pill:active { transform: scale(.96); }
.filter-bar { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: var(--r-pill); font-size: 11.5px; font-weight: 700; }
.tag.good { color: var(--good); background: rgba(201, 162, 74, .13); }
.tag.bad { color: var(--bad); background: var(--accent-tint); }
.tag.warn { color: var(--warm); background: rgba(233, 162, 74, .13); }
.tag.quiet { color: var(--slate); background: var(--surface); border: 1px solid var(--line-2); }

/* ============ AVATAR / INITIAL ============ */
.avatar { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--raised); border: 1px solid var(--line-2); color: var(--accent-deep); font-weight: 700; font-size: 15px; flex: none; }

/* ============ STAR RATING (LTR-isolated; stars don't mirror) ============ */
.stars { display: inline-flex; direction: ltr; unicode-bidi: isolate; gap: 1px; color: var(--star); font-size: 13px; }
.stars .off { color: var(--line-2); }

/* ============ LIST / FEED ROWS ============ */
.feed { display: flex; flex-direction: column; }
.feed-row { display: flex; align-items: flex-start; gap: var(--sp-3); padding: var(--sp-4) 0; border-bottom: 1px solid var(--line); }
.feed-row:last-child { border-bottom: none; }
.feed-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 7px; flex-shrink: 0; }
.feed-dot.bad { background: var(--bad); box-shadow: 0 0 0 3px var(--accent-tint); }
.feed-dot.warn { background: var(--warm); box-shadow: 0 0 0 3px rgba(233, 162, 74, .14); }
.feed-dot.good { background: var(--good); box-shadow: 0 0 0 3px rgba(201, 162, 74, .14); }
.feed-dot.neutral { background: var(--muted); }
.feed-body { flex: 1; min-width: 0; }
.feed-text { font-size: 14px; color: var(--ink-2); line-height: 1.55; }
.feed-text strong { color: var(--ink); font-weight: 700; }
.feed-meta { display: flex; align-items: center; gap: var(--sp-3); margin-top: 4px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.feed-action { color: var(--accent-deep); font-weight: 600; transition: opacity .14s var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .feed-action:hover { opacity: .75; } }

/* ============ FORM CONTROLS (settings) ============ */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: var(--sp-4); }
.field label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field .hint { font-size: 12px; color: var(--muted); }
.input, .select { width: 100%; min-height: 44px; padding: 10px var(--sp-4); border-radius: var(--r-ctl); border: 1px solid var(--line-2); background: var(--sunken); color: var(--ink); font-family: inherit; font-size: 14px; transition: border-color .16s var(--ease-out); }
.input::placeholder { color: var(--muted); }
.input:focus, .select:focus { border-color: var(--accent); outline: none; }
.select { appearance: none; cursor: pointer; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); padding: var(--sp-4) 0; border-bottom: 1px solid var(--line); }
.setting-row:last-child { border-bottom: none; }
.setting-row .st-copy { min-width: 0; }
.setting-row .st-title { font-size: 14px; font-weight: 600; color: var(--ink); }
.setting-row .st-desc { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
/* toggle switch — RTL-aware via logical inset */
.toggle { position: relative; width: 44px; height: 26px; border-radius: var(--r-pill); background: var(--raised); border: 1px solid var(--line-2); cursor: pointer; flex: none; transition: background-color .18s var(--ease-out); }
.toggle .knob { position: absolute; top: 2px; inset-inline-start: 2px; width: 20px; height: 20px; border-radius: 50%; background: var(--muted); transition: transform .2s var(--ease-out), background-color .18s var(--ease-out); }
.toggle.on { background: var(--accent-tint); border-color: var(--accent); }
.toggle.on .knob { background: var(--accent); transform: translateX(18px); }   /* moves toward inline-end */
[dir="rtl"] .toggle.on .knob { transform: translateX(-18px); }                 /* RTL: knob travels the other way */

/* ============ TABS ============ */
.tabs { display: flex; flex-wrap: wrap; gap: var(--sp-1); border-bottom: 1px solid var(--line); margin-bottom: var(--sp-5); }
.tab { position: relative; min-height: 42px; padding: 10px var(--sp-4); color: var(--muted); font-size: 14px; font-weight: 600; cursor: pointer; background: none; border: none; }
.tab.active { color: var(--ink); }
.tab.active::after { content: ""; position: absolute; inset-inline: var(--sp-3); bottom: -1px; height: 2px; background: var(--accent); border-radius: 2px; }

/* ============ GEO MAP ============ */
.geo-map { position: relative; aspect-ratio: 4 / 3; border-radius: var(--r-ctl); background: linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 28px 28px, linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 28px 28px, var(--sunken); border: 1px solid var(--line); overflow: hidden; }
.geo-dot { position: absolute; border-radius: 50%; transform: translate(50%, -50%); }   /* +50% X for inline-start anchoring in RTL */
.geo-dot.d-small { width: 8px; height: 8px; background: var(--muted); opacity: .55; }
.geo-dot.d-mid { width: 12px; height: 12px; background: var(--accent-deep); opacity: .75; }
.geo-dot.d-top { width: 16px; height: 16px; background: var(--accent); box-shadow: 0 0 0 1.5px var(--accent-tint); }
.geo-dot.d-self { width: 14px; height: 14px; background: transparent; border: 2px solid var(--accent); }
.geo-dot.d-self::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 1px solid var(--accent); opacity: .4; }
.geo-caption { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); margin-top: var(--sp-3); font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
.geo-legend { display: flex; gap: var(--sp-4); }
.geo-legend-item { display: flex; align-items: center; gap: 5px; }
.geo-legend-dot { width: 8px; height: 8px; border-radius: 50%; }

/* ============ MISC ============ */
.cta-band { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-6); padding: var(--sp-6); border: 0; border-radius: 0; background: var(--accent-tint); flex-wrap: wrap; }
.cta-copy { max-width: 560px; }
.cta-eyebrow { font-size: 12.5px; font-weight: 700; color: var(--good); margin-bottom: var(--sp-2); }
.cta-headline { font-size: 18px; font-weight: 700; color: var(--ink); margin-bottom: 4px; text-wrap: balance; }
.cta-sub { font-size: 14px; color: var(--ink-2); }
.empty { display: grid; place-items: center; gap: var(--sp-2); padding: var(--sp-7) var(--sp-5); text-align: center; color: var(--muted); }
.empty .big { font-size: 15px; font-weight: 600; color: var(--ink-2); }
.divider { height: 1px; background: var(--line); border: 0; margin: var(--sp-5) 0; }

.pro-foot { max-width: 1360px; margin: var(--sp-7) auto 0; padding: var(--sp-5) var(--sp-6) 0; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.pro-foot a { color: var(--ink-2); }
@media (hover: hover) and (pointer: fine) { .pro-foot a:hover { color: var(--accent-deep); } }
.demo-pill { font-size: 11px; font-weight: 700; color: var(--warm); border: 1px solid var(--line-2); border-radius: var(--r-pill); padding: 3px 10px; }

/* ============ SOCIAL / PLATFORM ============ */
/* platform identity via a colored token (no trademarked logos): ig=harissa, tt=ink, fb=slate */
.plat { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--ink-2); }
.plat-dot { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.plat.ig .plat-dot { background: var(--accent); }
.plat.tt .plat-dot { background: var(--ink-2); }
.plat.fb .plat-dot { background: var(--slate); }

.social-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-4); }
.social-card { background: var(--raised); border: 1px solid var(--line); border-radius: var(--r-card); padding: var(--sp-5); display: flex; flex-direction: column; gap: var(--sp-3); }
.social-card .foll { font-size: 27px; font-weight: 700; color: var(--ink); letter-spacing: -.01em; }
.social-card .foll .unit { font-size: 15px; font-weight: 600; color: var(--muted); }
.social-metric { display: flex; align-items: center; justify-content: space-between; font-size: 13px; padding: 5px 0; border-top: 1px solid var(--line); }
.social-metric .k { color: var(--muted); }
.social-metric .v { color: var(--ink-2); font-weight: 600; }

/* self-vs-competitor comparison rows (reuse .barrow for the bars) */
.plat-compare { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-5); }
.cmp-row { display: grid; grid-template-columns: 1fr auto; gap: 4px var(--sp-4); align-items: center; padding: var(--sp-3) 0; border-bottom: 1px solid var(--line); }
.cmp-row:last-child { border-bottom: none; }
.cmp-row .cmp-k { font-size: 13px; color: var(--ink-2); }
.cmp-row .cmp-v { font-weight: 700; font-size: 14px; }

/* mini trend sparkline — inline SVG <polyline stroke="currentColor">, colored by class */
.spark { display: block; width: 100%; height: 32px; color: var(--accent); overflow: visible; }
.spark.good { color: var(--good); }
.spark.bad { color: var(--bad); }
.spark polyline { fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.spark .area { fill: currentColor; opacity: .10; stroke: none; }

/* progress ring — SVG, set --p (0..1) inline. r=28 → circumference 175.9 */
.ring { width: 68px; height: 68px; flex: none; }
.ring circle { fill: none; stroke-width: 6; }
.ring .track { stroke: var(--raised); }
.ring .val { stroke: var(--accent); stroke-linecap: round; transform: rotate(-90deg); transform-origin: 50% 50%; stroke-dasharray: 175.9; stroke-dashoffset: calc(175.9 - 175.9 * var(--p, 0)); transition: stroke-dashoffset .8s var(--ease-out); }
.ring.good .val { stroke: var(--good); }
.ring-wrap { position: relative; display: inline-grid; place-items: center; }
.ring-wrap .ring-num { position: absolute; font-size: 18px; font-weight: 700; color: var(--ink); }

/* connect-account row (settings → connections) */
.connect-row { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); padding: var(--sp-4) 0; border-bottom: 1px solid var(--line); }
.connect-row:last-child { border-bottom: none; }
.connect-row .ci { display: flex; align-items: center; gap: var(--sp-3); min-width: 0; }
.connect-row .ci .c-title { font-size: 14px; font-weight: 600; color: var(--ink); }
.connect-row .ci .c-desc { font-size: 12.5px; color: var(--muted); margin-top: 2px; }

/* add-competitor search + results */
.search-box { position: relative; }
.search-results { margin-top: var(--sp-3); border: 1px solid var(--line-2); border-radius: var(--r-card); overflow: hidden; }
.search-result { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); padding: var(--sp-3) var(--sp-4); border-bottom: 1px solid var(--line); }
.search-result:last-child { border-bottom: none; }
@media (hover: hover) and (pointer: fine) { .search-result:hover { background: var(--raised); } }
.search-result .sr-meta { font-size: 12.5px; color: var(--muted); }

/* tracked-competitor management list */
.tracked-item { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); padding: var(--sp-3) 0; border-bottom: 1px solid var(--line); }
.tracked-item:last-child { border-bottom: none; }
.icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: var(--r-ctl); border: 1px solid var(--line-2); background: var(--surface); color: var(--muted); cursor: pointer; transition: transform .12s var(--ease-out), color .16s var(--ease-out), border-color .16s var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .icon-btn:hover { color: var(--ink-2); border-color: var(--muted); } }
.icon-btn:active { transform: scale(.94); }

/* AI-visibility / query result rows */
.q-row { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); padding: var(--sp-4) 0; border-bottom: 1px solid var(--line); }
.q-row:last-child { border-bottom: none; }
.q-row .q-text { font-size: 14px; color: var(--ink-2); }
.rank-pos { font-weight: 700; font-size: 15px; }
.rank-pos.top { color: var(--good); }
.rank-pos.mid { color: var(--warm); }
.rank-pos.low { color: var(--bad); }

/* invoice / billing table reuses .data-table; a plan card */
.plan-card { border: 0; background: var(--accent-tint); border-radius: 0; padding: var(--sp-5); }

/* ============ CONTENT UNITS (posts / reels / videos) — the social centerpiece ============ */
.content-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-4); }
.content-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; display: flex; flex-direction: column; transition: transform .16s var(--ease-out), border-color .16s var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .content-card:hover { border-color: var(--line-2); transform: translateY(-2px); } }
.content-card.is-self { border-color: var(--accent); }
/* generated media tile — NEVER a scraped photo: a platform-tinted block + play glyph (reel/video) or doc glyph (post) */
.media-tile { position: relative; aspect-ratio: 16 / 10; display: grid; place-items: center; background: var(--sunken); border-bottom: 1px solid var(--line); }
.media-tile.ig { background: color-mix(in oklab, var(--accent) 9%, var(--sunken)); }
.media-tile.tt { background: color-mix(in oklab, var(--ink) 6%, var(--sunken)); }
.media-tile.fb { background: color-mix(in oklab, var(--slate) 10%, var(--sunken)); }
.media-tile .play { width: 46px; height: 46px; border-radius: 50%; background: color-mix(in oklab, var(--ink) 14%, transparent); display: grid; place-items: center; color: var(--ink); }
.media-tile .dur { position: absolute; inset-block-end: 8px; inset-inline-end: 8px; font-size: 11px; font-weight: 700; color: var(--ink); background: rgba(14, 11, 9, .6); padding: 1px 6px; border-radius: var(--r-ctl); }
.media-tile .badge { position: absolute; inset-block-start: 8px; inset-inline-start: 8px; }
.content-body { padding: var(--sp-4); display: flex; flex-direction: column; gap: var(--sp-2); }
.content-cap { font-size: 13.5px; color: var(--ink-2); line-height: 1.5; }
.content-metrics { display: flex; gap: var(--sp-4); font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
.content-metrics span b { color: var(--ink-2); font-weight: 700; }
.content-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); font-size: 12px; color: var(--muted); }
/* transcript via native <details> — no JS needed */
.transcript { border-top: 1px solid var(--line); margin-top: 2px; }
.transcript summary { list-style: none; cursor: pointer; padding: var(--sp-3) 0 var(--sp-2); font-size: 12.5px; color: var(--accent-deep); font-weight: 600; }
.transcript summary::-webkit-details-marker { display: none; }
.transcript[open] summary { color: var(--ink-2); }
.transcript .t-body { font-size: 12.5px; color: var(--muted); line-height: 1.65; padding-bottom: var(--sp-2); }
.top-comment { display: flex; gap: var(--sp-2); font-size: 12.5px; color: var(--ink-2); padding-top: var(--sp-2); border-top: 1px solid var(--line); line-height: 1.5; }
.top-comment .c-author { color: var(--muted); font-weight: 600; flex: none; }
.top-comment .c-likes { color: var(--muted); flex: none; margin-inline-start: auto; }
/* weekly posting cadence — you vs a competitor, reuse .barrow for the meter */
.cadence-row { display: grid; grid-template-columns: 92px 1fr auto; gap: var(--sp-3); align-items: center; padding: var(--sp-2) 0; }
.cadence-row .c-name { font-size: 13px; color: var(--ink-2); }
.cadence-row .c-num { font-weight: 700; font-size: 13px; color: var(--ink-2); }
/* transcript-theme chips */
.theme-chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: var(--r-pill); border: 1px solid var(--line-2); background: var(--surface); font-size: 12.5px; color: var(--ink-2); }
.theme-chip .cnt { color: var(--muted); font-weight: 700; }

/* ============ REVIEW SOURCES / EMPTY STATES ============ */
.tab .cnt { color: var(--muted); font-weight: 700; margin-inline-start: 5px; font-size: 12px; }
.tab.off { color: var(--muted); opacity: .65; }
.not-connected { display: grid; place-items: center; gap: var(--sp-3); padding: var(--sp-6) var(--sp-5); text-align: center; border: 1px dashed var(--line-2); border-radius: var(--r-card); color: var(--muted); }
.not-connected .nc-title { font-size: 14px; font-weight: 600; color: var(--ink-2); }

/* ============ RECOMMENDED CREATORS ============ */
.creator-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-3); }
.creator-card { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-4) 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: transparent; }
.creator-card .cc-body { flex: 1; min-width: 0; }
.creator-card .cc-name { font-weight: 700; color: var(--ink); font-size: 14px; }
.creator-card .cc-meta { font-size: 12.5px; color: var(--muted); margin-top: 2px; }

/* ============ RECOMMENDED PR / PLACEMENTS ============ */
.pr-item { display: flex; align-items: flex-start; gap: var(--sp-3); padding: var(--sp-4) 0; border-bottom: 1px solid var(--line); }
.pr-item:last-child { border-bottom: none; }
.pr-rank { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: var(--r-ctl); background: var(--raised); color: var(--accent-deep); font-weight: 700; font-size: 13px; flex: none; }
.pr-body { flex: 1; min-width: 0; }
.pr-name { font-weight: 700; color: var(--ink); font-size: 14px; }
.pr-why { font-size: 12.5px; color: var(--muted); margin-top: 2px; line-height: 1.5; }

/* ============ INLINE SUBMIT FORM ============ */
.inline-form { display: flex; gap: var(--sp-2); flex-wrap: wrap; align-items: center; }
.inline-form .input { flex: 1; min-width: 200px; }

/* ============ EMBED FRAME (social — real-post look) ============ */
.embed-frame { border: 1px solid var(--line-2); border-radius: var(--r-card); overflow: hidden; background: var(--surface); display: flex; flex-direction: column; }
.embed-head { display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-3) var(--sp-4); border-bottom: 1px solid var(--line); }
.embed-head .eh-name { font-weight: 700; font-size: 13px; color: var(--ink); }
.embed-head .eh-handle { font-size: 12px; color: var(--muted); }
.embed-note { padding: 6px var(--sp-4); font-size: 11px; color: var(--muted); background: var(--sunken); border-top: 1px solid var(--line); }

/* ============ EVEN-COLUMN GRIDS (fix ragged desktop widths) ============ */
.even-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-7); align-items: stretch; }
.even-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-6); align-items: stretch; }
/* equal-height card grids: children fill the row height (fixes "boxes not equal") */
.even-2 > *, .even-3 > * { min-width: 0; }
.acct-card { height: 100%; }
@media (max-width: 900px) { .even-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .creator-grid { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .even-2, .even-3 { grid-template-columns: 1fr; } }

/* ============ MOTION — signature moments only ============ */
/* logo roll-in on load + hover spin (pure rotation is RTL-safe) */
.markpie { transform-origin: 50% 50%; }
.markpie.play { animation: logoRoll .6s var(--ease-out) both; }   /* brief clean spin on load — no wobble (fires per page load, so keep it short) */
@keyframes logoRoll { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@media (hover: hover) and (pointer: fine) { .brand-mark:hover .markpie, .sb-brand:hover .markpie { animation: logoSpin .9s var(--ease-out); } }
@keyframes logoSpin { to { transform: rotate(360deg); } }

/* one-time entrance for cards/panels — visible without JS via @starting-style,
   staggered. Content is present by default; this only animates the first paint. */
@supports (transition-behavior: allow-discrete) or (animation-timeline: view()) {
  .rise { opacity: 1; transform: translateY(0); transition: opacity .22s var(--ease-out), transform .22s var(--ease-out); }
  .kpi-row .kpi-card:nth-child(2) { transition-delay: .04s; }
  .kpi-row .kpi-card:nth-child(3) { transition-delay: .08s; }
  .kpi-row .kpi-card:nth-child(4) { transition-delay: .12s; }
  /* signature data motion: bars sweep from the RTL side, the score ring fills — on first paint, no JS */
  @starting-style {
    .rise { opacity: 0; transform: translateY(8px); }
    .barrow .fill { transform: scaleX(0); }
    .ring .val { stroke-dashoffset: 175.9; }
  }
}

/* bar / percentile fills grow from the inline-END (RTL = right) */
.barrow { position: relative; height: 8px; border-radius: 0; background: var(--raised); overflow: hidden; }
.barrow .fill { height: 100%; background: var(--accent); border-radius: 0; transform: scaleX(var(--v, 0)); transform-origin: inline-end center; transition: transform .7s var(--ease-out); }

@media (prefers-reduced-motion: reduce) {
  /* drop MOVEMENT, keep comprehension fades + tactile press feedback (Emil) */
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; }
  .markpie.play, .btn-primary.hero { animation: none !important; transform: none !important; }
  .btn-primary.hero::after { display: none; }
  .rise { opacity: 1 !important; transform: none !important; transition: opacity .2s ease !important; }
  .barrow .fill { transform: scaleX(var(--v, 0)) !important; transition: none !important; }
  .ring .val, .toggle .knob { transition: none !important; }
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1100px) {
  .below-grid { grid-template-columns: 1fr; }
  .kpi-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .topbar-inner { padding-inline: var(--sp-4); gap: var(--sp-2) var(--sp-3); flex-wrap: wrap; }
  .context-line { order: 3; width: 100%; }   /* own row — never collides with the wordmark */
  /* nav becomes the hamburger drawer below — see the NAV DRAWER section */
  .social-grid, .plat-compare, .content-grid { grid-template-columns: 1fr !important; }
  .context-line { font-size: 12px; }
  .shell { padding-inline: var(--sp-4); }
  .kpi-row { grid-template-columns: 1fr; }
  .page-title { font-size: 26px; }
  .cta-band { flex-direction: column; align-items: stretch; }
  .cta-band .btn-primary { width: 100%; }
  .pro-foot { padding-inline: var(--sp-4); }
}
/* table → cards on phones: no cramped 5-col scroll. Rows become labelled cards.
   Cells must carry data-label="…" for the leading label to appear. */
@media (max-width: 560px) {
  .data-table.as-cards thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .data-table.as-cards, .data-table.as-cards tbody, .data-table.as-cards tr, .data-table.as-cards td { display: block; width: 100%; }
  .data-table.as-cards tr { border: 0; border-bottom: 1px solid var(--line-2); border-radius: 0; margin-bottom: 0; padding: var(--sp-3) 0; background: transparent; }
  .data-table.as-cards tr.is-self { background: var(--accent-tint); padding-inline: var(--sp-3); }
  .data-table.as-cards td { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); padding: 9px 0; border-bottom: 1px solid var(--line); text-align: end; }
  .data-table.as-cards td:last-child { border-bottom: none; }
  .data-table.as-cards td::before { content: attr(data-label); color: var(--muted); font-size: 12px; font-weight: 600; text-align: start; }
  .data-table.as-cards .name-cell { justify-content: flex-start; font-size: 15px; }
  .data-table.as-cards .name-cell::before { content: none; }
}

/* ============================================================================
   WAVE: modern platform logos · hamburger drawer · stats-first social ·
   content modal · signature bite-chart. RTL-native, Emil motion, tokens only.
   ============================================================================ */

/* ---------- ROUND PLATFORM LOGOS (real IG / FB / TT badges) ---------- */
/* markup: <span class="plat-logo ig"></span> — the glyph is injected by app.js
   (single source), and these brand fills render even before JS. Real platform
   colors are a deliberate exception to the harissa palette (small identity chips). */
.plat-logo { display: inline-grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%; color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.plat-logo svg { width: 58%; height: 58%; display: block; }
.plat-logo.sm { width: 18px; height: 18px; }
.plat-logo.lg { width: 40px; height: 40px; }
.plat-logo.ig { background: radial-gradient(circle at 28% 110%, #FEDA75 0 8%, #F58529 24%, #DD2A7B 52%, #8134AF 76%, #4C63D2 112%); }
.plat-logo.fb { background: #1877F2; }
.plat-logo.tt { background: #111214; }
/* .plat is the inline label wrapper (logo + platform name) */
.plat { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--ink-2); }

/* ---------- HAMBURGER + NAV DRAWER ---------- */
.nav-toggle { display: none; }
.nav-scrim { display: none; }
@media (max-width: 720px) {
  /* backdrop-filter would make the topbar the containing block for the fixed drawer
     AND clip it to the bar's height — drop it here (the drawer only exists on mobile) */
  .topbar-wrap { backdrop-filter: none; background: var(--bg); }
  .nav-toggle {
    order: -1; position: relative; z-index: 70;   /* stays above the open drawer so ✕ is tappable */
    display: inline-grid; place-items: center; width: 42px; height: 42px; flex: none;
    border-radius: var(--r-ctl); border: 1px solid var(--line-2); background: var(--surface);
    color: var(--ink-2); cursor: pointer; transition: transform .12s var(--ease-out), border-color .16s var(--ease-out);
  }
  .nav-toggle:active { transform: scale(.94); }
  .nav-toggle .bars, .nav-toggle .bars::before, .nav-toggle .bars::after { content: ""; display: block; width: 18px; height: 2px; border-radius: 2px; background: currentColor; transition: transform .26s var(--ease-drawer), opacity .18s var(--ease-out); }
  .nav-toggle .bars { position: relative; }
  .nav-toggle .bars::before { position: absolute; inset-inline-start: 0; top: -6px; }
  .nav-toggle .bars::after  { position: absolute; inset-inline-start: 0; top: 6px; }
  [data-nav="open"] .nav-toggle .bars { background: transparent; }
  [data-nav="open"] .nav-toggle .bars::before { transform: translateY(6px) rotate(45deg); }
  [data-nav="open"] .nav-toggle .bars::after  { transform: translateY(-6px) rotate(-45deg); }

  /* the drawer IS the existing .main-nav, taken off-canvas from the inline-end */
  .main-nav {
    position: fixed; inset-block: 0; inset-inline-start: 0; z-index: var(--z-modal);
    width: min(80vw, 300px); flex-direction: column; align-items: stretch; gap: 3px;
    padding: calc(var(--sp-7) + var(--sp-4)) var(--sp-4) var(--sp-5);
    background: var(--surface); border-inline-end: 1px solid var(--line-2);
    box-shadow: -18px 0 52px rgba(0,0,0,.45);
    transform: translateX(100%); transition: transform .28s var(--ease-drawer);
    overflow-y: auto; overscroll-behavior: contain;
  }
  [data-nav="open"] .main-nav { transform: translateX(0); }
  .main-nav a { min-height: 48px; width: 100%; padding-inline: var(--sp-4); font-size: 15px; }
  .main-nav a.active { background: var(--accent-tint); border-color: var(--accent); }

  /* scrim sits BELOW the topbar's stacking context (z-nav:20) so the topbar + its
     drawer render above it; still above the page (z 0) so content dims behind it */
  .nav-scrim { display: block; position: fixed; inset: 0; z-index: 10; background: rgba(10,8,6,.5); backdrop-filter: blur(1px); opacity: 0; visibility: hidden; transition: opacity .24s var(--ease-out), visibility .24s; }
  [data-nav="open"] .nav-scrim { opacity: 1; visibility: visible; }
  html[data-nav="open"] { overflow: hidden; }
}

/* ---------- STATS-FIRST SOCIAL — account cards + small thumbnail strip ---------- */
.acct-card { background: transparent; border: 0; border-top: 1px solid var(--line-2); border-radius: 0; padding: var(--sp-4) 0 0; display: flex; flex-direction: column; gap: var(--sp-4); }
.acct-card.is-self { border-top-color: var(--accent); }
.acct-top { display: flex; align-items: center; gap: var(--sp-3); }
.acct-id { min-width: 0; }
.acct-name { font-size: 15px; font-weight: 700; color: var(--ink); display: flex; align-items: center; gap: var(--sp-2); }
.acct-handle { font-size: 12.5px; color: var(--muted); }
.acct-foll { margin-inline-start: auto; text-align: end; flex: none; }
.acct-foll .n { font-size: 22px; font-weight: 700; color: var(--ink); letter-spacing: -.01em; display: block; line-height: 1.1; }
.acct-foll .l { font-size: 11.5px; color: var(--muted); }
.acct-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-3); padding-top: var(--sp-3); border-top: 1px solid var(--line); }
.acct-stat { display: flex; flex-direction: column; gap: 1px; }
.acct-stat .sv { font-size: 15px; font-weight: 700; color: var(--ink-2); }
.acct-stat .sl { font-size: 11.5px; color: var(--muted); }
.acct-strip-label { font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: var(--sp-2); }

.thumb-strip { display: flex; gap: var(--sp-2); overflow-x: auto; padding-block: 2px 4px; scroll-snap-type: x proximity; overscroll-behavior-x: contain; scrollbar-width: thin; }
.thumb-strip::-webkit-scrollbar { height: 6px; }
.thumb-strip::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 3px; }
.thumb { position: relative; flex: 0 0 auto; width: 68px; height: 68px; border-radius: var(--r-ctl); border: 1px solid var(--line); background: var(--sunken); cursor: pointer; overflow: hidden; scroll-snap-align: start; display: grid; place-items: center; color: var(--ink); transition: transform .14s var(--ease-out), border-color .16s var(--ease-out); }
.thumb.ig { background: color-mix(in oklab, var(--accent) 13%, var(--sunken)); }
.thumb.tt { background: color-mix(in oklab, var(--ink) 8%, var(--sunken)); }
.thumb.fb { background: color-mix(in oklab, var(--slate) 13%, var(--sunken)); }
@media (hover: hover) and (pointer: fine) { .thumb:hover { border-color: var(--accent); transform: translateY(-2px); } }
.thumb:active { transform: scale(.95); }
.thumb .tk { position: absolute; inset-block-start: 3px; inset-inline-start: 3px; width: 15px; height: 15px; border-radius: 50%; background: rgba(14,11,9,.55); display: grid; place-items: center; color: #fff; }
.thumb .tk svg { width: 9px; height: 9px; display: block; }
.thumb .tv { position: absolute; inset-block-end: 0; inset-inline: 0; padding: 9px 3px 3px; font-size: 10.5px; font-weight: 700; color: #fff; text-align: center; background: linear-gradient(transparent, rgba(14,11,9,.74)); }

/* ---------- CONTENT-PIECE MODAL (native <dialog>) ---------- */
.cx-modal { border: none; padding: 0; background: transparent; max-width: 100vw; max-height: 100dvh; color: var(--ink); }
.cx-modal::backdrop { background: rgba(8, 6, 5, .62); }
.cx-panel { position: relative; width: min(92vw, 600px); max-height: 88dvh; overflow-y: auto; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-card); box-shadow: 0 24px 70px rgba(0, 0, 0, .5); }
.cx-modal[open] { animation: cxIn .24s var(--ease-out) both; }
.cx-modal[open]::backdrop { animation: cxFade .24s var(--ease-out) both; }
@keyframes cxIn { from { opacity: 0; transform: translateY(10px) scale(.97); } }
@keyframes cxFade { from { opacity: 0; } }
.cx-close { position: absolute; inset-block-start: var(--sp-3); inset-inline-end: var(--sp-3); z-index: 2; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line-2); background: color-mix(in oklab, var(--sunken) 82%, transparent); color: var(--ink-2); font-size: 14px; cursor: pointer; display: grid; place-items: center; transition: transform .12s var(--ease-out), color .16s var(--ease-out); }
.cx-close:active { transform: scale(.94); }
@media (hover: hover) and (pointer: fine) { .cx-close:hover { color: var(--ink); } }
.cx-media { position: relative; aspect-ratio: 16 / 10; display: grid; place-items: center; border-radius: var(--r-card) var(--r-card) 0 0; }
.cx-media.ig { background: color-mix(in oklab, var(--accent) 15%, var(--sunken)); color: var(--accent-deep); }
.cx-media.tt { background: color-mix(in oklab, var(--ink) 10%, var(--sunken)); color: var(--ink-2); }
.cx-media.fb { background: color-mix(in oklab, var(--slate) 17%, var(--sunken)); color: var(--slate); }
.cx-play { width: 56px; height: 56px; border-radius: 50%; background: color-mix(in oklab, var(--ink) 16%, transparent); display: grid; place-items: center; color: var(--ink); }
.cx-dur { position: absolute; inset-block-end: 10px; inset-inline-end: 10px; font-size: 12px; font-weight: 700; color: #fff; background: rgba(14, 11, 9, .6); padding: 2px 7px; border-radius: var(--r-ctl); }
.cx-badge { position: absolute; inset-block-start: 10px; inset-inline-start: 10px; }
.cx-detail { padding: var(--sp-5); display: flex; flex-direction: column; gap: var(--sp-4); }
.cx-head { display: flex; align-items: center; gap: var(--sp-2); }
.cx-acct { font-weight: 700; color: var(--ink); }
.cx-handle { font-size: 12.5px; color: var(--muted); }
.cx-cap { font-size: 15px; color: var(--ink); line-height: 1.55; }
.cx-block { border-top: 1px solid var(--line); padding-top: var(--sp-3); }
.cx-block-k { font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
.cx-transcript { font-size: 13.5px; color: var(--ink-2); line-height: 1.7; }
.cx-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); font-size: 12.5px; color: var(--muted); padding-top: var(--sp-3); border-top: 1px solid var(--line); }

/* ---------- SIGNATURE BITE-CHART (grow from 0, then the corner is bitten off) ---------- */
/* The bite is a toothed notch at the TOP-RIGHT — same side as the logo mark, and
   like the logo it is NOT mirrored in RTL (physical right). */
.bitchart { display: flex; align-items: flex-end; justify-content: center; gap: var(--sp-6); min-height: 178px; padding-block-start: var(--sp-3); }
.bitbar-wrap { display: flex; flex-direction: column; align-items: center; gap: var(--sp-3); }
.bitbar {
  position: relative; width: 54px; height: var(--h, 120px); border-radius: 0;
  background: linear-gradient(180deg, var(--accent-deep), var(--accent) 58%, #B4472A);
  transform-origin: bottom center; overflow: visible;
  animation: bitGrow .5s var(--ease-out) both; animation-delay: var(--d, 0s);
}
.bitbar.tall { background: linear-gradient(180deg, var(--accent-deep), var(--accent) 52%, #A23E24); }
@keyframes bitGrow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
/* the bite: rounded surface-colored SCOOPS eat into the TOP-RIGHT corner (same side as the
   logo, not mirrored) AFTER the bar has grown — a cookie/apple bite, not sharp teeth. */
.bitbar .scoop { position: absolute; border-radius: 50%; background: var(--surface); transform: scale(0); animation: scoopBite .3s var(--ease-out) both; }
.bitbar .scoop.s1 { width: 30px; height: 30px; top: -8px;  right: -8px; transform-origin: 30% 70%; animation-delay: calc(var(--d, 0s) + .5s); }
.bitbar .scoop.s2 { width: 21px; height: 21px; top: -6px;  right: 15px; transform-origin: 60% 80%; animation-delay: calc(var(--d, 0s) + .56s); }
.bitbar .scoop.s3 { width: 18px; height: 18px; top: 14px;  right: -6px; transform-origin: 30% 50%; animation-delay: calc(var(--d, 0s) + .61s); }
@keyframes scoopBite { from { transform: scale(0); } to { transform: scale(1); } }
/* crumbs — harissa specks that pop out of the bite, then drift up-and-out and fade */
.bitbar .crumb { position: absolute; border-radius: 50%; background: var(--accent-deep); opacity: 0; animation: crumbPop .55s var(--ease-out) both; }
.bitbar .crumb.k1 { width: 4px; height: 4px; top: -3px; right: 3px;  animation-delay: calc(var(--d, 0s) + .64s); }
.bitbar .crumb.k2 { width: 3px; height: 3px; top: 6px;  right: -9px; animation-delay: calc(var(--d, 0s) + .69s); }
.bitbar .crumb.k3 { width: 5px; height: 5px; top: -10px; right: 13px; animation-delay: calc(var(--d, 0s) + .73s); }
/* crumbs pop out of the bite and settle as little specks (like the reference), not vanish */
@keyframes crumbPop { 0% { opacity: 0; transform: scale(.2); } 60% { opacity: 1; } 100% { opacity: 1; transform: scale(1); } }
.bitbar-cap { display: flex; flex-direction: column; align-items: center; gap: 1px; }
.bitbar-v { font-size: 15px; font-weight: 700; color: var(--ink); }
.bitbar-l { font-size: 12px; color: var(--muted); }

/* ---------- UNIFIED CONTENT LIST — all posts across sources, sortable (opens the modal) ---------- */
.cl-controls { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }
.cl-controls .cl-label { font-size: 12.5px; color: var(--muted); }
.content-list { display: flex; flex-direction: column; }
.cl-row { display: grid; grid-template-columns: 54px minmax(0, 1fr) auto; gap: var(--sp-2) var(--sp-4); align-items: center; width: 100%; padding: var(--sp-3) 0; border: 0; border-bottom: 1px solid var(--line); background: none; color: inherit; text-align: start; cursor: pointer; transition: background-color .14s var(--ease-out); }
.cl-row:last-child { border-bottom: none; }
@media (hover: hover) and (pointer: fine) { .cl-row:hover { background: var(--raised); } }
.cl-row:active { transform: scale(.995); }
.cl-thumb { position: relative; width: 54px; height: 54px; border-radius: var(--r-ctl); overflow: hidden; display: grid; place-items: center; color: #fff; flex: none; }
.cl-thumb.ig { background: color-mix(in oklab, var(--accent) 13%, var(--sunken)); }
.cl-thumb.tt { background: color-mix(in oklab, var(--ink) 8%, var(--sunken)); }
.cl-thumb.fb { background: color-mix(in oklab, var(--slate) 13%, var(--sunken)); }
.cl-thumb .plat-logo { position: absolute; inset-block-end: -3px; inset-inline-end: -3px; box-shadow: 0 0 0 2px var(--surface); }
.cl-thumb .tk svg { width: 15px; height: 15px; display: block; opacity: .92; }
.cl-main { min-width: 0; }
.cl-cap { font-size: 13.5px; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl-meta { display: flex; align-items: center; gap: var(--sp-2); margin-top: 3px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.cl-src { font-weight: 600; color: var(--ink-2); }
.cl-row.is-self .cl-src { color: var(--accent-deep); }
.cl-badge { font-size: 10.5px; font-weight: 700; padding: 1px 6px; border-radius: var(--r-pill); }
.cl-badge.self { color: var(--on-accent); background: var(--accent); }
.cl-badge.comp { color: var(--slate); background: var(--surface); border: 1px solid var(--line-2); }
.cl-badge.creator { color: var(--warm); background: rgba(233, 162, 74, .13); }
.cl-metrics { display: flex; gap: var(--sp-4); font-size: 12.5px; color: var(--muted); text-align: end; white-space: nowrap; }
.cl-metrics b { color: var(--ink); font-weight: 700; }
@media (max-width: 560px) {
  .cl-row { grid-template-columns: 48px minmax(0, 1fr); }
  .cl-thumb { width: 48px; height: 48px; }
  .cl-metrics { grid-column: 1 / -1; justify-content: flex-start; gap: var(--sp-3); padding-inline-start: calc(48px + var(--sp-4)); }
}

/* ---------- REVIEWS MODULE WAVE (v6): composer · policy flags · chat · QR · wizard ---------- */
/* copy-to-clipboard button feedback (app.js data-copy) */
.btn-ghost.copied, .btn-primary.copied { border-color: var(--good); color: var(--good); }
/* guided response composer (per-review, native <details>) */
.composer { border-top: 1px solid var(--line); margin-top: var(--sp-3); }
.composer summary { list-style: none; cursor: pointer; padding: var(--sp-2) 0; font-size: 13px; color: var(--accent-deep); font-weight: 600; }
.composer summary::-webkit-details-marker { display: none; }
.composer .cp-body { display: flex; flex-direction: column; gap: var(--sp-3); padding: var(--sp-2) 0 var(--sp-3); }
.composer textarea { width: 100%; min-height: 96px; padding: var(--sp-3) var(--sp-4); border-radius: var(--r-ctl); border: 1px solid var(--line-2); background: var(--sunken); color: var(--ink); font-family: inherit; font-size: 13.5px; line-height: 1.6; resize: vertical; }
.composer textarea:focus { border-color: var(--accent); outline: none; }
.cp-actions { display: flex; gap: var(--sp-2); flex-wrap: wrap; }
/* policy-breach flag + removal helper */
.policy-box { border: 1px dashed var(--line-2); border-radius: var(--r-ctl); background: var(--sunken); padding: var(--sp-3) var(--sp-4); font-size: 12.5px; color: var(--ink-2); line-height: 1.6; }
.policy-box .pb-title { font-weight: 700; color: var(--warm); margin-bottom: 4px; }
/* chat mock (answer reviews from our own chat / WhatsApp) */
.chat-mock { display: flex; flex-direction: column; gap: var(--sp-2); padding: var(--sp-4); border: 1px solid var(--line); border-radius: var(--r-card); background: var(--sunken); }
.cm-bubble { max-width: 85%; padding: var(--sp-2) var(--sp-3); border-radius: 12px; font-size: 13px; line-height: 1.55; }
.cm-bubble.in { align-self: flex-start; background: var(--raised); color: var(--ink-2); border-start-start-radius: 4px; }
.cm-bubble.out { align-self: flex-end; background: var(--accent-tint); color: var(--ink); border: 1px solid var(--line-2); border-start-end-radius: 4px; }
.cm-meta { font-size: 11px; color: var(--muted); margin-top: 2px; }
.cm-bubble .cm-review { border-inline-start: 2px solid var(--accent); padding-inline-start: var(--sp-2); margin-bottom: 6px; color: var(--muted); font-size: 12px; }
/* QR tiles */
.qr-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: var(--sp-4); }
@media (max-width: 640px) { .qr-grid { grid-template-columns: 1fr; } }
.qr-card { display: flex; gap: var(--sp-4); padding: var(--sp-4) 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: transparent; align-items: center; }
.qr-img { width: 84px; height: 84px; flex: none; border-radius: var(--r-ctl); background:
  repeating-linear-gradient(0deg, var(--ink-2) 0 4px, transparent 4px 8px),
  repeating-linear-gradient(90deg, var(--ink-2) 0 4px, transparent 4px 8px), var(--sunken);
  background-blend-mode: multiply; border: 4px solid #fff; opacity: .92; }
.qr-body { min-width: 0; flex: 1; }
.qr-name { font-weight: 700; color: var(--ink); font-size: 14px; }
.qr-dest { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.qr-stats { font-size: 12.5px; color: var(--ink-2); margin-top: 6px; }
/* onboarding wizard */
.wz-steps { display: flex; align-items: center; gap: var(--sp-2); margin-bottom: var(--sp-6); flex-wrap: wrap; }
.wz-dot { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.wz-dot .n { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--surface); font-size: 12px; }
.wz-dot.done .n { background: var(--accent-tint); border-color: var(--accent); color: var(--accent-deep); }
.wz-dot.now { color: var(--ink); }
.wz-dot.now .n { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.wz-sep { width: 22px; height: 1px; background: var(--line-2); }
.wz-pane { display: none; }
.wz-pane.now { display: block; }
.wz-actions { display: flex; justify-content: space-between; gap: var(--sp-3); margin-top: var(--sp-5); }
/* oauth connect row (REAL provider connect — never a mocked consent screen) */
.oauth-row { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-4) 0; border: 0; border-top: 1px solid var(--line-2); border-radius: 0; background: transparent; }
.oauth-row .oa-body { flex: 1; min-width: 0; }
.oauth-row .oa-name { font-weight: 700; color: var(--ink); font-size: 14px; }
.oauth-row .oa-desc { font-size: 12.5px; color: var(--muted); margin-top: 2px; }

@media (prefers-reduced-motion: reduce) {
  .main-nav, .sidebar { transition: none; }
  .nav-toggle .bars, .nav-toggle .bars::before, .nav-toggle .bars::after { transition: none; }
  .cx-modal[open], .cx-modal[open]::backdrop { animation: cxFade .18s ease both; }
  /* bite-chart: show the final bitten bars + crumbs statically, no growth/chomp motion */
  .bitbar { animation: none; }
  .bitbar .scoop { animation: none; transform: scale(1); }
  .bitbar .crumb { animation: none; opacity: 1; transform: none; }
}

/* ============================================================================
   V7 — SaaS SHELL: right sidebar (RTL start) + grouped nav + account block,
   toolbar/filters (dd dropdowns, chips), tier table. Topbar classes above are
   KEPT for root-mock/flow; dashboard pages use this shell.
   ============================================================================ */

/* ---------- SIDEBAR LAYOUT ---------- */
body.sb-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); }
.sb-main { min-width: 0; display: flex; flex-direction: column; min-height: 100dvh; }
.sb-main .shell { width: 100%; }
.sb-main .pro-foot { margin-top: auto; }

.sidebar { position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; background: var(--bg); border-inline-end: 1px solid var(--line-2); z-index: var(--z-nav); }

/* brand row + desktop collapse control */
.sb-head { display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-5) var(--sp-4) var(--sp-3) var(--sp-5); }
.sb-brand { display: flex; align-items: center; gap: var(--sp-2); min-width: 0; flex: 1; }
.sb-brand svg { width: 24px; height: 24px; flex: none; }
.sb-brand .brand-name { font-size: 18px; white-space: nowrap; }
.sb-collapse { flex: none; display: none; place-items: center; width: 30px; height: 30px; border: 1px solid var(--line-2); border-radius: var(--r-ctl); background: var(--surface); color: var(--muted); cursor: pointer; transition: color .16s var(--ease-out), border-color .16s var(--ease-out); }
.sb-collapse svg { width: 15px; height: 15px; transition: transform .24s var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .sb-collapse:hover { color: var(--ink); border-color: var(--muted); } }

/* scrollable groups — thin themed scrollbar + edge fade so overflow reads clean */
.sb-groups { flex: 1; overflow-y: auto; overflow-x: hidden; padding: var(--sp-2) 0 var(--sp-4); overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 14px, #000 calc(100% - 16px), transparent 100%); mask-image: linear-gradient(to bottom, transparent 0, #000 14px, #000 calc(100% - 16px), transparent 100%); }
.sb-groups::-webkit-scrollbar { width: 8px; }
.sb-groups::-webkit-scrollbar-track { background: transparent; }
.sb-groups::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 99px; border: 2px solid transparent; background-clip: padding-box; }
.sb-groups:hover::-webkit-scrollbar-thumb { background: var(--muted); background-clip: padding-box; }

/* collapsible pillar group */
.sb-group + .sb-group { margin-top: 2px; }
.sb-group-head { display: flex; align-items: center; gap: var(--sp-2); width: 100%; padding: var(--sp-3) var(--sp-5) var(--sp-2); background: none; border: 0; cursor: pointer; font-family: inherit; text-align: start; color: var(--ink-2); transition: color .16s var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .sb-group-head:hover { color: var(--ink); } .sb-group-head:hover .sb-chev { color: var(--ink-2); } }
.sb-group-label { font-size: 13.5px; font-weight: 700; letter-spacing: .01em; color: inherit; }
.sb-chev { margin-inline-start: auto; flex: none; width: 15px; height: 15px; color: var(--muted); transition: transform .24s var(--ease-out), color .16s var(--ease-out); }
.sb-group.collapsed .sb-chev { transform: rotate(-90deg); }
.sb-group-items { display: grid; grid-template-rows: 1fr; transition: grid-template-rows .26s var(--ease-out); }
.sb-group.collapsed .sb-group-items { grid-template-rows: 0fr; }
.sb-group-inner { overflow: hidden; min-height: 0; }

.sb-item { display: flex; align-items: center; gap: var(--sp-2); min-height: 38px; padding: 8px var(--sp-5); font-size: 14px; font-weight: 600; color: var(--muted); transition: color .16s var(--ease-out), background-color .16s var(--ease-out); }
.sb-item.active { background: var(--accent-tint); color: var(--ink); }
@media (hover: hover) and (pointer: fine) { .sb-item:not(.active):hover { color: var(--ink-2); background: var(--surface); } }
.sb-pro-tag { margin-inline-start: auto; font-size: 10px; font-weight: 700; color: var(--accent-deep); }
.sb-account { border-top: 1px solid var(--line-2); padding: var(--sp-4) var(--sp-5); display: flex; flex-direction: column; gap: var(--sp-3); }

/* desktop-only: collapse the whole sidebar to a slim rail (mobile uses the drawer) */
@media (min-width: 1001px) {
  body.sb-layout { transition: grid-template-columns .28s var(--ease-out); }
  .sb-collapse { display: inline-grid; }
  body.sb-collapsed { grid-template-columns: 56px minmax(0, 1fr); }
  body.sb-collapsed .sb-head { padding-inline: 0; justify-content: center; }
  body.sb-collapsed .sb-brand { display: none; }
  body.sb-collapsed .sb-collapse svg { transform: scaleX(-1); }
  body.sb-collapsed .sb-groups { opacity: 0; visibility: hidden; pointer-events: none; }
  body.sb-collapsed .sb-account { padding-inline: 0; align-items: center; }
  body.sb-collapsed .sb-acct-row { justify-content: center; }
  body.sb-collapsed .sa-body, body.sb-collapsed .sb-acct-links, body.sb-collapsed .sa-updated { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  body.sb-layout, .sb-group-items, .sb-chev, .sb-collapse svg { transition: none; }
}
.sb-acct-row { display: flex; align-items: center; gap: var(--sp-3); }
.sa-body { min-width: 0; }
.sa-name { font-size: 14px; font-weight: 700; color: var(--ink); }
.sa-meta { font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.sb-acct-links { display: flex; gap: var(--sp-4); font-size: 12.5px; }
.sb-acct-links a { color: var(--ink-2); font-weight: 600; }
@media (hover: hover) and (pointer: fine) { .sb-acct-links a:hover { color: var(--accent-deep); } }
.sa-updated { font-size: 11px; color: var(--muted); }

/* slim mobile top bar (hidden on desktop) */
.mobile-top { display: none; }
.mobile-top .nav-toggle { order: 0; position: relative; z-index: 1; display: inline-grid; place-items: center; width: 42px; height: 42px; flex: none; border-radius: var(--r-ctl); border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); cursor: pointer; transition: transform .12s var(--ease-out); }
.mobile-top .nav-toggle:active { transform: scale(.94); }

@media (max-width: 1000px) {
  body.sb-layout { display: block; }
  .mobile-top { display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: var(--z-dropdown); background: var(--bg); border-bottom: 1px solid var(--line); padding: var(--sp-3) var(--sp-4); }
  html[data-nav="open"] { overflow: hidden; }
  .sidebar {
    position: fixed; inset-block: 0; inset-inline-start: 0; height: 100dvh;
    width: min(80vw, 300px); z-index: var(--z-modal);
    box-shadow: -18px 0 52px rgba(0, 0, 0, .45);
    transform: translateX(100%); transition: transform .28s var(--ease-drawer);
  }
  [data-nav="open"] .sidebar { transform: translateX(0); }
  .sb-layout .nav-scrim { display: block; position: fixed; inset: 0; z-index: var(--z-sticky); background: rgba(10, 8, 6, .5); backdrop-filter: blur(1px); opacity: 0; visibility: hidden; transition: opacity .24s var(--ease-out), visibility .24s; }
  [data-nav="open"] .nav-scrim { opacity: 1; visibility: visible; }
  .mobile-top .nav-toggle .bars, .mobile-top .nav-toggle .bars::before, .mobile-top .nav-toggle .bars::after { content: ""; display: block; width: 18px; height: 2px; border-radius: 2px; background: currentColor; transition: transform .26s var(--ease-drawer), opacity .18s var(--ease-out); }
  .mobile-top .nav-toggle .bars { position: relative; }
  .mobile-top .nav-toggle .bars::before { position: absolute; inset-inline-start: 0; top: -6px; }
  .mobile-top .nav-toggle .bars::after { position: absolute; inset-inline-start: 0; top: 6px; }
  [data-nav="open"] .mobile-top .nav-toggle .bars { background: transparent; }
  [data-nav="open"] .mobile-top .nav-toggle .bars::before { transform: translateY(6px) rotate(45deg); }
  [data-nav="open"] .mobile-top .nav-toggle .bars::after { transform: translateY(-6px) rotate(-45deg); }
}

/* ---------- TOOLBAR + DROPDOWN FILTERS (SaaS filters: dates, multi-choice) ---------- */
.toolbar { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; margin-bottom: var(--sp-5); }
.toolbar .input { max-width: 220px; min-height: 40px; }
details.dd { position: relative; }
details.dd > summary { list-style: none; }
details.dd > summary::-webkit-details-marker { display: none; }
details.dd > summary .sort-arrow { color: var(--muted); }
details.dd[open] > summary { border-color: var(--accent); color: var(--ink); }
.dd-menu { position: absolute; inset-inline-start: 0; top: calc(100% + 6px); min-width: 220px; max-width: min(300px, calc(100vw - var(--sp-6))); background: var(--surface); border: 1px solid var(--line-2); z-index: var(--z-dropdown); box-shadow: 0 14px 40px rgba(0, 0, 0, .45); padding: var(--sp-2) 0; }
/* narrow screens: search takes its own full row; dd menus clamp inside the viewport */
@media (max-width: 560px) {
  .toolbar { gap: var(--sp-3); }
  .toolbar .input { max-width: none; flex: 1 1 100%; order: 9; }
  .dd-menu { min-width: min(220px, 82vw); }
}
.dd-item { display: flex; align-items: center; gap: var(--sp-2); width: 100%; padding: 9px var(--sp-4); font-size: 13.5px; font-weight: 500; color: var(--ink-2); cursor: pointer; background: none; border: 0; text-align: start; font-family: inherit; }
.dd-item.active { color: var(--ink); background: var(--accent-tint); font-weight: 600; }
@media (hover: hover) and (pointer: fine) { .dd-item:hover { background: var(--raised); } }
.dd-item input[type="checkbox"] { accent-color: var(--accent); width: 15px; height: 15px; margin: 0; flex: none; }
.chips-applied { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }
.chip-x { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 1px solid var(--line-2); border-radius: var(--r-pill); background: var(--surface); font-size: 12.5px; font-weight: 600; color: var(--ink-2); cursor: pointer; transition: border-color .16s var(--ease-out); }
.chip-x b { font-weight: 700; color: var(--muted); }
@media (hover: hover) and (pointer: fine) { .chip-x:hover { border-color: var(--bad); } .chip-x:hover b { color: var(--bad); } }
.clear-all { font-size: 12.5px; font-weight: 600; color: var(--accent-deep); background: none; border: 0; cursor: pointer; font-family: inherit; padding: 4px; }
.result-count { font-size: 12.5px; color: var(--muted); margin-block: var(--sp-2) var(--sp-3); }
.load-more { width: 100%; margin-top: var(--sp-3); }

/* ---------- TIER TABLE (Essentials / Pro — example pricing) ---------- */
.tier-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.tier-table thead th { text-align: start; padding: var(--sp-4) var(--sp-3); border-bottom: 1px solid var(--line-2); vertical-align: bottom; }
.tier-table thead th:first-child { padding-inline-start: 0; }
.tt-tier { font-size: 16px; font-weight: 800; color: var(--ink); }
.tt-tier.pro { color: var(--accent-deep); }
.tt-price { font-size: 13px; color: var(--ink-2); font-weight: 600; margin-top: 2px; }
.tt-price-sub { font-size: 11.5px; color: var(--muted); font-weight: 500; }
.tier-table tbody td { padding: var(--sp-3); border-bottom: 1px solid var(--line); color: var(--ink-2); }
.tier-table tbody td:first-child { padding-inline-start: 0; color: var(--ink-2); }
.tier-table tbody td + td { text-align: center; width: 130px; }
.tier-table tr.tt-group td { padding-top: var(--sp-5); font-weight: 700; color: var(--ink); border-bottom: 1px solid var(--line-2); }
.tt-yes { color: var(--good); font-weight: 700; }
.tt-no { color: var(--muted); }
.tt-val { font-weight: 600; color: var(--ink-2); font-size: 13px; }
@media (max-width: 640px) { .tier-table tbody td + td { width: 84px; } .tier-table { font-size: 13px; } }

/* ============================================================================
   WAVE PRO-SOCIAL — IG-scroll feed · engagement rail · followers strip ·
   square thumb strips. Tokens + logical properties only. Emil motion rules.
   ============================================================================ */

/* visually-hidden (screen-reader labels for icon metrics) */
.vh { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- FEED PAGE SCAFFOLD ---------- */
.feed-layout { display: grid; grid-template-columns: minmax(0, 500px) minmax(300px, 1fr); gap: var(--sp-7); align-items: start; margin-bottom: var(--sp-7); }
.feed-col { min-width: 0; max-width: 500px; width: 100%; }
.feed-aside { min-width: 0; display: flex; flex-direction: column; gap: var(--sp-6); }
.feed-aside .kpi-row { grid-template-columns: repeat(2, 1fr); gap: var(--sp-5) var(--sp-6); margin-bottom: 0; }
@media (max-width: 1240px) { .feed-layout { grid-template-columns: 1fr; gap: var(--sp-6); } }
@media (max-width: 720px) { .feed-col { max-width: none; } .feed-aside .kpi-row { grid-template-columns: 1fr; } }

/* sticky sort/filter bar above the feed (offset clears the mobile top bar: 12+42+12+1px) */
.feed-controls { position: sticky; top: 0; z-index: var(--z-sticky); background: var(--bg); display: flex; flex-direction: column; gap: var(--sp-2); padding-block: var(--sp-3); border-block-end: 1px solid var(--line); }
@media (max-width: 1000px) { .feed-controls { top: 67px; } }

/* ---------- FEED — the IG-scroll unit ---------- */
/* .feed container rule shared with the alert-feed component (defined earlier) */
.feed__item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 52px;
  grid-template-areas: "head head" "media rail" "body body";
  column-gap: var(--sp-3); row-gap: var(--sp-3);
  padding-block: var(--sp-5);
  border-block-end: 1px solid var(--line);
  content-visibility: auto;
  contain-intrinsic-size: auto 620px;
}
.feed__item:last-child { border-block-end: none; }
.feed > .feed__item:first-child { padding-block-start: var(--sp-3); }

/* header row: platform chip · name · handle · badge · date at inline-end */
.feed__head { grid-area: head; display: flex; align-items: center; gap: var(--sp-2); min-height: 32px; min-width: 0; }
.feed__name { font-size: 14px; font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed__handle { flex: none; font-size: 12px; color: var(--muted); }
.feed__date { margin-inline-start: auto; flex: none; font-size: 12px; color: var(--muted); }
.feed__badge { flex: none; font-size: 10.5px; font-weight: 700; padding: 1px 6px; border-radius: var(--r-pill); }
.feed__badge.self { color: var(--on-accent); background: var(--accent); }
.feed__badge.comp { color: var(--slate); background: var(--surface); border: 1px solid var(--line-2); }
.feed__badge.creator { color: var(--warm); background: rgba(233, 162, 74, .13); }

/* media tile — a <button data-cx> that opens the content modal.
   Reels/video default 4:5; still posts add .sq for 1:1. Placeholder tint today;
   the live product drops a real <img class="feed__img" loading="lazy"> in. */
.feed__media { grid-area: media; position: relative; display: block; width: 100%; aspect-ratio: 4 / 5; padding: 0; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--sunken); overflow: hidden; cursor: pointer; color: var(--ink); transition: transform .14s var(--ease-out), border-color .16s var(--ease-out); }
.feed__media.sq { aspect-ratio: 1 / 1; }
.feed__media:active { transform: scale(.99); }
@media (hover: hover) and (pointer: fine) { .feed__media:hover { border-color: var(--line-2); } }
.feed__ph { position: absolute; inset: 0; display: grid; place-items: center; }
.feed__media.ig .feed__ph { background: linear-gradient(135deg, color-mix(in oklab, var(--accent) 24%, var(--sunken)), color-mix(in oklab, var(--accent) 7%, var(--sunken)) 62%, var(--sunken)); }
.feed__media.tt .feed__ph { background: linear-gradient(135deg, color-mix(in oklab, var(--ink) 11%, var(--sunken)), color-mix(in oklab, var(--ink) 4%, var(--sunken)) 70%, var(--sunken)); }
.feed__media.fb .feed__ph { background: linear-gradient(135deg, color-mix(in oklab, var(--slate) 16%, var(--sunken)), color-mix(in oklab, var(--slate) 5%, var(--sunken)) 70%, var(--sunken)); }
.feed__ph .play { width: 46px; height: 46px; border-radius: 50%; background: color-mix(in oklab, var(--ink) 14%, transparent); display: grid; place-items: center; color: var(--ink); }
.feed__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.feed__dur { position: absolute; inset-block-end: 8px; inset-inline-end: 8px; font-size: 11px; font-weight: 700; color: #fff; background: rgba(14, 11, 9, .6); padding: 1px 6px; border-radius: var(--r-ctl); }

/* engagement rail — vertical metric stack beside the media, bottom-anchored (Reels) */
.feed__rail { grid-area: rail; align-self: end; display: flex; flex-direction: column; align-items: center; gap: var(--sp-4); padding-block-end: var(--sp-1); }
.feed__rail-btn { display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--ink-2); -webkit-tap-highlight-color: transparent; user-select: none; transition: transform .12s var(--ease-out); }
.feed__rail-btn:active { transform: scale(.9); }
.feed__rail-btn svg { width: 24px; height: 24px; display: block; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.feed__count { font-size: 11.5px; font-weight: 700; color: var(--muted); }
@keyframes railPop { 0% { transform: scale(1); } 40% { transform: scale(1.22); } 100% { transform: scale(1); } }
.feed__rail-btn.pop svg { animation: railPop .24s var(--ease-out); }

/* caption block: 2-line clamp + "עוד" expander + metrics footnote */
.feed__body { grid-area: body; display: flex; flex-direction: column; gap: var(--sp-2); min-width: 0; }
.feed__caption { font-size: 13.5px; color: var(--ink-2); line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.feed__caption.is-open { display: block; -webkit-line-clamp: unset; }
.feed__more { align-self: flex-start; background: none; border: 0; padding: 0; font-family: inherit; font-size: 12.5px; font-weight: 600; color: var(--muted); cursor: pointer; transition: color .16s var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .feed__more:hover { color: var(--ink-2); } }
.feed__foot { display: flex; align-items: center; gap: var(--sp-3); font-size: 12px; color: var(--muted); flex-wrap: wrap; }

/* ---------- ACCT-STRIP — venue followers header (IG · TT · FB) ---------- */
.acct-strip { display: flex; align-items: stretch; gap: var(--sp-3); margin-block: var(--sp-2) var(--sp-6); }
.acct-total { flex: none; display: flex; flex-direction: column; justify-content: center; gap: 2px; padding-inline-end: var(--sp-5); border-inline-end: 1px solid var(--line-2); }
.acct-total .at-n { font-size: 27px; font-weight: 800; color: var(--ink); letter-spacing: -.01em; line-height: 1.1; }
.acct-total .at-l { font-size: 11.5px; color: var(--muted); }
.acct-total .at-d { font-size: 12px; }
.acct-chip { display: flex; align-items: center; gap: var(--sp-3); min-height: 62px; min-width: 176px; padding: var(--sp-3) var(--sp-4); border: 1px solid var(--line-2); border-radius: var(--r-ctl); background: var(--surface); color: inherit; scroll-snap-align: start; transition: transform .12s var(--ease-out), border-color .16s var(--ease-out); }
.acct-chip:active { transform: scale(.97); }
@media (hover: hover) and (pointer: fine) { .acct-chip:hover { border-color: var(--muted); } }
.acct-chip .ac-body { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.acct-chip .ac-handle { font-size: 12.5px; font-weight: 600; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acct-chip .ac-foll { font-size: 14px; font-weight: 700; color: var(--ink); white-space: nowrap; }
.acct-chip .ac-foll .fl { font-size: 11px; font-weight: 500; color: var(--muted); }
.acct-chip .ac-delta { margin-inline-start: auto; flex: none; font-size: 12px; }
.acct-chip.is-off { border-style: dashed; }
.acct-chip.is-off .plat-logo { filter: grayscale(1); opacity: .55; }
.acct-chip.is-off .ac-note { font-size: 12px; color: var(--muted); }
.acct-card[id] { scroll-margin-block-start: 84px; }
@media (max-width: 720px) {
  .acct-strip { overflow-x: auto; scroll-snap-type: x proximity; overscroll-behavior-x: contain; scrollbar-width: none; margin-inline: calc(var(--sp-4) * -1); padding-inline: var(--sp-4); padding-block-end: var(--sp-2); }
  .acct-strip::-webkit-scrollbar { display: none; }
  .acct-total { min-width: 132px; }
  .acct-chip { flex: none; }
}

/* ---------- STRIP — square IG-grid thumbnails, horizontal snap ---------- */
.strip-wrap { position: relative; }
.strip { display: flex; gap: 3px; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; padding-block-end: var(--sp-2); scrollbar-width: none; }
.strip::-webkit-scrollbar { display: none; }
.strip__thumb { position: relative; flex: 0 0 auto; width: 104px; aspect-ratio: 1 / 1; padding: 0; border: 0; border-radius: var(--r-ctl); overflow: hidden; cursor: pointer; scroll-snap-align: start; background: var(--sunken); color: #fff; display: grid; place-items: center; transition: transform .14s var(--ease-out), opacity .16s var(--ease-out); }
@media (min-width: 721px) { .strip__thumb { width: 120px; } }
.strip__thumb.ig { background: linear-gradient(160deg, color-mix(in oklab, var(--accent) 26%, var(--sunken)), color-mix(in oklab, var(--accent) 8%, var(--sunken))); }
.strip__thumb.tt { background: linear-gradient(160deg, color-mix(in oklab, var(--ink) 12%, var(--sunken)), color-mix(in oklab, var(--ink) 4%, var(--sunken))); }
.strip__thumb.fb { background: linear-gradient(160deg, color-mix(in oklab, var(--slate) 18%, var(--sunken)), color-mix(in oklab, var(--slate) 6%, var(--sunken))); }
.strip__thumb:active { transform: scale(.96); }
@media (hover: hover) and (pointer: fine) { .strip__thumb:hover { opacity: .88; } }
.strip__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.strip__tk { position: absolute; inset-block-start: 6px; inset-inline-start: 6px; width: 18px; height: 18px; border-radius: 50%; background: rgba(14, 11, 9, .55); display: grid; place-items: center; }
.strip__tk svg { width: 10px; height: 10px; display: block; }
.strip__ov { position: absolute; inset-block-end: 0; inset-inline: 0; display: flex; align-items: center; gap: 4px; padding: 14px 7px 5px; font-size: 11px; font-weight: 700; color: #fff; background: linear-gradient(transparent, rgba(14, 11, 9, .78)); }
.strip__ov svg { width: 12px; height: 12px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* desktop-only hover arrows (buttons injected by app.js into .strip-wrap) */
.strip-arr { display: none; }
@media (hover: hover) and (pointer: fine) {
  .strip-arr { position: absolute; inset-block-start: calc(50% - 24px); z-index: 2; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line-2); background: color-mix(in oklab, var(--bg) 86%, transparent); color: var(--ink-2); cursor: pointer; opacity: 0; visibility: hidden; transition: opacity .16s var(--ease-out), visibility .16s, transform .12s var(--ease-out); }
  .strip-arr svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  .strip-arr[data-dir="prev"] { inset-inline-start: -6px; }
  .strip-arr[data-dir="next"] { inset-inline-end: -6px; }
  /* app is permanently RTL: "next" advances toward the content end = physical left */
  .strip-arr[data-dir="next"] svg { transform: scaleX(-1); }
  .strip-wrap:hover .strip-arr:not([disabled]) { opacity: 1; visibility: visible; }
  .strip-arr:active { transform: scale(.92); }
  .strip-arr[disabled] { opacity: 0 !important; visibility: hidden !important; }
}

@media (prefers-reduced-motion: reduce) {
  .feed__rail-btn.pop svg { animation: none; }
  .feed__media, .feed__rail-btn, .strip__thumb, .acct-chip, .strip-arr { transition: none; }
}
